All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: linux-mmc@vger.kernel.org, Anton Vorontsov <cbouatmailru@gmail.com>
Subject: Re: [PATCH 1/2] mmc: sdhci: Replace SDHCI_QUIRK_FORCE_BLK_SZ_2048 with a pklatform hook.
Date: Mon, 7 Feb 2011 17:54:24 +0000	[thread overview]
Message-ID: <20110207175424.GA2065@void.printf.net> (raw)
In-Reply-To: <20110207174039.GE3123@pengutronix.de>

Hi Wolfram, thanks for the review,

On Mon, Feb 07, 2011 at 06:40:39PM +0100, Wolfram Sang wrote:
> On Sun, Feb 06, 2011 at 01:13:10AM -0500, Chris Ball wrote:
> > Part of a quirk cleanup run.  This quirk was only used by sdhci-esdhc.
> > This patch is untested.
> > 
> > Signed-off-by: Chris Ball <cjb@laptop.org>
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index 9e15f41..fcd6188 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -1962,8 +1962,8 @@ int sdhci_add_host(struct sdhci_host *host)
> >  	 * Maximum block size. This varies from controller to controller and
> >  	 * is specified in the capabilities register.
> >  	 */
> > -	if (host->quirks & SDHCI_QUIRK_FORCE_BLK_SZ_2048) {
> > -		mmc->max_blk_size = 2;
> > +	if (host->ops->get_max_blk_size) {
> > +		mmc->max_blk_size = host->ops->get_max_blk_size(host);
> >  	} else {
> >  		mmc->max_blk_size = (caps & SDHCI_MAX_BLOCK_MASK) >>
> >  				SDHCI_MAX_BLOCK_SHIFT;
> 
> I tend to think this could be fixed using io-accessors when reading the
> caps register?

Hm, I agree that it would work, but I'm not sure it's going to be
cleaner/more readable that way.  I like that here we have one place
for setting the max_blk_size, and it's obvious from the code exactly
where you need to look to see if it's been overloaded by the driver.

Thanks,

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2011-02-07 17:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06  6:13 [PATCH 1/2] mmc: sdhci: Replace SDHCI_QUIRK_FORCE_BLK_SZ_2048 with a pklatform hook Chris Ball
2011-02-07 17:40 ` Wolfram Sang
2011-02-07 17:54   ` Chris Ball [this message]
2011-02-07 18:11     ` Wolfram Sang
2011-05-29  2:27 ` Chris Ball
2011-06-01  4:00   ` Wolfram Sang
2011-06-01  4:42     ` [PATCH 1/2] mmc: sdhci: Replace SDHCI_QUIRK_FORCE_BLK_SZ_2048 with a platform hook Chris Ball
2011-06-01 15:01       ` Nicolas Pitre
2011-06-06 16:53         ` Wolfram Sang

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=20110207175424.GA2065@void.printf.net \
    --to=cjb@laptop.org \
    --cc=cbouatmailru@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=w.sang@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.