Re: [PATCH] mmc: Disabler for Ricoh MMC controller

Previous thread: Latest git won't compile by Adrian McMenamin on Saturday, September 15, 2007 - 1:20 pm. (2 messages)

Next thread: Re: [PATCH]PCI:disable resource decode in PCI BAR detection by Robert Hancock on Saturday, September 15, 2007 - 1:24 pm. (1 message)
From: Philip Langdale
Date: Saturday, September 15, 2007 - 12:54 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,152 @@
+/*
+ *  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: Pierre Ossman
Date: Thursday, September 20, 2007 - 9:24 am

On Sat, 15 Sep 2007 12:54:08 -0700

Patch looks ok. Please try to sort out that completely disabled
controller that was reported first though.

Rgds
Pierre
From: Philip Langdale
Date: Friday, September 21, 2007 - 7:30 am

This remains confusing. I went and investigated and the SD disable
bit is 0x20. The one lspci dump from the IFL90 shows that 0x80 is
set by default, but setting this on my laptop did not disable the
SD controller. I will need to collect more information from owners
to find out what's really going on.

Do you want to wait on this before taking this patch?

--phil
-

From: Pierre Ossman
Date: Friday, September 21, 2007 - 9:57 am

On Fri, 21 Sep 2007 07:30:59 -0700

Preferably. But if you can't figure it out until it is time to merge
things upstream, then I'll go with what we have right now.

Rgds
Pierre
From: Philip Langdale
Date: Monday, October 1, 2007 - 8:22 pm

I have not been contacted by anyone with one of those laptops so I
haven't been able to find out what's going on.

I'm updating the diff, because I forgot to terminate the pci table,
so it didn't add the alias correctly.

--phil
-

Previous thread: Latest git won't compile by Adrian McMenamin on Saturday, September 15, 2007 - 1:20 pm. (2 messages)

Next thread: Re: [PATCH]PCI:disable resource decode in PCI BAR detection by Robert Hancock on Saturday, September 15, 2007 - 1:24 pm. (1 message)