public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/3] ARM: OMAP: SmartReflex driver, reference source and header files
Date: Wed, 11 Jun 2008 10:40:03 -0700	[thread overview]
Message-ID: <20080611174003.GX23796@atomide.com> (raw)
In-Reply-To: <1213181284.9988.12.camel@kj-ubuntu>

Hi,

I guess you had some of the stuff I commented on already fixed earlier,
looks like I missed your integration patch.

* Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> [080611 03:47]:
> Hi,
> 
> Good comments. I'll tighten the patch-set into only two patches: regdefs
> and implementation. Some other comments below.
> 
> On ti, 2008-06-10 at 15:20 -0700, ext Tony Lindgren wrote:

<snip>

> > 
> > > +static inline void sr_write_reg(struct omap_sr *sr, int offset, u32 value)
> > > +{
> > > +	omap_writel(value, sr->srbase_addr + offset);
> > > +}
> > > +
> > > +static inline void sr_modify_reg(struct omap_sr *sr, int offset, u32 mask,
> > > +								u32 value)
> > > +{
> > > +	u32 reg_val;
> > > +
> > > +	reg_val = omap_readl(sr->srbase_addr + offset);
> > > +	reg_val &= ~mask;
> > > +	reg_val |= value;
> > > +
> > > +	omap_writel(reg_val, sr->srbase_addr + offset);
> > > +}
> > > +
> > > +static inline u32 sr_read_reg(struct omap_sr *sr, int offset)
> > > +{
> > > +	return omap_readl(sr->srbase_addr + offset);
> > > +}
> > > +
> > > +
> > 
> > The read and write registers are better done using __raw_readl/writel()
> > instead. Unless the register address is static, the function adds the
> > IO offset every time unnecessarily.
> > 
> > So please set the sr->srbase_addr = io_v2p(SOME_PHYS_ADDR) during init
> > and change the read and write to use __raw_readl/writel() instead.
> 
> did you mean "sr->srbase_addr = io_p2v(SOME_PHYS_ADDR)" ?

Yeah, sorry that's a pretty confusing typo there :)

Regards,

Tony


  reply	other threads:[~2008-06-11 17:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-06  9:49 [PATCH 1/3] ARM: OMAP: SmartReflex driver, reference source and header files Kalle Jokiniemi
2008-06-06  9:49 ` [PATCH 2/3] ARM: OMAP: SmartReflex driver: added required register and bit definitions Kalle Jokiniemi
2008-06-06  9:49   ` [PATCH 3/3] ARM: OMAP: SmartReflex driver: integration to linux-omap Kalle Jokiniemi
2008-06-10 22:20 ` [PATCH 1/3] ARM: OMAP: SmartReflex driver, reference source and header files Tony Lindgren
2008-06-11 10:48   ` Kalle Jokiniemi
2008-06-11 17:40     ` Tony Lindgren [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-06-02 11:30 Kalle Jokiniemi
2008-05-30 14:12 Kalle Jokiniemi

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=20080611174003.GX23796@atomide.com \
    --to=tony@atomide.com \
    --cc=ext-kalle.jokiniemi@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    /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