summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0005-ARM-OMAP3-hwmod-data-disable-multiblock-reads-on-MMC.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0005-ARM-OMAP3-hwmod-data-disable-multiblock-reads-on-MMC.patch')
-rw-r--r--recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0005-ARM-OMAP3-hwmod-data-disable-multiblock-reads-on-MMC.patch161
1 files changed, 161 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0005-ARM-OMAP3-hwmod-data-disable-multiblock-reads-on-MMC.patch b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0005-ARM-OMAP3-hwmod-data-disable-multiblock-reads-on-MMC.patch
new file mode 100644
index 00000000..11461bc3
--- /dev/null
+++ b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0005-ARM-OMAP3-hwmod-data-disable-multiblock-reads-on-MMC.patch
@@ -0,0 +1,161 @@
1From 44d502c38e4c7bd924c7ac987af4525ec3e8818f Mon Sep 17 00:00:00 2001
2From: Paul Walmsley <paul@pwsan.com>
3Date: Thu, 15 Dec 2011 23:30:44 -0700
4Subject: [PATCH 5/6] ARM: OMAP3: hwmod data: disable multiblock reads on
5 MMC1/2 on OMAP34xx/35xx <= ES2.1
6
7The HSMMC1/HSMMC2 host controllers on OMAP34xx and
8OMAP3503/3515/3525/3530 chips at ES levels prior to 3.0 can't do multiple
9block reads[1]. Mark the hwmod data appropriately.
10
11Reported by Dave Hylands <dhylands@gmail.com> and Steve Sakoman
12<sakoman@gmail.com>. Thanks to Steve Sakoman for further help
13testing this patch.
14
151. See for example Advisory 2.1.1.128 "MMC: Multiple Block Read
16 Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_
17 Revision F (October 2010) (SPRZ278F), available from
18 http://focus.ti.com/lit/er/sprz278f/sprz278f.pdf
19
20Note: added 36xx/am35 stuff in the next patch..
21
22Signed-off-by: Paul Walmsley <paul@pwsan.com>
23Cc: Dave Hylands <dhylands@gmail.com>
24Cc: Steve Sakoman <sakoman@gmail.com>
25Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
26---
27 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 90 ++++++++++++++++++++++++++-
28 1 files changed, 86 insertions(+), 4 deletions(-)
29
30diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
31index eef43e2..dcbcd64 100644
32--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
33+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
34@@ -3072,7 +3072,35 @@ static struct omap_mmc_dev_attr mmc1_dev_attr = {
35 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
36 };
37
38-static struct omap_hwmod omap3xxx_mmc1_hwmod = {
39+/* See 35xx errata 2.1.1.128 in SPRZ278F */
40+static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
41+ .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
42+ OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
43+};
44+
45+static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
46+ .name = "mmc1",
47+ .mpu_irqs = omap34xx_mmc1_mpu_irqs,
48+ .sdma_reqs = omap34xx_mmc1_sdma_reqs,
49+ .opt_clks = omap34xx_mmc1_opt_clks,
50+ .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
51+ .main_clk = "mmchs1_fck",
52+ .prcm = {
53+ .omap2 = {
54+ .module_offs = CORE_MOD,
55+ .prcm_reg_id = 1,
56+ .module_bit = OMAP3430_EN_MMC1_SHIFT,
57+ .idlest_reg_id = 1,
58+ .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
59+ },
60+ },
61+ .dev_attr = &mmc1_pre_es3_dev_attr,
62+ .slaves = omap3xxx_mmc1_slaves,
63+ .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
64+ .class = &omap34xx_mmc_class,
65+};
66+
67+static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
68 .name = "mmc1",
69 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
70 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
71@@ -3115,7 +3143,34 @@ static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
72 &omap3xxx_l4_core__mmc2,
73 };
74
75-static struct omap_hwmod omap3xxx_mmc2_hwmod = {
76+/* See 35xx errata 2.1.1.128 in SPRZ278F */
77+static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
78+ .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
79+};
80+
81+static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
82+ .name = "mmc2",
83+ .mpu_irqs = omap34xx_mmc2_mpu_irqs,
84+ .sdma_reqs = omap34xx_mmc2_sdma_reqs,
85+ .opt_clks = omap34xx_mmc2_opt_clks,
86+ .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
87+ .main_clk = "mmchs2_fck",
88+ .prcm = {
89+ .omap2 = {
90+ .module_offs = CORE_MOD,
91+ .prcm_reg_id = 1,
92+ .module_bit = OMAP3430_EN_MMC2_SHIFT,
93+ .idlest_reg_id = 1,
94+ .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
95+ },
96+ },
97+ .dev_attr = &mmc2_pre_es3_dev_attr,
98+ .slaves = omap3xxx_mmc2_slaves,
99+ .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
100+ .class = &omap34xx_mmc_class,
101+};
102+
103+static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
104 .name = "mmc2",
105 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
106 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
107@@ -3182,8 +3237,6 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
108 &omap3xxx_l4_core_hwmod,
109 &omap3xxx_l4_per_hwmod,
110 &omap3xxx_l4_wkup_hwmod,
111- &omap3xxx_mmc1_hwmod,
112- &omap3xxx_mmc2_hwmod,
113 &omap3xxx_mmc3_hwmod,
114 &omap3xxx_mpu_hwmod,
115
116@@ -3258,6 +3311,20 @@ static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = {
117 NULL
118 };
119
120+/* <= 3430ES3-only hwmods */
121+static struct omap_hwmod *omap3430_pre_es3_hwmods[] __initdata = {
122+ &omap3xxx_pre_es3_mmc1_hwmod,
123+ &omap3xxx_pre_es3_mmc2_hwmod,
124+ NULL
125+};
126+
127+/* 3430ES3+-only hwmods */
128+static struct omap_hwmod *omap3430_es3plus_hwmods[] __initdata = {
129+ &omap3xxx_es3plus_mmc1_hwmod,
130+ &omap3xxx_es3plus_mmc2_hwmod,
131+ NULL
132+};
133+
134 /* 34xx-only hwmods (all ES revisions) */
135 static __initdata struct omap_hwmod *omap34xx_hwmods[] = {
136 &omap3xxx_iva_hwmod,
137@@ -3334,6 +3401,21 @@ int __init omap3xxx_hwmod_init(void)
138 h = omap3430es2plus_hwmods;
139 };
140
141+ if (h) {
142+ r = omap_hwmod_register(h);
143+ if (r < 0)
144+ return r;
145+ }
146+
147+ h = NULL;
148+ if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
149+ rev == OMAP3430_REV_ES2_1) {
150+ h = omap3430_pre_es3_hwmods;
151+ } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
152+ rev == OMAP3430_REV_ES3_1_2) {
153+ h = omap3430_es3plus_hwmods;
154+ };
155+
156 if (h)
157 r = omap_hwmod_register(h);
158
159--
1601.7.7.4
161