From: Felipe Balbi <me@felipebalbi.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Felipe Balbi <me@felipebalbi.com>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Re: omap: update omap README
Date: Sun, 31 Aug 2008 18:19:28 +0300 [thread overview]
Message-ID: <20080831151925.GC9887@frodo> (raw)
In-Reply-To: <20080831135249.GA29378@flint.arm.linux.org.uk>
On Sun, Aug 31, 2008 at 02:52:49PM +0100, Russell King - ARM Linux wrote:
> On Sat, Aug 30, 2008 at 10:33:35PM +0300, Felipe Balbi wrote:
> > 4. General guidelines to write clean and OMAP Linux compatible code
> > -------------------------------------------------------------------
> >
> > +- For register access use the __raw_{read,write}[bwl]() functions. At the
> > +moment, see first example in arch/arm/plat-omap/include/mach/hardware.h.
>
> (looking at mainline) which example?
>
> > +#define OMAP_ID_REG 0xfffed400
> > +#define DPLL_CTL_REG 0xfffecf00
>
> This is unclear; it looks to me like it's trying to suggest that:
>
> __raw_readl(OMAP_ID_REG)
>
> is somehow valid. It isn't; you're passing a physical address to a
> function which takes a virtual address - I'm cooking a patch which will
> make __raw_readl() and friends only accept void __iomem pointers.
>
> The correct way is to do something like:
>
> __raw_readl(IO_ADDRESS(OMAP_ID_REG))
>
> where IO_ADDRESS is some function which translates the physical address
> to a virtual address _and_ casts to a void __iomem pointer.
>
> See my recent patch which fixes most of the virtual vs physical address
> confusion that's present in the omap kernel (which was sent for comment
> but got completely ignored.)
Cool, thanks for the review. I'll update the patch and repost soon.
--
balbi
prev parent reply other threads:[~2008-08-31 15:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-30 19:33 omap: update omap README Felipe Balbi
2008-08-31 13:52 ` Russell King - ARM Linux
2008-08-31 15:19 ` Felipe Balbi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080831151925.GC9887@frodo \
--to=me@felipebalbi.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox