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@xxxxxxxxx> wrote: > > Some controllers can't handle SDIO IRQ properly. Give a way to > > disable it. > > > > Signed-off-by: Olof Johansson <olof@xxxxxxxxx> > > --- > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html