summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-mainline-3.2/omap_fixes
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-mainline-3.2/omap_fixes')
-rw-r--r--recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0001-omap3-Increase-limit-on-bootarg-mpurate.patch33
-rw-r--r--recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0002-ARM-OMAP-AM3517-3505-fix-crash-on-boot-due-to-incorr.patch110
-rw-r--r--recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0003-ARM-OMAP4-hwmod-Don-t-wait-for-the-idle-status-if-mo.patch200
-rw-r--r--recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0004-ARM-OMAP4-clock-Add-CPU-local-timer-clock-node.patch56
-rw-r--r--recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0005-ARM-OMAP3-hwmod-data-disable-multiblock-reads-on-MMC.patch161
-rw-r--r--recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0006-OMAP-HWMOD-add-es3plus-to-am36xx-am35xx.patch34
6 files changed, 594 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0001-omap3-Increase-limit-on-bootarg-mpurate.patch b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0001-omap3-Increase-limit-on-bootarg-mpurate.patch
new file mode 100644
index 00000000..597c4dd5
--- /dev/null
+++ b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0001-omap3-Increase-limit-on-bootarg-mpurate.patch
@@ -0,0 +1,33 @@
1From 8c23e194ca34d280d21ca845acd18052928002d0 Mon Sep 17 00:00:00 2001
2From: Sanjeev Premi <premi@ti.com>
3Date: Thu, 29 Apr 2010 14:09:42 +0530
4Subject: [PATCH 1/6] omap3: Increase limit on bootarg 'mpurate'
5
6The value of mpurate is currently expected to be less
7than 1000 when specified in MHz.
8
9This patch raises this limit to 2000 to support 1GHz
10capable processors. The new limit should be reasonable
11for quite some time.
12
13Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
14---
15 arch/arm/plat-omap/clock.c | 2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
19index 567e4b5..fe4e67c 100644
20--- a/arch/arm/plat-omap/clock.c
21+++ b/arch/arm/plat-omap/clock.c
22@@ -186,7 +186,7 @@ static int __init omap_clk_setup(char *str)
23 if (!mpurate)
24 return 1;
25
26- if (mpurate < 1000)
27+ if (mpurate < 2000)
28 mpurate *= 1000000;
29
30 return 1;
31--
321.7.7.4
33
diff --git a/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0002-ARM-OMAP-AM3517-3505-fix-crash-on-boot-due-to-incorr.patch b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0002-ARM-OMAP-AM3517-3505-fix-crash-on-boot-due-to-incorr.patch
new file mode 100644
index 00000000..5c839c6f
--- /dev/null
+++ b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0002-ARM-OMAP-AM3517-3505-fix-crash-on-boot-due-to-incorr.patch
@@ -0,0 +1,110 @@
1From 4f047b347137482b1894ab1c48ed472993dbbe54 Mon Sep 17 00:00:00 2001
2From: Paul Walmsley <paul@pwsan.com>
3Date: Fri, 16 Dec 2011 16:09:11 -0800
4Subject: [PATCH 2/6] ARM: OMAP: AM3517/3505: fix crash on boot due to
5 incorrect voltagedomain data
6
7AM3517/3505 chips don't have voltage controller and voltage processor
8IP blocks. Trying to use OMAP34xx/36xx voltage domain data on these
9chips causes a crash during boot:
10
11 omap_vc_init_channel: PMIC info requried to configure vc forvdd_core not populated.Hence cannot initialize vc
12 Unable to handle kernel NULL pointer dereference at virtual address 00000025
13 pgd = c0004000
14 [00000025] *pgd=00000000
15 Internal error: Oops: 5 [#1] SMP
16 Modules linked in:
17 CPU: 0 Tainted: G W (3.2.0-rc5-00006-g402ecf4 #304)
18 PC is at omap_vp_init+0x5c/0x14c
19 LR is at omap_vp_init+0x54/0x14c
20
21Fix this by using very minimal voltage domain definitions for AM3517/3505.
22
23Signed-off-by: Paul Walmsley <paul@pwsan.com>
24Cc: Igor Grinberg <grinberg@compulab.co.il>
25Cc: Kevin Hilman <khilman@ti.com>
26Signed-off-by: Tony Lindgren <tony@atomide.com>
27---
28 arch/arm/mach-omap2/voltagedomains3xxx_data.c | 40 +++++++++++++++++++++----
29 1 files changed, 34 insertions(+), 6 deletions(-)
30
31diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
32index 071101d..636b688 100644
33--- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c
34+++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
35@@ -31,6 +31,14 @@
36 * VDD data
37 */
38
39+/* OMAP3-common voltagedomain data */
40+
41+static struct voltagedomain omap3_voltdm_wkup = {
42+ .name = "wakeup",
43+};
44+
45+/* 34xx/36xx voltagedomain data */
46+
47 static const struct omap_vfsm_instance omap3_vdd1_vfsm = {
48 .voltsetup_reg = OMAP3_PRM_VOLTSETUP1_OFFSET,
49 .voltsetup_mask = OMAP3430_SETUP_TIME1_MASK,
50@@ -63,10 +71,6 @@ static struct voltagedomain omap3_voltdm_core = {
51 .vp = &omap3_vp_core,
52 };
53
54-static struct voltagedomain omap3_voltdm_wkup = {
55- .name = "wakeup",
56-};
57-
58 static struct voltagedomain *voltagedomains_omap3[] __initdata = {
59 &omap3_voltdm_mpu,
60 &omap3_voltdm_core,
61@@ -74,11 +78,30 @@ static struct voltagedomain *voltagedomains_omap3[] __initdata = {
62 NULL,
63 };
64
65+/* AM35xx voltagedomain data */
66+
67+static struct voltagedomain am35xx_voltdm_mpu = {
68+ .name = "mpu_iva",
69+};
70+
71+static struct voltagedomain am35xx_voltdm_core = {
72+ .name = "core",
73+};
74+
75+static struct voltagedomain *voltagedomains_am35xx[] __initdata = {
76+ &am35xx_voltdm_mpu,
77+ &am35xx_voltdm_core,
78+ &omap3_voltdm_wkup,
79+ NULL,
80+};
81+
82+
83 static const char *sys_clk_name __initdata = "sys_ck";
84
85 void __init omap3xxx_voltagedomains_init(void)
86 {
87 struct voltagedomain *voltdm;
88+ struct voltagedomain **voltdms;
89 int i;
90
91 /*
92@@ -93,8 +116,13 @@ void __init omap3xxx_voltagedomains_init(void)
93 omap3_voltdm_core.volt_data = omap34xx_vddcore_volt_data;
94 }
95
96- for (i = 0; voltdm = voltagedomains_omap3[i], voltdm; i++)
97+ if (cpu_is_omap3517() || cpu_is_omap3505())
98+ voltdms = voltagedomains_am35xx;
99+ else
100+ voltdms = voltagedomains_omap3;
101+
102+ for (i = 0; voltdm = voltdms[i], voltdm; i++)
103 voltdm->sys_clk.name = sys_clk_name;
104
105- voltdm_init(voltagedomains_omap3);
106+ voltdm_init(voltdms);
107 };
108--
1091.7.7.4
110
diff --git a/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0003-ARM-OMAP4-hwmod-Don-t-wait-for-the-idle-status-if-mo.patch b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0003-ARM-OMAP4-hwmod-Don-t-wait-for-the-idle-status-if-mo.patch
new file mode 100644
index 00000000..aa293045
--- /dev/null
+++ b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0003-ARM-OMAP4-hwmod-Don-t-wait-for-the-idle-status-if-mo.patch
@@ -0,0 +1,200 @@
1From 3752df4a899250ce6ad4ebd46e0c58235f9dcfa0 Mon Sep 17 00:00:00 2001
2From: Benoit Cousson <b-cousson@ti.com>
3Date: Fri, 16 Dec 2011 16:09:11 -0800
4Subject: [PATCH 3/6] ARM: OMAP4: hwmod: Don't wait for the idle status if
5 modulemode is not supported
6
7If the module does not have any modulemode, the _disable_module function
8will do nothing. There is then no point waiting for a idle status change.
9
10It will remove the following warnings.
11
12[ 0.331848] omap_hwmod: dmm: _wait_target_disable failed
13[ 0.339935] omap_hwmod: emif_fw: _wait_target_disable failed
14[ 0.348358] omap_hwmod: l3_main_1: _wait_target_disable failed
15[ 0.356964] omap_hwmod: l3_main_2: _wait_target_disable failed
16[ 0.365600] omap_hwmod: l4_abe: _wait_target_disable failed
17[ 0.373931] omap_hwmod: l4_cfg: _wait_target_disable failed
18[ 0.382263] omap_hwmod: l4_per: _wait_target_disable failed
19[ 0.391113] omap_hwmod: l4_wkup: _wait_target_disable failed
20[ 0.399536] omap_hwmod: dma_system: _wait_target_disable failed
21[ 0.408325] omap_hwmod: dss_core: _wait_target_disable failed
22[ 0.416839] omap_hwmod: dss_dispc: _wait_target_disable failed
23[ 0.425445] omap_hwmod: dss_dsi1: _wait_target_disable failed
24[ 0.433990] omap_hwmod: dss_dsi2: _wait_target_disable failed
25[ 0.442504] omap_hwmod: dss_hdmi: _wait_target_disable failed
26[ 0.451019] omap_hwmod: dss_rfbi: _wait_target_disable failed
27[ 0.459564] omap_hwmod: dss_venc: _wait_target_disable failed
28[ 0.489471] omap_hwmod: mailbox: _wait_target_disable failed
29[ 0.505920] omap_hwmod: spinlock: _wait_target_disable failed
30
31Note: For such module, the state is managed automatically by HW according
32to clock domain transition. It is then not possible to wait for idle even
33later in the _idle function since the status will change at clock domain
34boundary.
35
36Signed-off-by: Benoit Cousson <b-cousson@ti.com>
37Cc: Paul Walmsley <paul@pwsan.com>
38Cc: Rajendra Nayak <rnayak@ti.com>
39[paul@pwsan.com: renamed fns to indicate that they are OMAP4-only; moved
40 _wait_target_disable() into _disable_module(), removing duplicate code]
41Signed-off-by: Paul Walmsley <paul@pwsan.com>
42Signed-off-by: Tony Lindgren <tony@atomide.com>
43---
44 arch/arm/mach-omap2/omap_hwmod.c | 98 +++++++++++++++++++-------------------
45 1 files changed, 49 insertions(+), 49 deletions(-)
46
47diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
48index 207a2ff..ebace0f 100644
49--- a/arch/arm/mach-omap2/omap_hwmod.c
50+++ b/arch/arm/mach-omap2/omap_hwmod.c
51@@ -706,27 +706,65 @@ static void _enable_module(struct omap_hwmod *oh)
52 }
53
54 /**
55- * _disable_module - enable CLKCTRL modulemode on OMAP4
56+ * _omap4_wait_target_disable - wait for a module to be disabled on OMAP4
57+ * @oh: struct omap_hwmod *
58+ *
59+ * Wait for a module @oh to enter slave idle. Returns 0 if the module
60+ * does not have an IDLEST bit or if the module successfully enters
61+ * slave idle; otherwise, pass along the return value of the
62+ * appropriate *_cm*_wait_module_idle() function.
63+ */
64+static int _omap4_wait_target_disable(struct omap_hwmod *oh)
65+{
66+ if (!cpu_is_omap44xx())
67+ return 0;
68+
69+ if (!oh)
70+ return -EINVAL;
71+
72+ if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
73+ return 0;
74+
75+ if (oh->flags & HWMOD_NO_IDLEST)
76+ return 0;
77+
78+ return omap4_cminst_wait_module_idle(oh->clkdm->prcm_partition,
79+ oh->clkdm->cm_inst,
80+ oh->clkdm->clkdm_offs,
81+ oh->prcm.omap4.clkctrl_offs);
82+}
83+
84+/**
85+ * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
86 * @oh: struct omap_hwmod *
87 *
88 * Disable the PRCM module mode related to the hwmod @oh.
89- * No return value.
90+ * Return EINVAL if the modulemode is not supported and 0 in case of success.
91 */
92-static void _disable_module(struct omap_hwmod *oh)
93+static int _omap4_disable_module(struct omap_hwmod *oh)
94 {
95+ int v;
96+
97 /* The module mode does not exist prior OMAP4 */
98- if (cpu_is_omap24xx() || cpu_is_omap34xx())
99- return;
100+ if (!cpu_is_omap44xx())
101+ return -EINVAL;
102
103 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
104- return;
105+ return -EINVAL;
106
107- pr_debug("omap_hwmod: %s: _disable_module\n", oh->name);
108+ pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
109
110 omap4_cminst_module_disable(oh->clkdm->prcm_partition,
111 oh->clkdm->cm_inst,
112 oh->clkdm->clkdm_offs,
113 oh->prcm.omap4.clkctrl_offs);
114+
115+ v = _omap4_wait_target_disable(oh);
116+ if (v)
117+ pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
118+ oh->name);
119+
120+ return 0;
121 }
122
123 /**
124@@ -1153,36 +1191,6 @@ static int _wait_target_ready(struct omap_hwmod *oh)
125 }
126
127 /**
128- * _wait_target_disable - wait for a module to be disabled
129- * @oh: struct omap_hwmod *
130- *
131- * Wait for a module @oh to enter slave idle. Returns 0 if the module
132- * does not have an IDLEST bit or if the module successfully enters
133- * slave idle; otherwise, pass along the return value of the
134- * appropriate *_cm*_wait_module_idle() function.
135- */
136-static int _wait_target_disable(struct omap_hwmod *oh)
137-{
138- /* TODO: For now just handle OMAP4+ */
139- if (cpu_is_omap24xx() || cpu_is_omap34xx())
140- return 0;
141-
142- if (!oh)
143- return -EINVAL;
144-
145- if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
146- return 0;
147-
148- if (oh->flags & HWMOD_NO_IDLEST)
149- return 0;
150-
151- return omap4_cminst_wait_module_idle(oh->clkdm->prcm_partition,
152- oh->clkdm->cm_inst,
153- oh->clkdm->clkdm_offs,
154- oh->prcm.omap4.clkctrl_offs);
155-}
156-
157-/**
158 * _lookup_hardreset - fill register bit info for this hwmod/reset line
159 * @oh: struct omap_hwmod *
160 * @name: name of the reset line in the context of this hwmod
161@@ -1524,8 +1532,6 @@ static int _enable(struct omap_hwmod *oh)
162 */
163 static int _idle(struct omap_hwmod *oh)
164 {
165- int ret;
166-
167 pr_debug("omap_hwmod: %s: idling\n", oh->name);
168
169 if (oh->_state != _HWMOD_STATE_ENABLED) {
170@@ -1537,11 +1543,9 @@ static int _idle(struct omap_hwmod *oh)
171 if (oh->class->sysc)
172 _idle_sysc(oh);
173 _del_initiator_dep(oh, mpu_oh);
174- _disable_module(oh);
175- ret = _wait_target_disable(oh);
176- if (ret)
177- pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
178- oh->name);
179+
180+ _omap4_disable_module(oh);
181+
182 /*
183 * The module must be in idle mode before disabling any parents
184 * clocks. Otherwise, the parent clock might be disabled before
185@@ -1642,11 +1646,7 @@ static int _shutdown(struct omap_hwmod *oh)
186 if (oh->_state == _HWMOD_STATE_ENABLED) {
187 _del_initiator_dep(oh, mpu_oh);
188 /* XXX what about the other system initiators here? dma, dsp */
189- _disable_module(oh);
190- ret = _wait_target_disable(oh);
191- if (ret)
192- pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
193- oh->name);
194+ _omap4_disable_module(oh);
195 _disable_clocks(oh);
196 if (oh->clkdm)
197 clkdm_hwmod_disable(oh->clkdm, oh);
198--
1991.7.7.4
200
diff --git a/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0004-ARM-OMAP4-clock-Add-CPU-local-timer-clock-node.patch b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0004-ARM-OMAP4-clock-Add-CPU-local-timer-clock-node.patch
new file mode 100644
index 00000000..f6c4ab68
--- /dev/null
+++ b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0004-ARM-OMAP4-clock-Add-CPU-local-timer-clock-node.patch
@@ -0,0 +1,56 @@
1From 65f1ea963900225224754f674e8907248262a46b Mon Sep 17 00:00:00 2001
2From: Santosh Shilimkar <santosh.shilimkar@ti.com>
3Date: Fri, 16 Dec 2011 16:09:12 -0800
4Subject: [PATCH 4/6] ARM: OMAP4: clock: Add CPU local timer clock node
5
6Local timer clock is sourced from the CPU clock and hence changes
7along with CPU clock. These per CPU local timers are used as
8clock-events, so they need to be reconfigured on CPU frequency
9change as part of CPUfreq governor.
10
11Newly introduced clockevents_reconfigure() needs to know the
12twd clock-rate. Provide a clock-node to make clk_get_rate() work
13for TWD.
14
15Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
16Cc: Paul Walmsley <paul@pwsan.com>
17Cc: Kevin Hilman <khilman@ti.com>
18[paul@pwsan.com: renamed clock node to 'mpu_periphclk' to indicate that this
19 is the Cortex-A9 MPCore subsystem clock PERIPHCLK (DDI 0407G); moved
20 clock and clkdev entries to match the autogenerated script output]
21Signed-off-by: Paul Walmsley <paul@pwsan.com>
22Signed-off-by: Tony Lindgren <tony@atomide.com>
23---
24 arch/arm/mach-omap2/clock44xx_data.c | 9 +++++++++
25 1 files changed, 9 insertions(+), 0 deletions(-)
26
27diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
28index 0798a80..730097e 100644
29--- a/arch/arm/mach-omap2/clock44xx_data.c
30+++ b/arch/arm/mach-omap2/clock44xx_data.c
31@@ -1206,6 +1206,14 @@ static const struct clksel ocp_abe_iclk_div[] = {
32 { .parent = NULL },
33 };
34
35+static struct clk mpu_periphclk = {
36+ .name = "mpu_periphclk",
37+ .parent = &dpll_mpu_ck,
38+ .ops = &clkops_null,
39+ .fixed_div = 2,
40+ .recalc = &omap_fixed_divisor_recalc,
41+};
42+
43 static struct clk ocp_abe_iclk = {
44 .name = "ocp_abe_iclk",
45 .parent = &aess_fclk,
46@@ -3189,6 +3197,7 @@ static struct omap_clk omap44xx_clks[] = {
47 CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X),
48 CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X),
49 CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X),
50+ CLK("smp_twd", NULL, &mpu_periphclk, CK_443X),
51 CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X),
52 CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X),
53 CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X),
54--
551.7.7.4
56
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
diff --git a/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0006-OMAP-HWMOD-add-es3plus-to-am36xx-am35xx.patch b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0006-OMAP-HWMOD-add-es3plus-to-am36xx-am35xx.patch
new file mode 100644
index 00000000..38433450
--- /dev/null
+++ b/recipes-kernel/linux/linux-mainline-3.2/omap_fixes/0006-OMAP-HWMOD-add-es3plus-to-am36xx-am35xx.patch
@@ -0,0 +1,34 @@
1From 9607ccc0276ee734d3c1a58da0ab4ee18c7fbd29 Mon Sep 17 00:00:00 2001
2From: Robert Nelson <robertcnelson@gmail.com>
3Date: Wed, 28 Dec 2011 10:32:54 -0600
4Subject: [PATCH 6/6] OMAP: HWMOD: add es3plus to am36xx/am35xx
5
6Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
7---
8 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 4 ++++
9 1 files changed, 4 insertions(+), 0 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
12index dcbcd64..3e1a489 100644
13--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
14+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
15@@ -3343,12 +3343,16 @@ static __initdata struct omap_hwmod *omap36xx_hwmods[] = {
16 &omap36xx_sr2_hwmod,
17 &omap3xxx_usbhsotg_hwmod,
18 &omap3xxx_mailbox_hwmod,
19+ &omap3xxx_es3plus_mmc1_hwmod,
20+ &omap3xxx_es3plus_mmc2_hwmod,
21 NULL
22 };
23
24 static __initdata struct omap_hwmod *am35xx_hwmods[] = {
25 &omap3xxx_dss_core_hwmod, /* XXX ??? */
26 &am35xx_usbhsotg_hwmod,
27+ &omap3xxx_es3plus_mmc1_hwmod,
28+ &omap3xxx_es3plus_mmc2_hwmod,
29 NULL
30 };
31
32--
331.7.7.4
34