public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Felipe Balbi <me@felipebalbi.com>
Cc: Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Re: omap: update omap README
Date: Sun, 31 Aug 2008 14:52:49 +0100	[thread overview]
Message-ID: <20080831135249.GA29378@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20080830193330.GA9887@frodo>

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.)

  reply	other threads:[~2008-08-31 13:53 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 [this message]
2008-08-31 15:19   ` Felipe Balbi

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=20080831135249.GA29378@flint.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=me@felipebalbi.com \
    /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