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