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