linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* mpc52xx_mmap_ctl access
@ 2008-04-01 17:03 Marcelo Dalmas
  2008-04-02  4:15 ` Grant Likely
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Dalmas @ 2008-04-01 17:03 UTC (permalink / raw)
  To: linuxppc-embedded

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?


Thank you,

Marcelo Dalmas
 



      Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
http://br.mail.yahoo.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mpc52xx_mmap_ctl access
  2008-04-01 17:03 mpc52xx_mmap_ctl access Marcelo Dalmas
@ 2008-04-02  4:15 ` Grant Likely
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2008-04-02  4:15 UTC (permalink / raw)
  To: Marcelo Dalmas; +Cc: linuxppc-embedded

On Tue, Apr 1, 2008 at 11:03 AM, Marcelo Dalmas <m_dalmas@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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-02  4:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-01 17:03 mpc52xx_mmap_ctl access Marcelo Dalmas
2008-04-02  4:15 ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).