linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Dan Williams <dcbw@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Alagu Sankar <alagusankar@embwise.com>,
	Volker Ernst <volker.ernst@txtr.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	Holger Schurig <hs4233@mail.mn-solutions.de>,
	Bing Zhao <bzhao@marvell.com>,
	libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org,
	linux-mmc@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] libertas/sdio: 8686: set ECSI bit for 1-bit transfers
Date: Tue, 13 Apr 2010 12:29:54 +0200	[thread overview]
Message-ID: <20100413102954.GH30801@buzzloop.caiaq.de> (raw)
In-Reply-To: <1270570054.2969.3.camel@localhost.localdomain>

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@caiaq.de>
> > Cc: Alagu Sankar <alagusankar@embwise.com>
> > Cc: Volker Ernst <volker.ernst@txtr.com>
> > Cc: Dan Williams <dcbw@redhat.com>
> > Cc: John W. Linville <linville@tuxdriver.com>
> > Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
> > Cc: Bing Zhao <bzhao@marvell.com>
> > Cc: libertas-dev@lists.infradead.org
> > Cc: linux-wireless@vger.kernel.org
> > Cc: linux-mmc@vger.kernel.org
> 
> Acked-by: Dan Williams <dcbw@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
> >  
> 
> 

  reply	other threads:[~2010-04-13 10:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 17:38 [PATCH] libertas/sdio: set ECSI and SCSI bits for 1-bit transfers Daniel Mack
2010-03-30 18:37 ` Dan Williams
2010-03-30 18:40   ` Daniel Mack
2010-03-31  8:23 ` Alagu Sankar Vellaichamy
2010-03-31 13:34   ` Daniel Mack
2010-03-31  9:07 ` Michał Mirosław
     [not found]   ` <x2ve2d7436a1003310207t16a7d1d6r7853de2dfa647c6c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-03-31  9:08     ` Daniel Mack
2010-03-31  9:49       ` Michał Mirosław
2010-03-31 13:08         ` Daniel Mack
2010-03-31 13:31         ` [PATCH] libertas/sdio: set ECSI bit " Daniel Mack
2010-04-06  2:42           ` Dan Williams
2010-04-06  8:52             ` [PATCH] libertas/sdio: 8686: " Daniel Mack
2010-04-06 16:07               ` Dan Williams
2010-04-13 10:29                 ` Daniel Mack [this message]
2010-04-13 13:06                   ` John W. Linville
2010-04-13 13:21                     ` Daniel Mack

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=20100413102954.GH30801@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=alagusankar@embwise.com \
    --cc=bzhao@marvell.com \
    --cc=dcbw@redhat.com \
    --cc=hs4233@mail.mn-solutions.de \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=stable@kernel.org \
    --cc=volker.ernst@txtr.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;
as well as URLs for NNTP newsgroup(s).