[PATCH] POWERPC: Support ISA legacy addresses in of_address_to_resource()

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat May 10 08:27:45 EST 2008


> m to memory or something like that.
> 
> Your suspicion is correct in a way -- this allows IO port addresses to
> make their way to 'struct resource' so that drivers can use inb(),
> outb(), etc.  After some thought, I'm not sure if a device tree using
> I/O port addresses for a legacy node is considered a bug or not.
> 
> Here is the failure case
 
.../...

Your isa node is at the root of the device-tree and not behind some kind
of PCI bridge ?

In that case, I suspect that you do need a range property that converts
ISA IO addresses to toplevel memory addresses.

That is, you keep the "1" at the beginning of the reg property of ISA
devices that use ISA IO ports, but you make the bridge range property
convert from IO to memory.

Now, that might expose different issues with of_address_to_resource()
but then we can fix them.

One thing we can do for example, is to make it find legacy ISA based on
the base of the ISA bridge and turn them back into IO ports.

Ben.




More information about the Linuxppc-dev mailing list