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