SUPERH platform development
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-sh@vger.kernel.org, linux-mmc@vger.kernel.org,
	Magnus Damm <magnus.damm@gmail.com>, Chris Ball <cjb@laptop.org>
Subject: Re: [PATCH] mmc: tmio: add barriers to IO operations
Date: Thu, 24 Jan 2013 11:42:06 +0000	[thread overview]
Message-ID: <20130124114205.GD5724@linux-sh.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1301241219290.5625@axis700.grange>

On Thu, Jan 24, 2013 at 12:20:19PM +0100, Guennadi Liakhovetski wrote:
> On Thu, 24 Jan 2013, Paul Mundt wrote:
> 
> > On Wed, Jan 23, 2013 at 05:46:18PM +0100, Guennadi Liakhovetski wrote:
> > > Without barriers SDIO operations fail with runtime PM enabled.
> > > 
> > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > ---
> > >  drivers/mmc/host/tmio_mmc.h |   14 ++++++++------
> > >  1 files changed, 8 insertions(+), 6 deletions(-)
> > > 
> > > diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
> > > index d857f5c..ad1a1c6 100644
> > > --- a/drivers/mmc/host/tmio_mmc.h
> > > +++ b/drivers/mmc/host/tmio_mmc.h
> > > @@ -159,19 +159,20 @@ int tmio_mmc_host_runtime_resume(struct device *dev);
> > >  
> > >  static inline u16 sd_ctrl_read16(struct tmio_mmc_host *host, int addr)
> > >  {
> > > -	return readw(host->ctl + (addr << host->bus_shift));
> > > +	return ioread16(host->ctl + (addr << host->bus_shift));
> > >  }
> > >  
> > >  static inline void sd_ctrl_read16_rep(struct tmio_mmc_host *host, int addr,
> > >  		u16 *buf, int count)
> > >  {
> > > +	wmb();
> > >  	readsw(host->ctl + (addr << host->bus_shift), buf, count);
> > >  }
> > >  
> > Some reason to not use ioread16_rep() and friends?
> 
> Aren't they "raw," i.e. without barriers:
> 
> #define ioread16_rep(p,d,c)	__raw_readsw(p,d,c)

I wasn't talking about the barrier semantics, I meant for consistency, as
you are converting to the ioread/write API for everything else.

  reply	other threads:[~2013-01-24 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 16:46 [PATCH] mmc: tmio: add barriers to IO operations Guennadi Liakhovetski
2013-01-24 11:10 ` Paul Mundt
2013-01-24 11:20   ` Guennadi Liakhovetski
2013-01-24 11:42     ` Paul Mundt [this message]
2013-01-24 11:52       ` Guennadi Liakhovetski

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=20130124114205.GD5724@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=cjb@laptop.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.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