2007-08-10 12:25:57

by David Vrabel

[permalink] [raw]
Subject: [patch 0/5] sdio: various bug fixes and CSR specific support

This set of 5 patches fixes a few bugs in the SDIO support and adds
stuff required for CSR chips.

1. SHDC PCI cards produced by Arasan (for prototyping their SHDC IP)
report an invalid maximum block size. These cards don't have a valid
vendor or device ID so we can't blacklist them. Instead, just assume we
can always support a block size of 512 (which is the minimum possible).

2. Ensure we set the bus width the host uses if we set the card's bus
width to 4 bit mode. Needless to say a host sending 1 bit mode data to
a card in 4 bit mode doesn't work.

3. Add defines for CSR specific CCCR vendor registers.

4. Add vendor and device IDs for CSR chips.

5. Add sdio_f0_readb() and sdio_f0_writeb() so drivers can read/write F0
registers.

David
--
David Vrabel, Software Engineer, Drivers group Tel: +44 (0)1223 692562
CSR plc, Churchill House, Cambridge Business Park, Cowley Road, CB4 0WZ


.


2007-08-10 12:26:23

by David Vrabel

[permalink] [raw]
Subject: mmc: ignore bad max block size in sdhci

--
David Vrabel, Software Engineer, Drivers group Tel: +44 (0)1223 692562
CSR plc, Churchill House, Cambridge Business Park, Cowley Road, CB4 0WZ


.


Attachments:
mmc-sdhci-ignore-invalid-block-size.patch (988.00 B)

2007-08-10 12:28:55

by David Vrabel

[permalink] [raw]
Subject: sdio: set host bus width

--
David Vrabel, Software Engineer, Drivers group Tel: +44 (0)1223 692562
CSR plc, Churchill House, Cambridge Business Park, Cowley Road, CB4 0WZ


.


Attachments:
sdio-set-host-bus-width.patch (518.00 B)

2007-08-10 12:29:54

by David Vrabel

[permalink] [raw]
Subject: sdio: add <linux/mmc/sdio_csr.h> for CSR specific CCCR registers

--
David Vrabel, Software Engineer, Drivers group Tel: +44 (0)1223 692562
CSR plc, Churchill House, Cambridge Business Park, Cowley Road, CB4 0WZ


.


Attachments:
sdio-csr-regs.patch (3.85 kB)

2007-08-10 12:31:28

by David Vrabel

[permalink] [raw]
Subject: sdio: add CSR vendor/device IDs

--
David Vrabel, Software Engineer, Drivers group Tel: +44 (0)1223 692562
CSR plc, Churchill House, Cambridge Business Park, Cowley Road, CB4 0WZ


.


Attachments:
sdio-csr-ids.patch (698.00 B)

2007-08-10 12:32:23

by David Vrabel

[permalink] [raw]
Subject: [patch 5/5] sdio: add sdio_f0_readb() and sdio_f0_writeb()

--
David Vrabel, Software Engineer, Drivers group Tel: +44 (0)1223 692562
CSR plc, Churchill House, Cambridge Business Park, Cowley Road, CB4 0WZ


.


Attachments:
sdio-f0-read-write.patch (2.72 kB)

2007-08-10 12:57:10

by Marcel Holtmann

[permalink] [raw]
Subject: Re: sdio: add <linux/mmc/sdio_csr.h> for CSR specific CCCR registers

Hi David,

are these CSR extensions specific to Bluetooth or do they also apply to
your WiFi and Ultra-Wideband products? If they are Bluetooth specific,
we might simply keep them inside the Bluetooth SDIO driver.

Regards

Marcel


2007-08-10 13:01:58

by David Vrabel

[permalink] [raw]
Subject: Re: sdio: add <linux/mmc/sdio_csr.h> for CSR specific CCCR registers

Marcel Holtmann wrote:
> Hi David,
>
> are these CSR extensions specific to Bluetooth or do they also apply to
> your WiFi and Ultra-Wideband products? If they are Bluetooth specific,
> we might simply keep them inside the Bluetooth SDIO driver.

They're registers common to all chips from BlueCore 6 and upwards. This
includes future non-BlueCore/bluetooth products (but not UniFi-1 or
UniFi-2).

David
--
David Vrabel, Software Engineer, Drivers group Tel: +44 (0)1223 692562
CSR plc, Churchill House, Cambridge Business Park, Cowley Road, CB4 0WZ


.

2007-08-10 13:35:18

by Pierre Ossman

[permalink] [raw]
Subject: Re: mmc: ignore bad max block size in sdhci

On Fri, 10 Aug 2007 13:25:03 +0100
David Vrabel <[email protected]> wrote:

> mmc: ignore bad max block size in sdhci
>
> Some SDHC cards report an invalid maximum block size, in these cases
> assume they support block sizes up to 512 bytes instead of returning
> an error.
>
> Signed-off-by: David Vrabel <[email protected]>

Thanks. Applied.

I find it rather amusing that this is for a controller from a vendor
that brags about its conformance testing kits. Go figure.

--
-- Pierre Ossman

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

2007-08-10 13:35:46

by Pierre Ossman

[permalink] [raw]
Subject: Re: sdio: set host bus width

On Fri, 10 Aug 2007 13:27:34 +0100
David Vrabel <[email protected]> wrote:

> sdio: set host bus width
>
> Need to set the bus width used by the host when enabling wide (4 bit)
> mode.
>
> Signed-of-by: David Vrabel <[email protected]>

Now this is just embarrassing. Thanks for spotting it.

--
-- Pierre Ossman

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

2007-08-10 13:37:49

by Pierre Ossman

[permalink] [raw]
Subject: Re: sdio: add <linux/mmc/sdio_csr.h> for CSR specific CCCR registers

On Fri, 10 Aug 2007 13:28:18 +0100
David Vrabel <[email protected]> wrote:

> sdio: add <linux/mmc/sdio_csr.h> for CSR specific CCCR registers
>
> Signed-off-by: David Vrabel <[email protected]>

I'm not a fan of this trend of sticking device specific headers in
include/linux, but if it's for registers common to many devices spread
all over the kernel tree, then I suppose it's acceptable.

I'm not going to apply this just yet though as it isn't used. Include
it with the first driver that needs it.

--
-- Pierre Ossman

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

2007-08-10 13:39:44

by Pierre Ossman

[permalink] [raw]
Subject: Re: sdio: add CSR vendor/device IDs

On Fri, 10 Aug 2007 13:28:55 +0100
David Vrabel <[email protected]> wrote:

> sdio: add CSR vendor/device IDs
>
> Signed-off-by: David Vrabel <[email protected]>

Same thing here. Send it with the driver.

--
-- Pierre Ossman

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

2007-08-10 13:40:07

by Pierre Ossman

[permalink] [raw]
Subject: Re: [patch 5/5] sdio: add sdio_f0_readb() and sdio_f0_writeb()

On Fri, 10 Aug 2007 13:29:46 +0100
David Vrabel <[email protected]> wrote:

> sdio: add sdio_f0_readb() and sdio_f0_writeb()
>
> Add sdio_f0_readb() and sdio_f0_writeb() functions to reading and
> writing function 0 registers. Writes outside the vendor specific CCCR
> registers (0xF0 - 0xFF) are not permitted.
>
> Signed-off-by: David Vrabel <[email protected]>

Nice. Especially the touch with restricting it to vendor specific
regs. :)

--
-- Pierre Ossman

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

2007-08-10 13:47:14

by David Vrabel

[permalink] [raw]
Subject: Re: sdio: set host bus width

Pierre Ossman wrote:
> On Fri, 10 Aug 2007 13:27:34 +0100
> David Vrabel <[email protected]> wrote:
>
>> sdio: set host bus width
>>
>> Need to set the bus width used by the host when enabling wide (4 bit)
>> mode.
>>
>> Signed-of-by: David Vrabel <[email protected]>
>
> Now this is just embarrassing. Thanks for spotting it.

Don't feel too bad. I didn't spot it until I started looking at all the
data lines with a oscilloscope.

David
--
David Vrabel, Software Engineer, Drivers group Tel: +44 (0)1223 692562
CSR plc, Churchill House, Cambridge Business Park, Cowley Road, CB4 0WZ


.