[FIXUP/FEATURE/OFW] OFW API by GuEe-GUI · Pull Request #9411 · RT-Thread/rt-thread

added 7 commits

September 10, 2024 13:14
Signed-off-by: GuEe-GUI <2991707448@qq.com>
rt_ofw_append_child append a new child node and return,
ref_get is necessary.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
Signed-off-by: GuEe-GUI <2991707448@qq.com>
Signed-off-by: GuEe-GUI <2991707448@qq.com>
The ofw parse should:
1. Check obj_name EQU the current node's rt_data.
2. Find the next object name.
3. goto "2" until obj_name EQU the cmp_cell's obj_name.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
Maybe use for memory/DMA buffer init before
ofw_node unflatten.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
DMA and CPU address view is different, we need to convert them:

    +--------+    +--------+  +---------+          +--------+
    |        |    |        |  |         |          |        |
    |  CPUs  |    |  DEV0  |  |  IOMMU  <----+     |  DEV1  |
    |        |    |        |  |         |    |     |        |
    +----+---+    +----+---+  +----+----+    |     +----+---+
         |             |           |         |          |
0x200000 |      0x1000 |    0x1000 |         |   0x8000 |
         |             |           |         |          |
         +-------------+-----------+         +----------+
         |
         |
+--------v----------------------------------------------------+
|                                                             |
|                          Address BUS                        |
|                                                             |
+-------------------------------------------------------------+

Signed-off-by: GuEe-GUI <2991707448@qq.com>

supperthomas

polarvid