[PATCH] mmc: Disabler for Ricoh MMC controller

Previous thread: [PATCH] PM_QOS 1 of 2 by Mark Gross on Monday, October 1, 2007 - 4:45 pm. (4 messages)

Next thread: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.. by Linus Torvalds on Monday, October 1, 2007 - 8:41 pm. (85 messages)
From: Philip Langdale
Date: Monday, October 1, 2007 - 8:23 pm

Thanks to Matt Domsch and Rezwanul Kabir at Dell, we know how to disable the
MMC controller on the multi-function Ricoh R5C832. The MMC controller needs
to be disabled or it will steal MMC cards from the SD controller where they
would otherwise be supported by the Linux SDHCI driver.

Signed-off-by: Philipl Langdale <philipl@overt.org>

--- linux-2.6.22/drivers/mmc/host/Kconfig	2007-07-08 16:32:17.000000000 -0700
+++ linux-ricoh/drivers/mmc/host/Kconfig	2007-09-15 12:32:10.000000000 -0700
@@ -35,6 +35,23 @@

 	  If unsure, say N.

+config MMC_RICOH_MMC
+	tristate "Ricoh MMC Controller Disabler  (EXPERIMENTAL)"
+	depends on PCI && EXPERIMENTAL && MMC_SDHCI
+	help
+	  This selects the disabler for the Ricoh MMC Controller. This
+	  proprietary controller is unnecessary because the SDHCI driver
+	  supports MMC cards on the SD controller, but if it is not
+	  disabled, it will steal the MMC cards away - rendering them
+	  useless. It is safe to select this driver even if you don't
+	  have a Ricoh based card reader.
+
+
+	  To compile this driver as a module, choose M here:
+	  the module will be called ricoh_mmc.
+
+	  If unsure, say Y.
+
 config MMC_OMAP
 	tristate "TI OMAP Multimedia Card Interface support"
 	depends on ARCH_OMAP
--- linux-2.6.22/drivers/mmc/host/Makefile	2007-07-08 16:32:17.000000000 -0700
+++ linux-ricoh/drivers/mmc/host/Makefile	2007-09-15 12:28:49.000000000 -0700
@@ -15,4 +15,5 @@
 obj-$(CONFIG_MMC_OMAP)		+= omap.o
 obj-$(CONFIG_MMC_AT91)		+= at91_mci.o
 obj-$(CONFIG_MMC_TIFM_SD)	+= tifm_sd.o
+obj-$(CONFIG_MMC_RICOH_MMC)	+= ricoh_mmc.o

--- linux-2.6.22/drivers/mmc/host/ricoh_mmc.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-ricoh/drivers/mmc/host/ricoh_mmc.c	2007-09-15 12:29:05.000000000 -0700
@@ -0,0 +1,156 @@
+/*
+ *  ricoh_mmc.c - Dummy driver to disable the Rioch MMC controller.
+ *
+ *  Copyright (C) 2007 Philip Langdale, All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under ...
From: Benjamin Herrenschmidt
Date: Monday, October 1, 2007 - 9:43 pm

From: Benjamin Herrenschmidt
Date: Monday, October 1, 2007 - 9:45 pm

From: Philip Langdale
Date: Monday, October 1, 2007 - 10:01 pm

Pierre doesn't want a quirk.

--phil
-

From: Benjamin Herrenschmidt
Date: Tuesday, October 2, 2007 - 12:14 am

Hrm... allright, tho having this "disabler" driver is butt ugly too ...
especially since it needs to whack registers in another function, that's
really quirkland :-)

Oh well...

Ben.


-

From: Pierre Ossman
Date: Tuesday, October 2, 2007 - 4:40 am

On Tue, 02 Oct 2007 17:14:34 +1000

Well, that issue would remain even if we put it into sdhci.c. Perhaps
something can be done when sdhci is split into multiple parts, but not
right now.

Rgds
Pierre
Previous thread: [PATCH] PM_QOS 1 of 2 by Mark Gross on Monday, October 1, 2007 - 4:45 pm. (4 messages)

Next thread: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.. by Linus Torvalds on Monday, October 1, 2007 - 8:41 pm. (85 messages)