+ mmc-quirk-for-broken-reset.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     From: Pierre Ossman <drzeus@xxxxxxxxx>

has been added to the -mm tree.  Its filename is

     mmc-quirk-for-broken-reset.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: From: Pierre Ossman <drzeus@xxxxxxxxx>



Some controllers fail to complete a reset unless you touch the clock
register first.

Signed-off-by: Pierre Ossman <drzeus@xxxxxxxxx>
---

index 1a12427..617a588 100644
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/mmc/sdhci.c |   29 +++++++++++++++++++++++++++--
 1 files changed, 27 insertions(+), 2 deletions(-)

diff -puN drivers/mmc/sdhci.c~mmc-quirk-for-broken-reset drivers/mmc/sdhci.c
--- 25/drivers/mmc/sdhci.c~mmc-quirk-for-broken-reset	Tue Jun 27 14:28:57 2006
+++ 25-akpm/drivers/mmc/sdhci.c	Tue Jun 27 14:28:57 2006
@@ -32,9 +32,21 @@ static unsigned int debug_nodma = 0;
 static unsigned int debug_forcedma = 0;
 static unsigned int debug_quirks = 0;
 
+#define SDHCI_QUIRK_CLOCK_BEFORE_RESET			(1<<0)
+
 static const struct pci_device_id pci_ids[] __devinitdata = {
-	/* handle any SD host controller */
-	{PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)},
+	{
+		.vendor		= PCI_VENDOR_ID_RICOH,
+		.device		= PCI_DEVICE_ID_RICOH_R5C822,
+		.subvendor	= PCI_VENDOR_ID_IBM,
+		.subdevice	= PCI_ANY_ID,
+		.driver_data	= SDHCI_QUIRK_CLOCK_BEFORE_RESET,
+	},
+
+	{	/* Generic SD host controller */
+		PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)
+	},
+
 	{ /* end: all zeroes */ },
 };
 
@@ -808,6 +820,19 @@ static void sdhci_tasklet_finish(unsigne
 	if ((mrq->cmd->error != MMC_ERR_NONE) ||
 		(mrq->data && ((mrq->data->error != MMC_ERR_NONE) ||
 		(mrq->data->stop && (mrq->data->stop->error != MMC_ERR_NONE))))) {
+
+		/* Some controllers need this kick or reset won't work here */
+		if (host->chip->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET) {
+			unsigned int clock;
+
+			/* This is to force an update */
+			clock = host->clock;
+			host->clock = 0;
+			sdhci_set_clock(host, clock);
+		}
+
+		/* Spec says we should do both at the same time, but Ricoh
+		   controllers do not like that. */
 		sdhci_reset(host, SDHCI_RESET_CMD);
 		sdhci_reset(host, SDHCI_RESET_DATA);
 	}
_

Patches currently in -mm which might be from drzeus@xxxxxxxxx are

mmc-check-sdhci-base-clock.patch
mmc-print-device-id.patch
mmc-support-for-multiple-voltages.patch
mmc-fix-timeout-loops-in-sdhci.patch
mmc-fix-sdhci-reset-timeout.patch
mmc-proper-timeout-handling.patch
mmc-correct-register-order.patch
mmc-fix-interrupt-handling.patch
mmc-fix-sdhci-pio-routines.patch
mmc-avoid-sdhci-dma-boundaries.patch
mmc-test-for-invalid-block-size.patch
mmc-check-only-relevant-inhibit-bits.patch
mmc-check-controller-version.patch
mmc-reset-sdhci-controller-early.patch
mmc-more-dma-capabilities-tests.patch
mmc-support-controller-specific-quirks.patch
mmc-version-bump-sdhci.patch
mmc-add-sdhci-controller-ids.patch
mmc-quirk-for-broken-reset.patch
mmc-force-dma-on-some-controllers.patch
mmc-remove-duplicate-error-message.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux