FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 02-11-2011, 09:55 PM
Manoj Iyer
 
Default mmc: make sdhci work with ricoh mmc controller

Please consider the following cherry-pick for Maverick SRU.

SRU JUSTIFICATION
==================

EFFECT
=======
MMC card reader does not recognize SD/MMC/SDHC cards

FIX
===
Patch adds RICOH pci id 0xe823, this enables this card reader on x220, and other lenovo platforms.

TESTING
========
This patch was tested and reported to work on Lenovo plarform.

The following changes since commit 98defa1c5773a3d7e4c524967eb01d5bae035816:

UBUNTU: Ubuntu-2.6.35-27.47 (2011-02-10 08:55:07 -0800)

are available in the git repository at:
ssh://zinc.canonical.com/srv/kernel.ubuntu.com/git/manjo/ubuntu-maverick.git lp717435

Manoj Iyer (1):
UBUNTU: SAUCE: add ricoh 0xe823 pci id.

Maxim Levitsky (1):
mmc: make sdhci work with ricoh mmc controller

drivers/mmc/host/sdhci-pci.c | 49 ++++++++++++++++++++++++++++++++++++++++++
drivers/mmc/host/sdhci.c | 3 +-
drivers/mmc/host/sdhci.h | 4 +++
3 files changed, 55 insertions(+), 1 deletions(-)



--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-11-2011, 09:55 PM
Manoj Iyer
 
Default mmc: make sdhci work with ricoh mmc controller

From: Maxim Levitsky <maximlevitsky@gmail.com>

The current way of disabling it is not well tested by vendor and has all
kinds of bugs that show up on resume from ram/disk. A very good example
is a dead SDHCI controller.

Old way of disabling is still supported by continuing to use
CONFIG_MMC_RICOH_MMC.

Based on 'http://list.drzeus.cx/pipermail/sdhci-devel/2007-December/002085.html'
Therefore most of the credit for this goes to Andrew de Quincey

BugLink: http://launchpad.net/bugs/717435

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Philip Langdale <philipl@overt.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit ccc92c23240cdf952ef7cc39ba563910dcbc9cbe)

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
---
drivers/mmc/host/sdhci-pci.c | 41 +++++++++++++++++++++++++++++++++++++++++
drivers/mmc/host/sdhci.c | 3 ++-
drivers/mmc/host/sdhci.h | 4 ++++
3 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 65483fd..e021431 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -17,6 +17,7 @@
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
+#include <linux/device.h>

#include <linux/mmc/host.h>

@@ -84,7 +85,30 @@ static int ricoh_probe(struct sdhci_pci_chip *chip)
if (chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG ||
chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SONY)
chip->quirks |= SDHCI_QUIRK_NO_CARD_NO_RESET;
+ return 0;
+}
+
+static int ricoh_mmc_probe_slot(struct sdhci_pci_slot *slot)
+{
+ slot->host->caps =
+ ((0x21 << SDHCI_TIMEOUT_CLK_SHIFT)
+ & SDHCI_TIMEOUT_CLK_MASK) |
+
+ ((0x21 << SDHCI_CLOCK_BASE_SHIFT)
+ & SDHCI_CLOCK_BASE_MASK) |

+ SDHCI_TIMEOUT_CLK_UNIT |
+ SDHCI_CAN_VDD_330 |
+ SDHCI_CAN_DO_SDMA;
+ return 0;
+}
+
+static int ricoh_mmc_resume(struct sdhci_pci_chip *chip)
+{
+ /* Apply a delay to allow controller to settle */
+ /* Otherwise it becomes confused if card state changed
+ during suspend */
+ msleep(500);
return 0;
}

@@ -95,6 +119,15 @@ static const struct sdhci_pci_fixes sdhci_ricoh = {
SDHCI_QUIRK_CLOCK_BEFORE_RESET,
};

+static const struct sdhci_pci_fixes sdhci_ricoh_mmc = {
+ .probe_slot = ricoh_mmc_probe_slot,
+ .resume = ricoh_mmc_resume,
+ .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR |
+ SDHCI_QUIRK_CLOCK_BEFORE_RESET |
+ SDHCI_QUIRK_NO_CARD_NO_RESET |
+ SDHCI_QUIRK_MISSING_CAPS
+};
+
static const struct sdhci_pci_fixes sdhci_ene_712 = {
.quirks = SDHCI_QUIRK_SINGLE_POWER_WRITE |
SDHCI_QUIRK_BROKEN_DMA,
@@ -374,6 +407,14 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
},

{
+ .vendor = PCI_VENDOR_ID_RICOH,
+ .device = 0x843,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ .driver_data = (kernel_ulong_t)&sdhci_ricoh_mmc,
+ },
+
+ {
.vendor = PCI_VENDOR_ID_ENE,
.device = PCI_DEVICE_ID_ENE_CB712_SD,
.subvendor = PCI_ANY_ID,
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c6d1bd8..483b78e 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1687,7 +1687,8 @@ int sdhci_add_host(struct sdhci_host *host)
host->version);
}

- caps = sdhci_readl(host, SDHCI_CAPABILITIES);
+ caps = (host->quirks & SDHCI_QUIRK_MISSING_CAPS) ? host->caps :
+ sdhci_readl(host, SDHCI_CAPABILITIES);

if (host->quirks & SDHCI_QUIRK_FORCE_DMA)
host->flags |= SDHCI_USE_SDMA;
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index c846813..b1839a3 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -240,6 +240,8 @@ struct sdhci_host {
#define SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN (1<<25)
/* Controller cannot support End Attribute in NOP ADMA descriptor */
#define SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC (1<<26)
+/* Controller is missing device caps. Use caps provided by host */
+#define SDHCI_QUIRK_MISSING_CAPS (1<<27)

int irq; /* Device IRQ */
void __iomem * ioaddr; /* Mapped address */
@@ -292,6 +294,8 @@ struct sdhci_host {

struct timer_list timer; /* Timer for timeouts */

+ unsigned int caps; /* Alternative capabilities */
+
unsigned long private[0] ____cacheline_aligned;
};

--
1.7.1


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-11-2011, 10:05 PM
Manoj Iyer
 
Default mmc: make sdhci work with ricoh mmc controller

On Fri, Feb 11, 2011 at 4:55 PM, Manoj Iyer <manoj.iyer@canonical.com> wrote:
>
>
> Please consider the following cherry-pick for Maverick SRU.
>
> SRU JUSTIFICATION
> ==================
>
> EFFECT
> =======
> MMC card reader does not recognize SD/MMC/SDHC cards
>
> FIX
> ===
> Patch adds RICOH pci id 0xe823, this enables this card reader on x220, and other lenovo platforms.
>
> TESTING
> ========
> This patch was tested and reported to work on Lenovo plarform.
>
> The following changes since commit 98defa1c5773a3d7e4c524967eb01d5bae035816:
>
> *UBUNTU: Ubuntu-2.6.35-27.47 (2011-02-10 08:55:07 -0800)
>
> are available in the git repository at:
> *ssh://zinc.canonical.com/srv/kernel.ubuntu.com/git/manjo/u

That should be ..

git://kernel.ubuntu.com/manjo/ubuntu-maverick.git lp717435

>
> Manoj Iyer (1):
> * * *UBUNTU: SAUCE: add ricoh 0xe823 pci id.
>
> Maxim Levitsky (1):
> * * *mmc: make sdhci work with ricoh mmc controller
>
> *drivers/mmc/host/sdhci-pci.c | * 49 ++++++++++++++++++++++++++++++++++++++++++
> *drivers/mmc/host/sdhci.c * * | * *3 +-
> *drivers/mmc/host/sdhci.h * * | * *4 +++
> *3 files changed, 55 insertions(+), 1 deletions(-)
>
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>



--
-----------------------------------------------------
Manoj Iyer
Ubuntu/Canonical Kernel Developer
Hardware Enablement Team
------------------------------------------------------

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-14-2011, 12:16 PM
Stefan Bader
 
Default mmc: make sdhci work with ricoh mmc controller

On 02/11/2011 11:55 PM, Manoj Iyer wrote:
> From: Maxim Levitsky <maximlevitsky@gmail.com>
>
> The current way of disabling it is not well tested by vendor and has all
> kinds of bugs that show up on resume from ram/disk. A very good example
> is a dead SDHCI controller.
>
> Old way of disabling is still supported by continuing to use
> CONFIG_MMC_RICOH_MMC.
>
> Based on 'http://list.drzeus.cx/pipermail/sdhci-devel/2007-December/002085.html'
> Therefore most of the credit for this goes to Andrew de Quincey
>
> BugLink: http://launchpad.net/bugs/717435
>
> Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> Cc: Andrew de Quincey <adq_dvb@lidskialf.net>
> Acked-by: Philip Langdale <philipl@overt.org>
> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: <linux-mmc@vger.kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> (cherry picked from commit ccc92c23240cdf952ef7cc39ba563910dcbc9cbe)
>
> Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>

I suspect this could be rather seen as adding feature and by that not make it
into longterm support (has it been tried)? But it is at least well contained to
affect only the one pci id.

Acked-by: Stefan Bader <stefan.bader@canonical.com>

Note that Maverick will soon reach the stage where this kind of change will not
qualify for SRU anymore.

> ---
> drivers/mmc/host/sdhci-pci.c | 41 +++++++++++++++++++++++++++++++++++++++++
> drivers/mmc/host/sdhci.c | 3 ++-
> drivers/mmc/host/sdhci.h | 4 ++++
> 3 files changed, 47 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
> index 65483fd..e021431 100644
> --- a/drivers/mmc/host/sdhci-pci.c
> +++ b/drivers/mmc/host/sdhci-pci.c
> @@ -17,6 +17,7 @@
> #include <linux/pci.h>
> #include <linux/dma-mapping.h>
> #include <linux/slab.h>
> +#include <linux/device.h>
>
> #include <linux/mmc/host.h>
>
> @@ -84,7 +85,30 @@ static int ricoh_probe(struct sdhci_pci_chip *chip)
> if (chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG ||
> chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SONY)
> chip->quirks |= SDHCI_QUIRK_NO_CARD_NO_RESET;
> + return 0;
> +}
> +
> +static int ricoh_mmc_probe_slot(struct sdhci_pci_slot *slot)
> +{
> + slot->host->caps =
> + ((0x21 << SDHCI_TIMEOUT_CLK_SHIFT)
> + & SDHCI_TIMEOUT_CLK_MASK) |
> +
> + ((0x21 << SDHCI_CLOCK_BASE_SHIFT)
> + & SDHCI_CLOCK_BASE_MASK) |
>
> + SDHCI_TIMEOUT_CLK_UNIT |
> + SDHCI_CAN_VDD_330 |
> + SDHCI_CAN_DO_SDMA;
> + return 0;
> +}
> +
> +static int ricoh_mmc_resume(struct sdhci_pci_chip *chip)
> +{
> + /* Apply a delay to allow controller to settle */
> + /* Otherwise it becomes confused if card state changed
> + during suspend */
> + msleep(500);
> return 0;
> }
>
> @@ -95,6 +119,15 @@ static const struct sdhci_pci_fixes sdhci_ricoh = {
> SDHCI_QUIRK_CLOCK_BEFORE_RESET,
> };
>
> +static const struct sdhci_pci_fixes sdhci_ricoh_mmc = {
> + .probe_slot = ricoh_mmc_probe_slot,
> + .resume = ricoh_mmc_resume,
> + .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR |
> + SDHCI_QUIRK_CLOCK_BEFORE_RESET |
> + SDHCI_QUIRK_NO_CARD_NO_RESET |
> + SDHCI_QUIRK_MISSING_CAPS
> +};
> +
> static const struct sdhci_pci_fixes sdhci_ene_712 = {
> .quirks = SDHCI_QUIRK_SINGLE_POWER_WRITE |
> SDHCI_QUIRK_BROKEN_DMA,
> @@ -374,6 +407,14 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
> },
>
> {
> + .vendor = PCI_VENDOR_ID_RICOH,
> + .device = 0x843,
> + .subvendor = PCI_ANY_ID,
> + .subdevice = PCI_ANY_ID,
> + .driver_data = (kernel_ulong_t)&sdhci_ricoh_mmc,
> + },
> +
> + {
> .vendor = PCI_VENDOR_ID_ENE,
> .device = PCI_DEVICE_ID_ENE_CB712_SD,
> .subvendor = PCI_ANY_ID,
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index c6d1bd8..483b78e 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1687,7 +1687,8 @@ int sdhci_add_host(struct sdhci_host *host)
> host->version);
> }
>
> - caps = sdhci_readl(host, SDHCI_CAPABILITIES);
> + caps = (host->quirks & SDHCI_QUIRK_MISSING_CAPS) ? host->caps :
> + sdhci_readl(host, SDHCI_CAPABILITIES);
>
> if (host->quirks & SDHCI_QUIRK_FORCE_DMA)
> host->flags |= SDHCI_USE_SDMA;
> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index c846813..b1839a3 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -240,6 +240,8 @@ struct sdhci_host {
> #define SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN (1<<25)
> /* Controller cannot support End Attribute in NOP ADMA descriptor */
> #define SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC (1<<26)
> +/* Controller is missing device caps. Use caps provided by host */
> +#define SDHCI_QUIRK_MISSING_CAPS (1<<27)
>
> int irq; /* Device IRQ */
> void __iomem * ioaddr; /* Mapped address */
> @@ -292,6 +294,8 @@ struct sdhci_host {
>
> struct timer_list timer; /* Timer for timeouts */
>
> + unsigned int caps; /* Alternative capabilities */
> +
> unsigned long private[0] ____cacheline_aligned;
> };
>


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-14-2011, 03:16 PM
Tim Gardner
 
Default mmc: make sdhci work with ricoh mmc controller

On 02/11/2011 03:55 PM, Manoj Iyer wrote:

From: Maxim Levitsky<maximlevitsky@gmail.com>

The current way of disabling it is not well tested by vendor and has all
kinds of bugs that show up on resume from ram/disk. A very good example
is a dead SDHCI controller.

Old way of disabling is still supported by continuing to use
CONFIG_MMC_RICOH_MMC.

Based on 'http://list.drzeus.cx/pipermail/sdhci-devel/2007-December/002085.html'
Therefore most of the credit for this goes to Andrew de Quincey

BugLink: http://launchpad.net/bugs/717435

Signed-off-by: Maxim Levitsky<maximlevitsky@gmail.com>
Cc: Andrew de Quincey<adq_dvb@lidskialf.net>
Acked-by: Philip Langdale<philipl@overt.org>
Cc: "Rafael J. Wysocki"<rjw@sisk.pl>
Cc:<linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton<akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds<torvalds@linux-foundation.org>
(cherry picked from commit ccc92c23240cdf952ef7cc39ba563910dcbc9cbe)

Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
---
drivers/mmc/host/sdhci-pci.c | 41 +++++++++++++++++++++++++++++++++++++++++
drivers/mmc/host/sdhci.c | 3 ++-
drivers/mmc/host/sdhci.h | 4 ++++
3 files changed, 47 insertions(+), 1 deletions(-)



Acked-by: Tim Gardner <tim.gardner@canonical.com>

--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-14-2011, 06:46 PM
Tim Gardner
 
Default mmc: make sdhci work with ricoh mmc controller

On 02/11/2011 03:55 PM, Manoj Iyer wrote:

From: Maxim Levitsky<maximlevitsky@gmail.com>

The current way of disabling it is not well tested by vendor and has all
kinds of bugs that show up on resume from ram/disk. A very good example
is a dead SDHCI controller.

Old way of disabling is still supported by continuing to use
CONFIG_MMC_RICOH_MMC.

Based on 'http://list.drzeus.cx/pipermail/sdhci-devel/2007-December/002085.html'
Therefore most of the credit for this goes to Andrew de Quincey

BugLink: http://launchpad.net/bugs/717435

Signed-off-by: Maxim Levitsky<maximlevitsky@gmail.com>
Cc: Andrew de Quincey<adq_dvb@lidskialf.net>
Acked-by: Philip Langdale<philipl@overt.org>
Cc: "Rafael J. Wysocki"<rjw@sisk.pl>
Cc:<linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton<akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds<torvalds@linux-foundation.org>
(cherry picked from commit ccc92c23240cdf952ef7cc39ba563910dcbc9cbe)

Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
---
drivers/mmc/host/sdhci-pci.c | 41 +++++++++++++++++++++++++++++++++++++++++
drivers/mmc/host/sdhci.c | 3 ++-
drivers/mmc/host/sdhci.h | 4 ++++
3 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 65483fd..e021431 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -17,6 +17,7 @@
#include<linux/pci.h>
#include<linux/dma-mapping.h>
#include<linux/slab.h>
+#include<linux/device.h>

#include<linux/mmc/host.h>

@@ -84,7 +85,30 @@ static int ricoh_probe(struct sdhci_pci_chip *chip)
if (chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG ||
chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SONY)
chip->quirks |= SDHCI_QUIRK_NO_CARD_NO_RESET;
+ return 0;
+}
+
+static int ricoh_mmc_probe_slot(struct sdhci_pci_slot *slot)
+{
+ slot->host->caps =
+ ((0x21<< SDHCI_TIMEOUT_CLK_SHIFT)
+ & SDHCI_TIMEOUT_CLK_MASK) |
+
+ ((0x21<< SDHCI_CLOCK_BASE_SHIFT)
+ & SDHCI_CLOCK_BASE_MASK) |

+ SDHCI_TIMEOUT_CLK_UNIT |
+ SDHCI_CAN_VDD_330 |
+ SDHCI_CAN_DO_SDMA;
+ return 0;
+}
+
+static int ricoh_mmc_resume(struct sdhci_pci_chip *chip)
+{
+ /* Apply a delay to allow controller to settle */
+ /* Otherwise it becomes confused if card state changed
+ during suspend */
+ msleep(500);
return 0;
}

@@ -95,6 +119,15 @@ static const struct sdhci_pci_fixes sdhci_ricoh = {
SDHCI_QUIRK_CLOCK_BEFORE_RESET,
};

+static const struct sdhci_pci_fixes sdhci_ricoh_mmc = {
+ .probe_slot = ricoh_mmc_probe_slot,
+ .resume = ricoh_mmc_resume,
+ .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR |
+ SDHCI_QUIRK_CLOCK_BEFORE_RESET |
+ SDHCI_QUIRK_NO_CARD_NO_RESET |
+ SDHCI_QUIRK_MISSING_CAPS
+};
+
static const struct sdhci_pci_fixes sdhci_ene_712 = {
.quirks = SDHCI_QUIRK_SINGLE_POWER_WRITE |
SDHCI_QUIRK_BROKEN_DMA,
@@ -374,6 +407,14 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
},

{
+ .vendor = PCI_VENDOR_ID_RICOH,
+ .device = 0x843,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ .driver_data = (kernel_ulong_t)&sdhci_ricoh_mmc,
+ },
+
+ {
.vendor = PCI_VENDOR_ID_ENE,
.device = PCI_DEVICE_ID_ENE_CB712_SD,
.subvendor = PCI_ANY_ID,
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c6d1bd8..483b78e 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1687,7 +1687,8 @@ int sdhci_add_host(struct sdhci_host *host)
host->version);
}

- caps = sdhci_readl(host, SDHCI_CAPABILITIES);
+ caps = (host->quirks& SDHCI_QUIRK_MISSING_CAPS) ? host->caps :
+ sdhci_readl(host, SDHCI_CAPABILITIES);

if (host->quirks& SDHCI_QUIRK_FORCE_DMA)
host->flags |= SDHCI_USE_SDMA;
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index c846813..b1839a3 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -240,6 +240,8 @@ struct sdhci_host {
#define SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN (1<<25)
/* Controller cannot support End Attribute in NOP ADMA descriptor */
#define SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC (1<<26)
+/* Controller is missing device caps. Use caps provided by host */
+#define SDHCI_QUIRK_MISSING_CAPS (1<<27)

int irq; /* Device IRQ */
void __iomem * ioaddr; /* Mapped address */
@@ -292,6 +294,8 @@ struct sdhci_host {

struct timer_list timer; /* Timer for timeouts */

+ unsigned int caps; /* Alternative capabilities */
+
unsigned long private[0] ____cacheline_aligned;
};



applied and pushed to Maverick

--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 05:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org