omap24xx: Add 2.6.38 files
[openwrt/staging/mkresin.git] / target / linux / omap24xx / patches-2.6.38 / 810-mmc-fixes.patch
1 ---
2 drivers/mmc/core/core.c | 5 +++--
3 drivers/mmc/host/omap.c | 7 +++++--
4 include/linux/mmc/host.h | 2 ++
5 3 files changed, 10 insertions(+), 4 deletions(-)
6
7 Index: linux-2.6.38-rc6/drivers/mmc/host/omap.c
8 ===================================================================
9 --- linux-2.6.38-rc6.orig/drivers/mmc/host/omap.c 2011-02-22 02:25:52.000000000 +0100
10 +++ linux-2.6.38-rc6/drivers/mmc/host/omap.c 2011-02-24 00:40:46.129908862 +0100
11 @@ -389,7 +389,7 @@
12
13 mod_timer(&host->cmd_abort_timer, jiffies + HZ/2);
14
15 - OMAP_MMC_WRITE(host, CTO, 200);
16 +// OMAP_MMC_WRITE(host, CTO, 200);
17 OMAP_MMC_WRITE(host, ARGL, cmd->arg & 0xffff);
18 OMAP_MMC_WRITE(host, ARGH, cmd->arg >> 16);
19 OMAP_MMC_WRITE(host, IE,
20 @@ -1456,6 +1456,7 @@
21 host->dma_ch = -1;
22
23 host->irq = irq;
24 + host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);
25 host->phys_base = host->mem_res->start;
26 host->virt_base = ioremap(res->start, res->end - res->start + 1);
27 if (!host->virt_base)
28 @@ -1495,7 +1496,9 @@
29 }
30 }
31
32 - host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);
33 + /* Make sure the detect workqueue was run at least once. */
34 + printk(KERN_INFO "OMAP-mmc: waiting for cards...\n");
35 + mmc_flush_scheduled_work();
36
37 return 0;
38
39 Index: linux-2.6.38-rc6/drivers/mmc/core/core.c
40 ===================================================================
41 --- linux-2.6.38-rc6.orig/drivers/mmc/core/core.c 2011-02-22 02:25:52.000000000 +0100
42 +++ linux-2.6.38-rc6/drivers/mmc/core/core.c 2011-02-24 00:40:46.131908784 +0100
43 @@ -75,12 +75,13 @@
44 }
45
46 /*
47 - * Internal function. Flush all scheduled work from the MMC work queue.
48 + * Flush all scheduled work from the MMC work queue.
49 */
50 -static void mmc_flush_scheduled_work(void)
51 +void mmc_flush_scheduled_work(void)
52 {
53 flush_workqueue(workqueue);
54 }
55 +EXPORT_SYMBOL(mmc_flush_scheduled_work);
56
57 /**
58 * mmc_request_done - finish processing an MMC request
59 Index: linux-2.6.38-rc6/include/linux/mmc/host.h
60 ===================================================================
61 --- linux-2.6.38-rc6.orig/include/linux/mmc/host.h 2011-02-22 02:25:52.000000000 +0100
62 +++ linux-2.6.38-rc6/include/linux/mmc/host.h 2011-02-24 00:40:46.131908784 +0100
63 @@ -326,5 +326,7 @@
64 return host->pm_flags & MMC_PM_KEEP_POWER;
65 }
66
67 +void mmc_flush_scheduled_work(void);
68 +
69 #endif
70