From: Dan Williams on
On Tue, 2010-04-06 at 10:52 +0200, Daniel Mack wrote:
> When operating in 1-bit mode, SDAT1 is used as dedicated interrupt line.
> However, the 8686 will only drive this line when the ECSI bit is set in
> the CCCR_IF register.
>
> Thanks to Alagu Sankar for pointing me in the right direction.
>
> Signed-off-by: Daniel Mack <daniel(a)caiaq.de>
> Cc: Alagu Sankar <alagusankar(a)embwise.com>
> Cc: Volker Ernst <volker.ernst(a)txtr.com>
> Cc: Dan Williams <dcbw(a)redhat.com>
> Cc: John W. Linville <linville(a)tuxdriver.com>
> Cc: Holger Schurig <hs4233(a)mail.mn-solutions.de>
> Cc: Bing Zhao <bzhao(a)marvell.com>
> Cc: libertas-dev(a)lists.infradead.org
> Cc: linux-wireless(a)vger.kernel.org
> Cc: linux-mmc(a)vger.kernel.org

Acked-by: Dan Williams <dcbw(a)redhat.com>

> ---
> drivers/net/wireless/libertas/if_sdio.c | 22 ++++++++++++++++++++++
> include/linux/mmc/sdio.h | 2 ++
> 2 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
> index 7a73f62..33206a9 100644
> --- a/drivers/net/wireless/libertas/if_sdio.c
> +++ b/drivers/net/wireless/libertas/if_sdio.c
> @@ -34,6 +34,8 @@
> #include <linux/mmc/card.h>
> #include <linux/mmc/sdio_func.h>
> #include <linux/mmc/sdio_ids.h>
> +#include <linux/mmc/sdio.h>
> +#include <linux/mmc/host.h>
>
> #include "host.h"
> #include "decl.h"
> @@ -942,6 +944,7 @@ static int if_sdio_probe(struct sdio_func *func,
> int ret, i;
> unsigned int model;
> struct if_sdio_packet *packet;
> + struct mmc_host *host = func->card->host;
>
> lbs_deb_enter(LBS_DEB_SDIO);
>
> @@ -1022,6 +1025,25 @@ static int if_sdio_probe(struct sdio_func *func,
> if (ret)
> goto disable;
>
> + /* For 1-bit transfers to the 8686 model, we need to enable the
> + * interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0
> + * bit to allow access to non-vendor registers. */
> + if ((card->model == IF_SDIO_MODEL_8686) &&
> + (host->caps & MMC_CAP_SDIO_IRQ) &&
> + (host->ios.bus_width == MMC_BUS_WIDTH_1)) {
> + u8 reg;
> +
> + func->card->quirks |= MMC_QUIRK_LENIENT_FN0;
> + reg = sdio_f0_readb(func, SDIO_CCCR_IF, &ret);
> + if (ret)
> + goto release_int;
> +
> + reg |= SDIO_BUS_ECSI;
> + sdio_f0_writeb(func, reg, SDIO_CCCR_IF, &ret);
> + if (ret)
> + goto release_int;
> + }
> +
> card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret);
> if (ret)
> goto release_int;
> diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h
> index 0ebaef5..329a8fa 100644
> --- a/include/linux/mmc/sdio.h
> +++ b/include/linux/mmc/sdio.h
> @@ -94,6 +94,8 @@
>
> #define SDIO_BUS_WIDTH_1BIT 0x00
> #define SDIO_BUS_WIDTH_4BIT 0x02
> +#define SDIO_BUS_ECSI 0x20 /* Enable continuous SPI interrupt */
> +#define SDIO_BUS_SCSI 0x40 /* Support continuous SPI interrupt */
>
> #define SDIO_BUS_ASYNC_INT 0x20
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Daniel Mack on
On Tue, Apr 06, 2010 at 09:07:34AM -0700, Dan Williams wrote:
> On Tue, 2010-04-06 at 10:52 +0200, Daniel Mack wrote:
> > When operating in 1-bit mode, SDAT1 is used as dedicated interrupt line.
> > However, the 8686 will only drive this line when the ECSI bit is set in
> > the CCCR_IF register.
> >
> > Thanks to Alagu Sankar for pointing me in the right direction.
> >
> > Signed-off-by: Daniel Mack <daniel(a)caiaq.de>
> > Cc: Alagu Sankar <alagusankar(a)embwise.com>
> > Cc: Volker Ernst <volker.ernst(a)txtr.com>
> > Cc: Dan Williams <dcbw(a)redhat.com>
> > Cc: John W. Linville <linville(a)tuxdriver.com>
> > Cc: Holger Schurig <hs4233(a)mail.mn-solutions.de>
> > Cc: Bing Zhao <bzhao(a)marvell.com>
> > Cc: libertas-dev(a)lists.infradead.org
> > Cc: linux-wireless(a)vger.kernel.org
> > Cc: linux-mmc(a)vger.kernel.org
>
> Acked-by: Dan Williams <dcbw(a)redhat.com>

Was this picked by anyone?
Just asking because I didn't see it in the wireless-2.6.git yet.

Thanks,
Daniel



>
> > ---
> > drivers/net/wireless/libertas/if_sdio.c | 22 ++++++++++++++++++++++
> > include/linux/mmc/sdio.h | 2 ++
> > 2 files changed, 24 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
> > index 7a73f62..33206a9 100644
> > --- a/drivers/net/wireless/libertas/if_sdio.c
> > +++ b/drivers/net/wireless/libertas/if_sdio.c
> > @@ -34,6 +34,8 @@
> > #include <linux/mmc/card.h>
> > #include <linux/mmc/sdio_func.h>
> > #include <linux/mmc/sdio_ids.h>
> > +#include <linux/mmc/sdio.h>
> > +#include <linux/mmc/host.h>
> >
> > #include "host.h"
> > #include "decl.h"
> > @@ -942,6 +944,7 @@ static int if_sdio_probe(struct sdio_func *func,
> > int ret, i;
> > unsigned int model;
> > struct if_sdio_packet *packet;
> > + struct mmc_host *host = func->card->host;
> >
> > lbs_deb_enter(LBS_DEB_SDIO);
> >
> > @@ -1022,6 +1025,25 @@ static int if_sdio_probe(struct sdio_func *func,
> > if (ret)
> > goto disable;
> >
> > + /* For 1-bit transfers to the 8686 model, we need to enable the
> > + * interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0
> > + * bit to allow access to non-vendor registers. */
> > + if ((card->model == IF_SDIO_MODEL_8686) &&
> > + (host->caps & MMC_CAP_SDIO_IRQ) &&
> > + (host->ios.bus_width == MMC_BUS_WIDTH_1)) {
> > + u8 reg;
> > +
> > + func->card->quirks |= MMC_QUIRK_LENIENT_FN0;
> > + reg = sdio_f0_readb(func, SDIO_CCCR_IF, &ret);
> > + if (ret)
> > + goto release_int;
> > +
> > + reg |= SDIO_BUS_ECSI;
> > + sdio_f0_writeb(func, reg, SDIO_CCCR_IF, &ret);
> > + if (ret)
> > + goto release_int;
> > + }
> > +
> > card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret);
> > if (ret)
> > goto release_int;
> > diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h
> > index 0ebaef5..329a8fa 100644
> > --- a/include/linux/mmc/sdio.h
> > +++ b/include/linux/mmc/sdio.h
> > @@ -94,6 +94,8 @@
> >
> > #define SDIO_BUS_WIDTH_1BIT 0x00
> > #define SDIO_BUS_WIDTH_4BIT 0x02
> > +#define SDIO_BUS_ECSI 0x20 /* Enable continuous SPI interrupt */
> > +#define SDIO_BUS_SCSI 0x40 /* Support continuous SPI interrupt */
> >
> > #define SDIO_BUS_ASYNC_INT 0x20
> >
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: John W. Linville on
On Tue, Apr 13, 2010 at 12:29:54PM +0200, Daniel Mack wrote:
> On Tue, Apr 06, 2010 at 09:07:34AM -0700, Dan Williams wrote:
> > On Tue, 2010-04-06 at 10:52 +0200, Daniel Mack wrote:
> > > When operating in 1-bit mode, SDAT1 is used as dedicated interrupt line.
> > > However, the 8686 will only drive this line when the ECSI bit is set in
> > > the CCCR_IF register.
> > >
> > > Thanks to Alagu Sankar for pointing me in the right direction.
> > >
> > > Signed-off-by: Daniel Mack <daniel(a)caiaq.de>
> > > Cc: Alagu Sankar <alagusankar(a)embwise.com>
> > > Cc: Volker Ernst <volker.ernst(a)txtr.com>
> > > Cc: Dan Williams <dcbw(a)redhat.com>
> > > Cc: John W. Linville <linville(a)tuxdriver.com>
> > > Cc: Holger Schurig <hs4233(a)mail.mn-solutions.de>
> > > Cc: Bing Zhao <bzhao(a)marvell.com>
> > > Cc: libertas-dev(a)lists.infradead.org
> > > Cc: linux-wireless(a)vger.kernel.org
> > > Cc: linux-mmc(a)vger.kernel.org
> >
> > Acked-by: Dan Williams <dcbw(a)redhat.com>
>
> Was this picked by anyone?
> Just asking because I didn't see it in the wireless-2.6.git yet.

It is in wireless-next-2.6, queued for 2.6.35.

John
--
John W. Linville Someday the world will need a hero, and you
linville(a)tuxdriver.com might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Daniel Mack on
On Tue, Apr 13, 2010 at 09:06:54AM -0400, John W. Linville wrote:
> On Tue, Apr 13, 2010 at 12:29:54PM +0200, Daniel Mack wrote:
> > Was this picked by anyone?
> > Just asking because I didn't see it in the wireless-2.6.git yet.
>
> It is in wireless-next-2.6, queued for 2.6.35.

Thanks a lot!

Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/