On Sat, 20 Jul 2019, Mark Cave-Ayland wrote:
Probably the correct solution is to create a call-parent chain much like the dma-* words which should also enable you to get rid of the hack that is pci_bus_addr_to_host_addr().
Maybe we don't need a chain up to the root for this. SLOF seems to translate adresses by looking at the parent's ranges property. See translate-address in this file:
https://github.com/aik/SLOF/blob/master/slof/fs/translate.fs
This is used to implement map-in as well:
https://github.com/aik/SLOF/blob/master/slof/fs/pci-config-bridge.fs
Maybe we should do the same (either in Forth or in C).
Regards, BALATON Zoltan