aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGraeme Gregory <dp@xora.org.uk>2009-05-16 18:12:31 +0100
committerGraeme Gregory <dp@xora.org.uk>2009-05-16 18:12:31 +0100
commit775236876ae21a149cd8a1e7eb15dad32c4ff84c (patch)
tree1108f63c8da07a671e7742b3870543c1a9dbbf9d
parent71c53615c26094991223f503372dfbfd63f144f5 (diff)
downloadopenembedded-775236876ae21a149cd8a1e7eb15dad32c4ff84c.tar.gz
linux-kirkwood_2.6.29.2.bb : add kludge to allow SDHC cards to work
-rw-r--r--recipes/linux/linux-kirkwood/mvsdio.patch46
-rw-r--r--recipes/linux/linux-kirkwood_2.6.29.2.bb2
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 0000000000..e4ba675428
--- /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 0e349362db..00cdb2bea2 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 \
"