[PATCH 2.6.20-rc2] Add a quirk to allow ENE PCI SD card readers to work again
- From: Darren Salt <linux@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 31 Dec 2006 17:08:20 +0000
Add a quirk to allow ENE PCI SD card readers to work again
Support for these devices was broken for 2.6.18-rc1 and later by commit
146ad66eac836c0b976c98f428d73e1f6a75270d, which added voltage level support.
This restores the previous behaviour for these devices by ensuring that when
the voltage is changed, only one write to set the voltage is performed.
It may be that both writes are needed if the voltage is being changed between
two non-zero values or that it's safe to ensure that only one write is done
if the hardware only supports one voltage; I don't know whether either is the
case nor can I test since I have only the one SD reader (1524:0550), and it
supports just the one voltage.
Signed-off-by: Darren Salt <linux@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
diff -ur linux-2.6.20-rc2.orig/drivers/mmc/sdhci.c linux-2.6.20-rc2/drivers/mmc/sdhci.c
--- linux-2.6.20-rc2.orig/drivers/mmc/sdhci.c 2006-12-30 15:34:11.000000000 +0000
+++ linux-2.6.20-rc2/drivers/mmc/sdhci.c 2006-12-31 16:43:50.000000000 +0000
@@ -37,6 +37,7 @@
#define SDHCI_QUIRK_FORCE_DMA (1<<1)
/* Controller doesn't like some resets when there is no card inserted. */
#define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<2)
+#define SDHCI_QUIRK_SINGLE_POWER_WRITE (1<<3)
static const struct pci_device_id pci_ids[] __devinitdata = {
{
@@ -65,6 +66,16 @@
.driver_data = SDHCI_QUIRK_FORCE_DMA,
},
+ {
+ .class = PCI_CLASS_SYSTEM_SDHCI << 8,
+ .class_mask = 0xFFFF00,
+ .vendor = PCI_VENDOR_ID_ENE,
+ .device = PCI_ANY_ID,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE,
+ },
+
{ /* Generic SD host controller */
PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)
},
@@ -669,16 +680,17 @@
static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
{
- u8 pwr;
+ u8 pwr = 0;
if (host->power == power)
return;
- writeb(0, host->ioaddr + SDHCI_POWER_CONTROL);
-
if (power == (unsigned short)-1)
goto out;
+ if ((host->chip->quirks & SDHCI_QUIRK_SINGLE_POWER_WRITE) == 0)
+ writeb(0, host->ioaddr + SDHCI_POWER_CONTROL);
+
pwr = SDHCI_POWER_ON;
switch (power) {
--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| Kill all extremists!
Confucius say: Many pages make thick book.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [PATCH 2.6.20-rc2] Add a quirk to allow at least some ENE PCI SD card readers to work again
- From: Darren Salt
- Re: [PATCH 2.6.20-rc2] Add a quirk to allow at least some ENE PCI SD card readers to work again
- From: Pierre Ossman
- Re: [PATCH 2.6.20-rc2] Add a quirk to allow at least some ENE PCI SD card readers to work again
- From: Darren Salt
- [PATCH 2.6.20-rc2] Add a quirk to allow at least some ENE PCI SD card readers to work again
- Prev by Date: Re: [PATCH 2.6.20-rc2] Add a quirk to allow at least some ENE PCI SD card readers to work again
- Next by Date: Using _syscall3 to manipulate files in a driver
- Previous by thread: Re: [PATCH 2.6.20-rc2] Add a quirk to allow at least some ENE PCI SD card readers to work again
- Next by thread: Re: [PATCH 2.6.20-rc2] Add a quirk to allow ENE PCI SD card readers to work again
- Index(es):
Relevant Pages
- Re: high input to CPLD
... Can we direcly give the high inut voltage i.e. +5V to its input pin? ...
the newer parts run on lower voltage and at least recent FPGAs would not even support 5V - that
is why we use some of the old FPGAs as well ... ... Looks like you can still buy them but recent
Xilinx ISE tools do not support them any more so we have a few machines still running ISE 4! ...
(comp.arch.fpga) - Re: [PATCH 2.6.20-rc2] Add a quirk to allow ENE PCI SD card readers to work again
... I demand that I definitely did write... ... 146ad66eac836c0b976c98f428d73e1f6a75270d,
which added voltage level ... support. ... (Linux-Kernel) - Re: portable audio recorder
... support the voltage spec'd ... Are you saying it wasn't putting
out the spec'd 30V phantom? ... (rec.audio.pro) - [patch 058/101] mmc: Power quirk for ENE controllers
... Support for these devices was broken for 2.6.18-rc1 and later by commit ...
which added voltage level support. ... This restores the previous behaviour for
these devices by ensuring that when ... (Linux-Kernel)