PowerPC iotable_init equivalent?

Grant Likely grant.likely at secretlab.ca
Sat Apr 18 15:42:55 EST 2009


On Fri, Apr 17, 2009 at 3:21 PM, Eddie Dawydiuk <eddie at embeddedarm.com> wrote:
> Hello,
>
> In the past I've worked with ARM architectures where I could setup virtual /
> physical address mappings so I don't have to ioremap then pass around
> pointers. Does PowerPC have an equivalent abstraction? If not whats the
> recommended approach?

No.  Predefining virt->phys mappings is fragile since it makes
assumptions about how the kernel is going to carve up the virtual
address space.  Better to let the kernel allocate virtual ranges as it
needs them.

As Kumar says, do your ioremap() (or, even better: of_iomap()) in your
driver's probe function and store it in the driver's private data
structure.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.



More information about the Linuxppc-dev mailing list