Merge tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik...
[deliverable/linux.git] / arch / arm / mach-omap2 / omap_hwmod_3xxx_data.c
CommitLineData
7359154e
PW
1/*
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3 *
78183f3f 4 * Copyright (C) 2009-2011 Nokia Corporation
0a78c5c5 5 * Copyright (C) 2012 Texas Instruments, Inc.
7359154e
PW
6 * Paul Walmsley
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * The data in this file should be completely autogeneratable from
13 * the TI hardware database or other technical documentation.
14 *
15 * XXX these should be marked initdata for multi-OMAP kernels
16 */
3a8761c0
TL
17
18#include <linux/i2c-omap.h>
b86aeafc 19#include <linux/power/smartreflex.h>
4b25408f 20#include <linux/platform_data/gpio-omap.h>
b86aeafc 21
45c3eb7d 22#include <linux/omap-dma.h>
79e3cb22 23#include "l3_3xxx.h"
957988c7 24#include "l4_3xxx.h"
2203747c
AB
25#include <linux/platform_data/asoc-ti-mcbsp.h>
26#include <linux/platform_data/spi-omap2-mcspi.h>
2ab7c848 27#include <linux/platform_data/iommu-omap.h>
ce722d26 28#include <plat/dmtimer.h>
7359154e 29
4f9ed545 30#include "am35xx.h"
7d7e1eba 31
dbc04161 32#include "soc.h"
2a296c8f 33#include "omap_hwmod.h"
43b40992 34#include "omap_hwmod_common_data.h"
7359154e 35#include "prm-regbits-34xx.h"
6b667f88 36#include "cm-regbits-34xx.h"
d5e7c864
LV
37
38#include "dma.h"
3a8761c0 39#include "i2c.h"
68f39e74 40#include "mmc.h"
ff2516fb 41#include "wd_timer.h"
3d82cbbb 42#include "serial.h"
7359154e
PW
43
44/*
45 * OMAP3xxx hardware module integration data
46 *
844a3b63 47 * All of the data in this section should be autogeneratable from the
7359154e
PW
48 * TI hardware database or other technical documentation. Data that
49 * is driver-specific or driver-kernel integration-specific belongs
50 * elsewhere.
51 */
52
844a3b63
PW
53/*
54 * IP blocks
55 */
7359154e 56
844a3b63 57/* L3 */
4bb194dc 58static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
7d7e1eba
TL
59 { .irq = 9 + OMAP_INTC_START, },
60 { .irq = 10 + OMAP_INTC_START, },
61 { .irq = -1 },
4bb194dc 62};
63
4a7cf90a 64static struct omap_hwmod omap3xxx_l3_main_hwmod = {
fa98347e 65 .name = "l3_main",
43b40992 66 .class = &l3_hwmod_class,
0d619a89 67 .mpu_irqs = omap3xxx_l3_main_irqs,
2eb1875d 68 .flags = HWMOD_NO_IDLEST,
7359154e
PW
69};
70
844a3b63
PW
71/* L4 CORE */
72static struct omap_hwmod omap3xxx_l4_core_hwmod = {
73 .name = "l4_core",
74 .class = &l4_hwmod_class,
75 .flags = HWMOD_NO_IDLEST,
870ea2b8 76};
7359154e 77
844a3b63
PW
78/* L4 PER */
79static struct omap_hwmod omap3xxx_l4_per_hwmod = {
80 .name = "l4_per",
81 .class = &l4_hwmod_class,
82 .flags = HWMOD_NO_IDLEST,
273ff8c3 83};
844a3b63
PW
84
85/* L4 WKUP */
86static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
87 .name = "l4_wkup",
88 .class = &l4_hwmod_class,
89 .flags = HWMOD_NO_IDLEST,
7359154e
PW
90};
91
844a3b63
PW
92/* L4 SEC */
93static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
94 .name = "l4_sec",
95 .class = &l4_hwmod_class,
96 .flags = HWMOD_NO_IDLEST,
4a9efb62
PW
97};
98
844a3b63 99/* MPU */
ee75d95c 100static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = {
3dc3401c 101 { .name = "pmu", .irq = 3 + OMAP_INTC_START },
ee75d95c
JH
102 { .irq = -1 }
103};
104
844a3b63
PW
105static struct omap_hwmod omap3xxx_mpu_hwmod = {
106 .name = "mpu",
ee75d95c 107 .mpu_irqs = omap3xxx_mpu_irqs,
844a3b63
PW
108 .class = &mpu_hwmod_class,
109 .main_clk = "arm_fck",
b163605e
PW
110};
111
844a3b63 112/* IVA2 (IVA2) */
f42c5496 113static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
ed733619
TK
114 { .name = "logic", .rst_shift = 0, .st_shift = 8 },
115 { .name = "seq0", .rst_shift = 1, .st_shift = 9 },
116 { .name = "seq1", .rst_shift = 2, .st_shift = 10 },
f42c5496
PW
117};
118
844a3b63
PW
119static struct omap_hwmod omap3xxx_iva_hwmod = {
120 .name = "iva",
121 .class = &iva_hwmod_class,
f42c5496
PW
122 .clkdm_name = "iva2_clkdm",
123 .rst_lines = omap3xxx_iva_resets,
124 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
125 .main_clk = "iva2_ck",
ed733619
TK
126 .prcm = {
127 .omap2 = {
128 .module_offs = OMAP3430_IVA2_MOD,
129 .prcm_reg_id = 1,
130 .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
131 .idlest_reg_id = 1,
132 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
133 }
134 },
4a9efb62
PW
135};
136
c7dad45f
JH
137/*
138 * 'debugss' class
139 * debug and emulation sub system
140 */
141
142static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = {
143 .name = "debugss",
144};
145
146/* debugss */
147static struct omap_hwmod omap3xxx_debugss_hwmod = {
148 .name = "debugss",
149 .class = &omap3xxx_debugss_hwmod_class,
150 .clkdm_name = "emu_clkdm",
151 .main_clk = "emu_src_ck",
152 .flags = HWMOD_NO_IDLEST,
153};
154
844a3b63 155/* timer class */
844a3b63
PW
156static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
157 .rev_offs = 0x0000,
158 .sysc_offs = 0x0010,
159 .syss_offs = 0x0014,
725a8fe3
JH
160 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
161 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
f3a13e72
JH
162 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
163 SYSS_HAS_RESET_STATUS),
844a3b63 164 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
10759e82 165 .clockact = CLOCKACT_TEST_ICLK,
844a3b63 166 .sysc_fields = &omap_hwmod_sysc_type1,
b163605e
PW
167};
168
844a3b63
PW
169static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
170 .name = "timer",
171 .sysc = &omap3xxx_timer_sysc,
046465b7
KH
172};
173
844a3b63
PW
174/* secure timers dev attribute */
175static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
139486fa 176 .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
046465b7
KH
177};
178
844a3b63
PW
179/* always-on timers dev attribute */
180static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
181 .timer_capability = OMAP_TIMER_ALWON,
046465b7
KH
182};
183
844a3b63
PW
184/* pwm timers dev attribute */
185static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
186 .timer_capability = OMAP_TIMER_HAS_PWM,
046465b7
KH
187};
188
5c3e4ec4
JH
189/* timers with DSP interrupt dev attribute */
190static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
191 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
192};
193
194/* pwm timers with DSP interrupt dev attribute */
195static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
196 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
197};
198
844a3b63
PW
199/* timer1 */
200static struct omap_hwmod omap3xxx_timer1_hwmod = {
201 .name = "timer1",
202 .mpu_irqs = omap2_timer1_mpu_irqs,
203 .main_clk = "gpt1_fck",
204 .prcm = {
205 .omap2 = {
206 .prcm_reg_id = 1,
207 .module_bit = OMAP3430_EN_GPT1_SHIFT,
208 .module_offs = WKUP_MOD,
209 .idlest_reg_id = 1,
210 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
211 },
046465b7 212 },
844a3b63 213 .dev_attr = &capability_alwon_dev_attr,
725a8fe3 214 .class = &omap3xxx_timer_hwmod_class,
10759e82 215 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
046465b7
KH
216};
217
844a3b63
PW
218/* timer2 */
219static struct omap_hwmod omap3xxx_timer2_hwmod = {
220 .name = "timer2",
221 .mpu_irqs = omap2_timer2_mpu_irqs,
222 .main_clk = "gpt2_fck",
223 .prcm = {
224 .omap2 = {
225 .prcm_reg_id = 1,
226 .module_bit = OMAP3430_EN_GPT2_SHIFT,
227 .module_offs = OMAP3430_PER_MOD,
228 .idlest_reg_id = 1,
229 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
230 },
231 },
725a8fe3 232 .class = &omap3xxx_timer_hwmod_class,
10759e82 233 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
046465b7
KH
234};
235
844a3b63
PW
236/* timer3 */
237static struct omap_hwmod omap3xxx_timer3_hwmod = {
238 .name = "timer3",
239 .mpu_irqs = omap2_timer3_mpu_irqs,
240 .main_clk = "gpt3_fck",
241 .prcm = {
242 .omap2 = {
243 .prcm_reg_id = 1,
244 .module_bit = OMAP3430_EN_GPT3_SHIFT,
245 .module_offs = OMAP3430_PER_MOD,
246 .idlest_reg_id = 1,
247 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
248 },
249 },
844a3b63 250 .class = &omap3xxx_timer_hwmod_class,
10759e82 251 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
046465b7
KH
252};
253
844a3b63
PW
254/* timer4 */
255static struct omap_hwmod omap3xxx_timer4_hwmod = {
256 .name = "timer4",
257 .mpu_irqs = omap2_timer4_mpu_irqs,
258 .main_clk = "gpt4_fck",
259 .prcm = {
260 .omap2 = {
261 .prcm_reg_id = 1,
262 .module_bit = OMAP3430_EN_GPT4_SHIFT,
263 .module_offs = OMAP3430_PER_MOD,
264 .idlest_reg_id = 1,
265 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
266 },
267 },
844a3b63 268 .class = &omap3xxx_timer_hwmod_class,
10759e82 269 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
046465b7
KH
270};
271
844a3b63
PW
272/* timer5 */
273static struct omap_hwmod omap3xxx_timer5_hwmod = {
274 .name = "timer5",
275 .mpu_irqs = omap2_timer5_mpu_irqs,
276 .main_clk = "gpt5_fck",
277 .prcm = {
278 .omap2 = {
279 .prcm_reg_id = 1,
280 .module_bit = OMAP3430_EN_GPT5_SHIFT,
281 .module_offs = OMAP3430_PER_MOD,
282 .idlest_reg_id = 1,
283 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
284 },
4bf90f65 285 },
5c3e4ec4 286 .dev_attr = &capability_dsp_dev_attr,
844a3b63 287 .class = &omap3xxx_timer_hwmod_class,
10759e82 288 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
4bf90f65
KM
289};
290
844a3b63
PW
291/* timer6 */
292static struct omap_hwmod omap3xxx_timer6_hwmod = {
293 .name = "timer6",
294 .mpu_irqs = omap2_timer6_mpu_irqs,
295 .main_clk = "gpt6_fck",
296 .prcm = {
297 .omap2 = {
298 .prcm_reg_id = 1,
299 .module_bit = OMAP3430_EN_GPT6_SHIFT,
300 .module_offs = OMAP3430_PER_MOD,
301 .idlest_reg_id = 1,
302 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
303 },
304 },
5c3e4ec4 305 .dev_attr = &capability_dsp_dev_attr,
844a3b63 306 .class = &omap3xxx_timer_hwmod_class,
10759e82 307 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
4bf90f65
KM
308};
309
844a3b63
PW
310/* timer7 */
311static struct omap_hwmod omap3xxx_timer7_hwmod = {
312 .name = "timer7",
313 .mpu_irqs = omap2_timer7_mpu_irqs,
314 .main_clk = "gpt7_fck",
315 .prcm = {
4fe20e97 316 .omap2 = {
844a3b63
PW
317 .prcm_reg_id = 1,
318 .module_bit = OMAP3430_EN_GPT7_SHIFT,
319 .module_offs = OMAP3430_PER_MOD,
320 .idlest_reg_id = 1,
321 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
322 },
4fe20e97 323 },
5c3e4ec4 324 .dev_attr = &capability_dsp_dev_attr,
844a3b63 325 .class = &omap3xxx_timer_hwmod_class,
10759e82 326 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
4fe20e97
RN
327};
328
844a3b63
PW
329/* timer8 */
330static struct omap_hwmod omap3xxx_timer8_hwmod = {
331 .name = "timer8",
332 .mpu_irqs = omap2_timer8_mpu_irqs,
333 .main_clk = "gpt8_fck",
334 .prcm = {
4fe20e97 335 .omap2 = {
844a3b63
PW
336 .prcm_reg_id = 1,
337 .module_bit = OMAP3430_EN_GPT8_SHIFT,
338 .module_offs = OMAP3430_PER_MOD,
339 .idlest_reg_id = 1,
340 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
341 },
4fe20e97 342 },
5c3e4ec4 343 .dev_attr = &capability_dsp_pwm_dev_attr,
844a3b63 344 .class = &omap3xxx_timer_hwmod_class,
10759e82 345 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
4fe20e97
RN
346};
347
844a3b63
PW
348/* timer9 */
349static struct omap_hwmod omap3xxx_timer9_hwmod = {
350 .name = "timer9",
351 .mpu_irqs = omap2_timer9_mpu_irqs,
352 .main_clk = "gpt9_fck",
353 .prcm = {
354 .omap2 = {
355 .prcm_reg_id = 1,
356 .module_bit = OMAP3430_EN_GPT9_SHIFT,
357 .module_offs = OMAP3430_PER_MOD,
358 .idlest_reg_id = 1,
359 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
360 },
4fe20e97 361 },
844a3b63
PW
362 .dev_attr = &capability_pwm_dev_attr,
363 .class = &omap3xxx_timer_hwmod_class,
10759e82 364 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
4fe20e97
RN
365};
366
844a3b63
PW
367/* timer10 */
368static struct omap_hwmod omap3xxx_timer10_hwmod = {
369 .name = "timer10",
370 .mpu_irqs = omap2_timer10_mpu_irqs,
371 .main_clk = "gpt10_fck",
372 .prcm = {
4fe20e97 373 .omap2 = {
844a3b63
PW
374 .prcm_reg_id = 1,
375 .module_bit = OMAP3430_EN_GPT10_SHIFT,
376 .module_offs = CORE_MOD,
377 .idlest_reg_id = 1,
378 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
379 },
4fe20e97 380 },
844a3b63 381 .dev_attr = &capability_pwm_dev_attr,
725a8fe3 382 .class = &omap3xxx_timer_hwmod_class,
10759e82 383 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
4fe20e97
RN
384};
385
844a3b63
PW
386/* timer11 */
387static struct omap_hwmod omap3xxx_timer11_hwmod = {
388 .name = "timer11",
389 .mpu_irqs = omap2_timer11_mpu_irqs,
390 .main_clk = "gpt11_fck",
391 .prcm = {
392 .omap2 = {
393 .prcm_reg_id = 1,
394 .module_bit = OMAP3430_EN_GPT11_SHIFT,
395 .module_offs = CORE_MOD,
396 .idlest_reg_id = 1,
397 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
398 },
399 },
400 .dev_attr = &capability_pwm_dev_attr,
401 .class = &omap3xxx_timer_hwmod_class,
10759e82 402 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
d62bc78a
NM
403};
404
844a3b63
PW
405/* timer12 */
406static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
7d7e1eba
TL
407 { .irq = 95 + OMAP_INTC_START, },
408 { .irq = -1 },
d62bc78a
NM
409};
410
844a3b63
PW
411static struct omap_hwmod omap3xxx_timer12_hwmod = {
412 .name = "timer12",
413 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
414 .main_clk = "gpt12_fck",
415 .prcm = {
416 .omap2 = {
417 .prcm_reg_id = 1,
418 .module_bit = OMAP3430_EN_GPT12_SHIFT,
419 .module_offs = WKUP_MOD,
420 .idlest_reg_id = 1,
421 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
422 },
d3442726 423 },
844a3b63
PW
424 .dev_attr = &capability_secure_dev_attr,
425 .class = &omap3xxx_timer_hwmod_class,
10759e82 426 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
d3442726
TG
427};
428
844a3b63
PW
429/*
430 * 'wd_timer' class
431 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
432 * overflow condition
433 */
434
435static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
436 .rev_offs = 0x0000,
437 .sysc_offs = 0x0010,
438 .syss_offs = 0x0014,
439 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
440 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
441 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
442 SYSS_HAS_RESET_STATUS),
443 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
444 .sysc_fields = &omap_hwmod_sysc_type1,
d3442726
TG
445};
446
844a3b63
PW
447/* I2C common */
448static struct omap_hwmod_class_sysconfig i2c_sysc = {
449 .rev_offs = 0x00,
450 .sysc_offs = 0x20,
451 .syss_offs = 0x10,
452 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
453 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
454 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
455 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
456 .clockact = CLOCKACT_TEST_ICLK,
457 .sysc_fields = &omap_hwmod_sysc_type1,
d3442726
TG
458};
459
844a3b63
PW
460static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
461 .name = "wd_timer",
462 .sysc = &omap3xxx_wd_timer_sysc,
414e4128
KH
463 .pre_shutdown = &omap2_wd_timer_disable,
464 .reset = &omap2_wd_timer_reset,
d3442726
TG
465};
466
844a3b63
PW
467static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
468 .name = "wd_timer2",
469 .class = &omap3xxx_wd_timer_hwmod_class,
470 .main_clk = "wdt2_fck",
471 .prcm = {
472 .omap2 = {
473 .prcm_reg_id = 1,
474 .module_bit = OMAP3430_EN_WDT2_SHIFT,
475 .module_offs = WKUP_MOD,
476 .idlest_reg_id = 1,
477 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
478 },
479 },
480 /*
481 * XXX: Use software supervised mode, HW supervised smartidle seems to
482 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
483 */
484 .flags = HWMOD_SWSUP_SIDLE,
485};
870ea2b8 486
844a3b63
PW
487/* UART1 */
488static struct omap_hwmod omap3xxx_uart1_hwmod = {
489 .name = "uart1",
490 .mpu_irqs = omap2_uart1_mpu_irqs,
491 .sdma_reqs = omap2_uart1_sdma_reqs,
492 .main_clk = "uart1_fck",
493 .prcm = {
494 .omap2 = {
495 .module_offs = CORE_MOD,
496 .prcm_reg_id = 1,
497 .module_bit = OMAP3430_EN_UART1_SHIFT,
498 .idlest_reg_id = 1,
499 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
500 },
870ea2b8 501 },
844a3b63 502 .class = &omap2_uart_class,
870ea2b8
HH
503};
504
844a3b63
PW
505/* UART2 */
506static struct omap_hwmod omap3xxx_uart2_hwmod = {
507 .name = "uart2",
508 .mpu_irqs = omap2_uart2_mpu_irqs,
509 .sdma_reqs = omap2_uart2_sdma_reqs,
510 .main_clk = "uart2_fck",
511 .prcm = {
512 .omap2 = {
513 .module_offs = CORE_MOD,
514 .prcm_reg_id = 1,
515 .module_bit = OMAP3430_EN_UART2_SHIFT,
516 .idlest_reg_id = 1,
517 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
518 },
519 },
520 .class = &omap2_uart_class,
870ea2b8
HH
521};
522
844a3b63
PW
523/* UART3 */
524static struct omap_hwmod omap3xxx_uart3_hwmod = {
525 .name = "uart3",
526 .mpu_irqs = omap2_uart3_mpu_irqs,
527 .sdma_reqs = omap2_uart3_sdma_reqs,
528 .main_clk = "uart3_fck",
529 .prcm = {
530 .omap2 = {
531 .module_offs = OMAP3430_PER_MOD,
532 .prcm_reg_id = 1,
533 .module_bit = OMAP3430_EN_UART3_SHIFT,
534 .idlest_reg_id = 1,
535 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
536 },
273ff8c3 537 },
844a3b63 538 .class = &omap2_uart_class,
273ff8c3
HH
539};
540
844a3b63
PW
541/* UART4 */
542static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
7d7e1eba
TL
543 { .irq = 80 + OMAP_INTC_START, },
544 { .irq = -1 },
273ff8c3
HH
545};
546
844a3b63
PW
547static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
548 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
549 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
550 { .dma_req = -1 }
7359154e
PW
551};
552
844a3b63
PW
553static struct omap_hwmod omap36xx_uart4_hwmod = {
554 .name = "uart4",
555 .mpu_irqs = uart4_mpu_irqs,
556 .sdma_reqs = uart4_sdma_reqs,
557 .main_clk = "uart4_fck",
558 .prcm = {
559 .omap2 = {
560 .module_offs = OMAP3430_PER_MOD,
561 .prcm_reg_id = 1,
562 .module_bit = OMAP3630_EN_UART4_SHIFT,
563 .idlest_reg_id = 1,
564 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
565 },
566 },
567 .class = &omap2_uart_class,
7359154e
PW
568};
569
844a3b63 570static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
7d7e1eba
TL
571 { .irq = 84 + OMAP_INTC_START, },
572 { .irq = -1 },
43085705
PW
573};
574
844a3b63
PW
575static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
576 { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
577 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
bf765237 578 { .dma_req = -1 }
7359154e
PW
579};
580
82ee620d
PW
581/*
582 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
583 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
584 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
585 * should not be needed. The functional clock structure of the AM35xx
586 * UART4 is extremely unclear and opaque; it is unclear what the role
587 * of uart1/2_fck is for the UART4. Any clarification from either
588 * empirical testing or the AM3505/3517 hardware designers would be
589 * most welcome.
590 */
591static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
592 { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
593};
594
844a3b63
PW
595static struct omap_hwmod am35xx_uart4_hwmod = {
596 .name = "uart4",
597 .mpu_irqs = am35xx_uart4_mpu_irqs,
598 .sdma_reqs = am35xx_uart4_sdma_reqs,
599 .main_clk = "uart4_fck",
600 .prcm = {
601 .omap2 = {
602 .module_offs = CORE_MOD,
603 .prcm_reg_id = 1,
bf765237 604 .module_bit = AM35XX_EN_UART4_SHIFT,
844a3b63 605 .idlest_reg_id = 1,
bf765237 606 .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
844a3b63
PW
607 },
608 },
82ee620d
PW
609 .opt_clks = am35xx_uart4_opt_clks,
610 .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
611 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
844a3b63
PW
612 .class = &omap2_uart_class,
613};
614
615static struct omap_hwmod_class i2c_class = {
616 .name = "i2c",
617 .sysc = &i2c_sysc,
618 .rev = OMAP_I2C_IP_VERSION_1,
619 .reset = &omap_i2c_reset,
620};
621
622static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
623 { .name = "dispc", .dma_req = 5 },
624 { .name = "dsi1", .dma_req = 74 },
625 { .dma_req = -1 }
43085705
PW
626};
627
844a3b63
PW
628/* dss */
629static struct omap_hwmod_opt_clk dss_opt_clks[] = {
630 /*
631 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
632 * driver does not use these clocks.
633 */
634 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
635 { .role = "tv_clk", .clk = "dss_tv_fck" },
636 /* required only on OMAP3430 */
637 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
7359154e
PW
638};
639
844a3b63
PW
640static struct omap_hwmod omap3430es1_dss_core_hwmod = {
641 .name = "dss_core",
642 .class = &omap2_dss_hwmod_class,
643 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
644 .sdma_reqs = omap3xxx_dss_sdma_chs,
645 .prcm = {
646 .omap2 = {
647 .prcm_reg_id = 1,
648 .module_bit = OMAP3430_EN_DSS1_SHIFT,
649 .module_offs = OMAP3430_DSS_MOD,
650 .idlest_reg_id = 1,
651 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
652 },
653 },
654 .opt_clks = dss_opt_clks,
655 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
656 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
657};
540064bf 658
844a3b63
PW
659static struct omap_hwmod omap3xxx_dss_core_hwmod = {
660 .name = "dss_core",
661 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
662 .class = &omap2_dss_hwmod_class,
663 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
664 .sdma_reqs = omap3xxx_dss_sdma_chs,
665 .prcm = {
666 .omap2 = {
667 .prcm_reg_id = 1,
668 .module_bit = OMAP3430_EN_DSS1_SHIFT,
669 .module_offs = OMAP3430_DSS_MOD,
670 .idlest_reg_id = 1,
671 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
672 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
673 },
674 },
675 .opt_clks = dss_opt_clks,
676 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
540064bf
KH
677};
678
540064bf 679/*
844a3b63
PW
680 * 'dispc' class
681 * display controller
540064bf
KH
682 */
683
844a3b63 684static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
ce722d26
TG
685 .rev_offs = 0x0000,
686 .sysc_offs = 0x0010,
687 .syss_offs = 0x0014,
844a3b63
PW
688 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
689 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
690 SYSC_HAS_ENAWAKEUP),
691 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
692 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
ce722d26 693 .sysc_fields = &omap_hwmod_sysc_type1,
6b667f88
VC
694};
695
844a3b63
PW
696static struct omap_hwmod_class omap3_dispc_hwmod_class = {
697 .name = "dispc",
698 .sysc = &omap3_dispc_sysc,
6b667f88
VC
699};
700
844a3b63
PW
701static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
702 .name = "dss_dispc",
703 .class = &omap3_dispc_hwmod_class,
704 .mpu_irqs = omap2_dispc_irqs,
705 .main_clk = "dss1_alwon_fck",
706 .prcm = {
707 .omap2 = {
708 .prcm_reg_id = 1,
709 .module_bit = OMAP3430_EN_DSS1_SHIFT,
710 .module_offs = OMAP3430_DSS_MOD,
711 },
712 },
713 .flags = HWMOD_NO_IDLEST,
714 .dev_attr = &omap2_3_dss_dispc_dev_attr
6b667f88
VC
715};
716
844a3b63
PW
717/*
718 * 'dsi' class
719 * display serial interface controller
720 */
4fe20e97 721
844a3b63
PW
722static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
723 .name = "dsi",
c345c8b0
TKD
724};
725
844a3b63 726static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
7d7e1eba
TL
727 { .irq = 25 + OMAP_INTC_START, },
728 { .irq = -1 },
c345c8b0
TKD
729};
730
844a3b63
PW
731/* dss_dsi1 */
732static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
733 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
c345c8b0
TKD
734};
735
844a3b63
PW
736static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
737 .name = "dss_dsi1",
738 .class = &omap3xxx_dsi_hwmod_class,
739 .mpu_irqs = omap3xxx_dsi1_irqs,
740 .main_clk = "dss1_alwon_fck",
741 .prcm = {
742 .omap2 = {
743 .prcm_reg_id = 1,
744 .module_bit = OMAP3430_EN_DSS1_SHIFT,
745 .module_offs = OMAP3430_DSS_MOD,
746 },
ce722d26 747 },
844a3b63
PW
748 .opt_clks = dss_dsi1_opt_clks,
749 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
750 .flags = HWMOD_NO_IDLEST,
6b667f88
VC
751};
752
844a3b63
PW
753static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
754 { .role = "ick", .clk = "dss_ick" },
ce722d26
TG
755};
756
844a3b63
PW
757static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
758 .name = "dss_rfbi",
759 .class = &omap2_rfbi_hwmod_class,
760 .main_clk = "dss1_alwon_fck",
6b667f88
VC
761 .prcm = {
762 .omap2 = {
763 .prcm_reg_id = 1,
844a3b63
PW
764 .module_bit = OMAP3430_EN_DSS1_SHIFT,
765 .module_offs = OMAP3430_DSS_MOD,
6b667f88
VC
766 },
767 },
844a3b63
PW
768 .opt_clks = dss_rfbi_opt_clks,
769 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
770 .flags = HWMOD_NO_IDLEST,
046465b7
KH
771};
772
844a3b63
PW
773static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
774 /* required only on OMAP3430 */
775 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
046465b7
KH
776};
777
844a3b63
PW
778static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
779 .name = "dss_venc",
780 .class = &omap2_venc_hwmod_class,
781 .main_clk = "dss_tv_fck",
046465b7
KH
782 .prcm = {
783 .omap2 = {
046465b7 784 .prcm_reg_id = 1,
844a3b63
PW
785 .module_bit = OMAP3430_EN_DSS1_SHIFT,
786 .module_offs = OMAP3430_DSS_MOD,
046465b7
KH
787 },
788 },
844a3b63
PW
789 .opt_clks = dss_venc_opt_clks,
790 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
791 .flags = HWMOD_NO_IDLEST,
046465b7
KH
792};
793
844a3b63
PW
794/* I2C1 */
795static struct omap_i2c_dev_attr i2c1_dev_attr = {
796 .fifo_depth = 8, /* bytes */
797 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
798 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
799 OMAP_I2C_FLAG_BUS_SHIFT_2,
046465b7
KH
800};
801
844a3b63
PW
802static struct omap_hwmod omap3xxx_i2c1_hwmod = {
803 .name = "i2c1",
804 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
805 .mpu_irqs = omap2_i2c1_mpu_irqs,
806 .sdma_reqs = omap2_i2c1_sdma_reqs,
807 .main_clk = "i2c1_fck",
046465b7
KH
808 .prcm = {
809 .omap2 = {
844a3b63 810 .module_offs = CORE_MOD,
046465b7 811 .prcm_reg_id = 1,
844a3b63 812 .module_bit = OMAP3430_EN_I2C1_SHIFT,
046465b7 813 .idlest_reg_id = 1,
844a3b63 814 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
046465b7
KH
815 },
816 },
844a3b63
PW
817 .class = &i2c_class,
818 .dev_attr = &i2c1_dev_attr,
046465b7
KH
819};
820
844a3b63
PW
821/* I2C2 */
822static struct omap_i2c_dev_attr i2c2_dev_attr = {
823 .fifo_depth = 8, /* bytes */
824 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
825 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
826 OMAP_I2C_FLAG_BUS_SHIFT_2,
046465b7
KH
827};
828
844a3b63
PW
829static struct omap_hwmod omap3xxx_i2c2_hwmod = {
830 .name = "i2c2",
831 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
832 .mpu_irqs = omap2_i2c2_mpu_irqs,
833 .sdma_reqs = omap2_i2c2_sdma_reqs,
834 .main_clk = "i2c2_fck",
046465b7
KH
835 .prcm = {
836 .omap2 = {
844a3b63 837 .module_offs = CORE_MOD,
046465b7 838 .prcm_reg_id = 1,
844a3b63 839 .module_bit = OMAP3430_EN_I2C2_SHIFT,
046465b7 840 .idlest_reg_id = 1,
844a3b63 841 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
046465b7
KH
842 },
843 },
844a3b63
PW
844 .class = &i2c_class,
845 .dev_attr = &i2c2_dev_attr,
046465b7
KH
846};
847
844a3b63
PW
848/* I2C3 */
849static struct omap_i2c_dev_attr i2c3_dev_attr = {
850 .fifo_depth = 64, /* bytes */
851 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
852 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
853 OMAP_I2C_FLAG_BUS_SHIFT_2,
854};
046465b7 855
844a3b63 856static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
7d7e1eba
TL
857 { .irq = 61 + OMAP_INTC_START, },
858 { .irq = -1 },
046465b7
KH
859};
860
844a3b63
PW
861static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
862 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
863 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
864 { .dma_req = -1 }
046465b7
KH
865};
866
844a3b63
PW
867static struct omap_hwmod omap3xxx_i2c3_hwmod = {
868 .name = "i2c3",
869 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
870 .mpu_irqs = i2c3_mpu_irqs,
871 .sdma_reqs = i2c3_sdma_reqs,
872 .main_clk = "i2c3_fck",
046465b7
KH
873 .prcm = {
874 .omap2 = {
844a3b63 875 .module_offs = CORE_MOD,
046465b7 876 .prcm_reg_id = 1,
844a3b63 877 .module_bit = OMAP3430_EN_I2C3_SHIFT,
046465b7 878 .idlest_reg_id = 1,
844a3b63 879 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
046465b7
KH
880 },
881 },
844a3b63
PW
882 .class = &i2c_class,
883 .dev_attr = &i2c3_dev_attr,
4fe20e97
RN
884};
885
844a3b63
PW
886/*
887 * 'gpio' class
888 * general purpose io module
889 */
4fe20e97 890
844a3b63
PW
891static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
892 .rev_offs = 0x0000,
893 .sysc_offs = 0x0010,
894 .syss_offs = 0x0014,
895 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
896 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
897 SYSS_HAS_RESET_STATUS),
898 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
899 .sysc_fields = &omap_hwmod_sysc_type1,
4fe20e97
RN
900};
901
844a3b63
PW
902static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
903 .name = "gpio",
904 .sysc = &omap3xxx_gpio_sysc,
905 .rev = 1,
4fe20e97
RN
906};
907
844a3b63
PW
908/* gpio_dev_attr */
909static struct omap_gpio_dev_attr gpio_dev_attr = {
910 .bank_width = 32,
911 .dbck_flag = true,
912};
913
914/* gpio1 */
915static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
916 { .role = "dbclk", .clk = "gpio1_dbck", },
917};
918
919static struct omap_hwmod omap3xxx_gpio1_hwmod = {
920 .name = "gpio1",
921 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
922 .mpu_irqs = omap2_gpio1_irqs,
923 .main_clk = "gpio1_ick",
924 .opt_clks = gpio1_opt_clks,
925 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
4fe20e97
RN
926 .prcm = {
927 .omap2 = {
4fe20e97 928 .prcm_reg_id = 1,
844a3b63
PW
929 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
930 .module_offs = WKUP_MOD,
4fe20e97 931 .idlest_reg_id = 1,
844a3b63 932 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
4fe20e97
RN
933 },
934 },
844a3b63
PW
935 .class = &omap3xxx_gpio_hwmod_class,
936 .dev_attr = &gpio_dev_attr,
4fe20e97
RN
937};
938
844a3b63
PW
939/* gpio2 */
940static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
941 { .role = "dbclk", .clk = "gpio2_dbck", },
4fe20e97
RN
942};
943
844a3b63
PW
944static struct omap_hwmod omap3xxx_gpio2_hwmod = {
945 .name = "gpio2",
946 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
947 .mpu_irqs = omap2_gpio2_irqs,
948 .main_clk = "gpio2_ick",
949 .opt_clks = gpio2_opt_clks,
950 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
4fe20e97
RN
951 .prcm = {
952 .omap2 = {
4fe20e97 953 .prcm_reg_id = 1,
844a3b63 954 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
ce722d26 955 .module_offs = OMAP3430_PER_MOD,
4fe20e97 956 .idlest_reg_id = 1,
844a3b63 957 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
4fe20e97
RN
958 },
959 },
844a3b63
PW
960 .class = &omap3xxx_gpio_hwmod_class,
961 .dev_attr = &gpio_dev_attr,
4fe20e97
RN
962};
963
844a3b63
PW
964/* gpio3 */
965static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
966 { .role = "dbclk", .clk = "gpio3_dbck", },
4fe20e97
RN
967};
968
844a3b63
PW
969static struct omap_hwmod omap3xxx_gpio3_hwmod = {
970 .name = "gpio3",
971 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
972 .mpu_irqs = omap2_gpio3_irqs,
973 .main_clk = "gpio3_ick",
974 .opt_clks = gpio3_opt_clks,
975 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
4fe20e97
RN
976 .prcm = {
977 .omap2 = {
4fe20e97 978 .prcm_reg_id = 1,
844a3b63 979 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
ce722d26 980 .module_offs = OMAP3430_PER_MOD,
4fe20e97 981 .idlest_reg_id = 1,
844a3b63 982 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
4fe20e97
RN
983 },
984 },
844a3b63
PW
985 .class = &omap3xxx_gpio_hwmod_class,
986 .dev_attr = &gpio_dev_attr,
70034d38
VC
987};
988
844a3b63
PW
989/* gpio4 */
990static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
991 { .role = "dbclk", .clk = "gpio4_dbck", },
70034d38
VC
992};
993
844a3b63
PW
994static struct omap_hwmod omap3xxx_gpio4_hwmod = {
995 .name = "gpio4",
996 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
997 .mpu_irqs = omap2_gpio4_irqs,
998 .main_clk = "gpio4_ick",
999 .opt_clks = gpio4_opt_clks,
1000 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
ce722d26
TG
1001 .prcm = {
1002 .omap2 = {
1003 .prcm_reg_id = 1,
844a3b63 1004 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
ce722d26
TG
1005 .module_offs = OMAP3430_PER_MOD,
1006 .idlest_reg_id = 1,
844a3b63 1007 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
ce722d26 1008 },
70034d38 1009 },
844a3b63
PW
1010 .class = &omap3xxx_gpio_hwmod_class,
1011 .dev_attr = &gpio_dev_attr,
70034d38
VC
1012};
1013
844a3b63
PW
1014/* gpio5 */
1015static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
7d7e1eba
TL
1016 { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
1017 { .irq = -1 },
844a3b63 1018};
70034d38 1019
844a3b63
PW
1020static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
1021 { .role = "dbclk", .clk = "gpio5_dbck", },
70034d38
VC
1022};
1023
844a3b63
PW
1024static struct omap_hwmod omap3xxx_gpio5_hwmod = {
1025 .name = "gpio5",
1026 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1027 .mpu_irqs = omap3xxx_gpio5_irqs,
1028 .main_clk = "gpio5_ick",
1029 .opt_clks = gpio5_opt_clks,
1030 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
ce722d26
TG
1031 .prcm = {
1032 .omap2 = {
1033 .prcm_reg_id = 1,
844a3b63
PW
1034 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
1035 .module_offs = OMAP3430_PER_MOD,
ce722d26 1036 .idlest_reg_id = 1,
844a3b63 1037 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
ce722d26 1038 },
70034d38 1039 },
844a3b63
PW
1040 .class = &omap3xxx_gpio_hwmod_class,
1041 .dev_attr = &gpio_dev_attr,
70034d38
VC
1042};
1043
844a3b63
PW
1044/* gpio6 */
1045static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
7d7e1eba
TL
1046 { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
1047 { .irq = -1 },
844a3b63 1048};
70034d38 1049
844a3b63
PW
1050static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
1051 { .role = "dbclk", .clk = "gpio6_dbck", },
70034d38
VC
1052};
1053
844a3b63
PW
1054static struct omap_hwmod omap3xxx_gpio6_hwmod = {
1055 .name = "gpio6",
1056 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1057 .mpu_irqs = omap3xxx_gpio6_irqs,
1058 .main_clk = "gpio6_ick",
1059 .opt_clks = gpio6_opt_clks,
1060 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
ce722d26
TG
1061 .prcm = {
1062 .omap2 = {
1063 .prcm_reg_id = 1,
844a3b63
PW
1064 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
1065 .module_offs = OMAP3430_PER_MOD,
ce722d26 1066 .idlest_reg_id = 1,
844a3b63 1067 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
ce722d26
TG
1068 },
1069 },
844a3b63
PW
1070 .class = &omap3xxx_gpio_hwmod_class,
1071 .dev_attr = &gpio_dev_attr,
ce722d26
TG
1072};
1073
844a3b63
PW
1074/* dma attributes */
1075static struct omap_dma_dev_attr dma_dev_attr = {
1076 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1077 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1078 .lch_count = 32,
ce722d26
TG
1079};
1080
844a3b63
PW
1081static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
1082 .rev_offs = 0x0000,
1083 .sysc_offs = 0x002c,
1084 .syss_offs = 0x0028,
1085 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1086 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1087 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
1088 SYSS_HAS_RESET_STATUS),
1089 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1090 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1091 .sysc_fields = &omap_hwmod_sysc_type1,
70034d38
VC
1092};
1093
844a3b63
PW
1094static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1095 .name = "dma",
1096 .sysc = &omap3xxx_dma_sysc,
70034d38
VC
1097};
1098
844a3b63
PW
1099/* dma_system */
1100static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1101 .name = "dma",
1102 .class = &omap3xxx_dma_hwmod_class,
1103 .mpu_irqs = omap2_dma_system_irqs,
1104 .main_clk = "core_l3_ick",
1105 .prcm = {
ce722d26 1106 .omap2 = {
844a3b63
PW
1107 .module_offs = CORE_MOD,
1108 .prcm_reg_id = 1,
1109 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1110 .idlest_reg_id = 1,
1111 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
ce722d26
TG
1112 },
1113 },
844a3b63
PW
1114 .dev_attr = &dma_dev_attr,
1115 .flags = HWMOD_NO_IDLEST,
70034d38
VC
1116};
1117
844a3b63
PW
1118/*
1119 * 'mcbsp' class
1120 * multi channel buffered serial port controller
1121 */
1122
1123static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1124 .sysc_offs = 0x008c,
1125 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1126 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1127 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1128 .sysc_fields = &omap_hwmod_sysc_type1,
1129 .clockact = 0x2,
70034d38
VC
1130};
1131
844a3b63
PW
1132static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1133 .name = "mcbsp",
1134 .sysc = &omap3xxx_mcbsp_sysc,
1135 .rev = MCBSP_CONFIG_TYPE3,
70034d38
VC
1136};
1137
7039154b
PU
1138/* McBSP functional clock mapping */
1139static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
1140 { .role = "pad_fck", .clk = "mcbsp_clks" },
1141 { .role = "prcm_fck", .clk = "core_96m_fck" },
1142};
1143
1144static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1145 { .role = "pad_fck", .clk = "mcbsp_clks" },
1146 { .role = "prcm_fck", .clk = "per_96m_fck" },
1147};
1148
844a3b63
PW
1149/* mcbsp1 */
1150static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
7d7e1eba
TL
1151 { .name = "common", .irq = 16 + OMAP_INTC_START, },
1152 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
1153 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
1154 { .irq = -1 },
844a3b63 1155};
6b667f88 1156
844a3b63
PW
1157static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1158 .name = "mcbsp1",
1159 .class = &omap3xxx_mcbsp_hwmod_class,
1160 .mpu_irqs = omap3xxx_mcbsp1_irqs,
1161 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1162 .main_clk = "mcbsp1_fck",
1163 .prcm = {
1164 .omap2 = {
1165 .prcm_reg_id = 1,
1166 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
1167 .module_offs = CORE_MOD,
1168 .idlest_reg_id = 1,
1169 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
1170 },
1171 },
7039154b
PU
1172 .opt_clks = mcbsp15_opt_clks,
1173 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
70034d38
VC
1174};
1175
844a3b63
PW
1176/* mcbsp2 */
1177static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
7d7e1eba
TL
1178 { .name = "common", .irq = 17 + OMAP_INTC_START, },
1179 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
1180 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
1181 { .irq = -1 },
70034d38
VC
1182};
1183
844a3b63
PW
1184static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1185 .sidetone = "mcbsp2_sidetone",
70034d38
VC
1186};
1187
844a3b63
PW
1188static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1189 .name = "mcbsp2",
1190 .class = &omap3xxx_mcbsp_hwmod_class,
1191 .mpu_irqs = omap3xxx_mcbsp2_irqs,
1192 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1193 .main_clk = "mcbsp2_fck",
70034d38
VC
1194 .prcm = {
1195 .omap2 = {
1196 .prcm_reg_id = 1,
844a3b63
PW
1197 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1198 .module_offs = OMAP3430_PER_MOD,
70034d38 1199 .idlest_reg_id = 1,
844a3b63 1200 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
70034d38
VC
1201 },
1202 },
7039154b
PU
1203 .opt_clks = mcbsp234_opt_clks,
1204 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
844a3b63 1205 .dev_attr = &omap34xx_mcbsp2_dev_attr,
70034d38
VC
1206};
1207
844a3b63
PW
1208/* mcbsp3 */
1209static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
7d7e1eba
TL
1210 { .name = "common", .irq = 22 + OMAP_INTC_START, },
1211 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
1212 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
1213 { .irq = -1 },
844a3b63
PW
1214};
1215
1216static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1217 .sidetone = "mcbsp3_sidetone",
1218};
1219
1220static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1221 .name = "mcbsp3",
1222 .class = &omap3xxx_mcbsp_hwmod_class,
1223 .mpu_irqs = omap3xxx_mcbsp3_irqs,
1224 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
1225 .main_clk = "mcbsp3_fck",
70034d38
VC
1226 .prcm = {
1227 .omap2 = {
1228 .prcm_reg_id = 1,
844a3b63
PW
1229 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1230 .module_offs = OMAP3430_PER_MOD,
70034d38 1231 .idlest_reg_id = 1,
844a3b63 1232 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
70034d38
VC
1233 },
1234 },
7039154b
PU
1235 .opt_clks = mcbsp234_opt_clks,
1236 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
844a3b63 1237 .dev_attr = &omap34xx_mcbsp3_dev_attr,
70034d38
VC
1238};
1239
844a3b63
PW
1240/* mcbsp4 */
1241static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
7d7e1eba
TL
1242 { .name = "common", .irq = 23 + OMAP_INTC_START, },
1243 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
1244 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
1245 { .irq = -1 },
844a3b63
PW
1246};
1247
1248static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
1249 { .name = "rx", .dma_req = 20 },
1250 { .name = "tx", .dma_req = 19 },
1251 { .dma_req = -1 }
1252};
1253
1254static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1255 .name = "mcbsp4",
1256 .class = &omap3xxx_mcbsp_hwmod_class,
1257 .mpu_irqs = omap3xxx_mcbsp4_irqs,
1258 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
1259 .main_clk = "mcbsp4_fck",
70034d38
VC
1260 .prcm = {
1261 .omap2 = {
1262 .prcm_reg_id = 1,
844a3b63
PW
1263 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
1264 .module_offs = OMAP3430_PER_MOD,
046465b7 1265 .idlest_reg_id = 1,
844a3b63 1266 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
046465b7
KH
1267 },
1268 },
7039154b
PU
1269 .opt_clks = mcbsp234_opt_clks,
1270 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
046465b7
KH
1271};
1272
844a3b63
PW
1273/* mcbsp5 */
1274static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
7d7e1eba
TL
1275 { .name = "common", .irq = 27 + OMAP_INTC_START, },
1276 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
1277 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
1278 { .irq = -1 },
844a3b63
PW
1279};
1280
1281static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
1282 { .name = "rx", .dma_req = 22 },
1283 { .name = "tx", .dma_req = 21 },
1284 { .dma_req = -1 }
1285};
1286
1287static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1288 .name = "mcbsp5",
1289 .class = &omap3xxx_mcbsp_hwmod_class,
1290 .mpu_irqs = omap3xxx_mcbsp5_irqs,
1291 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
1292 .main_clk = "mcbsp5_fck",
046465b7
KH
1293 .prcm = {
1294 .omap2 = {
046465b7 1295 .prcm_reg_id = 1,
844a3b63
PW
1296 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
1297 .module_offs = CORE_MOD,
70034d38 1298 .idlest_reg_id = 1,
844a3b63 1299 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
70034d38
VC
1300 },
1301 },
7039154b
PU
1302 .opt_clks = mcbsp15_opt_clks,
1303 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
70034d38
VC
1304};
1305
844a3b63
PW
1306/* 'mcbsp sidetone' class */
1307static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1308 .sysc_offs = 0x0010,
1309 .sysc_flags = SYSC_HAS_AUTOIDLE,
1310 .sysc_fields = &omap_hwmod_sysc_type1,
1311};
046465b7 1312
844a3b63
PW
1313static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1314 .name = "mcbsp_sidetone",
1315 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
70034d38
VC
1316};
1317
844a3b63
PW
1318/* mcbsp2_sidetone */
1319static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
7d7e1eba
TL
1320 { .name = "irq", .irq = 4 + OMAP_INTC_START, },
1321 { .irq = -1 },
70034d38
VC
1322};
1323
844a3b63
PW
1324static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1325 .name = "mcbsp2_sidetone",
1326 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1327 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
1328 .main_clk = "mcbsp2_fck",
046465b7
KH
1329 .prcm = {
1330 .omap2 = {
046465b7 1331 .prcm_reg_id = 1,
844a3b63
PW
1332 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1333 .module_offs = OMAP3430_PER_MOD,
046465b7 1334 .idlest_reg_id = 1,
844a3b63 1335 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
046465b7
KH
1336 },
1337 },
4bf90f65
KM
1338};
1339
844a3b63
PW
1340/* mcbsp3_sidetone */
1341static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
7d7e1eba
TL
1342 { .name = "irq", .irq = 5 + OMAP_INTC_START, },
1343 { .irq = -1 },
4bf90f65
KM
1344};
1345
844a3b63
PW
1346static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1347 .name = "mcbsp3_sidetone",
1348 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1349 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
1350 .main_clk = "mcbsp3_fck",
0a78c5c5 1351 .prcm = {
4bf90f65 1352 .omap2 = {
4bf90f65 1353 .prcm_reg_id = 1,
844a3b63
PW
1354 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1355 .module_offs = OMAP3430_PER_MOD,
4bf90f65 1356 .idlest_reg_id = 1,
844a3b63 1357 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
4bf90f65
KM
1358 },
1359 },
4bf90f65
KM
1360};
1361
844a3b63
PW
1362/* SR common */
1363static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
1364 .clkact_shift = 20,
1365};
4bf90f65 1366
844a3b63
PW
1367static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1368 .sysc_offs = 0x24,
1369 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
1370 .clockact = CLOCKACT_TEST_ICLK,
1371 .sysc_fields = &omap34xx_sr_sysc_fields,
4fe20e97
RN
1372};
1373
844a3b63
PW
1374static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1375 .name = "smartreflex",
1376 .sysc = &omap34xx_sr_sysc,
1377 .rev = 1,
e04d9e1e
SG
1378};
1379
844a3b63
PW
1380static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
1381 .sidle_shift = 24,
1382 .enwkup_shift = 26,
1383};
e04d9e1e 1384
844a3b63
PW
1385static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1386 .sysc_offs = 0x38,
1387 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1388 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1389 SYSC_NO_CACHE),
1390 .sysc_fields = &omap36xx_sr_sysc_fields,
1391};
1392
1393static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1394 .name = "smartreflex",
1395 .sysc = &omap36xx_sr_sysc,
1396 .rev = 2,
1397};
1398
1399/* SR1 */
1400static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1401 .sensor_voltdm_name = "mpu_iva",
1402};
1403
1404static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
7d7e1eba
TL
1405 { .irq = 18 + OMAP_INTC_START, },
1406 { .irq = -1 },
844a3b63
PW
1407};
1408
1409static struct omap_hwmod omap34xx_sr1_hwmod = {
1fcd3069 1410 .name = "smartreflex_mpu_iva",
844a3b63
PW
1411 .class = &omap34xx_smartreflex_hwmod_class,
1412 .main_clk = "sr1_fck",
1413 .prcm = {
e04d9e1e 1414 .omap2 = {
844a3b63
PW
1415 .prcm_reg_id = 1,
1416 .module_bit = OMAP3430_EN_SR1_SHIFT,
1417 .module_offs = WKUP_MOD,
1418 .idlest_reg_id = 1,
1419 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1420 },
e04d9e1e 1421 },
844a3b63
PW
1422 .dev_attr = &sr1_dev_attr,
1423 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1424 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
e04d9e1e
SG
1425};
1426
844a3b63 1427static struct omap_hwmod omap36xx_sr1_hwmod = {
1fcd3069 1428 .name = "smartreflex_mpu_iva",
844a3b63
PW
1429 .class = &omap36xx_smartreflex_hwmod_class,
1430 .main_clk = "sr1_fck",
1431 .prcm = {
e04d9e1e 1432 .omap2 = {
844a3b63
PW
1433 .prcm_reg_id = 1,
1434 .module_bit = OMAP3430_EN_SR1_SHIFT,
1435 .module_offs = WKUP_MOD,
1436 .idlest_reg_id = 1,
1437 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1438 },
e04d9e1e 1439 },
844a3b63
PW
1440 .dev_attr = &sr1_dev_attr,
1441 .mpu_irqs = omap3_smartreflex_mpu_irqs,
e04d9e1e
SG
1442};
1443
844a3b63
PW
1444/* SR2 */
1445static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1446 .sensor_voltdm_name = "core",
e04d9e1e
SG
1447};
1448
844a3b63 1449static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
7d7e1eba
TL
1450 { .irq = 19 + OMAP_INTC_START, },
1451 { .irq = -1 },
844a3b63
PW
1452};
1453
1454static struct omap_hwmod omap34xx_sr2_hwmod = {
1fcd3069 1455 .name = "smartreflex_core",
844a3b63
PW
1456 .class = &omap34xx_smartreflex_hwmod_class,
1457 .main_clk = "sr2_fck",
e04d9e1e
SG
1458 .prcm = {
1459 .omap2 = {
1460 .prcm_reg_id = 1,
844a3b63
PW
1461 .module_bit = OMAP3430_EN_SR2_SHIFT,
1462 .module_offs = WKUP_MOD,
e04d9e1e 1463 .idlest_reg_id = 1,
844a3b63 1464 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
e04d9e1e
SG
1465 },
1466 },
844a3b63
PW
1467 .dev_attr = &sr2_dev_attr,
1468 .mpu_irqs = omap3_smartreflex_core_irqs,
1469 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
e04d9e1e
SG
1470};
1471
844a3b63 1472static struct omap_hwmod omap36xx_sr2_hwmod = {
1fcd3069 1473 .name = "smartreflex_core",
844a3b63
PW
1474 .class = &omap36xx_smartreflex_hwmod_class,
1475 .main_clk = "sr2_fck",
e04d9e1e
SG
1476 .prcm = {
1477 .omap2 = {
1478 .prcm_reg_id = 1,
844a3b63
PW
1479 .module_bit = OMAP3430_EN_SR2_SHIFT,
1480 .module_offs = WKUP_MOD,
e04d9e1e 1481 .idlest_reg_id = 1,
844a3b63 1482 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
e04d9e1e
SG
1483 },
1484 },
844a3b63
PW
1485 .dev_attr = &sr2_dev_attr,
1486 .mpu_irqs = omap3_smartreflex_core_irqs,
e04d9e1e
SG
1487};
1488
1ac6d46e 1489/*
844a3b63
PW
1490 * 'mailbox' class
1491 * mailbox module allowing communication between the on-chip processors
1492 * using a queued mailbox-interrupt mechanism.
1ac6d46e
TV
1493 */
1494
844a3b63
PW
1495static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1496 .rev_offs = 0x000,
1497 .sysc_offs = 0x010,
1498 .syss_offs = 0x014,
1499 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1500 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1501 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1ac6d46e
TV
1502 .sysc_fields = &omap_hwmod_sysc_type1,
1503};
1504
844a3b63
PW
1505static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1506 .name = "mailbox",
1507 .sysc = &omap3xxx_mailbox_sysc,
1ac6d46e
TV
1508};
1509
844a3b63 1510static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
7d7e1eba
TL
1511 { .irq = 26 + OMAP_INTC_START, },
1512 { .irq = -1 },
e04d9e1e
SG
1513};
1514
844a3b63
PW
1515static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1516 .name = "mailbox",
1517 .class = &omap3xxx_mailbox_hwmod_class,
1518 .mpu_irqs = omap3xxx_mailbox_irqs,
1519 .main_clk = "mailboxes_ick",
e04d9e1e
SG
1520 .prcm = {
1521 .omap2 = {
1522 .prcm_reg_id = 1,
844a3b63
PW
1523 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1524 .module_offs = CORE_MOD,
1525 .idlest_reg_id = 1,
1526 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
e04d9e1e
SG
1527 },
1528 },
e04d9e1e
SG
1529};
1530
1531/*
844a3b63
PW
1532 * 'mcspi' class
1533 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1534 * bus
e04d9e1e
SG
1535 */
1536
844a3b63
PW
1537static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1538 .rev_offs = 0x0000,
1539 .sysc_offs = 0x0010,
1540 .syss_offs = 0x0014,
1541 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1542 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1543 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1544 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1545 .sysc_fields = &omap_hwmod_sysc_type1,
e04d9e1e
SG
1546};
1547
844a3b63
PW
1548static struct omap_hwmod_class omap34xx_mcspi_class = {
1549 .name = "mcspi",
1550 .sysc = &omap34xx_mcspi_sysc,
1551 .rev = OMAP3_MCSPI_REV,
affe360d 1552};
1553
844a3b63
PW
1554/* mcspi1 */
1555static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1556 .num_chipselect = 4,
e04d9e1e
SG
1557};
1558
844a3b63
PW
1559static struct omap_hwmod omap34xx_mcspi1 = {
1560 .name = "mcspi1",
1561 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1562 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1563 .main_clk = "mcspi1_fck",
1564 .prcm = {
e04d9e1e 1565 .omap2 = {
844a3b63
PW
1566 .module_offs = CORE_MOD,
1567 .prcm_reg_id = 1,
1568 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
1569 .idlest_reg_id = 1,
1570 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1571 },
e04d9e1e 1572 },
844a3b63
PW
1573 .class = &omap34xx_mcspi_class,
1574 .dev_attr = &omap_mcspi1_dev_attr,
e04d9e1e
SG
1575};
1576
844a3b63
PW
1577/* mcspi2 */
1578static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1579 .num_chipselect = 2,
6c3d7e34
TV
1580};
1581
844a3b63
PW
1582static struct omap_hwmod omap34xx_mcspi2 = {
1583 .name = "mcspi2",
1584 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1585 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1586 .main_clk = "mcspi2_fck",
e04d9e1e
SG
1587 .prcm = {
1588 .omap2 = {
844a3b63 1589 .module_offs = CORE_MOD,
e04d9e1e 1590 .prcm_reg_id = 1,
844a3b63
PW
1591 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
1592 .idlest_reg_id = 1,
1593 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
e04d9e1e
SG
1594 },
1595 },
844a3b63
PW
1596 .class = &omap34xx_mcspi_class,
1597 .dev_attr = &omap_mcspi2_dev_attr,
e04d9e1e
SG
1598};
1599
844a3b63
PW
1600/* mcspi3 */
1601static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
7d7e1eba
TL
1602 { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
1603 { .irq = -1 },
844a3b63
PW
1604};
1605
1606static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
1607 { .name = "tx0", .dma_req = 15 },
1608 { .name = "rx0", .dma_req = 16 },
1609 { .name = "tx1", .dma_req = 23 },
1610 { .name = "rx1", .dma_req = 24 },
1611 { .dma_req = -1 }
e04d9e1e
SG
1612};
1613
844a3b63
PW
1614static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1615 .num_chipselect = 2,
6c3d7e34
TV
1616};
1617
844a3b63
PW
1618static struct omap_hwmod omap34xx_mcspi3 = {
1619 .name = "mcspi3",
1620 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
1621 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
1622 .main_clk = "mcspi3_fck",
e04d9e1e
SG
1623 .prcm = {
1624 .omap2 = {
844a3b63 1625 .module_offs = CORE_MOD,
e04d9e1e 1626 .prcm_reg_id = 1,
844a3b63
PW
1627 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
1628 .idlest_reg_id = 1,
1629 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
e04d9e1e
SG
1630 },
1631 },
844a3b63
PW
1632 .class = &omap34xx_mcspi_class,
1633 .dev_attr = &omap_mcspi3_dev_attr,
e04d9e1e
SG
1634};
1635
844a3b63
PW
1636/* mcspi4 */
1637static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
7d7e1eba
TL
1638 { .name = "irq", .irq = 48 + OMAP_INTC_START, },
1639 { .irq = -1 },
e04d9e1e
SG
1640};
1641
844a3b63
PW
1642static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
1643 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
1644 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
1645 { .dma_req = -1 }
6c3d7e34
TV
1646};
1647
844a3b63
PW
1648static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1649 .num_chipselect = 1,
1650};
1651
1652static struct omap_hwmod omap34xx_mcspi4 = {
1653 .name = "mcspi4",
1654 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
1655 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
1656 .main_clk = "mcspi4_fck",
e04d9e1e
SG
1657 .prcm = {
1658 .omap2 = {
844a3b63 1659 .module_offs = CORE_MOD,
e04d9e1e 1660 .prcm_reg_id = 1,
844a3b63
PW
1661 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
1662 .idlest_reg_id = 1,
1663 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
e04d9e1e
SG
1664 },
1665 },
844a3b63
PW
1666 .class = &omap34xx_mcspi_class,
1667 .dev_attr = &omap_mcspi4_dev_attr,
e04d9e1e
SG
1668};
1669
844a3b63
PW
1670/* usbhsotg */
1671static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1672 .rev_offs = 0x0400,
1673 .sysc_offs = 0x0404,
1674 .syss_offs = 0x0408,
1675 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1676 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1677 SYSC_HAS_AUTOIDLE),
1678 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1679 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1680 .sysc_fields = &omap_hwmod_sysc_type1,
1681};
4fe20e97 1682
844a3b63
PW
1683static struct omap_hwmod_class usbotg_class = {
1684 .name = "usbotg",
1685 .sysc = &omap3xxx_usbhsotg_sysc,
4fe20e97
RN
1686};
1687
844a3b63
PW
1688/* usb_otg_hs */
1689static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1690
7d7e1eba
TL
1691 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
1692 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
1693 { .irq = -1 },
844a3b63
PW
1694};
1695
1696static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1697 .name = "usb_otg_hs",
1698 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
1699 .main_clk = "hsotgusb_ick",
4fe20e97
RN
1700 .prcm = {
1701 .omap2 = {
4fe20e97 1702 .prcm_reg_id = 1,
844a3b63
PW
1703 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1704 .module_offs = CORE_MOD,
4fe20e97 1705 .idlest_reg_id = 1,
844a3b63
PW
1706 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
1707 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
4fe20e97
RN
1708 },
1709 },
844a3b63
PW
1710 .class = &usbotg_class,
1711
1712 /*
1713 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1714 * broken when autoidle is enabled
1715 * workaround is to disable the autoidle bit at module level.
1716 */
1717 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1718 | HWMOD_SWSUP_MSTANDBY,
4fe20e97
RN
1719};
1720
844a3b63
PW
1721/* usb_otg_hs */
1722static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
7d7e1eba
TL
1723 { .name = "mc", .irq = 71 + OMAP_INTC_START, },
1724 { .irq = -1 },
4fe20e97
RN
1725};
1726
844a3b63
PW
1727static struct omap_hwmod_class am35xx_usbotg_class = {
1728 .name = "am35xx_usbotg",
844a3b63
PW
1729};
1730
1731static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1732 .name = "am35x_otg_hs",
1733 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
89ea2583 1734 .main_clk = "hsotgusb_fck",
844a3b63 1735 .class = &am35xx_usbotg_class,
89ea2583 1736 .flags = HWMOD_NO_IDLEST,
4fe20e97
RN
1737};
1738
844a3b63
PW
1739/* MMC/SD/SDIO common */
1740static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1741 .rev_offs = 0x1fc,
1742 .sysc_offs = 0x10,
1743 .syss_offs = 0x14,
1744 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1745 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1746 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1747 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1748 .sysc_fields = &omap_hwmod_sysc_type1,
1749};
4fe20e97 1750
844a3b63
PW
1751static struct omap_hwmod_class omap34xx_mmc_class = {
1752 .name = "mmc",
1753 .sysc = &omap34xx_mmc_sysc,
4fe20e97
RN
1754};
1755
844a3b63
PW
1756/* MMC/SD/SDIO1 */
1757
1758static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
7d7e1eba
TL
1759 { .irq = 83 + OMAP_INTC_START, },
1760 { .irq = -1 },
4fe20e97
RN
1761};
1762
844a3b63
PW
1763static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
1764 { .name = "tx", .dma_req = 61, },
1765 { .name = "rx", .dma_req = 62, },
bc614958 1766 { .dma_req = -1 }
4fe20e97
RN
1767};
1768
844a3b63
PW
1769static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1770 { .role = "dbck", .clk = "omap_32k_fck", },
1771};
1772
1773static struct omap_mmc_dev_attr mmc1_dev_attr = {
1774 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1775};
1776
1777/* See 35xx errata 2.1.1.128 in SPRZ278F */
1778static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
1779 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1780 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1781};
1782
1783static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1784 .name = "mmc1",
1785 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1786 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1787 .opt_clks = omap34xx_mmc1_opt_clks,
1788 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1789 .main_clk = "mmchs1_fck",
4fe20e97
RN
1790 .prcm = {
1791 .omap2 = {
1792 .module_offs = CORE_MOD,
1793 .prcm_reg_id = 1,
844a3b63 1794 .module_bit = OMAP3430_EN_MMC1_SHIFT,
4fe20e97 1795 .idlest_reg_id = 1,
844a3b63 1796 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
4fe20e97
RN
1797 },
1798 },
844a3b63
PW
1799 .dev_attr = &mmc1_pre_es3_dev_attr,
1800 .class = &omap34xx_mmc_class,
4fe20e97
RN
1801};
1802
844a3b63
PW
1803static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1804 .name = "mmc1",
1805 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1806 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1807 .opt_clks = omap34xx_mmc1_opt_clks,
1808 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1809 .main_clk = "mmchs1_fck",
1810 .prcm = {
1811 .omap2 = {
1812 .module_offs = CORE_MOD,
1813 .prcm_reg_id = 1,
1814 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1815 .idlest_reg_id = 1,
1816 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1817 },
70034d38 1818 },
844a3b63
PW
1819 .dev_attr = &mmc1_dev_attr,
1820 .class = &omap34xx_mmc_class,
70034d38
VC
1821};
1822
844a3b63 1823/* MMC/SD/SDIO2 */
70034d38 1824
844a3b63 1825static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
7d7e1eba
TL
1826 { .irq = 86 + OMAP_INTC_START, },
1827 { .irq = -1 },
70034d38
VC
1828};
1829
844a3b63
PW
1830static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
1831 { .name = "tx", .dma_req = 47, },
1832 { .name = "rx", .dma_req = 48, },
1833 { .dma_req = -1 }
70034d38
VC
1834};
1835
844a3b63
PW
1836static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1837 { .role = "dbck", .clk = "omap_32k_fck", },
70034d38
VC
1838};
1839
844a3b63
PW
1840/* See 35xx errata 2.1.1.128 in SPRZ278F */
1841static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
1842 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
70034d38
VC
1843};
1844
844a3b63
PW
1845static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1846 .name = "mmc2",
1847 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1848 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1849 .opt_clks = omap34xx_mmc2_opt_clks,
1850 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1851 .main_clk = "mmchs2_fck",
1852 .prcm = {
1853 .omap2 = {
1854 .module_offs = CORE_MOD,
1855 .prcm_reg_id = 1,
1856 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1857 .idlest_reg_id = 1,
1858 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1859 },
70034d38 1860 },
844a3b63
PW
1861 .dev_attr = &mmc2_pre_es3_dev_attr,
1862 .class = &omap34xx_mmc_class,
70034d38
VC
1863};
1864
844a3b63
PW
1865static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1866 .name = "mmc2",
1867 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1868 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1869 .opt_clks = omap34xx_mmc2_opt_clks,
1870 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1871 .main_clk = "mmchs2_fck",
1872 .prcm = {
1873 .omap2 = {
1874 .module_offs = CORE_MOD,
1875 .prcm_reg_id = 1,
1876 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1877 .idlest_reg_id = 1,
1878 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1879 },
1880 },
1881 .class = &omap34xx_mmc_class,
70034d38
VC
1882};
1883
844a3b63
PW
1884/* MMC/SD/SDIO3 */
1885
1886static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
7d7e1eba
TL
1887 { .irq = 94 + OMAP_INTC_START, },
1888 { .irq = -1 },
70034d38
VC
1889};
1890
844a3b63
PW
1891static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
1892 { .name = "tx", .dma_req = 77, },
1893 { .name = "rx", .dma_req = 78, },
1894 { .dma_req = -1 }
70034d38
VC
1895};
1896
844a3b63
PW
1897static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1898 { .role = "dbck", .clk = "omap_32k_fck", },
70034d38
VC
1899};
1900
844a3b63
PW
1901static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1902 .name = "mmc3",
1903 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
1904 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
1905 .opt_clks = omap34xx_mmc3_opt_clks,
1906 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1907 .main_clk = "mmchs3_fck",
1908 .prcm = {
1909 .omap2 = {
1910 .prcm_reg_id = 1,
1911 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1912 .idlest_reg_id = 1,
1913 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1914 },
1915 },
1916 .class = &omap34xx_mmc_class,
70034d38
VC
1917};
1918
1919/*
844a3b63
PW
1920 * 'usb_host_hs' class
1921 * high-speed multi-port usb host controller
70034d38
VC
1922 */
1923
844a3b63 1924static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
70034d38
VC
1925 .rev_offs = 0x0000,
1926 .sysc_offs = 0x0010,
1927 .syss_offs = 0x0014,
844a3b63
PW
1928 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1929 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1930 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1931 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1932 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1933 .sysc_fields = &omap_hwmod_sysc_type1,
70034d38
VC
1934};
1935
844a3b63
PW
1936static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1937 .name = "usb_host_hs",
1938 .sysc = &omap3xxx_usb_host_hs_sysc,
70034d38
VC
1939};
1940
844a3b63
PW
1941static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
1942 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
70034d38
VC
1943};
1944
844a3b63 1945static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
7d7e1eba
TL
1946 { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
1947 { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
1948 { .irq = -1 },
70034d38
VC
1949};
1950
844a3b63
PW
1951static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1952 .name = "usb_host_hs",
1953 .class = &omap3xxx_usb_host_hs_hwmod_class,
1954 .clkdm_name = "l3_init_clkdm",
1955 .mpu_irqs = omap3xxx_usb_host_hs_irqs,
1956 .main_clk = "usbhost_48m_fck",
1957 .prcm = {
70034d38 1958 .omap2 = {
844a3b63 1959 .module_offs = OMAP3430ES2_USBHOST_MOD,
70034d38 1960 .prcm_reg_id = 1,
844a3b63 1961 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
70034d38 1962 .idlest_reg_id = 1,
844a3b63
PW
1963 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1964 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
70034d38
VC
1965 },
1966 },
844a3b63
PW
1967 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
1968 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
70034d38 1969
844a3b63
PW
1970 /*
1971 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1972 * id: i660
1973 *
1974 * Description:
1975 * In the following configuration :
1976 * - USBHOST module is set to smart-idle mode
1977 * - PRCM asserts idle_req to the USBHOST module ( This typically
1978 * happens when the system is going to a low power mode : all ports
1979 * have been suspended, the master part of the USBHOST module has
1980 * entered the standby state, and SW has cut the functional clocks)
1981 * - an USBHOST interrupt occurs before the module is able to answer
1982 * idle_ack, typically a remote wakeup IRQ.
1983 * Then the USB HOST module will enter a deadlock situation where it
1984 * is no more accessible nor functional.
1985 *
1986 * Workaround:
1987 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1988 */
1989
1990 /*
1991 * Errata: USB host EHCI may stall when entering smart-standby mode
1992 * Id: i571
1993 *
1994 * Description:
1995 * When the USBHOST module is set to smart-standby mode, and when it is
1996 * ready to enter the standby state (i.e. all ports are suspended and
1997 * all attached devices are in suspend mode), then it can wrongly assert
1998 * the Mstandby signal too early while there are still some residual OCP
1999 * transactions ongoing. If this condition occurs, the internal state
2000 * machine may go to an undefined state and the USB link may be stuck
2001 * upon the next resume.
2002 *
2003 * Workaround:
2004 * Don't use smart standby; use only force standby,
2005 * hence HWMOD_SWSUP_MSTANDBY
2006 */
2007
2008 /*
2009 * During system boot; If the hwmod framework resets the module
2010 * the module will have smart idle settings; which can lead to deadlock
2011 * (above Errata Id:i660); so, dont reset the module during boot;
2012 * Use HWMOD_INIT_NO_RESET.
2013 */
70034d38 2014
844a3b63
PW
2015 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
2016 HWMOD_INIT_NO_RESET,
70034d38
VC
2017};
2018
844a3b63
PW
2019/*
2020 * 'usb_tll_hs' class
2021 * usb_tll_hs module is the adapter on the usb_host_hs ports
2022 */
2023static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
2024 .rev_offs = 0x0000,
2025 .sysc_offs = 0x0010,
2026 .syss_offs = 0x0014,
2027 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2028 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2029 SYSC_HAS_AUTOIDLE),
2030 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2031 .sysc_fields = &omap_hwmod_sysc_type1,
70034d38
VC
2032};
2033
844a3b63
PW
2034static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
2035 .name = "usb_tll_hs",
2036 .sysc = &omap3xxx_usb_tll_hs_sysc,
70034d38
VC
2037};
2038
844a3b63 2039static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
7d7e1eba
TL
2040 { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
2041 { .irq = -1 },
70034d38
VC
2042};
2043
844a3b63
PW
2044static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
2045 .name = "usb_tll_hs",
2046 .class = &omap3xxx_usb_tll_hs_hwmod_class,
2047 .clkdm_name = "l3_init_clkdm",
2048 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
2049 .main_clk = "usbtll_fck",
2050 .prcm = {
70034d38 2051 .omap2 = {
844a3b63
PW
2052 .module_offs = CORE_MOD,
2053 .prcm_reg_id = 3,
2054 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
2055 .idlest_reg_id = 3,
2056 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
70034d38
VC
2057 },
2058 },
70034d38
VC
2059};
2060
45a4bb06
PW
2061static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
2062 .name = "hdq1w",
2063 .mpu_irqs = omap2_hdq1w_mpu_irqs,
2064 .main_clk = "hdq_fck",
2065 .prcm = {
2066 .omap2 = {
2067 .module_offs = CORE_MOD,
2068 .prcm_reg_id = 1,
2069 .module_bit = OMAP3430_EN_HDQ_SHIFT,
2070 .idlest_reg_id = 1,
2071 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
2072 },
2073 },
2074 .class = &omap2_hdq1w_class,
2075};
2076
8f993a01
TK
2077/* SAD2D */
2078static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
2079 { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
2080 { .name = "rst_modem_sw", .rst_shift = 1 },
2081};
2082
2083static struct omap_hwmod_class omap3xxx_sad2d_class = {
2084 .name = "sad2d",
2085};
2086
2087static struct omap_hwmod omap3xxx_sad2d_hwmod = {
2088 .name = "sad2d",
2089 .rst_lines = omap3xxx_sad2d_resets,
2090 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
2091 .main_clk = "sad2d_ick",
2092 .prcm = {
2093 .omap2 = {
2094 .module_offs = CORE_MOD,
2095 .prcm_reg_id = 1,
2096 .module_bit = OMAP3430_EN_SAD2D_SHIFT,
2097 .idlest_reg_id = 1,
2098 .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
2099 },
2100 },
2101 .class = &omap3xxx_sad2d_class,
2102};
2103
c8d82ff6
VH
2104/*
2105 * '32K sync counter' class
2106 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
2107 */
2108static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
2109 .rev_offs = 0x0000,
2110 .sysc_offs = 0x0004,
2111 .sysc_flags = SYSC_HAS_SIDLEMODE,
2112 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
2113 .sysc_fields = &omap_hwmod_sysc_type1,
2114};
2115
2116static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
2117 .name = "counter",
2118 .sysc = &omap3xxx_counter_sysc,
2119};
2120
2121static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
2122 .name = "counter_32k",
2123 .class = &omap3xxx_counter_hwmod_class,
2124 .clkdm_name = "wkup_clkdm",
2125 .flags = HWMOD_SWSUP_SIDLE,
2126 .main_clk = "wkup_32k_fck",
2127 .prcm = {
2128 .omap2 = {
2129 .module_offs = WKUP_MOD,
2130 .prcm_reg_id = 1,
2131 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
2132 .idlest_reg_id = 1,
2133 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
2134 },
2135 },
2136};
2137
49484a60
AM
2138/*
2139 * 'gpmc' class
2140 * general purpose memory controller
2141 */
2142
2143static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
2144 .rev_offs = 0x0000,
2145 .sysc_offs = 0x0010,
2146 .syss_offs = 0x0014,
2147 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
2148 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2149 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2150 .sysc_fields = &omap_hwmod_sysc_type1,
2151};
2152
2153static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
2154 .name = "gpmc",
2155 .sysc = &omap3xxx_gpmc_sysc,
2156};
2157
2158static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = {
2159 { .irq = 20 },
2160 { .irq = -1 }
2161};
2162
2163static struct omap_hwmod omap3xxx_gpmc_hwmod = {
2164 .name = "gpmc",
2165 .class = &omap3xxx_gpmc_hwmod_class,
2166 .clkdm_name = "core_l3_clkdm",
2167 .mpu_irqs = omap3xxx_gpmc_irqs,
2168 .main_clk = "gpmc_fck",
2169 /*
2170 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
2171 * block. It is not being added due to any known bugs with
2172 * resetting the GPMC IP block, but rather because any timings
2173 * set by the bootloader are not being correctly programmed by
2174 * the kernel from the board file or DT data.
2175 * HWMOD_INIT_NO_RESET should be removed ASAP.
2176 */
2177 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
2178 HWMOD_NO_IDLEST),
2179};
2180
844a3b63
PW
2181/*
2182 * interfaces
2183 */
2184
2185/* L3 -> L4_CORE interface */
2186static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
2187 .master = &omap3xxx_l3_main_hwmod,
2188 .slave = &omap3xxx_l4_core_hwmod,
2189 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2190};
2191
844a3b63
PW
2192/* L3 -> L4_PER interface */
2193static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
2194 .master = &omap3xxx_l3_main_hwmod,
2195 .slave = &omap3xxx_l4_per_hwmod,
2196 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2197};
2198
844a3b63
PW
2199static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
2200 {
2201 .pa_start = 0x68000000,
2202 .pa_end = 0x6800ffff,
2203 .flags = ADDR_TYPE_RT,
70034d38 2204 },
844a3b63 2205 { }
70034d38
VC
2206};
2207
844a3b63
PW
2208/* MPU -> L3 interface */
2209static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
2210 .master = &omap3xxx_mpu_hwmod,
2211 .slave = &omap3xxx_l3_main_hwmod,
2212 .addr = omap3xxx_l3_main_addrs,
2213 .user = OCP_USER_MPU,
70034d38
VC
2214};
2215
c7dad45f
JH
2216static struct omap_hwmod_addr_space omap3xxx_l4_emu_addrs[] = {
2217 {
2218 .pa_start = 0x54000000,
2219 .pa_end = 0x547fffff,
2220 .flags = ADDR_TYPE_RT,
2221 },
2222 { }
2223};
2224
2225/* l3 -> debugss */
2226static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
2227 .master = &omap3xxx_l3_main_hwmod,
2228 .slave = &omap3xxx_debugss_hwmod,
76a5d9bf 2229 .addr = omap3xxx_l4_emu_addrs,
c7dad45f
JH
2230 .user = OCP_USER_MPU,
2231};
2232
844a3b63
PW
2233/* DSS -> l3 */
2234static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
2235 .master = &omap3430es1_dss_core_hwmod,
2236 .slave = &omap3xxx_l3_main_hwmod,
2237 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2238};
2239
844a3b63
PW
2240static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
2241 .master = &omap3xxx_dss_core_hwmod,
2242 .slave = &omap3xxx_l3_main_hwmod,
2243 .fw = {
70034d38 2244 .omap2 = {
844a3b63
PW
2245 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
2246 .flags = OMAP_FIREWALL_L3,
2247 }
70034d38 2248 },
844a3b63 2249 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2250};
2251
844a3b63
PW
2252/* l3_core -> usbhsotg interface */
2253static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
2254 .master = &omap3xxx_usbhsotg_hwmod,
01438ab6
MK
2255 .slave = &omap3xxx_l3_main_hwmod,
2256 .clk = "core_l3_ick",
844a3b63 2257 .user = OCP_USER_MPU,
01438ab6
MK
2258};
2259
844a3b63
PW
2260/* l3_core -> am35xx_usbhsotg interface */
2261static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
2262 .master = &am35xx_usbhsotg_hwmod,
2263 .slave = &omap3xxx_l3_main_hwmod,
89ea2583 2264 .clk = "hsotgusb_ick",
844a3b63 2265 .user = OCP_USER_MPU,
01438ab6 2266};
89ea2583 2267
8f993a01
TK
2268/* l3_core -> sad2d interface */
2269static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
2270 .master = &omap3xxx_sad2d_hwmod,
2271 .slave = &omap3xxx_l3_main_hwmod,
2272 .clk = "core_l3_ick",
2273 .user = OCP_USER_MPU,
2274};
2275
844a3b63
PW
2276/* L4_CORE -> L4_WKUP interface */
2277static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
2278 .master = &omap3xxx_l4_core_hwmod,
2279 .slave = &omap3xxx_l4_wkup_hwmod,
2280 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
2281};
2282
844a3b63
PW
2283/* L4 CORE -> MMC1 interface */
2284static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
01438ab6 2285 .master = &omap3xxx_l4_core_hwmod,
844a3b63
PW
2286 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
2287 .clk = "mmchs1_ick",
2288 .addr = omap2430_mmc1_addr_space,
01438ab6 2289 .user = OCP_USER_MPU | OCP_USER_SDMA,
844a3b63 2290 .flags = OMAP_FIREWALL_L4
01438ab6
MK
2291};
2292
844a3b63
PW
2293static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
2294 .master = &omap3xxx_l4_core_hwmod,
2295 .slave = &omap3xxx_es3plus_mmc1_hwmod,
2296 .clk = "mmchs1_ick",
2297 .addr = omap2430_mmc1_addr_space,
2298 .user = OCP_USER_MPU | OCP_USER_SDMA,
2299 .flags = OMAP_FIREWALL_L4
01438ab6
MK
2300};
2301
844a3b63
PW
2302/* L4 CORE -> MMC2 interface */
2303static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
2304 .master = &omap3xxx_l4_core_hwmod,
2305 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
2306 .clk = "mmchs2_ick",
2307 .addr = omap2430_mmc2_addr_space,
2308 .user = OCP_USER_MPU | OCP_USER_SDMA,
2309 .flags = OMAP_FIREWALL_L4
2310};
70034d38 2311
844a3b63
PW
2312static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2313 .master = &omap3xxx_l4_core_hwmod,
2314 .slave = &omap3xxx_es3plus_mmc2_hwmod,
2315 .clk = "mmchs2_ick",
2316 .addr = omap2430_mmc2_addr_space,
2317 .user = OCP_USER_MPU | OCP_USER_SDMA,
2318 .flags = OMAP_FIREWALL_L4
70034d38
VC
2319};
2320
844a3b63
PW
2321/* L4 CORE -> MMC3 interface */
2322static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
2323 {
2324 .pa_start = 0x480ad000,
2325 .pa_end = 0x480ad1ff,
2326 .flags = ADDR_TYPE_RT,
2327 },
2328 { }
70034d38
VC
2329};
2330
844a3b63
PW
2331static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2332 .master = &omap3xxx_l4_core_hwmod,
2333 .slave = &omap3xxx_mmc3_hwmod,
2334 .clk = "mmchs3_ick",
2335 .addr = omap3xxx_mmc3_addr_space,
2336 .user = OCP_USER_MPU | OCP_USER_SDMA,
2337 .flags = OMAP_FIREWALL_L4
70034d38
VC
2338};
2339
844a3b63
PW
2340/* L4 CORE -> UART1 interface */
2341static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
dc48e5fc 2342 {
844a3b63
PW
2343 .pa_start = OMAP3_UART1_BASE,
2344 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
2345 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
dc48e5fc 2346 },
78183f3f 2347 { }
70034d38
VC
2348};
2349
844a3b63 2350static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
dc48e5fc 2351 .master = &omap3xxx_l4_core_hwmod,
844a3b63
PW
2352 .slave = &omap3xxx_uart1_hwmod,
2353 .clk = "uart1_ick",
2354 .addr = omap3xxx_uart1_addr_space,
dc48e5fc 2355 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2356};
2357
844a3b63
PW
2358/* L4 CORE -> UART2 interface */
2359static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
2360 {
2361 .pa_start = OMAP3_UART2_BASE,
2362 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
2363 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
70034d38 2364 },
844a3b63 2365 { }
70034d38
VC
2366};
2367
844a3b63
PW
2368static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2369 .master = &omap3xxx_l4_core_hwmod,
2370 .slave = &omap3xxx_uart2_hwmod,
2371 .clk = "uart2_ick",
2372 .addr = omap3xxx_uart2_addr_space,
2373 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2374};
2375
844a3b63
PW
2376/* L4 PER -> UART3 interface */
2377static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
dc48e5fc 2378 {
844a3b63
PW
2379 .pa_start = OMAP3_UART3_BASE,
2380 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
2381 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
70034d38 2382 },
78183f3f 2383 { }
70034d38
VC
2384};
2385
844a3b63 2386static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
dc48e5fc 2387 .master = &omap3xxx_l4_per_hwmod,
844a3b63
PW
2388 .slave = &omap3xxx_uart3_hwmod,
2389 .clk = "uart3_ick",
2390 .addr = omap3xxx_uart3_addr_space,
dc48e5fc 2391 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2392};
2393
844a3b63
PW
2394/* L4 PER -> UART4 interface */
2395static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
2396 {
2397 .pa_start = OMAP3_UART4_BASE,
2398 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
2399 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
70034d38 2400 },
844a3b63 2401 { }
70034d38
VC
2402};
2403
844a3b63
PW
2404static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
2405 .master = &omap3xxx_l4_per_hwmod,
2406 .slave = &omap36xx_uart4_hwmod,
2407 .clk = "uart4_ick",
2408 .addr = omap36xx_uart4_addr_space,
2409 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2410};
2411
844a3b63
PW
2412/* AM35xx: L4 CORE -> UART4 interface */
2413static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
dc48e5fc 2414 {
844a3b63
PW
2415 .pa_start = OMAP3_UART4_AM35XX_BASE,
2416 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
2417 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
dc48e5fc 2418 },
bf765237 2419 { }
70034d38
VC
2420};
2421
844a3b63
PW
2422static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
2423 .master = &omap3xxx_l4_core_hwmod,
2424 .slave = &am35xx_uart4_hwmod,
2425 .clk = "uart4_ick",
2426 .addr = am35xx_uart4_addr_space,
dc48e5fc
C
2427 .user = OCP_USER_MPU | OCP_USER_SDMA,
2428};
2429
844a3b63
PW
2430/* L4 CORE -> I2C1 interface */
2431static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2432 .master = &omap3xxx_l4_core_hwmod,
2433 .slave = &omap3xxx_i2c1_hwmod,
2434 .clk = "i2c1_ick",
2435 .addr = omap2_i2c1_addr_space,
2436 .fw = {
2437 .omap2 = {
2438 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2439 .l4_prot_group = 7,
2440 .flags = OMAP_FIREWALL_L4,
2441 }
2442 },
2443 .user = OCP_USER_MPU | OCP_USER_SDMA,
8b1906f1
KVA
2444};
2445
844a3b63
PW
2446/* L4 CORE -> I2C2 interface */
2447static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2448 .master = &omap3xxx_l4_core_hwmod,
2449 .slave = &omap3xxx_i2c2_hwmod,
2450 .clk = "i2c2_ick",
2451 .addr = omap2_i2c2_addr_space,
2452 .fw = {
70034d38 2453 .omap2 = {
844a3b63
PW
2454 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2455 .l4_prot_group = 7,
2456 .flags = OMAP_FIREWALL_L4,
2457 }
70034d38 2458 },
844a3b63 2459 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2460};
2461
844a3b63
PW
2462/* L4 CORE -> I2C3 interface */
2463static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
2464 {
2465 .pa_start = 0x48060000,
2466 .pa_end = 0x48060000 + SZ_128 - 1,
2467 .flags = ADDR_TYPE_RT,
2468 },
2469 { }
70034d38
VC
2470};
2471
844a3b63
PW
2472static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2473 .master = &omap3xxx_l4_core_hwmod,
2474 .slave = &omap3xxx_i2c3_hwmod,
2475 .clk = "i2c3_ick",
2476 .addr = omap3xxx_i2c3_addr_space,
2477 .fw = {
2478 .omap2 = {
2479 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2480 .l4_prot_group = 7,
2481 .flags = OMAP_FIREWALL_L4,
2482 }
2483 },
2484 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2485};
2486
844a3b63
PW
2487/* L4 CORE -> SR1 interface */
2488static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
dc48e5fc 2489 {
844a3b63
PW
2490 .pa_start = OMAP34XX_SR1_BASE,
2491 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2492 .flags = ADDR_TYPE_RT,
dc48e5fc 2493 },
78183f3f 2494 { }
70034d38
VC
2495};
2496
844a3b63
PW
2497static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
2498 .master = &omap3xxx_l4_core_hwmod,
2499 .slave = &omap34xx_sr1_hwmod,
2500 .clk = "sr_l4_ick",
2501 .addr = omap3_sr1_addr_space,
2502 .user = OCP_USER_MPU,
70034d38
VC
2503};
2504
844a3b63
PW
2505static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2506 .master = &omap3xxx_l4_core_hwmod,
2507 .slave = &omap36xx_sr1_hwmod,
2508 .clk = "sr_l4_ick",
2509 .addr = omap3_sr1_addr_space,
2510 .user = OCP_USER_MPU,
2511};
2512
2513/* L4 CORE -> SR1 interface */
2514static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2515 {
2516 .pa_start = OMAP34XX_SR2_BASE,
2517 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2518 .flags = ADDR_TYPE_RT,
70034d38 2519 },
844a3b63 2520 { }
70034d38
VC
2521};
2522
844a3b63
PW
2523static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
2524 .master = &omap3xxx_l4_core_hwmod,
2525 .slave = &omap34xx_sr2_hwmod,
2526 .clk = "sr_l4_ick",
2527 .addr = omap3_sr2_addr_space,
2528 .user = OCP_USER_MPU,
70034d38
VC
2529};
2530
844a3b63
PW
2531static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2532 .master = &omap3xxx_l4_core_hwmod,
2533 .slave = &omap36xx_sr2_hwmod,
2534 .clk = "sr_l4_ick",
2535 .addr = omap3_sr2_addr_space,
2536 .user = OCP_USER_MPU,
70034d38
VC
2537};
2538
844a3b63 2539static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
dc48e5fc 2540 {
844a3b63
PW
2541 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
2542 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
dc48e5fc
C
2543 .flags = ADDR_TYPE_RT
2544 },
78183f3f 2545 { }
70034d38
VC
2546};
2547
844a3b63
PW
2548/* l4_core -> usbhsotg */
2549static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
dc48e5fc 2550 .master = &omap3xxx_l4_core_hwmod,
844a3b63
PW
2551 .slave = &omap3xxx_usbhsotg_hwmod,
2552 .clk = "l4_ick",
2553 .addr = omap3xxx_usbhsotg_addrs,
2554 .user = OCP_USER_MPU,
dc48e5fc
C
2555};
2556
844a3b63
PW
2557static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
2558 {
2559 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
2560 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
2561 .flags = ADDR_TYPE_RT
70034d38 2562 },
844a3b63 2563 { }
70034d38
VC
2564};
2565
844a3b63
PW
2566/* l4_core -> usbhsotg */
2567static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2568 .master = &omap3xxx_l4_core_hwmod,
2569 .slave = &am35xx_usbhsotg_hwmod,
89ea2583 2570 .clk = "hsotgusb_ick",
844a3b63
PW
2571 .addr = am35xx_usbhsotg_addrs,
2572 .user = OCP_USER_MPU,
01438ab6
MK
2573};
2574
844a3b63
PW
2575/* L4_WKUP -> L4_SEC interface */
2576static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2577 .master = &omap3xxx_l4_wkup_hwmod,
2578 .slave = &omap3xxx_l4_sec_hwmod,
2579 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
2580};
2581
844a3b63
PW
2582/* IVA2 <- L3 interface */
2583static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2584 .master = &omap3xxx_l3_main_hwmod,
2585 .slave = &omap3xxx_iva_hwmod,
064931ab 2586 .clk = "core_l3_ick",
844a3b63 2587 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
2588};
2589
844a3b63 2590static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
dc48e5fc 2591 {
844a3b63
PW
2592 .pa_start = 0x48318000,
2593 .pa_end = 0x48318000 + SZ_1K - 1,
dc48e5fc
C
2594 .flags = ADDR_TYPE_RT
2595 },
78183f3f 2596 { }
01438ab6
MK
2597};
2598
844a3b63
PW
2599/* l4_wkup -> timer1 */
2600static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2601 .master = &omap3xxx_l4_wkup_hwmod,
2602 .slave = &omap3xxx_timer1_hwmod,
2603 .clk = "gpt1_ick",
2604 .addr = omap3xxx_timer1_addrs,
2605 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
2606};
2607
844a3b63
PW
2608static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
2609 {
2610 .pa_start = 0x49032000,
2611 .pa_end = 0x49032000 + SZ_1K - 1,
2612 .flags = ADDR_TYPE_RT
01438ab6 2613 },
844a3b63 2614 { }
01438ab6
MK
2615};
2616
844a3b63
PW
2617/* l4_per -> timer2 */
2618static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2619 .master = &omap3xxx_l4_per_hwmod,
2620 .slave = &omap3xxx_timer2_hwmod,
2621 .clk = "gpt2_ick",
2622 .addr = omap3xxx_timer2_addrs,
2623 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
2624};
2625
844a3b63 2626static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
dc48e5fc 2627 {
844a3b63
PW
2628 .pa_start = 0x49034000,
2629 .pa_end = 0x49034000 + SZ_1K - 1,
dc48e5fc
C
2630 .flags = ADDR_TYPE_RT
2631 },
78183f3f 2632 { }
01438ab6
MK
2633};
2634
844a3b63
PW
2635/* l4_per -> timer3 */
2636static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
dc48e5fc 2637 .master = &omap3xxx_l4_per_hwmod,
844a3b63
PW
2638 .slave = &omap3xxx_timer3_hwmod,
2639 .clk = "gpt3_ick",
2640 .addr = omap3xxx_timer3_addrs,
2641 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
2642};
2643
844a3b63
PW
2644static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
2645 {
2646 .pa_start = 0x49036000,
2647 .pa_end = 0x49036000 + SZ_1K - 1,
2648 .flags = ADDR_TYPE_RT
01438ab6 2649 },
844a3b63 2650 { }
01438ab6
MK
2651};
2652
844a3b63
PW
2653/* l4_per -> timer4 */
2654static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2655 .master = &omap3xxx_l4_per_hwmod,
2656 .slave = &omap3xxx_timer4_hwmod,
2657 .clk = "gpt4_ick",
2658 .addr = omap3xxx_timer4_addrs,
2659 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
2660};
2661
844a3b63
PW
2662static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
2663 {
2664 .pa_start = 0x49038000,
2665 .pa_end = 0x49038000 + SZ_1K - 1,
2666 .flags = ADDR_TYPE_RT
2667 },
2668 { }
d3442726
TG
2669};
2670
844a3b63
PW
2671/* l4_per -> timer5 */
2672static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2673 .master = &omap3xxx_l4_per_hwmod,
2674 .slave = &omap3xxx_timer5_hwmod,
2675 .clk = "gpt5_ick",
2676 .addr = omap3xxx_timer5_addrs,
2677 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
2678};
2679
844a3b63
PW
2680static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
2681 {
2682 .pa_start = 0x4903A000,
2683 .pa_end = 0x4903A000 + SZ_1K - 1,
2684 .flags = ADDR_TYPE_RT
2685 },
2686 { }
cea6b942
SG
2687};
2688
844a3b63
PW
2689/* l4_per -> timer6 */
2690static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2691 .master = &omap3xxx_l4_per_hwmod,
2692 .slave = &omap3xxx_timer6_hwmod,
2693 .clk = "gpt6_ick",
2694 .addr = omap3xxx_timer6_addrs,
2695 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
2696};
2697
844a3b63
PW
2698static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
2699 {
2700 .pa_start = 0x4903C000,
2701 .pa_end = 0x4903C000 + SZ_1K - 1,
2702 .flags = ADDR_TYPE_RT
d3442726 2703 },
844a3b63 2704 { }
d3442726
TG
2705};
2706
844a3b63
PW
2707/* l4_per -> timer7 */
2708static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2709 .master = &omap3xxx_l4_per_hwmod,
2710 .slave = &omap3xxx_timer7_hwmod,
2711 .clk = "gpt7_ick",
2712 .addr = omap3xxx_timer7_addrs,
2713 .user = OCP_USER_MPU | OCP_USER_SDMA,
cea6b942
SG
2714};
2715
844a3b63
PW
2716static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
2717 {
2718 .pa_start = 0x4903E000,
2719 .pa_end = 0x4903E000 + SZ_1K - 1,
2720 .flags = ADDR_TYPE_RT
d3442726 2721 },
844a3b63 2722 { }
d3442726
TG
2723};
2724
844a3b63
PW
2725/* l4_per -> timer8 */
2726static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2727 .master = &omap3xxx_l4_per_hwmod,
2728 .slave = &omap3xxx_timer8_hwmod,
2729 .clk = "gpt8_ick",
2730 .addr = omap3xxx_timer8_addrs,
2731 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
2732};
2733
844a3b63
PW
2734static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
2735 {
2736 .pa_start = 0x49040000,
2737 .pa_end = 0x49040000 + SZ_1K - 1,
2738 .flags = ADDR_TYPE_RT
2739 },
2740 { }
2741};
0f9dfdd3 2742
844a3b63
PW
2743/* l4_per -> timer9 */
2744static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2745 .master = &omap3xxx_l4_per_hwmod,
2746 .slave = &omap3xxx_timer9_hwmod,
2747 .clk = "gpt9_ick",
2748 .addr = omap3xxx_timer9_addrs,
2749 .user = OCP_USER_MPU | OCP_USER_SDMA,
0f9dfdd3
FC
2750};
2751
844a3b63
PW
2752/* l4_core -> timer10 */
2753static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2754 .master = &omap3xxx_l4_core_hwmod,
2755 .slave = &omap3xxx_timer10_hwmod,
2756 .clk = "gpt10_ick",
2757 .addr = omap2_timer10_addrs,
2758 .user = OCP_USER_MPU | OCP_USER_SDMA,
0f9dfdd3
FC
2759};
2760
844a3b63
PW
2761/* l4_core -> timer11 */
2762static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2763 .master = &omap3xxx_l4_core_hwmod,
2764 .slave = &omap3xxx_timer11_hwmod,
2765 .clk = "gpt11_ick",
2766 .addr = omap2_timer11_addrs,
2767 .user = OCP_USER_MPU | OCP_USER_SDMA,
0f9dfdd3
FC
2768};
2769
844a3b63 2770static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
0f9dfdd3 2771 {
844a3b63
PW
2772 .pa_start = 0x48304000,
2773 .pa_end = 0x48304000 + SZ_1K - 1,
2774 .flags = ADDR_TYPE_RT
0f9dfdd3 2775 },
78183f3f 2776 { }
0f9dfdd3
FC
2777};
2778
844a3b63
PW
2779/* l4_core -> timer12 */
2780static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2781 .master = &omap3xxx_l4_sec_hwmod,
2782 .slave = &omap3xxx_timer12_hwmod,
2783 .clk = "gpt12_ick",
2784 .addr = omap3xxx_timer12_addrs,
0f9dfdd3
FC
2785 .user = OCP_USER_MPU | OCP_USER_SDMA,
2786};
2787
844a3b63
PW
2788/* l4_wkup -> wd_timer2 */
2789static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
2790 {
2791 .pa_start = 0x48314000,
2792 .pa_end = 0x4831407f,
2793 .flags = ADDR_TYPE_RT
0f9dfdd3 2794 },
844a3b63 2795 { }
0f9dfdd3
FC
2796};
2797
844a3b63
PW
2798static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2799 .master = &omap3xxx_l4_wkup_hwmod,
2800 .slave = &omap3xxx_wd_timer2_hwmod,
2801 .clk = "wdt2_ick",
2802 .addr = omap3xxx_wd_timer2_addrs,
2803 .user = OCP_USER_MPU | OCP_USER_SDMA,
2804};
2805
2806/* l4_core -> dss */
2807static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
0f616a4e 2808 .master = &omap3xxx_l4_core_hwmod,
844a3b63
PW
2809 .slave = &omap3430es1_dss_core_hwmod,
2810 .clk = "dss_ick",
2811 .addr = omap2_dss_addrs,
2812 .fw = {
2813 .omap2 = {
2814 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2815 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2816 .flags = OMAP_FIREWALL_L4,
2817 }
2818 },
0f616a4e
C
2819 .user = OCP_USER_MPU | OCP_USER_SDMA,
2820};
2821
844a3b63 2822static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
0f616a4e 2823 .master = &omap3xxx_l4_core_hwmod,
844a3b63
PW
2824 .slave = &omap3xxx_dss_core_hwmod,
2825 .clk = "dss_ick",
2826 .addr = omap2_dss_addrs,
2827 .fw = {
2828 .omap2 = {
2829 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2830 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2831 .flags = OMAP_FIREWALL_L4,
2832 }
2833 },
0f616a4e
C
2834 .user = OCP_USER_MPU | OCP_USER_SDMA,
2835};
2836
844a3b63
PW
2837/* l4_core -> dss_dispc */
2838static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
0f616a4e 2839 .master = &omap3xxx_l4_core_hwmod,
844a3b63
PW
2840 .slave = &omap3xxx_dss_dispc_hwmod,
2841 .clk = "dss_ick",
2842 .addr = omap2_dss_dispc_addrs,
2843 .fw = {
2844 .omap2 = {
2845 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2846 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2847 .flags = OMAP_FIREWALL_L4,
2848 }
2849 },
0f616a4e
C
2850 .user = OCP_USER_MPU | OCP_USER_SDMA,
2851};
2852
844a3b63 2853static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
0f616a4e 2854 {
844a3b63
PW
2855 .pa_start = 0x4804FC00,
2856 .pa_end = 0x4804FFFF,
2857 .flags = ADDR_TYPE_RT
0f616a4e 2858 },
78183f3f 2859 { }
0f616a4e
C
2860};
2861
844a3b63
PW
2862/* l4_core -> dss_dsi1 */
2863static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
0f616a4e 2864 .master = &omap3xxx_l4_core_hwmod,
844a3b63
PW
2865 .slave = &omap3xxx_dss_dsi1_hwmod,
2866 .clk = "dss_ick",
2867 .addr = omap3xxx_dss_dsi1_addrs,
2868 .fw = {
2869 .omap2 = {
2870 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2871 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2872 .flags = OMAP_FIREWALL_L4,
2873 }
2874 },
0f616a4e
C
2875 .user = OCP_USER_MPU | OCP_USER_SDMA,
2876};
2877
844a3b63
PW
2878/* l4_core -> dss_rfbi */
2879static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2880 .master = &omap3xxx_l4_core_hwmod,
2881 .slave = &omap3xxx_dss_rfbi_hwmod,
2882 .clk = "dss_ick",
2883 .addr = omap2_dss_rfbi_addrs,
2884 .fw = {
0f616a4e 2885 .omap2 = {
844a3b63
PW
2886 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2887 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2888 .flags = OMAP_FIREWALL_L4,
2889 }
0f616a4e 2890 },
844a3b63 2891 .user = OCP_USER_MPU | OCP_USER_SDMA,
0f616a4e
C
2892};
2893
844a3b63
PW
2894/* l4_core -> dss_venc */
2895static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2896 .master = &omap3xxx_l4_core_hwmod,
2897 .slave = &omap3xxx_dss_venc_hwmod,
2898 .clk = "dss_ick",
2899 .addr = omap2_dss_venc_addrs,
2900 .fw = {
70034d38 2901 .omap2 = {
844a3b63
PW
2902 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2903 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2904 .flags = OMAP_FIREWALL_L4,
2905 }
70034d38 2906 },
844a3b63
PW
2907 .flags = OCPIF_SWSUP_IDLE,
2908 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2909};
2910
844a3b63
PW
2911/* l4_wkup -> gpio1 */
2912static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2913 {
2914 .pa_start = 0x48310000,
2915 .pa_end = 0x483101ff,
2916 .flags = ADDR_TYPE_RT
2917 },
2918 { }
70034d38
VC
2919};
2920
844a3b63
PW
2921static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2922 .master = &omap3xxx_l4_wkup_hwmod,
2923 .slave = &omap3xxx_gpio1_hwmod,
2924 .addr = omap3xxx_gpio1_addrs,
2925 .user = OCP_USER_MPU | OCP_USER_SDMA,
0f616a4e
C
2926};
2927
844a3b63
PW
2928/* l4_per -> gpio2 */
2929static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2930 {
2931 .pa_start = 0x49050000,
2932 .pa_end = 0x490501ff,
2933 .flags = ADDR_TYPE_RT
70034d38 2934 },
844a3b63 2935 { }
70034d38
VC
2936};
2937
844a3b63
PW
2938static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2939 .master = &omap3xxx_l4_per_hwmod,
2940 .slave = &omap3xxx_gpio2_hwmod,
2941 .addr = omap3xxx_gpio2_addrs,
2942 .user = OCP_USER_MPU | OCP_USER_SDMA,
70034d38
VC
2943};
2944
844a3b63
PW
2945/* l4_per -> gpio3 */
2946static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2947 {
2948 .pa_start = 0x49052000,
2949 .pa_end = 0x490521ff,
2950 .flags = ADDR_TYPE_RT
2951 },
2952 { }
70034d38
VC
2953};
2954
844a3b63
PW
2955static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2956 .master = &omap3xxx_l4_per_hwmod,
2957 .slave = &omap3xxx_gpio3_hwmod,
2958 .addr = omap3xxx_gpio3_addrs,
2959 .user = OCP_USER_MPU | OCP_USER_SDMA,
0f616a4e
C
2960};
2961
5486474c
PW
2962/*
2963 * 'mmu' class
2964 * The memory management unit performs virtual to physical address translation
2965 * for its requestors.
2966 */
2967
2968static struct omap_hwmod_class_sysconfig mmu_sysc = {
2969 .rev_offs = 0x000,
2970 .sysc_offs = 0x010,
2971 .syss_offs = 0x014,
2972 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2973 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2974 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2975 .sysc_fields = &omap_hwmod_sysc_type1,
2976};
2977
2978static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2979 .name = "mmu",
2980 .sysc = &mmu_sysc,
2981};
2982
2983/* mmu isp */
2984
2985static struct omap_mmu_dev_attr mmu_isp_dev_attr = {
2986 .da_start = 0x0,
2987 .da_end = 0xfffff000,
2988 .nr_tlb_entries = 8,
2989};
2990
2991static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
2992static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = {
2993 { .irq = 24 },
2994 { .irq = -1 }
2995};
2996
2997static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = {
2998 {
2999 .pa_start = 0x480bd400,
3000 .pa_end = 0x480bd47f,
3001 .flags = ADDR_TYPE_RT,
3002 },
3003 { }
3004};
3005
3006/* l4_core -> mmu isp */
3007static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
3008 .master = &omap3xxx_l4_core_hwmod,
3009 .slave = &omap3xxx_mmu_isp_hwmod,
3010 .addr = omap3xxx_mmu_isp_addrs,
3011 .user = OCP_USER_MPU | OCP_USER_SDMA,
3012};
3013
3014static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
3015 .name = "mmu_isp",
3016 .class = &omap3xxx_mmu_hwmod_class,
3017 .mpu_irqs = omap3xxx_mmu_isp_irqs,
3018 .main_clk = "cam_ick",
3019 .dev_attr = &mmu_isp_dev_attr,
3020 .flags = HWMOD_NO_IDLEST,
3021};
3022
3023#ifdef CONFIG_OMAP_IOMMU_IVA2
3024
3025/* mmu iva */
3026
3027static struct omap_mmu_dev_attr mmu_iva_dev_attr = {
3028 .da_start = 0x11000000,
3029 .da_end = 0xfffff000,
3030 .nr_tlb_entries = 32,
3031};
3032
3033static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
3034static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = {
3035 { .irq = 28 },
3036 { .irq = -1 }
3037};
3038
3039static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
3040 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
3041};
3042
3043static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = {
3044 {
3045 .pa_start = 0x5d000000,
3046 .pa_end = 0x5d00007f,
3047 .flags = ADDR_TYPE_RT,
3048 },
3049 { }
3050};
3051
3052/* l3_main -> iva mmu */
3053static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
3054 .master = &omap3xxx_l3_main_hwmod,
3055 .slave = &omap3xxx_mmu_iva_hwmod,
3056 .addr = omap3xxx_mmu_iva_addrs,
3057 .user = OCP_USER_MPU | OCP_USER_SDMA,
3058};
3059
3060static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
3061 .name = "mmu_iva",
3062 .class = &omap3xxx_mmu_hwmod_class,
3063 .mpu_irqs = omap3xxx_mmu_iva_irqs,
3064 .rst_lines = omap3xxx_mmu_iva_resets,
3065 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
3066 .main_clk = "iva2_ck",
3067 .prcm = {
3068 .omap2 = {
3069 .module_offs = OMAP3430_IVA2_MOD,
3070 },
3071 },
3072 .dev_attr = &mmu_iva_dev_attr,
3073 .flags = HWMOD_NO_IDLEST,
3074};
3075
3076#endif
3077
844a3b63
PW
3078/* l4_per -> gpio4 */
3079static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
3080 {
3081 .pa_start = 0x49054000,
3082 .pa_end = 0x490541ff,
3083 .flags = ADDR_TYPE_RT
70034d38 3084 },
844a3b63 3085 { }
70034d38
VC
3086};
3087
844a3b63
PW
3088static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
3089 .master = &omap3xxx_l4_per_hwmod,
3090 .slave = &omap3xxx_gpio4_hwmod,
3091 .addr = omap3xxx_gpio4_addrs,
3092 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
3093};
3094
844a3b63
PW
3095/* l4_per -> gpio5 */
3096static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
3097 {
3098 .pa_start = 0x49056000,
3099 .pa_end = 0x490561ff,
3100 .flags = ADDR_TYPE_RT
3101 },
3102 { }
01438ab6
MK
3103};
3104
844a3b63
PW
3105static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
3106 .master = &omap3xxx_l4_per_hwmod,
3107 .slave = &omap3xxx_gpio5_hwmod,
3108 .addr = omap3xxx_gpio5_addrs,
3109 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
3110};
3111
844a3b63
PW
3112/* l4_per -> gpio6 */
3113static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
3114 {
3115 .pa_start = 0x49058000,
3116 .pa_end = 0x490581ff,
3117 .flags = ADDR_TYPE_RT
01438ab6 3118 },
844a3b63 3119 { }
01438ab6
MK
3120};
3121
844a3b63
PW
3122static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
3123 .master = &omap3xxx_l4_per_hwmod,
3124 .slave = &omap3xxx_gpio6_hwmod,
3125 .addr = omap3xxx_gpio6_addrs,
3126 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
3127};
3128
844a3b63
PW
3129/* dma_system -> L3 */
3130static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
3131 .master = &omap3xxx_dma_system_hwmod,
3132 .slave = &omap3xxx_l3_main_hwmod,
3133 .clk = "core_l3_ick",
3134 .user = OCP_USER_MPU | OCP_USER_SDMA,
01438ab6
MK
3135};
3136
844a3b63
PW
3137static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
3138 {
3139 .pa_start = 0x48056000,
3140 .pa_end = 0x48056fff,
3141 .flags = ADDR_TYPE_RT
01438ab6 3142 },
844a3b63 3143 { }
01438ab6
MK
3144};
3145
844a3b63
PW
3146/* l4_cfg -> dma_system */
3147static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
3148 .master = &omap3xxx_l4_core_hwmod,
3149 .slave = &omap3xxx_dma_system_hwmod,
3150 .clk = "core_l4_ick",
3151 .addr = omap3xxx_dma_system_addrs,
3152 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
3153};
3154
844a3b63
PW
3155static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
3156 {
3157 .name = "mpu",
3158 .pa_start = 0x48074000,
3159 .pa_end = 0x480740ff,
3160 .flags = ADDR_TYPE_RT
3161 },
3162 { }
d3442726
TG
3163};
3164
844a3b63
PW
3165/* l4_core -> mcbsp1 */
3166static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
3167 .master = &omap3xxx_l4_core_hwmod,
3168 .slave = &omap3xxx_mcbsp1_hwmod,
3169 .clk = "mcbsp1_ick",
3170 .addr = omap3xxx_mcbsp1_addrs,
3171 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
3172};
3173
844a3b63
PW
3174static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
3175 {
3176 .name = "mpu",
3177 .pa_start = 0x49022000,
3178 .pa_end = 0x490220ff,
3179 .flags = ADDR_TYPE_RT
3180 },
3181 { }
d3442726
TG
3182};
3183
844a3b63
PW
3184/* l4_per -> mcbsp2 */
3185static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
3186 .master = &omap3xxx_l4_per_hwmod,
3187 .slave = &omap3xxx_mcbsp2_hwmod,
3188 .clk = "mcbsp2_ick",
3189 .addr = omap3xxx_mcbsp2_addrs,
3190 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
3191};
3192
844a3b63
PW
3193static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
3194 {
3195 .name = "mpu",
3196 .pa_start = 0x49024000,
3197 .pa_end = 0x490240ff,
3198 .flags = ADDR_TYPE_RT
3199 },
3200 { }
d3442726
TG
3201};
3202
844a3b63
PW
3203/* l4_per -> mcbsp3 */
3204static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
3205 .master = &omap3xxx_l4_per_hwmod,
3206 .slave = &omap3xxx_mcbsp3_hwmod,
3207 .clk = "mcbsp3_ick",
3208 .addr = omap3xxx_mcbsp3_addrs,
3209 .user = OCP_USER_MPU | OCP_USER_SDMA,
a52e2ab6
PW
3210};
3211
844a3b63
PW
3212static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
3213 {
3214 .name = "mpu",
3215 .pa_start = 0x49026000,
3216 .pa_end = 0x490260ff,
3217 .flags = ADDR_TYPE_RT
a52e2ab6 3218 },
844a3b63 3219 { }
a52e2ab6
PW
3220};
3221
844a3b63
PW
3222/* l4_per -> mcbsp4 */
3223static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
3224 .master = &omap3xxx_l4_per_hwmod,
3225 .slave = &omap3xxx_mcbsp4_hwmod,
3226 .clk = "mcbsp4_ick",
3227 .addr = omap3xxx_mcbsp4_addrs,
3228 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
3229};
3230
844a3b63
PW
3231static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
3232 {
3233 .name = "mpu",
3234 .pa_start = 0x48096000,
3235 .pa_end = 0x480960ff,
3236 .flags = ADDR_TYPE_RT
3237 },
3238 { }
3239};
b163605e 3240
844a3b63
PW
3241/* l4_core -> mcbsp5 */
3242static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
3243 .master = &omap3xxx_l4_core_hwmod,
3244 .slave = &omap3xxx_mcbsp5_hwmod,
3245 .clk = "mcbsp5_ick",
3246 .addr = omap3xxx_mcbsp5_addrs,
3247 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
3248};
3249
844a3b63
PW
3250static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
3251 {
3252 .name = "sidetone",
3253 .pa_start = 0x49028000,
3254 .pa_end = 0x490280ff,
3255 .flags = ADDR_TYPE_RT
3256 },
3257 { }
d3442726
TG
3258};
3259
844a3b63
PW
3260/* l4_per -> mcbsp2_sidetone */
3261static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
3262 .master = &omap3xxx_l4_per_hwmod,
3263 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
3264 .clk = "mcbsp2_ick",
3265 .addr = omap3xxx_mcbsp2_sidetone_addrs,
3266 .user = OCP_USER_MPU,
b163605e
PW
3267};
3268
844a3b63
PW
3269static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
3270 {
3271 .name = "sidetone",
3272 .pa_start = 0x4902A000,
3273 .pa_end = 0x4902A0ff,
3274 .flags = ADDR_TYPE_RT
3275 },
3276 { }
a52e2ab6
PW
3277};
3278
844a3b63
PW
3279/* l4_per -> mcbsp3_sidetone */
3280static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
3281 .master = &omap3xxx_l4_per_hwmod,
3282 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
3283 .clk = "mcbsp3_ick",
3284 .addr = omap3xxx_mcbsp3_sidetone_addrs,
3285 .user = OCP_USER_MPU,
a52e2ab6
PW
3286};
3287
844a3b63
PW
3288static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
3289 {
3290 .pa_start = 0x48094000,
3291 .pa_end = 0x480941ff,
3292 .flags = ADDR_TYPE_RT,
d3442726 3293 },
844a3b63 3294 { }
d3442726
TG
3295};
3296
844a3b63
PW
3297/* l4_core -> mailbox */
3298static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
3299 .master = &omap3xxx_l4_core_hwmod,
3300 .slave = &omap3xxx_mailbox_hwmod,
3301 .addr = omap3xxx_mailbox_addrs,
3302 .user = OCP_USER_MPU | OCP_USER_SDMA,
3303};
b163605e 3304
844a3b63
PW
3305/* l4 core -> mcspi1 interface */
3306static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
3307 .master = &omap3xxx_l4_core_hwmod,
3308 .slave = &omap34xx_mcspi1,
3309 .clk = "mcspi1_ick",
3310 .addr = omap2_mcspi1_addr_space,
3311 .user = OCP_USER_MPU | OCP_USER_SDMA,
b163605e
PW
3312};
3313
844a3b63
PW
3314/* l4 core -> mcspi2 interface */
3315static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
3316 .master = &omap3xxx_l4_core_hwmod,
3317 .slave = &omap34xx_mcspi2,
3318 .clk = "mcspi2_ick",
3319 .addr = omap2_mcspi2_addr_space,
3320 .user = OCP_USER_MPU | OCP_USER_SDMA,
b163605e
PW
3321};
3322
844a3b63
PW
3323/* l4 core -> mcspi3 interface */
3324static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
3325 .master = &omap3xxx_l4_core_hwmod,
3326 .slave = &omap34xx_mcspi3,
3327 .clk = "mcspi3_ick",
3328 .addr = omap2430_mcspi3_addr_space,
3329 .user = OCP_USER_MPU | OCP_USER_SDMA,
b163605e
PW
3330};
3331
844a3b63
PW
3332/* l4 core -> mcspi4 interface */
3333static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
3334 {
3335 .pa_start = 0x480ba000,
3336 .pa_end = 0x480ba0ff,
3337 .flags = ADDR_TYPE_RT,
d3442726 3338 },
844a3b63
PW
3339 { }
3340};
3341
3342static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3343 .master = &omap3xxx_l4_core_hwmod,
3344 .slave = &omap34xx_mcspi4,
3345 .clk = "mcspi4_ick",
3346 .addr = omap34xx_mcspi4_addr_space,
3347 .user = OCP_USER_MPU | OCP_USER_SDMA,
d3442726
TG
3348};
3349
de231388
KM
3350static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3351 .master = &omap3xxx_usb_host_hs_hwmod,
3352 .slave = &omap3xxx_l3_main_hwmod,
3353 .clk = "core_l3_ick",
3354 .user = OCP_USER_MPU,
3355};
3356
de231388
KM
3357static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3358 {
3359 .name = "uhh",
3360 .pa_start = 0x48064000,
3361 .pa_end = 0x480643ff,
3362 .flags = ADDR_TYPE_RT
3363 },
3364 {
3365 .name = "ohci",
3366 .pa_start = 0x48064400,
3367 .pa_end = 0x480647ff,
3368 },
3369 {
3370 .name = "ehci",
3371 .pa_start = 0x48064800,
3372 .pa_end = 0x48064cff,
3373 },
3374 {}
3375};
3376
3377static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3378 .master = &omap3xxx_l4_core_hwmod,
3379 .slave = &omap3xxx_usb_host_hs_hwmod,
3380 .clk = "usbhost_ick",
3381 .addr = omap3xxx_usb_host_hs_addrs,
3382 .user = OCP_USER_MPU | OCP_USER_SDMA,
3383};
3384
de231388
KM
3385static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3386 {
3387 .name = "tll",
3388 .pa_start = 0x48062000,
3389 .pa_end = 0x48062fff,
3390 .flags = ADDR_TYPE_RT
3391 },
3392 {}
3393};
3394
3395static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3396 .master = &omap3xxx_l4_core_hwmod,
3397 .slave = &omap3xxx_usb_tll_hs_hwmod,
3398 .clk = "usbtll_ick",
3399 .addr = omap3xxx_usb_tll_hs_addrs,
3400 .user = OCP_USER_MPU | OCP_USER_SDMA,
3401};
3402
45a4bb06
PW
3403/* l4_core -> hdq1w interface */
3404static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
3405 .master = &omap3xxx_l4_core_hwmod,
3406 .slave = &omap3xxx_hdq1w_hwmod,
3407 .clk = "hdq_ick",
3408 .addr = omap2_hdq1w_addr_space,
3409 .user = OCP_USER_MPU | OCP_USER_SDMA,
3410 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
3411};
3412
c8d82ff6
VH
3413/* l4_wkup -> 32ksync_counter */
3414static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
3415 {
3416 .pa_start = 0x48320000,
3417 .pa_end = 0x4832001f,
3418 .flags = ADDR_TYPE_RT
3419 },
3420 { }
3421};
3422
49484a60
AM
3423static struct omap_hwmod_addr_space omap3xxx_gpmc_addrs[] = {
3424 {
3425 .pa_start = 0x6e000000,
3426 .pa_end = 0x6e000fff,
3427 .flags = ADDR_TYPE_RT
3428 },
3429 { }
3430};
3431
c8d82ff6
VH
3432static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
3433 .master = &omap3xxx_l4_wkup_hwmod,
3434 .slave = &omap3xxx_counter_32k_hwmod,
3435 .clk = "omap_32ksync_ick",
3436 .addr = omap3xxx_counter_32k_addrs,
3437 .user = OCP_USER_MPU | OCP_USER_SDMA,
3438};
3439
31ba8808
MG
3440/* am35xx has Davinci MDIO & EMAC */
3441static struct omap_hwmod_class am35xx_mdio_class = {
3442 .name = "davinci_mdio",
3443};
3444
3445static struct omap_hwmod am35xx_mdio_hwmod = {
3446 .name = "davinci_mdio",
3447 .class = &am35xx_mdio_class,
3448 .flags = HWMOD_NO_IDLEST,
3449};
3450
3451/*
3452 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
3453 * but this will probably require some additional hwmod core support,
3454 * so is left as a future to-do item.
3455 */
3456static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
3457 .master = &am35xx_mdio_hwmod,
3458 .slave = &omap3xxx_l3_main_hwmod,
3459 .clk = "emac_fck",
3460 .user = OCP_USER_MPU,
3461};
3462
3463static struct omap_hwmod_addr_space am35xx_mdio_addrs[] = {
3464 {
3465 .pa_start = AM35XX_IPSS_MDIO_BASE,
3466 .pa_end = AM35XX_IPSS_MDIO_BASE + SZ_4K - 1,
3467 .flags = ADDR_TYPE_RT,
3468 },
3469 { }
3470};
3471
3472/* l4_core -> davinci mdio */
3473/*
3474 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
3475 * but this will probably require some additional hwmod core support,
3476 * so is left as a future to-do item.
3477 */
3478static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
3479 .master = &omap3xxx_l4_core_hwmod,
3480 .slave = &am35xx_mdio_hwmod,
3481 .clk = "emac_fck",
3482 .addr = am35xx_mdio_addrs,
3483 .user = OCP_USER_MPU,
3484};
3485
3486static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
7d7e1eba
TL
3487 { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
3488 { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
3489 { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
3490 { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
3491 { .irq = -1 },
31ba8808
MG
3492};
3493
3494static struct omap_hwmod_class am35xx_emac_class = {
3495 .name = "davinci_emac",
3496};
3497
3498static struct omap_hwmod am35xx_emac_hwmod = {
3499 .name = "davinci_emac",
3500 .mpu_irqs = am35xx_emac_mpu_irqs,
3501 .class = &am35xx_emac_class,
3502 .flags = HWMOD_NO_IDLEST,
3503};
3504
3505/* l3_core -> davinci emac interface */
3506/*
3507 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
3508 * but this will probably require some additional hwmod core support,
3509 * so is left as a future to-do item.
3510 */
3511static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
3512 .master = &am35xx_emac_hwmod,
3513 .slave = &omap3xxx_l3_main_hwmod,
3514 .clk = "emac_ick",
3515 .user = OCP_USER_MPU,
3516};
3517
3518static struct omap_hwmod_addr_space am35xx_emac_addrs[] = {
3519 {
3520 .pa_start = AM35XX_IPSS_EMAC_BASE,
3521 .pa_end = AM35XX_IPSS_EMAC_BASE + 0x30000 - 1,
3522 .flags = ADDR_TYPE_RT,
3523 },
3524 { }
3525};
3526
3527/* l4_core -> davinci emac */
3528/*
3529 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
3530 * but this will probably require some additional hwmod core support,
3531 * so is left as a future to-do item.
3532 */
3533static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
3534 .master = &omap3xxx_l4_core_hwmod,
3535 .slave = &am35xx_emac_hwmod,
3536 .clk = "emac_ick",
3537 .addr = am35xx_emac_addrs,
3538 .user = OCP_USER_MPU,
3539};
3540
49484a60
AM
3541static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
3542 .master = &omap3xxx_l3_main_hwmod,
3543 .slave = &omap3xxx_gpmc_hwmod,
3544 .clk = "core_l3_ick",
3545 .addr = omap3xxx_gpmc_addrs,
3546 .user = OCP_USER_MPU | OCP_USER_SDMA,
3547};
3548
0a78c5c5
PW
3549static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3550 &omap3xxx_l3_main__l4_core,
3551 &omap3xxx_l3_main__l4_per,
3552 &omap3xxx_mpu__l3_main,
c7dad45f 3553 &omap3xxx_l3_main__l4_debugss,
0a78c5c5
PW
3554 &omap3xxx_l4_core__l4_wkup,
3555 &omap3xxx_l4_core__mmc3,
3556 &omap3_l4_core__uart1,
3557 &omap3_l4_core__uart2,
3558 &omap3_l4_per__uart3,
3559 &omap3_l4_core__i2c1,
3560 &omap3_l4_core__i2c2,
3561 &omap3_l4_core__i2c3,
3562 &omap3xxx_l4_wkup__l4_sec,
3563 &omap3xxx_l4_wkup__timer1,
3564 &omap3xxx_l4_per__timer2,
3565 &omap3xxx_l4_per__timer3,
3566 &omap3xxx_l4_per__timer4,
3567 &omap3xxx_l4_per__timer5,
3568 &omap3xxx_l4_per__timer6,
3569 &omap3xxx_l4_per__timer7,
3570 &omap3xxx_l4_per__timer8,
3571 &omap3xxx_l4_per__timer9,
3572 &omap3xxx_l4_core__timer10,
3573 &omap3xxx_l4_core__timer11,
3574 &omap3xxx_l4_wkup__wd_timer2,
3575 &omap3xxx_l4_wkup__gpio1,
3576 &omap3xxx_l4_per__gpio2,
3577 &omap3xxx_l4_per__gpio3,
3578 &omap3xxx_l4_per__gpio4,
3579 &omap3xxx_l4_per__gpio5,
3580 &omap3xxx_l4_per__gpio6,
3581 &omap3xxx_dma_system__l3,
3582 &omap3xxx_l4_core__dma_system,
3583 &omap3xxx_l4_core__mcbsp1,
3584 &omap3xxx_l4_per__mcbsp2,
3585 &omap3xxx_l4_per__mcbsp3,
3586 &omap3xxx_l4_per__mcbsp4,
3587 &omap3xxx_l4_core__mcbsp5,
3588 &omap3xxx_l4_per__mcbsp2_sidetone,
3589 &omap3xxx_l4_per__mcbsp3_sidetone,
3590 &omap34xx_l4_core__mcspi1,
3591 &omap34xx_l4_core__mcspi2,
3592 &omap34xx_l4_core__mcspi3,
3593 &omap34xx_l4_core__mcspi4,
c8d82ff6 3594 &omap3xxx_l4_wkup__counter_32k,
49484a60 3595 &omap3xxx_l3_main__gpmc,
d6504acd
PW
3596 NULL,
3597};
3598
0a78c5c5
PW
3599/* GP-only hwmod links */
3600static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
3601 &omap3xxx_l4_sec__timer12,
91a36bdb
AK
3602 NULL
3603};
3604
0a78c5c5
PW
3605/* 3430ES1-only hwmod links */
3606static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3607 &omap3430es1_dss__l3,
3608 &omap3430es1_l4_core__dss,
d6504acd
PW
3609 NULL
3610};
3611
0a78c5c5
PW
3612/* 3430ES2+-only hwmod links */
3613static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3614 &omap3xxx_dss__l3,
3615 &omap3xxx_l4_core__dss,
3616 &omap3xxx_usbhsotg__l3,
3617 &omap3xxx_l4_core__usbhsotg,
3618 &omap3xxx_usb_host_hs__l3_main_2,
3619 &omap3xxx_l4_core__usb_host_hs,
3620 &omap3xxx_l4_core__usb_tll_hs,
d6504acd
PW
3621 NULL
3622};
870ea2b8 3623
0a78c5c5
PW
3624/* <= 3430ES3-only hwmod links */
3625static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3626 &omap3xxx_l4_core__pre_es3_mmc1,
3627 &omap3xxx_l4_core__pre_es3_mmc2,
a52e2ab6
PW
3628 NULL
3629};
3630
0a78c5c5
PW
3631/* 3430ES3+-only hwmod links */
3632static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3633 &omap3xxx_l4_core__es3plus_mmc1,
3634 &omap3xxx_l4_core__es3plus_mmc2,
a52e2ab6
PW
3635 NULL
3636};
3637
0a78c5c5
PW
3638/* 34xx-only hwmod links (all ES revisions) */
3639static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3640 &omap3xxx_l3__iva,
3641 &omap34xx_l4_core__sr1,
3642 &omap34xx_l4_core__sr2,
3643 &omap3xxx_l4_core__mailbox,
45a4bb06 3644 &omap3xxx_l4_core__hdq1w,
8f993a01 3645 &omap3xxx_sad2d__l3,
5486474c
PW
3646 &omap3xxx_l4_core__mmu_isp,
3647#ifdef CONFIG_OMAP_IOMMU_IVA2
3648 &omap3xxx_l3_main__mmu_iva,
3649#endif
d6504acd
PW
3650 NULL
3651};
273ff8c3 3652
0a78c5c5
PW
3653/* 36xx-only hwmod links (all ES revisions) */
3654static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3655 &omap3xxx_l3__iva,
3656 &omap36xx_l4_per__uart4,
3657 &omap3xxx_dss__l3,
3658 &omap3xxx_l4_core__dss,
3659 &omap36xx_l4_core__sr1,
3660 &omap36xx_l4_core__sr2,
3661 &omap3xxx_usbhsotg__l3,
3662 &omap3xxx_l4_core__usbhsotg,
3663 &omap3xxx_l4_core__mailbox,
3664 &omap3xxx_usb_host_hs__l3_main_2,
3665 &omap3xxx_l4_core__usb_host_hs,
3666 &omap3xxx_l4_core__usb_tll_hs,
3667 &omap3xxx_l4_core__es3plus_mmc1,
3668 &omap3xxx_l4_core__es3plus_mmc2,
45a4bb06 3669 &omap3xxx_l4_core__hdq1w,
8f993a01 3670 &omap3xxx_sad2d__l3,
5486474c
PW
3671 &omap3xxx_l4_core__mmu_isp,
3672#ifdef CONFIG_OMAP_IOMMU_IVA2
3673 &omap3xxx_l3_main__mmu_iva,
3674#endif
d6504acd
PW
3675 NULL
3676};
3677
0a78c5c5
PW
3678static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3679 &omap3xxx_dss__l3,
3680 &omap3xxx_l4_core__dss,
3681 &am35xx_usbhsotg__l3,
3682 &am35xx_l4_core__usbhsotg,
3683 &am35xx_l4_core__uart4,
3684 &omap3xxx_usb_host_hs__l3_main_2,
3685 &omap3xxx_l4_core__usb_host_hs,
3686 &omap3xxx_l4_core__usb_tll_hs,
3687 &omap3xxx_l4_core__es3plus_mmc1,
3688 &omap3xxx_l4_core__es3plus_mmc2,
b1a923d0 3689 &omap3xxx_l4_core__hdq1w,
31ba8808
MG
3690 &am35xx_mdio__l3,
3691 &am35xx_l4_core__mdio,
3692 &am35xx_emac__l3,
3693 &am35xx_l4_core__emac,
d6504acd 3694 NULL
7359154e
PW
3695};
3696
0a78c5c5
PW
3697static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3698 &omap3xxx_l4_core__dss_dispc,
3699 &omap3xxx_l4_core__dss_dsi1,
3700 &omap3xxx_l4_core__dss_rfbi,
3701 &omap3xxx_l4_core__dss_venc,
1d2f56c8
IY
3702 NULL
3703};
3704
7359154e
PW
3705int __init omap3xxx_hwmod_init(void)
3706{
d6504acd 3707 int r;
0a78c5c5 3708 struct omap_hwmod_ocp_if **h = NULL;
d6504acd
PW
3709 unsigned int rev;
3710
9ebfd285
KH
3711 omap_hwmod_init();
3712
0a78c5c5
PW
3713 /* Register hwmod links common to all OMAP3 */
3714 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
ace90216 3715 if (r < 0)
d6504acd
PW
3716 return r;
3717
0a78c5c5 3718 /* Register GP-only hwmod links. */
91a36bdb 3719 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
0a78c5c5 3720 r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
91a36bdb
AK
3721 if (r < 0)
3722 return r;
3723 }
3724
d6504acd
PW
3725 rev = omap_rev();
3726
3727 /*
0a78c5c5 3728 * Register hwmod links common to individual OMAP3 families, all
d6504acd
PW
3729 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3730 * All possible revisions should be included in this conditional.
3731 */
3732 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3733 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3734 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
0a78c5c5 3735 h = omap34xx_hwmod_ocp_ifs;
68a88b98 3736 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
0a78c5c5 3737 h = am35xx_hwmod_ocp_ifs;
d6504acd
PW
3738 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3739 rev == OMAP3630_REV_ES1_2) {
0a78c5c5 3740 h = omap36xx_hwmod_ocp_ifs;
d6504acd
PW
3741 } else {
3742 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3743 return -EINVAL;
c09fcc43 3744 }
d6504acd 3745
0a78c5c5 3746 r = omap_hwmod_register_links(h);
ace90216 3747 if (r < 0)
d6504acd
PW
3748 return r;
3749
3750 /*
0a78c5c5 3751 * Register hwmod links specific to certain ES levels of a
d6504acd
PW
3752 * particular family of silicon (e.g., 34xx ES1.0)
3753 */
3754 h = NULL;
3755 if (rev == OMAP3430_REV_ES1_0) {
0a78c5c5 3756 h = omap3430es1_hwmod_ocp_ifs;
d6504acd
PW
3757 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3758 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3759 rev == OMAP3430_REV_ES3_1_2) {
0a78c5c5 3760 h = omap3430es2plus_hwmod_ocp_ifs;
c09fcc43 3761 }
d6504acd 3762
a52e2ab6 3763 if (h) {
0a78c5c5 3764 r = omap_hwmod_register_links(h);
a52e2ab6
PW
3765 if (r < 0)
3766 return r;
3767 }
3768
3769 h = NULL;
3770 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3771 rev == OMAP3430_REV_ES2_1) {
0a78c5c5 3772 h = omap3430_pre_es3_hwmod_ocp_ifs;
a52e2ab6
PW
3773 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3774 rev == OMAP3430_REV_ES3_1_2) {
0a78c5c5 3775 h = omap3430_es3plus_hwmod_ocp_ifs;
c09fcc43 3776 }
a52e2ab6 3777
d6504acd 3778 if (h)
0a78c5c5 3779 r = omap_hwmod_register_links(h);
1d2f56c8
IY
3780 if (r < 0)
3781 return r;
3782
3783 /*
3784 * DSS code presumes that dss_core hwmod is handled first,
3785 * _before_ any other DSS related hwmods so register common
0a78c5c5
PW
3786 * DSS hwmod links last to ensure that dss_core is already
3787 * registered. Otherwise some change things may happen, for
3788 * ex. if dispc is handled before dss_core and DSS is enabled
3789 * in bootloader DISPC will be reset with outputs enabled
3790 * which sometimes leads to unrecoverable L3 error. XXX The
3791 * long-term fix to this is to ensure hwmods are set up in
3792 * dependency order in the hwmod core code.
1d2f56c8 3793 */
0a78c5c5 3794 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
d6504acd
PW
3795
3796 return r;
7359154e 3797}
This page took 0.505153 seconds and 5 git commands to generate.