Are there plans to add funtions to get the MMIO address accessible by the CPU for a node?
For example for a Raspberry Pi Zero, the serial io is
/soc/serial@7e201000
serial@7e201000 {
compatible = "arm,pl011-axi";
reg = <0x7e201000 0x200>;
interrupts = <0x02 0x19>;
clocks = <0x08 0x13 0x08 0x14>;
clock-names = "uartclk", "apb_pclk";
arm,primecell-periphid = <0x241011>;
cts-event-workaround;
skip-init;
status = "okay";
phandle = <0x1b>;
};
And in /soc:
ranges = <0x7e000000 0x20000000 0x2000000>;
So the MMIO address for the serial would be 0x20000000 + 0x7e201000 - 0x7e000000. To generalize this I think for a node you have to go through all the parent nodes from the root node, adjusting the memory offset.
Are there plans to add funtions to get the MMIO address accessible by the CPU for a node?
For example for a Raspberry Pi Zero, the serial io is
/soc/serial@7e201000And in
/soc:So the MMIO address for the serial would be
0x20000000 + 0x7e201000 - 0x7e000000. To generalize this I think for a node you have to go through all the parent nodes from the root node, adjusting the memory offset.