[oe-commits] Graeme Gregory : linux-kirkwood_2.6.29.2.bb : add kludge to allow SDHC cards to work

GIT User account git at amethyst.openembedded.net
Sat May 16 17:19:04 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 775236876ae21a149cd8a1e7eb15dad32c4ff84c
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=775236876ae21a149cd8a1e7eb15dad32c4ff84c

Author: Graeme Gregory <dp at xora.org.uk>
Date:   Sat May 16 18:12:31 2009 +0100

linux-kirkwood_2.6.29.2.bb : add kludge to allow SDHC cards to work

---

 recipes/linux/linux-kirkwood/mvsdio.patch |   46 +++++++++++++++++++++++++++++
 recipes/linux/linux-kirkwood_2.6.29.2.bb  |    2 +
 2 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/recipes/linux/linux-kirkwood/mvsdio.patch b/recipes/linux/linux-kirkwood/mvsdio.patch
new file mode 100644
index 0000000..e4ba675
--- /dev/null
+++ b/recipes/linux/linux-kirkwood/mvsdio.patch
@@ -0,0 +1,46 @@
+Patch obtained from http://www.computingplugs.com/index.php/Fixing_SDHC_access_in_the_Orion/Mainline_kernel
+
+--- a/drivers/mmc/host/mvsdio.c.orig	2009-04-14 20:51:48.000000000 +0000
++++ b/drivers/mmc/host/mvsdio.c	2009-04-19 15:58:42.261724324 +0000
+@@ -21,6 +21,7 @@
+ #include <linux/irq.h>
+ #include <linux/gpio.h>
+ #include <linux/mmc/host.h>
++#include <linux/mmc/sd.h>
+ 
+ #include <asm/sizes.h>
+ #include <asm/unaligned.h>
+@@ -123,6 +124,7 @@
+ 
+ 	dev_dbg(host->dev, "cmd %d (hw state 0x%04x)\n",
+ 		cmd->opcode, mvsd_read(MVSD_HW_STATE));
++	if (cmd->opcode == SD_SWITCH) mdelay(1); /* Voodoo */
+ 
+ 	cmdreg = MVSD_CMD_INDEX(cmd->opcode);
+ 
+@@ -620,9 +622,11 @@
+ 	if (ios->bus_width == MMC_BUS_WIDTH_4)
+ 		ctrl_reg |= MVSD_HOST_CTRL_DATA_WIDTH_4_BITS;
+ 
++#if 0
+ 	if (ios->timing == MMC_TIMING_MMC_HS ||
+ 	    ios->timing == MMC_TIMING_SD_HS)
+ 		ctrl_reg |= MVSD_HOST_CTRL_HI_SPEED_EN;
++#endif
+ 
+ 	host->ctrl = ctrl_reg;
+ 	mvsd_write(MVSD_HOST_CTRL, ctrl_reg);
+--- kernel/drivers/mmc/core/core.c.orig	2009-04-14 20:51:48.000000000 +0000
++++ kernel/drivers/mmc/core/core.c	2009-04-19 17:36:35.985746917 +0000
+@@ -286,9 +286,9 @@
+ 			 * The limit is really 250 ms, but that is
+ 			 * insufficient for some crappy cards.
+ 			 */
+-			limit_us = 300000;
++			limit_us = 500000;
+ 		else
+-			limit_us = 100000;
++			limit_us = 200000;
+ 
+ 		/*
+ 		 * SDHC cards always use these fixed values.
diff --git a/recipes/linux/linux-kirkwood_2.6.29.2.bb b/recipes/linux/linux-kirkwood_2.6.29.2.bb
index 0e34936..00cdb2b 100644
--- a/recipes/linux/linux-kirkwood_2.6.29.2.bb
+++ b/recipes/linux/linux-kirkwood_2.6.29.2.bb
@@ -7,12 +7,14 @@ require linux.inc
 
 # Change MACHINE_KERNEL_PR in conf/machine/include/kirkwood.inc
 PV = "2.6.29.2"
+PR = "r2"
 PR_append = "+gitr${SRCREV}"
 #PV = "2.6.28+2.6.29rc7-${PR}+gitr${SRCREV}"
 
 SRCREV = "10a12868405319fbf114af2bde9789aa64c34144"
 SRC_URI = "git://git.marvell.com/orion.git;protocol=git;branch=stable-2.6.29 \
            file://fw.patch;patch=1 \
+           file://mvsdio.patch;patch=1 \
            file://defconfig \
                "
 





More information about the Openembedded-commits mailing list