mpc52xx_mmap_ctl access

Grant Likely grant.likely at secretlab.ca
Wed Apr 2 15:15:35 EST 2008


On Tue, Apr 1, 2008 at 11:03 AM, Marcelo Dalmas <m_dalmas at yahoo.com.br> wrote:
> Hi all!
>
>  I'm updating a device driver from linux 2.6.16 ppc
>  tree to linux 2.6.24 powerpc in a lite5200 based
>  board.
>
>  I need to access  mpc52xx_mmap_ctl and mpc52xx_cslpc.
>
>  In ppc tree I do:
>
>   mmap_ctl =
>  ioremap(MPC52xx_PA(MPC52xx_MMAP_CTL_OFFSET),
>                      MPC52xx_MMAP_CTL_SIZE)
>
>  How can I access it in powerpc tree?

1) In your device tree, add a new node for the local plus bus control
registers with the correct base address.
2) Use of_find_compatible_node() to get a pointer to the node in your
platform init code.
3) Use of_iomap() to map the registers into the kernel address space.

Cheers,
g.

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


More information about the Linuxppc-embedded mailing list