public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: zhangfei gao <zhangfei.gao@gmail.com>
Cc: Chris Ball <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH 2/4] sdhci: add quirk for broken sdio irq
Date: Wed, 15 Dec 2010 04:54:43 -0600	[thread overview]
Message-ID: <20101215105443.GA32297@lixom.net> (raw)
In-Reply-To: <AANLkTint+ObCy3Mak4E1Cj+2TS_4vbpZm57tXK_-CJ+K@mail.gmail.com>

On Wed, Dec 15, 2010 at 05:42:14AM -0500, zhangfei gao wrote:
> On Tue, Dec 14, 2010 at 11:49 PM, Olof Johansson <olof@lixom.net> wrote:
> > Some controllers can't handle SDIO IRQ properly. Give a way to
> > disable it.
> >
> > Signed-off-by: Olof Johansson <olof@lixom.net>
> > ---
> >  drivers/mmc/host/sdhci.c  |    6 +++++-
> >  include/linux/mmc/sdhci.h |    2 ++
> >  2 files changed, 7 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index c0094c1..98f3d3d 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -1871,7 +1871,10 @@ int sdhci_add_host(struct sdhci_host *host)
> >                mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200;
> >
> >        mmc->f_max = host->max_clk;
> > -       mmc->caps |= MMC_CAP_SDIO_IRQ;
> > +       mmc->caps = 0;
> > +
> > +       if (!(host->quirks & SDHCI_QUIRK_NO_SDIO_IRQ))
> > +               mmc->caps |= MMC_CAP_SDIO_IRQ;
> >
> >        /*
> >         * A controller may support 8-bit width, but the board itself
> > diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
> > index dfb2106..97d547e 100644
> > --- a/include/linux/mmc/sdhci.h
> > +++ b/include/linux/mmc/sdhci.h
> > @@ -85,6 +85,8 @@ struct sdhci_host {
> >  #define SDHCI_QUIRK_NO_HISPD_BIT                       (1<<29)
> >  /* Controller treats ADMA descriptors with length 0000h incorrectly */
> >  #define SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC           (1<<30)
> > +/* Controller should not use SDIO IRQ */
> > +#define SDHCI_QUIRK_NO_SDIO_IRQ                                (1<<31)
> 
> Just wander can we use another way instead of using the last two
> quirk, otherwise, no quirk can be used any more.
> If this is only tegra specific issue, any possibility to modify vector
> after add_host in sdhci-tegra.c.
> for example
> sdhci_add_host(host);
> host->mmc->max_seg_size = 65535;
> host->mmc->caps |= MMC_CAP_SDIO_IRQ;

Yuck. That completely breaks any kind of abstraction and layering.

> Really appreciate if not using the valuable quirk resource, which is u32.

No big deal. Next person that needs a quirk bit gets to bump the data
type to u64.


-Olof


  reply	other threads:[~2010-12-15 10:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15  4:49 [PATCH 0/4] Add SDHCI driver for Tegra Olof Johansson
2010-12-15  4:49 ` [PATCH 1/4] sdhci: add quirk for max len ADMA descriptors Olof Johansson
2010-12-15  4:49 ` [PATCH 2/4] sdhci: add quirk for broken sdio irq Olof Johansson
2010-12-15 10:42   ` zhangfei gao
2010-12-15 10:54     ` Olof Johansson [this message]
2010-12-15 11:03       ` Wolfram Sang
2010-12-15 11:24         ` Olof Johansson
2010-12-15 11:44           ` Wolfram Sang
2010-12-15 10:57   ` Wolfram Sang
2010-12-15 11:34     ` Olof Johansson
2010-12-15  4:49 ` [PATCH 3/4] sdhci: don't finish commands in flight Olof Johansson
2010-12-15  4:49 ` [PATCH 4/4] mmc: add sdhci-tegra driver for Tegra SoCs Olof Johansson
2010-12-15  8:35   ` Wolfram Sang
2010-12-15  8:43     ` Olof Johansson
2010-12-15  8:46       ` Olof Johansson
2010-12-15 10:37         ` Wolfram Sang
2010-12-15 11:40           ` Olof Johansson
2010-12-15 11:59             ` Wolfram Sang
2010-12-15 13:03               ` Olof Johansson
2010-12-15 13:40                 ` Wolfram Sang
2010-12-15 11:23   ` Mike Rapoport
2010-12-15 11:31     ` Olof Johansson
2010-12-15 11:33   ` Pavan Kondeti
2010-12-15 11:35     ` Olof Johansson
2010-12-15 11:37       ` 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=20101215105443.GA32297@lixom.net \
    --to=olof@lixom.net \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=zhangfei.gao@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