public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: "Juha Yrjölä" <juha.yrjola@solidboot.com>
To: Komal Shah <komal_shah802003@yahoo.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] ARM: OMAP: Add minimal OMAP2430 support
Date: Sun, 11 Jun 2006 13:08:02 +0300	[thread overview]
Message-ID: <448BEB82.5020609@solidboot.com> (raw)
In-Reply-To: <20060611083756.85274.qmail@web37912.mail.mud.yahoo.com>

Hi,

Komal Shah wrote:

> After looking at the files which are needed to change for
> prcm_read/write[l], clock.c needs the major update. I hope Richard is
> OK with going from __REG32(...) to __raw_read/write[l] based prcm_rw
> wrappers? 

read_reg() and write_reg() are definitely the way to go.  The __REG() 
macros are unportable, and usually even lead to inefficient assembly code.

As for which API is the most coherent, I've found that this approach 
makes the most sense:

static void __iomem *prcm_base;

static u32 prcm_read_reg(int reg);
static void prcm_write_reg(int reg, u32 value);

If you go with the readl/writel argument ordering, you'll end up with 
oddness like:

static u32 mmc_writel(struct mmc *mmc, u32 value, int reg);

You should also not expose the raw register read/write functions, but 
rather implement wrapper functions to modify the relevant registers. 
Otherwise you might run into race issues with a preemptible kernel.

Cheers,
Juha

  reply	other threads:[~2006-06-11 10:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-18 11:44 [PATCH] ARM: OMAP: Add minimal OMAP2430 support Komal Shah
2006-06-05 16:54 ` Tony Lindgren
2006-06-06  3:08   ` Komal Shah
2006-06-06 17:58     ` Tony Lindgren
2006-06-11  8:37       ` Komal Shah
2006-06-11 10:08         ` Juha Yrjölä [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-11 13:22 Woodruff, Richard
2006-06-11 13:54 ` Juha Yrjölä
2006-06-12  6:43   ` Komal Shah
2006-06-12 16:07     ` Tony Lindgren
2006-06-12 16:35       ` Komal Shah
2006-06-11 13:09 Woodruff, Richard
2006-06-11 12:15 Woodruff, Richard
2006-06-11 12:50 ` Juha Yrjölä
2006-05-21 13:50 Woodruff, Richard
2006-05-18 12:30 Woodruff, Richard
2006-05-21 12:23 ` Komal Shah
2006-05-17 10:50 Komal Shah

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=448BEB82.5020609@solidboot.com \
    --to=juha.yrjola@solidboot.com \
    --cc=komal_shah802003@yahoo.com \
    --cc=linux-omap-open-source@linux.omap.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