blob: e4ba675428ffdb7907377d805c03714f29a57743 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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.
|