summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap-2.6.39/mfd/0004-arm-omap-usb-ehci-and-ohci-hwmod-structures-for-omap.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/mfd/0004-arm-omap-usb-ehci-and-ohci-hwmod-structures-for-omap.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap-2.6.39/mfd/0004-arm-omap-usb-ehci-and-ohci-hwmod-structures-for-omap.patch406
1 files changed, 406 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/mfd/0004-arm-omap-usb-ehci-and-ohci-hwmod-structures-for-omap.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/mfd/0004-arm-omap-usb-ehci-and-ohci-hwmod-structures-for-omap.patch
new file mode 100644
index 00000000..3d4d8a2d
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/mfd/0004-arm-omap-usb-ehci-and-ohci-hwmod-structures-for-omap.patch
@@ -0,0 +1,406 @@
1From 339b167f6f76707a2d6ae3a7c0b921b8278564af Mon Sep 17 00:00:00 2001
2From: Keshava Munegowda <Keshava_mgowda@ti.com>
3Date: Wed, 1 Jun 2011 11:02:49 -0700
4Subject: [PATCH 04/13] arm: omap: usb: ehci and ohci hwmod structures for omap3 and omap4
5
6Following 2 hwmod strcuture are added:
7UHH hwmod of usbhs with uhh base address and
8EHCI , OHCI irq and base addresses.
9TLL hwmod of usbhs with the TLL base address and irq.
10
11Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
12---
13 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 184 ++++++++++++++++++++++++++++
14 arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 153 +++++++++++++++++++++++
15 2 files changed, 337 insertions(+), 0 deletions(-)
16
17diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
18index 909a84d..fe9a176 100644
19--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
20+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
21@@ -84,6 +84,8 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod;
22 static struct omap_hwmod omap3xxx_mcbsp5_hwmod;
23 static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod;
24 static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod;
25+static struct omap_hwmod omap34xx_usb_host_hs_hwmod;
26+static struct omap_hwmod omap34xx_usb_tll_hs_hwmod;
27
28 /* L3 -> L4_CORE interface */
29 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
30@@ -3574,6 +3576,185 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = {
31 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
32 };
33
34+/*
35+ * 'usb_host_hs' class
36+ * high-speed multi-port usb host controller
37+ */
38+static struct omap_hwmod_ocp_if omap34xx_usb_host_hs__l3_main_2 = {
39+ .master = &omap34xx_usb_host_hs_hwmod,
40+ .slave = &omap3xxx_l3_main_hwmod,
41+ .clk = "core_l3_ick",
42+ .user = OCP_USER_MPU,
43+};
44+
45+static struct omap_hwmod_class_sysconfig omap34xx_usb_host_hs_sysc = {
46+ .rev_offs = 0x0000,
47+ .sysc_offs = 0x0010,
48+ .syss_offs = 0x0014,
49+ .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
50+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
51+ MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
52+ .sysc_fields = &omap_hwmod_sysc_type1,
53+};
54+
55+static struct omap_hwmod_class omap34xx_usb_host_hs_hwmod_class = {
56+ .name = "usbhs_uhh",
57+ .sysc = &omap34xx_usb_host_hs_sysc,
58+};
59+
60+static struct omap_hwmod_ocp_if *omap34xx_usb_host_hs_masters[] = {
61+ &omap34xx_usb_host_hs__l3_main_2,
62+};
63+
64+static struct omap_hwmod_irq_info omap34xx_usb_host_hs_irqs[] = {
65+ { .name = "ohci-irq", .irq = 76 },
66+ { .name = "ehci-irq", .irq = 77 },
67+};
68+
69+static struct omap_hwmod_addr_space omap34xx_usb_host_hs_addrs[] = {
70+ {
71+ .name = "uhh",
72+ .pa_start = 0x48064000,
73+ .pa_end = 0x480643ff,
74+ .flags = ADDR_TYPE_RT
75+ },
76+ {
77+ .name = "ohci",
78+ .pa_start = 0x48064400,
79+ .pa_end = 0x480647FF,
80+ .flags = ADDR_MAP_ON_INIT
81+ },
82+ {
83+ .name = "ehci",
84+ .pa_start = 0x48064800,
85+ .pa_end = 0x48064CFF,
86+ .flags = ADDR_MAP_ON_INIT
87+ }
88+};
89+
90+static struct omap_hwmod_ocp_if omap34xx_l4_cfg__usb_host_hs = {
91+ .master = &omap3xxx_l4_core_hwmod,
92+ .slave = &omap34xx_usb_host_hs_hwmod,
93+ .clk = "l4_ick",
94+ .addr = omap34xx_usb_host_hs_addrs,
95+ .addr_cnt = ARRAY_SIZE(omap34xx_usb_host_hs_addrs),
96+ .user = OCP_USER_MPU | OCP_USER_SDMA,
97+};
98+
99+static struct omap_hwmod_ocp_if omap34xx_f128m_cfg__usb_host_hs = {
100+ .clk = "usbhost_120m_fck",
101+ .user = OCP_USER_MPU,
102+ .flags = OCPIF_SWSUP_IDLE,
103+};
104+
105+static struct omap_hwmod_ocp_if omap34xx_f48m_cfg__usb_host_hs = {
106+ .clk = "usbhost_48m_fck",
107+ .user = OCP_USER_MPU,
108+ .flags = OCPIF_SWSUP_IDLE,
109+};
110+
111+static struct omap_hwmod_ocp_if *omap34xx_usb_host_hs_slaves[] = {
112+ &omap34xx_l4_cfg__usb_host_hs,
113+ &omap34xx_f128m_cfg__usb_host_hs,
114+ &omap34xx_f48m_cfg__usb_host_hs,
115+};
116+
117+static struct omap_hwmod omap34xx_usb_host_hs_hwmod = {
118+ .name = "usbhs_uhh",
119+ .class = &omap34xx_usb_host_hs_hwmod_class,
120+ .mpu_irqs = omap34xx_usb_host_hs_irqs,
121+ .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_usb_host_hs_irqs),
122+ .main_clk = "usbhost_ick",
123+ .prcm = {
124+ .omap2 = {
125+ .module_offs = OMAP3430ES2_USBHOST_MOD,
126+ .prcm_reg_id = 1,
127+ .module_bit = 0,
128+ .idlest_reg_id = 1,
129+ .idlest_idle_bit = 1,
130+ .idlest_stdby_bit = 0,
131+ },
132+ },
133+ .slaves = omap34xx_usb_host_hs_slaves,
134+ .slaves_cnt = ARRAY_SIZE(omap34xx_usb_host_hs_slaves),
135+ .masters = omap34xx_usb_host_hs_masters,
136+ .masters_cnt = ARRAY_SIZE(omap34xx_usb_host_hs_masters),
137+ .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
138+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
139+};
140+
141+/*
142+ * 'usb_tll_hs' class
143+ * usb_tll_hs module is the adapter on the usb_host_hs ports
144+ */
145+static struct omap_hwmod_class_sysconfig omap34xx_usb_tll_hs_sysc = {
146+ .rev_offs = 0x0000,
147+ .sysc_offs = 0x0010,
148+ .syss_offs = 0x0014,
149+ .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE),
150+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
151+ .sysc_fields = &omap_hwmod_sysc_type1,
152+};
153+
154+static struct omap_hwmod_class omap34xx_usb_tll_hs_hwmod_class = {
155+ .name = "usbhs_tll",
156+ .sysc = &omap34xx_usb_tll_hs_sysc,
157+};
158+
159+static struct omap_hwmod_irq_info omap34xx_usb_tll_hs_irqs[] = {
160+ { .name = "tll-irq", .irq = 78 },
161+};
162+
163+static struct omap_hwmod_addr_space omap34xx_usb_tll_hs_addrs[] = {
164+ {
165+ .name = "tll",
166+ .pa_start = 0x48062000,
167+ .pa_end = 0x48062fff,
168+ .flags = ADDR_TYPE_RT
169+ },
170+};
171+
172+static struct omap_hwmod_ocp_if omap34xx_f_cfg__usb_tll_hs = {
173+ .clk = "usbtll_fck",
174+ .user = OCP_USER_MPU,
175+ .flags = OCPIF_SWSUP_IDLE,
176+};
177+
178+static struct omap_hwmod_ocp_if omap34xx_l4_cfg__usb_tll_hs = {
179+ .master = &omap3xxx_l4_core_hwmod,
180+ .slave = &omap34xx_usb_tll_hs_hwmod,
181+ .clk = "l4_ick",
182+ .addr = omap34xx_usb_tll_hs_addrs,
183+ .addr_cnt = ARRAY_SIZE(omap34xx_usb_tll_hs_addrs),
184+ .user = OCP_USER_MPU | OCP_USER_SDMA,
185+};
186+
187+static struct omap_hwmod_ocp_if *omap34xx_usb_tll_hs_slaves[] = {
188+ &omap34xx_l4_cfg__usb_tll_hs,
189+ &omap34xx_f_cfg__usb_tll_hs,
190+};
191+
192+static struct omap_hwmod omap34xx_usb_tll_hs_hwmod = {
193+ .name = "usbhs_tll",
194+ .class = &omap34xx_usb_tll_hs_hwmod_class,
195+ .mpu_irqs = omap34xx_usb_tll_hs_irqs,
196+ .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_usb_tll_hs_irqs),
197+ .main_clk = "usbtll_ick",
198+ .prcm = {
199+ .omap2 = {
200+ .module_offs = CORE_MOD,
201+ .prcm_reg_id = 3,
202+ .module_bit = 2,
203+ .idlest_reg_id = 3,
204+ .idlest_idle_bit = 2,
205+ },
206+ },
207+ .slaves = omap34xx_usb_tll_hs_slaves,
208+ .slaves_cnt = ARRAY_SIZE(omap34xx_usb_tll_hs_slaves),
209+ .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
210+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
211+};
212+
213 static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
214 &omap3xxx_l3_main_hwmod,
215 &omap3xxx_l4_core_hwmod,
216@@ -3656,6 +3837,9 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
217 /* usbotg for am35x */
218 &am35xx_usbhsotg_hwmod,
219
220+ &omap34xx_usb_host_hs_hwmod,
221+ &omap34xx_usb_tll_hs_hwmod,
222+
223 NULL,
224 };
225
226diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
227index abc548a..d7112b0 100644
228--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
229+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
230@@ -66,6 +66,8 @@ static struct omap_hwmod omap44xx_mmc2_hwmod;
231 static struct omap_hwmod omap44xx_mpu_hwmod;
232 static struct omap_hwmod omap44xx_mpu_private_hwmod;
233 static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
234+static struct omap_hwmod omap44xx_usb_host_hs_hwmod;
235+static struct omap_hwmod omap44xx_usb_tll_hs_hwmod;
236
237 /*
238 * Interconnects omap_hwmod structures
239@@ -5027,6 +5029,155 @@ static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
240 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
241 };
242
243+/*
244+ * 'usb_host_hs' class
245+ * high-speed multi-port usb host controller
246+ */
247+static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = {
248+ .master = &omap44xx_usb_host_hs_hwmod,
249+ .slave = &omap44xx_l3_main_2_hwmod,
250+ .clk = "l3_div_ck",
251+ .user = OCP_USER_MPU | OCP_USER_SDMA,
252+};
253+
254+static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = {
255+ .rev_offs = 0x0000,
256+ .sysc_offs = 0x0010,
257+ .syss_offs = 0x0014,
258+ .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
259+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
260+ MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
261+ .sysc_fields = &omap_hwmod_sysc_type2,
262+};
263+
264+static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = {
265+ .name = "usbhs_uhh",
266+ .sysc = &omap44xx_usb_host_hs_sysc,
267+};
268+
269+static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_masters[] = {
270+ &omap44xx_usb_host_hs__l3_main_2,
271+};
272+
273+static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = {
274+ { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START },
275+ { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START },
276+};
277+
278+static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = {
279+ {
280+ .name = "uhh",
281+ .pa_start = 0x4a064000,
282+ .pa_end = 0x4a0647ff,
283+ .flags = ADDR_TYPE_RT
284+ },
285+ {
286+ .name = "ohci",
287+ .pa_start = 0x4A064800,
288+ .pa_end = 0x4A064BFF,
289+ .flags = ADDR_MAP_ON_INIT
290+ },
291+ {
292+ .name = "ehci",
293+ .pa_start = 0x4A064C00,
294+ .pa_end = 0x4A064FFF,
295+ .flags = ADDR_MAP_ON_INIT
296+ }
297+};
298+
299+static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = {
300+ .master = &omap44xx_l4_cfg_hwmod,
301+ .slave = &omap44xx_usb_host_hs_hwmod,
302+ .clk = "l4_div_ck",
303+ .addr = omap44xx_usb_host_hs_addrs,
304+ .addr_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_addrs),
305+ .user = OCP_USER_MPU | OCP_USER_SDMA,
306+};
307+
308+static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_slaves[] = {
309+ &omap44xx_l4_cfg__usb_host_hs,
310+};
311+
312+static struct omap_hwmod omap44xx_usb_host_hs_hwmod = {
313+ .name = "usbhs_uhh",
314+ .class = &omap44xx_usb_host_hs_hwmod_class,
315+ .mpu_irqs = omap44xx_usb_host_hs_irqs,
316+ .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_irqs),
317+ .main_clk = "usb_host_hs_fck",
318+ .prcm = {
319+ .omap4 = {
320+ .clkctrl_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
321+ },
322+ },
323+ .slaves = omap44xx_usb_host_hs_slaves,
324+ .slaves_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_slaves),
325+ .masters = omap44xx_usb_host_hs_masters,
326+ .masters_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_masters),
327+ .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
328+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
329+};
330+
331+/*
332+ * 'usb_tll_hs' class
333+ * usb_tll_hs module is the adapter on the usb_host_hs ports
334+ */
335+static struct omap_hwmod_class_sysconfig omap44xx_usb_tll_hs_sysc = {
336+ .rev_offs = 0x0000,
337+ .sysc_offs = 0x0010,
338+ .syss_offs = 0x0014,
339+ .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE),
340+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
341+ .sysc_fields = &omap_hwmod_sysc_type1,
342+};
343+
344+static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = {
345+ .name = "usbhs_tll",
346+ .sysc = &omap44xx_usb_tll_hs_sysc,
347+};
348+
349+static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = {
350+ { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START },
351+};
352+
353+static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = {
354+ {
355+ .name = "tll",
356+ .pa_start = 0x4a062000,
357+ .pa_end = 0x4a063fff,
358+ .flags = ADDR_TYPE_RT
359+ },
360+};
361+
362+static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = {
363+ .master = &omap44xx_l4_cfg_hwmod,
364+ .slave = &omap44xx_usb_tll_hs_hwmod,
365+ .clk = "l4_div_ck",
366+ .addr = omap44xx_usb_tll_hs_addrs,
367+ .addr_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_addrs),
368+ .user = OCP_USER_MPU | OCP_USER_SDMA,
369+};
370+
371+static struct omap_hwmod_ocp_if *omap44xx_usb_tll_hs_slaves[] = {
372+ &omap44xx_l4_cfg__usb_tll_hs,
373+};
374+
375+static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = {
376+ .name = "usbhs_tll",
377+ .class = &omap44xx_usb_tll_hs_hwmod_class,
378+ .mpu_irqs = omap44xx_usb_tll_hs_irqs,
379+ .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_irqs),
380+ .main_clk = "usb_tll_hs_ick",
381+ .prcm = {
382+ .omap4 = {
383+ .clkctrl_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
384+ },
385+ },
386+ .slaves = omap44xx_usb_tll_hs_slaves,
387+ .slaves_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_slaves),
388+ .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
389+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
390+};
391+
392 static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
393
394 /* dmm class */
395@@ -5173,6 +5324,8 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
396 &omap44xx_wd_timer2_hwmod,
397 &omap44xx_wd_timer3_hwmod,
398
399+ &omap44xx_usb_host_hs_hwmod,
400+ &omap44xx_usb_tll_hs_hwmod,
401 NULL,
402 };
403
404--
4051.6.6.1
406