public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [Fwd: MMC sub-system: SDIO block-mode with increment address issue]
       [not found] ` <20071120115104.163810ea@poseidon.drzeus.cx>
@ 2007-11-20 14:52   ` Dean Jenkins
  2007-11-20 16:39     ` Pierre Ossman
  0 siblings, 1 reply; 2+ messages in thread
From: Dean Jenkins @ 2007-11-20 14:52 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: Linux kernel mailing list

Hi Pierre,

My card driver needed to set the R/W E4MI bit in the Card Capability
register (0x08) in CCCR (function 0). Perhaps it is unnecessary ?

BTW. It is easy to for the card driver to access function 0 registers by
doing the following...

...
	int old_num = func->num;   /* note the current function number */

	/* force access to function 0 area */
	func->num = 0;

	/* enable the e4mi in the card capability register */
	x = sdio_readb(func, 0x000008, &ret);

	if ( ret == 0 ) {
		x |= 0x20;
		sdio_writeb(func, x, 0x000008, &ret);
	}

	/* restore to original function number */
	func->num = old_num; 

...

Regards,
Dean.


On Tue, 2007-11-20 at 11:51 +0100, Pierre Ossman wrote:
> On Tue, 20 Nov 2007 10:28:53 +0000
> Dean Jenkins <djenkins@...> wrote:
> 
> > Hi Pierre,
> > 
> > I've managed to find your E-mail address in the Linux kernel mailing
> > list. I hope it is OK to directly E-mail you ?
> > 
> 
> You should also find my address in the MAINTAINERS file, which is where you should look for contact info. But yes, you can contact me directly. I prefer that you also add a relevant mailing list though.
> 
> > I work for MontaVista Software in the UK. I guess you know that
> > MontaVista are using the MMC/SDIO sub-system in their latest Mobilinux
> > 5.0 product ? It is using a 2.6.21 kernel.
> > 
> > Yesterday, I sent an E-mail to you (attached) to the Linux kernel
> > mailing list. Do you have any comments to make ?
> > 
> 
> Didn't notice it. I'll have a look.
> 
> > Do you have any bug reporting facility for the MMC/SDIO sub-system ? I
> > would like to report some SDIO API limitations for the SDIO card drivers
> > that I needed to workaround. For example, my SDIO driver needs to modify
> > the contents of the Card Capability register in function 0 to enable
> > block-mode support but the card driver has been restricted to only be
> > able to use function 1. There are other registers as well that the card
> > driver needs access to.
> > 
> 
> That is by design (as you probably can tell). Letting function drivers touch card global stuff under the feet of the SDIO core is a big layering violation and bound to screw things up eventually.
> 
> Could you explain more in detail what it is you need to fiddle with in function 0 and why?
> 
> Rgds
-- 
Dean Jenkins
Embedded Software Engineer
MontaVista Software (UK)
Professional Services Division


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Fwd: MMC sub-system: SDIO block-mode with increment address issue]
  2007-11-20 14:52   ` [Fwd: MMC sub-system: SDIO block-mode with increment address issue] Dean Jenkins
@ 2007-11-20 16:39     ` Pierre Ossman
  0 siblings, 0 replies; 2+ messages in thread
From: Pierre Ossman @ 2007-11-20 16:39 UTC (permalink / raw)
  To: djenkins; +Cc: Linux kernel mailing list

On Tue, 20 Nov 2007 14:52:37 +0000
Dean Jenkins <djenkins@mvista.co.uk> wrote:

> Hi Pierre,
> 
> My card driver needed to set the R/W E4MI bit in the Card Capability
> register (0x08) in CCCR (function 0). Perhaps it is unnecessary ?
> 

That bit is pointless given the current design of the MMC layer, so it shouldn't be necessary.

> BTW. It is easy to for the card driver to access function 0 registers by
> doing the following...
> 

Of course. Any driver can do whatever it pleases since it is in kernel space. But you won't make any friends if you keep trying to bypass every system in the kernel. ;)

(Not to mention you'll have a lot more work on your hands.)

Rgds
-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  PulseAudio, core developer          http://pulseaudio.org
  rdesktop, core developer          http://www.rdesktop.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-20 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1195554533.18869.111.camel@libdev3.libertesoft.co.uk>
     [not found] ` <20071120115104.163810ea@poseidon.drzeus.cx>
2007-11-20 14:52   ` [Fwd: MMC sub-system: SDIO block-mode with increment address issue] Dean Jenkins
2007-11-20 16:39     ` Pierre Ossman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox