Merge branch 'next/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux...
[pandora-kernel.git] / arch / arm / mach-omap2 / omap_hwmod_2430_data.c
1 /*
2  * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
3  *
4  * Copyright (C) 2009-2011 Nokia Corporation
5  * Paul Walmsley
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * XXX handle crossbar/shared link difference for L3?
12  * XXX these should be marked initdata for multi-OMAP kernels
13  */
14 #include <plat/omap_hwmod.h>
15 #include <mach/irqs.h>
16 #include <plat/cpu.h>
17 #include <plat/dma.h>
18 #include <plat/serial.h>
19 #include <plat/i2c.h>
20 #include <plat/gpio.h>
21 #include <plat/mcbsp.h>
22 #include <plat/mcspi.h>
23 #include <plat/dmtimer.h>
24 #include <plat/mmc.h>
25 #include <plat/l3_2xxx.h>
26
27 #include "omap_hwmod_common_data.h"
28
29 #include "prm-regbits-24xx.h"
30 #include "cm-regbits-24xx.h"
31 #include "wd_timer.h"
32
33 /*
34  * OMAP2430 hardware module integration data
35  *
36  * ALl of the data in this section should be autogeneratable from the
37  * TI hardware database or other technical documentation.  Data that
38  * is driver-specific or driver-kernel integration-specific belongs
39  * elsewhere.
40  */
41
42 static struct omap_hwmod omap2430_mpu_hwmod;
43 static struct omap_hwmod omap2430_iva_hwmod;
44 static struct omap_hwmod omap2430_l3_main_hwmod;
45 static struct omap_hwmod omap2430_l4_core_hwmod;
46 static struct omap_hwmod omap2430_dss_core_hwmod;
47 static struct omap_hwmod omap2430_dss_dispc_hwmod;
48 static struct omap_hwmod omap2430_dss_rfbi_hwmod;
49 static struct omap_hwmod omap2430_dss_venc_hwmod;
50 static struct omap_hwmod omap2430_wd_timer2_hwmod;
51 static struct omap_hwmod omap2430_gpio1_hwmod;
52 static struct omap_hwmod omap2430_gpio2_hwmod;
53 static struct omap_hwmod omap2430_gpio3_hwmod;
54 static struct omap_hwmod omap2430_gpio4_hwmod;
55 static struct omap_hwmod omap2430_gpio5_hwmod;
56 static struct omap_hwmod omap2430_dma_system_hwmod;
57 static struct omap_hwmod omap2430_mcbsp1_hwmod;
58 static struct omap_hwmod omap2430_mcbsp2_hwmod;
59 static struct omap_hwmod omap2430_mcbsp3_hwmod;
60 static struct omap_hwmod omap2430_mcbsp4_hwmod;
61 static struct omap_hwmod omap2430_mcbsp5_hwmod;
62 static struct omap_hwmod omap2430_mcspi1_hwmod;
63 static struct omap_hwmod omap2430_mcspi2_hwmod;
64 static struct omap_hwmod omap2430_mcspi3_hwmod;
65 static struct omap_hwmod omap2430_mmc1_hwmod;
66 static struct omap_hwmod omap2430_mmc2_hwmod;
67
68 /* L3 -> L4_CORE interface */
69 static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
70         .master = &omap2430_l3_main_hwmod,
71         .slave  = &omap2430_l4_core_hwmod,
72         .user   = OCP_USER_MPU | OCP_USER_SDMA,
73 };
74
75 /* MPU -> L3 interface */
76 static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
77         .master = &omap2430_mpu_hwmod,
78         .slave  = &omap2430_l3_main_hwmod,
79         .user   = OCP_USER_MPU,
80 };
81
82 /* Slave interfaces on the L3 interconnect */
83 static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
84         &omap2430_mpu__l3_main,
85 };
86
87 /* DSS -> l3 */
88 static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
89         .master         = &omap2430_dss_core_hwmod,
90         .slave          = &omap2430_l3_main_hwmod,
91         .fw = {
92                 .omap2 = {
93                         .l3_perm_bit  = OMAP2_L3_CORE_FW_CONNID_DSS,
94                         .flags  = OMAP_FIREWALL_L3,
95                 }
96         },
97         .user           = OCP_USER_MPU | OCP_USER_SDMA,
98 };
99
100 /* Master interfaces on the L3 interconnect */
101 static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
102         &omap2430_l3_main__l4_core,
103 };
104
105 /* L3 */
106 static struct omap_hwmod omap2430_l3_main_hwmod = {
107         .name           = "l3_main",
108         .class          = &l3_hwmod_class,
109         .masters        = omap2430_l3_main_masters,
110         .masters_cnt    = ARRAY_SIZE(omap2430_l3_main_masters),
111         .slaves         = omap2430_l3_main_slaves,
112         .slaves_cnt     = ARRAY_SIZE(omap2430_l3_main_slaves),
113         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
114         .flags          = HWMOD_NO_IDLEST,
115 };
116
117 static struct omap_hwmod omap2430_l4_wkup_hwmod;
118 static struct omap_hwmod omap2430_uart1_hwmod;
119 static struct omap_hwmod omap2430_uart2_hwmod;
120 static struct omap_hwmod omap2430_uart3_hwmod;
121 static struct omap_hwmod omap2430_i2c1_hwmod;
122 static struct omap_hwmod omap2430_i2c2_hwmod;
123
124 static struct omap_hwmod omap2430_usbhsotg_hwmod;
125
126 /* l3_core -> usbhsotg  interface */
127 static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
128         .master         = &omap2430_usbhsotg_hwmod,
129         .slave          = &omap2430_l3_main_hwmod,
130         .clk            = "core_l3_ck",
131         .user           = OCP_USER_MPU,
132 };
133
134 /* L4 CORE -> I2C1 interface */
135 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
136         .master         = &omap2430_l4_core_hwmod,
137         .slave          = &omap2430_i2c1_hwmod,
138         .clk            = "i2c1_ick",
139         .addr           = omap2_i2c1_addr_space,
140         .user           = OCP_USER_MPU | OCP_USER_SDMA,
141 };
142
143 /* L4 CORE -> I2C2 interface */
144 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
145         .master         = &omap2430_l4_core_hwmod,
146         .slave          = &omap2430_i2c2_hwmod,
147         .clk            = "i2c2_ick",
148         .addr           = omap2_i2c2_addr_space,
149         .user           = OCP_USER_MPU | OCP_USER_SDMA,
150 };
151
152 /* L4_CORE -> L4_WKUP interface */
153 static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
154         .master = &omap2430_l4_core_hwmod,
155         .slave  = &omap2430_l4_wkup_hwmod,
156         .user   = OCP_USER_MPU | OCP_USER_SDMA,
157 };
158
159 /* L4 CORE -> UART1 interface */
160 static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
161         .master         = &omap2430_l4_core_hwmod,
162         .slave          = &omap2430_uart1_hwmod,
163         .clk            = "uart1_ick",
164         .addr           = omap2xxx_uart1_addr_space,
165         .user           = OCP_USER_MPU | OCP_USER_SDMA,
166 };
167
168 /* L4 CORE -> UART2 interface */
169 static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
170         .master         = &omap2430_l4_core_hwmod,
171         .slave          = &omap2430_uart2_hwmod,
172         .clk            = "uart2_ick",
173         .addr           = omap2xxx_uart2_addr_space,
174         .user           = OCP_USER_MPU | OCP_USER_SDMA,
175 };
176
177 /* L4 PER -> UART3 interface */
178 static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
179         .master         = &omap2430_l4_core_hwmod,
180         .slave          = &omap2430_uart3_hwmod,
181         .clk            = "uart3_ick",
182         .addr           = omap2xxx_uart3_addr_space,
183         .user           = OCP_USER_MPU | OCP_USER_SDMA,
184 };
185
186 /*
187 * usbhsotg interface data
188 */
189 static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
190         {
191                 .pa_start       = OMAP243X_HS_BASE,
192                 .pa_end         = OMAP243X_HS_BASE + SZ_4K - 1,
193                 .flags          = ADDR_TYPE_RT
194         },
195 };
196
197 /*  l4_core ->usbhsotg  interface */
198 static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
199         .master         = &omap2430_l4_core_hwmod,
200         .slave          = &omap2430_usbhsotg_hwmod,
201         .clk            = "usb_l4_ick",
202         .addr           = omap2430_usbhsotg_addrs,
203         .user           = OCP_USER_MPU,
204 };
205
206 static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
207         &omap2430_usbhsotg__l3,
208 };
209
210 static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
211         &omap2430_l4_core__usbhsotg,
212 };
213
214 /* L4 CORE -> MMC1 interface */
215 static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
216         .master         = &omap2430_l4_core_hwmod,
217         .slave          = &omap2430_mmc1_hwmod,
218         .clk            = "mmchs1_ick",
219         .addr           = omap2430_mmc1_addr_space,
220         .user           = OCP_USER_MPU | OCP_USER_SDMA,
221 };
222
223 /* L4 CORE -> MMC2 interface */
224 static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
225         .master         = &omap2430_l4_core_hwmod,
226         .slave          = &omap2430_mmc2_hwmod,
227         .clk            = "mmchs2_ick",
228         .addr           = omap2430_mmc2_addr_space,
229         .user           = OCP_USER_MPU | OCP_USER_SDMA,
230 };
231
232 /* Slave interfaces on the L4_CORE interconnect */
233 static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
234         &omap2430_l3_main__l4_core,
235 };
236
237 /* Master interfaces on the L4_CORE interconnect */
238 static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
239         &omap2430_l4_core__l4_wkup,
240         &omap2430_l4_core__mmc1,
241         &omap2430_l4_core__mmc2,
242 };
243
244 /* L4 CORE */
245 static struct omap_hwmod omap2430_l4_core_hwmod = {
246         .name           = "l4_core",
247         .class          = &l4_hwmod_class,
248         .masters        = omap2430_l4_core_masters,
249         .masters_cnt    = ARRAY_SIZE(omap2430_l4_core_masters),
250         .slaves         = omap2430_l4_core_slaves,
251         .slaves_cnt     = ARRAY_SIZE(omap2430_l4_core_slaves),
252         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
253         .flags          = HWMOD_NO_IDLEST,
254 };
255
256 /* Slave interfaces on the L4_WKUP interconnect */
257 static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
258         &omap2430_l4_core__l4_wkup,
259         &omap2_l4_core__uart1,
260         &omap2_l4_core__uart2,
261         &omap2_l4_core__uart3,
262 };
263
264 /* Master interfaces on the L4_WKUP interconnect */
265 static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
266 };
267
268 /* l4 core -> mcspi1 interface */
269 static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
270         .master         = &omap2430_l4_core_hwmod,
271         .slave          = &omap2430_mcspi1_hwmod,
272         .clk            = "mcspi1_ick",
273         .addr           = omap2_mcspi1_addr_space,
274         .user           = OCP_USER_MPU | OCP_USER_SDMA,
275 };
276
277 /* l4 core -> mcspi2 interface */
278 static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
279         .master         = &omap2430_l4_core_hwmod,
280         .slave          = &omap2430_mcspi2_hwmod,
281         .clk            = "mcspi2_ick",
282         .addr           = omap2_mcspi2_addr_space,
283         .user           = OCP_USER_MPU | OCP_USER_SDMA,
284 };
285
286 /* l4 core -> mcspi3 interface */
287 static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
288         .master         = &omap2430_l4_core_hwmod,
289         .slave          = &omap2430_mcspi3_hwmod,
290         .clk            = "mcspi3_ick",
291         .addr           = omap2430_mcspi3_addr_space,
292         .user           = OCP_USER_MPU | OCP_USER_SDMA,
293 };
294
295 /* L4 WKUP */
296 static struct omap_hwmod omap2430_l4_wkup_hwmod = {
297         .name           = "l4_wkup",
298         .class          = &l4_hwmod_class,
299         .masters        = omap2430_l4_wkup_masters,
300         .masters_cnt    = ARRAY_SIZE(omap2430_l4_wkup_masters),
301         .slaves         = omap2430_l4_wkup_slaves,
302         .slaves_cnt     = ARRAY_SIZE(omap2430_l4_wkup_slaves),
303         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
304         .flags          = HWMOD_NO_IDLEST,
305 };
306
307 /* Master interfaces on the MPU device */
308 static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
309         &omap2430_mpu__l3_main,
310 };
311
312 /* MPU */
313 static struct omap_hwmod omap2430_mpu_hwmod = {
314         .name           = "mpu",
315         .class          = &mpu_hwmod_class,
316         .main_clk       = "mpu_ck",
317         .masters        = omap2430_mpu_masters,
318         .masters_cnt    = ARRAY_SIZE(omap2430_mpu_masters),
319         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
320 };
321
322 /*
323  * IVA2_1 interface data
324  */
325
326 /* IVA2 <- L3 interface */
327 static struct omap_hwmod_ocp_if omap2430_l3__iva = {
328         .master         = &omap2430_l3_main_hwmod,
329         .slave          = &omap2430_iva_hwmod,
330         .clk            = "dsp_fck",
331         .user           = OCP_USER_MPU | OCP_USER_SDMA,
332 };
333
334 static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
335         &omap2430_l3__iva,
336 };
337
338 /*
339  * IVA2 (IVA2)
340  */
341
342 static struct omap_hwmod omap2430_iva_hwmod = {
343         .name           = "iva",
344         .class          = &iva_hwmod_class,
345         .masters        = omap2430_iva_masters,
346         .masters_cnt    = ARRAY_SIZE(omap2430_iva_masters),
347         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
348 };
349
350 /* timer1 */
351 static struct omap_hwmod omap2430_timer1_hwmod;
352
353 static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
354         {
355                 .pa_start       = 0x49018000,
356                 .pa_end         = 0x49018000 + SZ_1K - 1,
357                 .flags          = ADDR_TYPE_RT
358         },
359         { }
360 };
361
362 /* l4_wkup -> timer1 */
363 static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
364         .master         = &omap2430_l4_wkup_hwmod,
365         .slave          = &omap2430_timer1_hwmod,
366         .clk            = "gpt1_ick",
367         .addr           = omap2430_timer1_addrs,
368         .user           = OCP_USER_MPU | OCP_USER_SDMA,
369 };
370
371 /* timer1 slave port */
372 static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
373         &omap2430_l4_wkup__timer1,
374 };
375
376 /* timer1 hwmod */
377 static struct omap_hwmod omap2430_timer1_hwmod = {
378         .name           = "timer1",
379         .mpu_irqs       = omap2_timer1_mpu_irqs,
380         .main_clk       = "gpt1_fck",
381         .prcm           = {
382                 .omap2 = {
383                         .prcm_reg_id = 1,
384                         .module_bit = OMAP24XX_EN_GPT1_SHIFT,
385                         .module_offs = WKUP_MOD,
386                         .idlest_reg_id = 1,
387                         .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
388                 },
389         },
390         .slaves         = omap2430_timer1_slaves,
391         .slaves_cnt     = ARRAY_SIZE(omap2430_timer1_slaves),
392         .class          = &omap2xxx_timer_hwmod_class,
393         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
394 };
395
396 /* timer2 */
397 static struct omap_hwmod omap2430_timer2_hwmod;
398
399 /* l4_core -> timer2 */
400 static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
401         .master         = &omap2430_l4_core_hwmod,
402         .slave          = &omap2430_timer2_hwmod,
403         .clk            = "gpt2_ick",
404         .addr           = omap2xxx_timer2_addrs,
405         .user           = OCP_USER_MPU | OCP_USER_SDMA,
406 };
407
408 /* timer2 slave port */
409 static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
410         &omap2430_l4_core__timer2,
411 };
412
413 /* timer2 hwmod */
414 static struct omap_hwmod omap2430_timer2_hwmod = {
415         .name           = "timer2",
416         .mpu_irqs       = omap2_timer2_mpu_irqs,
417         .main_clk       = "gpt2_fck",
418         .prcm           = {
419                 .omap2 = {
420                         .prcm_reg_id = 1,
421                         .module_bit = OMAP24XX_EN_GPT2_SHIFT,
422                         .module_offs = CORE_MOD,
423                         .idlest_reg_id = 1,
424                         .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
425                 },
426         },
427         .slaves         = omap2430_timer2_slaves,
428         .slaves_cnt     = ARRAY_SIZE(omap2430_timer2_slaves),
429         .class          = &omap2xxx_timer_hwmod_class,
430         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
431 };
432
433 /* timer3 */
434 static struct omap_hwmod omap2430_timer3_hwmod;
435
436 /* l4_core -> timer3 */
437 static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
438         .master         = &omap2430_l4_core_hwmod,
439         .slave          = &omap2430_timer3_hwmod,
440         .clk            = "gpt3_ick",
441         .addr           = omap2xxx_timer3_addrs,
442         .user           = OCP_USER_MPU | OCP_USER_SDMA,
443 };
444
445 /* timer3 slave port */
446 static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
447         &omap2430_l4_core__timer3,
448 };
449
450 /* timer3 hwmod */
451 static struct omap_hwmod omap2430_timer3_hwmod = {
452         .name           = "timer3",
453         .mpu_irqs       = omap2_timer3_mpu_irqs,
454         .main_clk       = "gpt3_fck",
455         .prcm           = {
456                 .omap2 = {
457                         .prcm_reg_id = 1,
458                         .module_bit = OMAP24XX_EN_GPT3_SHIFT,
459                         .module_offs = CORE_MOD,
460                         .idlest_reg_id = 1,
461                         .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
462                 },
463         },
464         .slaves         = omap2430_timer3_slaves,
465         .slaves_cnt     = ARRAY_SIZE(omap2430_timer3_slaves),
466         .class          = &omap2xxx_timer_hwmod_class,
467         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
468 };
469
470 /* timer4 */
471 static struct omap_hwmod omap2430_timer4_hwmod;
472
473 /* l4_core -> timer4 */
474 static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
475         .master         = &omap2430_l4_core_hwmod,
476         .slave          = &omap2430_timer4_hwmod,
477         .clk            = "gpt4_ick",
478         .addr           = omap2xxx_timer4_addrs,
479         .user           = OCP_USER_MPU | OCP_USER_SDMA,
480 };
481
482 /* timer4 slave port */
483 static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
484         &omap2430_l4_core__timer4,
485 };
486
487 /* timer4 hwmod */
488 static struct omap_hwmod omap2430_timer4_hwmod = {
489         .name           = "timer4",
490         .mpu_irqs       = omap2_timer4_mpu_irqs,
491         .main_clk       = "gpt4_fck",
492         .prcm           = {
493                 .omap2 = {
494                         .prcm_reg_id = 1,
495                         .module_bit = OMAP24XX_EN_GPT4_SHIFT,
496                         .module_offs = CORE_MOD,
497                         .idlest_reg_id = 1,
498                         .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
499                 },
500         },
501         .slaves         = omap2430_timer4_slaves,
502         .slaves_cnt     = ARRAY_SIZE(omap2430_timer4_slaves),
503         .class          = &omap2xxx_timer_hwmod_class,
504         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
505 };
506
507 /* timer5 */
508 static struct omap_hwmod omap2430_timer5_hwmod;
509
510 /* l4_core -> timer5 */
511 static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
512         .master         = &omap2430_l4_core_hwmod,
513         .slave          = &omap2430_timer5_hwmod,
514         .clk            = "gpt5_ick",
515         .addr           = omap2xxx_timer5_addrs,
516         .user           = OCP_USER_MPU | OCP_USER_SDMA,
517 };
518
519 /* timer5 slave port */
520 static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
521         &omap2430_l4_core__timer5,
522 };
523
524 /* timer5 hwmod */
525 static struct omap_hwmod omap2430_timer5_hwmod = {
526         .name           = "timer5",
527         .mpu_irqs       = omap2_timer5_mpu_irqs,
528         .main_clk       = "gpt5_fck",
529         .prcm           = {
530                 .omap2 = {
531                         .prcm_reg_id = 1,
532                         .module_bit = OMAP24XX_EN_GPT5_SHIFT,
533                         .module_offs = CORE_MOD,
534                         .idlest_reg_id = 1,
535                         .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
536                 },
537         },
538         .slaves         = omap2430_timer5_slaves,
539         .slaves_cnt     = ARRAY_SIZE(omap2430_timer5_slaves),
540         .class          = &omap2xxx_timer_hwmod_class,
541         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
542 };
543
544 /* timer6 */
545 static struct omap_hwmod omap2430_timer6_hwmod;
546
547 /* l4_core -> timer6 */
548 static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
549         .master         = &omap2430_l4_core_hwmod,
550         .slave          = &omap2430_timer6_hwmod,
551         .clk            = "gpt6_ick",
552         .addr           = omap2xxx_timer6_addrs,
553         .user           = OCP_USER_MPU | OCP_USER_SDMA,
554 };
555
556 /* timer6 slave port */
557 static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
558         &omap2430_l4_core__timer6,
559 };
560
561 /* timer6 hwmod */
562 static struct omap_hwmod omap2430_timer6_hwmod = {
563         .name           = "timer6",
564         .mpu_irqs       = omap2_timer6_mpu_irqs,
565         .main_clk       = "gpt6_fck",
566         .prcm           = {
567                 .omap2 = {
568                         .prcm_reg_id = 1,
569                         .module_bit = OMAP24XX_EN_GPT6_SHIFT,
570                         .module_offs = CORE_MOD,
571                         .idlest_reg_id = 1,
572                         .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
573                 },
574         },
575         .slaves         = omap2430_timer6_slaves,
576         .slaves_cnt     = ARRAY_SIZE(omap2430_timer6_slaves),
577         .class          = &omap2xxx_timer_hwmod_class,
578         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
579 };
580
581 /* timer7 */
582 static struct omap_hwmod omap2430_timer7_hwmod;
583
584 /* l4_core -> timer7 */
585 static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
586         .master         = &omap2430_l4_core_hwmod,
587         .slave          = &omap2430_timer7_hwmod,
588         .clk            = "gpt7_ick",
589         .addr           = omap2xxx_timer7_addrs,
590         .user           = OCP_USER_MPU | OCP_USER_SDMA,
591 };
592
593 /* timer7 slave port */
594 static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
595         &omap2430_l4_core__timer7,
596 };
597
598 /* timer7 hwmod */
599 static struct omap_hwmod omap2430_timer7_hwmod = {
600         .name           = "timer7",
601         .mpu_irqs       = omap2_timer7_mpu_irqs,
602         .main_clk       = "gpt7_fck",
603         .prcm           = {
604                 .omap2 = {
605                         .prcm_reg_id = 1,
606                         .module_bit = OMAP24XX_EN_GPT7_SHIFT,
607                         .module_offs = CORE_MOD,
608                         .idlest_reg_id = 1,
609                         .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
610                 },
611         },
612         .slaves         = omap2430_timer7_slaves,
613         .slaves_cnt     = ARRAY_SIZE(omap2430_timer7_slaves),
614         .class          = &omap2xxx_timer_hwmod_class,
615         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
616 };
617
618 /* timer8 */
619 static struct omap_hwmod omap2430_timer8_hwmod;
620
621 /* l4_core -> timer8 */
622 static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
623         .master         = &omap2430_l4_core_hwmod,
624         .slave          = &omap2430_timer8_hwmod,
625         .clk            = "gpt8_ick",
626         .addr           = omap2xxx_timer8_addrs,
627         .user           = OCP_USER_MPU | OCP_USER_SDMA,
628 };
629
630 /* timer8 slave port */
631 static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
632         &omap2430_l4_core__timer8,
633 };
634
635 /* timer8 hwmod */
636 static struct omap_hwmod omap2430_timer8_hwmod = {
637         .name           = "timer8",
638         .mpu_irqs       = omap2_timer8_mpu_irqs,
639         .main_clk       = "gpt8_fck",
640         .prcm           = {
641                 .omap2 = {
642                         .prcm_reg_id = 1,
643                         .module_bit = OMAP24XX_EN_GPT8_SHIFT,
644                         .module_offs = CORE_MOD,
645                         .idlest_reg_id = 1,
646                         .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
647                 },
648         },
649         .slaves         = omap2430_timer8_slaves,
650         .slaves_cnt     = ARRAY_SIZE(omap2430_timer8_slaves),
651         .class          = &omap2xxx_timer_hwmod_class,
652         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
653 };
654
655 /* timer9 */
656 static struct omap_hwmod omap2430_timer9_hwmod;
657
658 /* l4_core -> timer9 */
659 static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
660         .master         = &omap2430_l4_core_hwmod,
661         .slave          = &omap2430_timer9_hwmod,
662         .clk            = "gpt9_ick",
663         .addr           = omap2xxx_timer9_addrs,
664         .user           = OCP_USER_MPU | OCP_USER_SDMA,
665 };
666
667 /* timer9 slave port */
668 static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
669         &omap2430_l4_core__timer9,
670 };
671
672 /* timer9 hwmod */
673 static struct omap_hwmod omap2430_timer9_hwmod = {
674         .name           = "timer9",
675         .mpu_irqs       = omap2_timer9_mpu_irqs,
676         .main_clk       = "gpt9_fck",
677         .prcm           = {
678                 .omap2 = {
679                         .prcm_reg_id = 1,
680                         .module_bit = OMAP24XX_EN_GPT9_SHIFT,
681                         .module_offs = CORE_MOD,
682                         .idlest_reg_id = 1,
683                         .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
684                 },
685         },
686         .slaves         = omap2430_timer9_slaves,
687         .slaves_cnt     = ARRAY_SIZE(omap2430_timer9_slaves),
688         .class          = &omap2xxx_timer_hwmod_class,
689         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
690 };
691
692 /* timer10 */
693 static struct omap_hwmod omap2430_timer10_hwmod;
694
695 /* l4_core -> timer10 */
696 static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
697         .master         = &omap2430_l4_core_hwmod,
698         .slave          = &omap2430_timer10_hwmod,
699         .clk            = "gpt10_ick",
700         .addr           = omap2_timer10_addrs,
701         .user           = OCP_USER_MPU | OCP_USER_SDMA,
702 };
703
704 /* timer10 slave port */
705 static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
706         &omap2430_l4_core__timer10,
707 };
708
709 /* timer10 hwmod */
710 static struct omap_hwmod omap2430_timer10_hwmod = {
711         .name           = "timer10",
712         .mpu_irqs       = omap2_timer10_mpu_irqs,
713         .main_clk       = "gpt10_fck",
714         .prcm           = {
715                 .omap2 = {
716                         .prcm_reg_id = 1,
717                         .module_bit = OMAP24XX_EN_GPT10_SHIFT,
718                         .module_offs = CORE_MOD,
719                         .idlest_reg_id = 1,
720                         .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
721                 },
722         },
723         .slaves         = omap2430_timer10_slaves,
724         .slaves_cnt     = ARRAY_SIZE(omap2430_timer10_slaves),
725         .class          = &omap2xxx_timer_hwmod_class,
726         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
727 };
728
729 /* timer11 */
730 static struct omap_hwmod omap2430_timer11_hwmod;
731
732 /* l4_core -> timer11 */
733 static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
734         .master         = &omap2430_l4_core_hwmod,
735         .slave          = &omap2430_timer11_hwmod,
736         .clk            = "gpt11_ick",
737         .addr           = omap2_timer11_addrs,
738         .user           = OCP_USER_MPU | OCP_USER_SDMA,
739 };
740
741 /* timer11 slave port */
742 static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
743         &omap2430_l4_core__timer11,
744 };
745
746 /* timer11 hwmod */
747 static struct omap_hwmod omap2430_timer11_hwmod = {
748         .name           = "timer11",
749         .mpu_irqs       = omap2_timer11_mpu_irqs,
750         .main_clk       = "gpt11_fck",
751         .prcm           = {
752                 .omap2 = {
753                         .prcm_reg_id = 1,
754                         .module_bit = OMAP24XX_EN_GPT11_SHIFT,
755                         .module_offs = CORE_MOD,
756                         .idlest_reg_id = 1,
757                         .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
758                 },
759         },
760         .slaves         = omap2430_timer11_slaves,
761         .slaves_cnt     = ARRAY_SIZE(omap2430_timer11_slaves),
762         .class          = &omap2xxx_timer_hwmod_class,
763         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
764 };
765
766 /* timer12 */
767 static struct omap_hwmod omap2430_timer12_hwmod;
768
769 /* l4_core -> timer12 */
770 static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
771         .master         = &omap2430_l4_core_hwmod,
772         .slave          = &omap2430_timer12_hwmod,
773         .clk            = "gpt12_ick",
774         .addr           = omap2xxx_timer12_addrs,
775         .user           = OCP_USER_MPU | OCP_USER_SDMA,
776 };
777
778 /* timer12 slave port */
779 static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
780         &omap2430_l4_core__timer12,
781 };
782
783 /* timer12 hwmod */
784 static struct omap_hwmod omap2430_timer12_hwmod = {
785         .name           = "timer12",
786         .mpu_irqs       = omap2xxx_timer12_mpu_irqs,
787         .main_clk       = "gpt12_fck",
788         .prcm           = {
789                 .omap2 = {
790                         .prcm_reg_id = 1,
791                         .module_bit = OMAP24XX_EN_GPT12_SHIFT,
792                         .module_offs = CORE_MOD,
793                         .idlest_reg_id = 1,
794                         .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
795                 },
796         },
797         .slaves         = omap2430_timer12_slaves,
798         .slaves_cnt     = ARRAY_SIZE(omap2430_timer12_slaves),
799         .class          = &omap2xxx_timer_hwmod_class,
800         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
801 };
802
803 /* l4_wkup -> wd_timer2 */
804 static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
805         {
806                 .pa_start       = 0x49016000,
807                 .pa_end         = 0x4901607f,
808                 .flags          = ADDR_TYPE_RT
809         },
810         { }
811 };
812
813 static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
814         .master         = &omap2430_l4_wkup_hwmod,
815         .slave          = &omap2430_wd_timer2_hwmod,
816         .clk            = "mpu_wdt_ick",
817         .addr           = omap2430_wd_timer2_addrs,
818         .user           = OCP_USER_MPU | OCP_USER_SDMA,
819 };
820
821 /* wd_timer2 */
822 static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
823         &omap2430_l4_wkup__wd_timer2,
824 };
825
826 static struct omap_hwmod omap2430_wd_timer2_hwmod = {
827         .name           = "wd_timer2",
828         .class          = &omap2xxx_wd_timer_hwmod_class,
829         .main_clk       = "mpu_wdt_fck",
830         .prcm           = {
831                 .omap2 = {
832                         .prcm_reg_id = 1,
833                         .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
834                         .module_offs = WKUP_MOD,
835                         .idlest_reg_id = 1,
836                         .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
837                 },
838         },
839         .slaves         = omap2430_wd_timer2_slaves,
840         .slaves_cnt     = ARRAY_SIZE(omap2430_wd_timer2_slaves),
841         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
842 };
843
844 /* UART1 */
845
846 static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
847         &omap2_l4_core__uart1,
848 };
849
850 static struct omap_hwmod omap2430_uart1_hwmod = {
851         .name           = "uart1",
852         .mpu_irqs       = omap2_uart1_mpu_irqs,
853         .sdma_reqs      = omap2_uart1_sdma_reqs,
854         .main_clk       = "uart1_fck",
855         .prcm           = {
856                 .omap2 = {
857                         .module_offs = CORE_MOD,
858                         .prcm_reg_id = 1,
859                         .module_bit = OMAP24XX_EN_UART1_SHIFT,
860                         .idlest_reg_id = 1,
861                         .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
862                 },
863         },
864         .slaves         = omap2430_uart1_slaves,
865         .slaves_cnt     = ARRAY_SIZE(omap2430_uart1_slaves),
866         .class          = &omap2_uart_class,
867         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
868 };
869
870 /* UART2 */
871
872 static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
873         &omap2_l4_core__uart2,
874 };
875
876 static struct omap_hwmod omap2430_uart2_hwmod = {
877         .name           = "uart2",
878         .mpu_irqs       = omap2_uart2_mpu_irqs,
879         .sdma_reqs      = omap2_uart2_sdma_reqs,
880         .main_clk       = "uart2_fck",
881         .prcm           = {
882                 .omap2 = {
883                         .module_offs = CORE_MOD,
884                         .prcm_reg_id = 1,
885                         .module_bit = OMAP24XX_EN_UART2_SHIFT,
886                         .idlest_reg_id = 1,
887                         .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
888                 },
889         },
890         .slaves         = omap2430_uart2_slaves,
891         .slaves_cnt     = ARRAY_SIZE(omap2430_uart2_slaves),
892         .class          = &omap2_uart_class,
893         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
894 };
895
896 /* UART3 */
897
898 static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
899         &omap2_l4_core__uart3,
900 };
901
902 static struct omap_hwmod omap2430_uart3_hwmod = {
903         .name           = "uart3",
904         .mpu_irqs       = omap2_uart3_mpu_irqs,
905         .sdma_reqs      = omap2_uart3_sdma_reqs,
906         .main_clk       = "uart3_fck",
907         .prcm           = {
908                 .omap2 = {
909                         .module_offs = CORE_MOD,
910                         .prcm_reg_id = 2,
911                         .module_bit = OMAP24XX_EN_UART3_SHIFT,
912                         .idlest_reg_id = 2,
913                         .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
914                 },
915         },
916         .slaves         = omap2430_uart3_slaves,
917         .slaves_cnt     = ARRAY_SIZE(omap2430_uart3_slaves),
918         .class          = &omap2_uart_class,
919         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
920 };
921
922 /* dss */
923 /* dss master ports */
924 static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
925         &omap2430_dss__l3,
926 };
927
928 /* l4_core -> dss */
929 static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
930         .master         = &omap2430_l4_core_hwmod,
931         .slave          = &omap2430_dss_core_hwmod,
932         .clk            = "dss_ick",
933         .addr           = omap2_dss_addrs,
934         .user           = OCP_USER_MPU | OCP_USER_SDMA,
935 };
936
937 /* dss slave ports */
938 static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
939         &omap2430_l4_core__dss,
940 };
941
942 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
943         { .role = "tv_clk", .clk = "dss_54m_fck" },
944         { .role = "sys_clk", .clk = "dss2_fck" },
945 };
946
947 static struct omap_hwmod omap2430_dss_core_hwmod = {
948         .name           = "dss_core",
949         .class          = &omap2_dss_hwmod_class,
950         .main_clk       = "dss1_fck", /* instead of dss_fck */
951         .sdma_reqs      = omap2xxx_dss_sdma_chs,
952         .prcm           = {
953                 .omap2 = {
954                         .prcm_reg_id = 1,
955                         .module_bit = OMAP24XX_EN_DSS1_SHIFT,
956                         .module_offs = CORE_MOD,
957                         .idlest_reg_id = 1,
958                         .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
959                 },
960         },
961         .opt_clks       = dss_opt_clks,
962         .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
963         .slaves         = omap2430_dss_slaves,
964         .slaves_cnt     = ARRAY_SIZE(omap2430_dss_slaves),
965         .masters        = omap2430_dss_masters,
966         .masters_cnt    = ARRAY_SIZE(omap2430_dss_masters),
967         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
968         .flags          = HWMOD_NO_IDLEST,
969 };
970
971 /* l4_core -> dss_dispc */
972 static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
973         .master         = &omap2430_l4_core_hwmod,
974         .slave          = &omap2430_dss_dispc_hwmod,
975         .clk            = "dss_ick",
976         .addr           = omap2_dss_dispc_addrs,
977         .user           = OCP_USER_MPU | OCP_USER_SDMA,
978 };
979
980 /* dss_dispc slave ports */
981 static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
982         &omap2430_l4_core__dss_dispc,
983 };
984
985 static struct omap_hwmod omap2430_dss_dispc_hwmod = {
986         .name           = "dss_dispc",
987         .class          = &omap2_dispc_hwmod_class,
988         .mpu_irqs       = omap2_dispc_irqs,
989         .main_clk       = "dss1_fck",
990         .prcm           = {
991                 .omap2 = {
992                         .prcm_reg_id = 1,
993                         .module_bit = OMAP24XX_EN_DSS1_SHIFT,
994                         .module_offs = CORE_MOD,
995                         .idlest_reg_id = 1,
996                         .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
997                 },
998         },
999         .slaves         = omap2430_dss_dispc_slaves,
1000         .slaves_cnt     = ARRAY_SIZE(omap2430_dss_dispc_slaves),
1001         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1002         .flags          = HWMOD_NO_IDLEST,
1003 };
1004
1005 /* l4_core -> dss_rfbi */
1006 static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
1007         .master         = &omap2430_l4_core_hwmod,
1008         .slave          = &omap2430_dss_rfbi_hwmod,
1009         .clk            = "dss_ick",
1010         .addr           = omap2_dss_rfbi_addrs,
1011         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1012 };
1013
1014 /* dss_rfbi slave ports */
1015 static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
1016         &omap2430_l4_core__dss_rfbi,
1017 };
1018
1019 static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
1020         .name           = "dss_rfbi",
1021         .class          = &omap2_rfbi_hwmod_class,
1022         .main_clk       = "dss1_fck",
1023         .prcm           = {
1024                 .omap2 = {
1025                         .prcm_reg_id = 1,
1026                         .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1027                         .module_offs = CORE_MOD,
1028                 },
1029         },
1030         .slaves         = omap2430_dss_rfbi_slaves,
1031         .slaves_cnt     = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
1032         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1033         .flags          = HWMOD_NO_IDLEST,
1034 };
1035
1036 /* l4_core -> dss_venc */
1037 static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
1038         .master         = &omap2430_l4_core_hwmod,
1039         .slave          = &omap2430_dss_venc_hwmod,
1040         .clk            = "dss_54m_fck",
1041         .addr           = omap2_dss_venc_addrs,
1042         .flags          = OCPIF_SWSUP_IDLE,
1043         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1044 };
1045
1046 /* dss_venc slave ports */
1047 static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
1048         &omap2430_l4_core__dss_venc,
1049 };
1050
1051 static struct omap_hwmod omap2430_dss_venc_hwmod = {
1052         .name           = "dss_venc",
1053         .class          = &omap2_venc_hwmod_class,
1054         .main_clk       = "dss1_fck",
1055         .prcm           = {
1056                 .omap2 = {
1057                         .prcm_reg_id = 1,
1058                         .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1059                         .module_offs = CORE_MOD,
1060                 },
1061         },
1062         .slaves         = omap2430_dss_venc_slaves,
1063         .slaves_cnt     = ARRAY_SIZE(omap2430_dss_venc_slaves),
1064         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1065         .flags          = HWMOD_NO_IDLEST,
1066 };
1067
1068 /* I2C common */
1069 static struct omap_hwmod_class_sysconfig i2c_sysc = {
1070         .rev_offs       = 0x00,
1071         .sysc_offs      = 0x20,
1072         .syss_offs      = 0x10,
1073         .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1074                            SYSS_HAS_RESET_STATUS),
1075         .sysc_fields    = &omap_hwmod_sysc_type1,
1076 };
1077
1078 static struct omap_hwmod_class i2c_class = {
1079         .name           = "i2c",
1080         .sysc           = &i2c_sysc,
1081 };
1082
1083 static struct omap_i2c_dev_attr i2c_dev_attr = {
1084         .fifo_depth     = 8, /* bytes */
1085 };
1086
1087 /* I2C1 */
1088
1089 static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
1090         &omap2430_l4_core__i2c1,
1091 };
1092
1093 static struct omap_hwmod omap2430_i2c1_hwmod = {
1094         .name           = "i2c1",
1095         .mpu_irqs       = omap2_i2c1_mpu_irqs,
1096         .sdma_reqs      = omap2_i2c1_sdma_reqs,
1097         .main_clk       = "i2chs1_fck",
1098         .prcm           = {
1099                 .omap2 = {
1100                         /*
1101                          * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
1102                          * I2CHS IP's do not follow the usual pattern.
1103                          * prcm_reg_id alone cannot be used to program
1104                          * the iclk and fclk. Needs to be handled using
1105                          * additional flags when clk handling is moved
1106                          * to hwmod framework.
1107                          */
1108                         .module_offs = CORE_MOD,
1109                         .prcm_reg_id = 1,
1110                         .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
1111                         .idlest_reg_id = 1,
1112                         .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
1113                 },
1114         },
1115         .slaves         = omap2430_i2c1_slaves,
1116         .slaves_cnt     = ARRAY_SIZE(omap2430_i2c1_slaves),
1117         .class          = &i2c_class,
1118         .dev_attr       = &i2c_dev_attr,
1119         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1120 };
1121
1122 /* I2C2 */
1123
1124 static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
1125         &omap2430_l4_core__i2c2,
1126 };
1127
1128 static struct omap_hwmod omap2430_i2c2_hwmod = {
1129         .name           = "i2c2",
1130         .mpu_irqs       = omap2_i2c2_mpu_irqs,
1131         .sdma_reqs      = omap2_i2c2_sdma_reqs,
1132         .main_clk       = "i2chs2_fck",
1133         .prcm           = {
1134                 .omap2 = {
1135                         .module_offs = CORE_MOD,
1136                         .prcm_reg_id = 1,
1137                         .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
1138                         .idlest_reg_id = 1,
1139                         .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
1140                 },
1141         },
1142         .slaves         = omap2430_i2c2_slaves,
1143         .slaves_cnt     = ARRAY_SIZE(omap2430_i2c2_slaves),
1144         .class          = &i2c_class,
1145         .dev_attr       = &i2c_dev_attr,
1146         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1147 };
1148
1149 /* l4_wkup -> gpio1 */
1150 static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
1151         {
1152                 .pa_start       = 0x4900C000,
1153                 .pa_end         = 0x4900C1ff,
1154                 .flags          = ADDR_TYPE_RT
1155         },
1156         { }
1157 };
1158
1159 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
1160         .master         = &omap2430_l4_wkup_hwmod,
1161         .slave          = &omap2430_gpio1_hwmod,
1162         .clk            = "gpios_ick",
1163         .addr           = omap2430_gpio1_addr_space,
1164         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1165 };
1166
1167 /* l4_wkup -> gpio2 */
1168 static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
1169         {
1170                 .pa_start       = 0x4900E000,
1171                 .pa_end         = 0x4900E1ff,
1172                 .flags          = ADDR_TYPE_RT
1173         },
1174         { }
1175 };
1176
1177 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
1178         .master         = &omap2430_l4_wkup_hwmod,
1179         .slave          = &omap2430_gpio2_hwmod,
1180         .clk            = "gpios_ick",
1181         .addr           = omap2430_gpio2_addr_space,
1182         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1183 };
1184
1185 /* l4_wkup -> gpio3 */
1186 static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
1187         {
1188                 .pa_start       = 0x49010000,
1189                 .pa_end         = 0x490101ff,
1190                 .flags          = ADDR_TYPE_RT
1191         },
1192         { }
1193 };
1194
1195 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
1196         .master         = &omap2430_l4_wkup_hwmod,
1197         .slave          = &omap2430_gpio3_hwmod,
1198         .clk            = "gpios_ick",
1199         .addr           = omap2430_gpio3_addr_space,
1200         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1201 };
1202
1203 /* l4_wkup -> gpio4 */
1204 static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
1205         {
1206                 .pa_start       = 0x49012000,
1207                 .pa_end         = 0x490121ff,
1208                 .flags          = ADDR_TYPE_RT
1209         },
1210         { }
1211 };
1212
1213 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
1214         .master         = &omap2430_l4_wkup_hwmod,
1215         .slave          = &omap2430_gpio4_hwmod,
1216         .clk            = "gpios_ick",
1217         .addr           = omap2430_gpio4_addr_space,
1218         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1219 };
1220
1221 /* l4_core -> gpio5 */
1222 static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
1223         {
1224                 .pa_start       = 0x480B6000,
1225                 .pa_end         = 0x480B61ff,
1226                 .flags          = ADDR_TYPE_RT
1227         },
1228         { }
1229 };
1230
1231 static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
1232         .master         = &omap2430_l4_core_hwmod,
1233         .slave          = &omap2430_gpio5_hwmod,
1234         .clk            = "gpio5_ick",
1235         .addr           = omap2430_gpio5_addr_space,
1236         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1237 };
1238
1239 /* gpio dev_attr */
1240 static struct omap_gpio_dev_attr gpio_dev_attr = {
1241         .bank_width = 32,
1242         .dbck_flag = false,
1243 };
1244
1245 /* gpio1 */
1246 static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1247         &omap2430_l4_wkup__gpio1,
1248 };
1249
1250 static struct omap_hwmod omap2430_gpio1_hwmod = {
1251         .name           = "gpio1",
1252         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1253         .mpu_irqs       = omap2_gpio1_irqs,
1254         .main_clk       = "gpios_fck",
1255         .prcm           = {
1256                 .omap2 = {
1257                         .prcm_reg_id = 1,
1258                         .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1259                         .module_offs = WKUP_MOD,
1260                         .idlest_reg_id = 1,
1261                         .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
1262                 },
1263         },
1264         .slaves         = omap2430_gpio1_slaves,
1265         .slaves_cnt     = ARRAY_SIZE(omap2430_gpio1_slaves),
1266         .class          = &omap2xxx_gpio_hwmod_class,
1267         .dev_attr       = &gpio_dev_attr,
1268         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1269 };
1270
1271 /* gpio2 */
1272 static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1273         &omap2430_l4_wkup__gpio2,
1274 };
1275
1276 static struct omap_hwmod omap2430_gpio2_hwmod = {
1277         .name           = "gpio2",
1278         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1279         .mpu_irqs       = omap2_gpio2_irqs,
1280         .main_clk       = "gpios_fck",
1281         .prcm           = {
1282                 .omap2 = {
1283                         .prcm_reg_id = 1,
1284                         .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1285                         .module_offs = WKUP_MOD,
1286                         .idlest_reg_id = 1,
1287                         .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1288                 },
1289         },
1290         .slaves         = omap2430_gpio2_slaves,
1291         .slaves_cnt     = ARRAY_SIZE(omap2430_gpio2_slaves),
1292         .class          = &omap2xxx_gpio_hwmod_class,
1293         .dev_attr       = &gpio_dev_attr,
1294         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1295 };
1296
1297 /* gpio3 */
1298 static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1299         &omap2430_l4_wkup__gpio3,
1300 };
1301
1302 static struct omap_hwmod omap2430_gpio3_hwmod = {
1303         .name           = "gpio3",
1304         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1305         .mpu_irqs       = omap2_gpio3_irqs,
1306         .main_clk       = "gpios_fck",
1307         .prcm           = {
1308                 .omap2 = {
1309                         .prcm_reg_id = 1,
1310                         .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1311                         .module_offs = WKUP_MOD,
1312                         .idlest_reg_id = 1,
1313                         .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1314                 },
1315         },
1316         .slaves         = omap2430_gpio3_slaves,
1317         .slaves_cnt     = ARRAY_SIZE(omap2430_gpio3_slaves),
1318         .class          = &omap2xxx_gpio_hwmod_class,
1319         .dev_attr       = &gpio_dev_attr,
1320         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1321 };
1322
1323 /* gpio4 */
1324 static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1325         &omap2430_l4_wkup__gpio4,
1326 };
1327
1328 static struct omap_hwmod omap2430_gpio4_hwmod = {
1329         .name           = "gpio4",
1330         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1331         .mpu_irqs       = omap2_gpio4_irqs,
1332         .main_clk       = "gpios_fck",
1333         .prcm           = {
1334                 .omap2 = {
1335                         .prcm_reg_id = 1,
1336                         .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1337                         .module_offs = WKUP_MOD,
1338                         .idlest_reg_id = 1,
1339                         .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1340                 },
1341         },
1342         .slaves         = omap2430_gpio4_slaves,
1343         .slaves_cnt     = ARRAY_SIZE(omap2430_gpio4_slaves),
1344         .class          = &omap2xxx_gpio_hwmod_class,
1345         .dev_attr       = &gpio_dev_attr,
1346         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1347 };
1348
1349 /* gpio5 */
1350 static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
1351         { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
1352         { .irq = -1 }
1353 };
1354
1355 static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
1356         &omap2430_l4_core__gpio5,
1357 };
1358
1359 static struct omap_hwmod omap2430_gpio5_hwmod = {
1360         .name           = "gpio5",
1361         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1362         .mpu_irqs       = omap243x_gpio5_irqs,
1363         .main_clk       = "gpio5_fck",
1364         .prcm           = {
1365                 .omap2 = {
1366                         .prcm_reg_id = 2,
1367                         .module_bit = OMAP2430_EN_GPIO5_SHIFT,
1368                         .module_offs = CORE_MOD,
1369                         .idlest_reg_id = 2,
1370                         .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
1371                 },
1372         },
1373         .slaves         = omap2430_gpio5_slaves,
1374         .slaves_cnt     = ARRAY_SIZE(omap2430_gpio5_slaves),
1375         .class          = &omap2xxx_gpio_hwmod_class,
1376         .dev_attr       = &gpio_dev_attr,
1377         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1378 };
1379
1380 /* dma attributes */
1381 static struct omap_dma_dev_attr dma_dev_attr = {
1382         .dev_caps  = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1383                                 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1384         .lch_count = 32,
1385 };
1386
1387 /* dma_system -> L3 */
1388 static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
1389         .master         = &omap2430_dma_system_hwmod,
1390         .slave          = &omap2430_l3_main_hwmod,
1391         .clk            = "core_l3_ck",
1392         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1393 };
1394
1395 /* dma_system master ports */
1396 static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
1397         &omap2430_dma_system__l3,
1398 };
1399
1400 /* l4_core -> dma_system */
1401 static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
1402         .master         = &omap2430_l4_core_hwmod,
1403         .slave          = &omap2430_dma_system_hwmod,
1404         .clk            = "sdma_ick",
1405         .addr           = omap2_dma_system_addrs,
1406         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1407 };
1408
1409 /* dma_system slave ports */
1410 static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
1411         &omap2430_l4_core__dma_system,
1412 };
1413
1414 static struct omap_hwmod omap2430_dma_system_hwmod = {
1415         .name           = "dma",
1416         .class          = &omap2xxx_dma_hwmod_class,
1417         .mpu_irqs       = omap2_dma_system_irqs,
1418         .main_clk       = "core_l3_ck",
1419         .slaves         = omap2430_dma_system_slaves,
1420         .slaves_cnt     = ARRAY_SIZE(omap2430_dma_system_slaves),
1421         .masters        = omap2430_dma_system_masters,
1422         .masters_cnt    = ARRAY_SIZE(omap2430_dma_system_masters),
1423         .dev_attr       = &dma_dev_attr,
1424         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1425         .flags          = HWMOD_NO_IDLEST,
1426 };
1427
1428 /* mailbox */
1429 static struct omap_hwmod omap2430_mailbox_hwmod;
1430 static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1431         { .irq = 26 },
1432         { .irq = -1 }
1433 };
1434
1435 /* l4_core -> mailbox */
1436 static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
1437         .master         = &omap2430_l4_core_hwmod,
1438         .slave          = &omap2430_mailbox_hwmod,
1439         .addr           = omap2_mailbox_addrs,
1440         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1441 };
1442
1443 /* mailbox slave ports */
1444 static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
1445         &omap2430_l4_core__mailbox,
1446 };
1447
1448 static struct omap_hwmod omap2430_mailbox_hwmod = {
1449         .name           = "mailbox",
1450         .class          = &omap2xxx_mailbox_hwmod_class,
1451         .mpu_irqs       = omap2430_mailbox_irqs,
1452         .main_clk       = "mailboxes_ick",
1453         .prcm           = {
1454                 .omap2 = {
1455                         .prcm_reg_id = 1,
1456                         .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1457                         .module_offs = CORE_MOD,
1458                         .idlest_reg_id = 1,
1459                         .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1460                 },
1461         },
1462         .slaves         = omap2430_mailbox_slaves,
1463         .slaves_cnt     = ARRAY_SIZE(omap2430_mailbox_slaves),
1464         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1465 };
1466
1467 /* mcspi1 */
1468 static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
1469         &omap2430_l4_core__mcspi1,
1470 };
1471
1472 static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1473         .num_chipselect = 4,
1474 };
1475
1476 static struct omap_hwmod omap2430_mcspi1_hwmod = {
1477         .name           = "mcspi1_hwmod",
1478         .mpu_irqs       = omap2_mcspi1_mpu_irqs,
1479         .sdma_reqs      = omap2_mcspi1_sdma_reqs,
1480         .main_clk       = "mcspi1_fck",
1481         .prcm           = {
1482                 .omap2 = {
1483                         .module_offs = CORE_MOD,
1484                         .prcm_reg_id = 1,
1485                         .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1486                         .idlest_reg_id = 1,
1487                         .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1488                 },
1489         },
1490         .slaves         = omap2430_mcspi1_slaves,
1491         .slaves_cnt     = ARRAY_SIZE(omap2430_mcspi1_slaves),
1492         .class          = &omap2xxx_mcspi_class,
1493         .dev_attr       = &omap_mcspi1_dev_attr,
1494         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1495 };
1496
1497 /* mcspi2 */
1498 static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
1499         &omap2430_l4_core__mcspi2,
1500 };
1501
1502 static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1503         .num_chipselect = 2,
1504 };
1505
1506 static struct omap_hwmod omap2430_mcspi2_hwmod = {
1507         .name           = "mcspi2_hwmod",
1508         .mpu_irqs       = omap2_mcspi2_mpu_irqs,
1509         .sdma_reqs      = omap2_mcspi2_sdma_reqs,
1510         .main_clk       = "mcspi2_fck",
1511         .prcm           = {
1512                 .omap2 = {
1513                         .module_offs = CORE_MOD,
1514                         .prcm_reg_id = 1,
1515                         .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1516                         .idlest_reg_id = 1,
1517                         .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1518                 },
1519         },
1520         .slaves         = omap2430_mcspi2_slaves,
1521         .slaves_cnt     = ARRAY_SIZE(omap2430_mcspi2_slaves),
1522         .class          = &omap2xxx_mcspi_class,
1523         .dev_attr       = &omap_mcspi2_dev_attr,
1524         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1525 };
1526
1527 /* mcspi3 */
1528 static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
1529         { .irq = 91 },
1530         { .irq = -1 }
1531 };
1532
1533 static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
1534         { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
1535         { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
1536         { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
1537         { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
1538         { .dma_req = -1 }
1539 };
1540
1541 static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
1542         &omap2430_l4_core__mcspi3,
1543 };
1544
1545 static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1546         .num_chipselect = 2,
1547 };
1548
1549 static struct omap_hwmod omap2430_mcspi3_hwmod = {
1550         .name           = "mcspi3_hwmod",
1551         .mpu_irqs       = omap2430_mcspi3_mpu_irqs,
1552         .sdma_reqs      = omap2430_mcspi3_sdma_reqs,
1553         .main_clk       = "mcspi3_fck",
1554         .prcm           = {
1555                 .omap2 = {
1556                         .module_offs = CORE_MOD,
1557                         .prcm_reg_id = 2,
1558                         .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
1559                         .idlest_reg_id = 2,
1560                         .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
1561                 },
1562         },
1563         .slaves         = omap2430_mcspi3_slaves,
1564         .slaves_cnt     = ARRAY_SIZE(omap2430_mcspi3_slaves),
1565         .class          = &omap2xxx_mcspi_class,
1566         .dev_attr       = &omap_mcspi3_dev_attr,
1567         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1568 };
1569
1570 /*
1571  * usbhsotg
1572  */
1573 static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
1574         .rev_offs       = 0x0400,
1575         .sysc_offs      = 0x0404,
1576         .syss_offs      = 0x0408,
1577         .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1578                           SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1579                           SYSC_HAS_AUTOIDLE),
1580         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1581                           MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1582         .sysc_fields    = &omap_hwmod_sysc_type1,
1583 };
1584
1585 static struct omap_hwmod_class usbotg_class = {
1586         .name = "usbotg",
1587         .sysc = &omap2430_usbhsotg_sysc,
1588 };
1589
1590 /* usb_otg_hs */
1591 static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
1592
1593         { .name = "mc", .irq = 92 },
1594         { .name = "dma", .irq = 93 },
1595         { .irq = -1 }
1596 };
1597
1598 static struct omap_hwmod omap2430_usbhsotg_hwmod = {
1599         .name           = "usb_otg_hs",
1600         .mpu_irqs       = omap2430_usbhsotg_mpu_irqs,
1601         .main_clk       = "usbhs_ick",
1602         .prcm           = {
1603                 .omap2 = {
1604                         .prcm_reg_id = 1,
1605                         .module_bit = OMAP2430_EN_USBHS_MASK,
1606                         .module_offs = CORE_MOD,
1607                         .idlest_reg_id = 1,
1608                         .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
1609                 },
1610         },
1611         .masters        = omap2430_usbhsotg_masters,
1612         .masters_cnt    = ARRAY_SIZE(omap2430_usbhsotg_masters),
1613         .slaves         = omap2430_usbhsotg_slaves,
1614         .slaves_cnt     = ARRAY_SIZE(omap2430_usbhsotg_slaves),
1615         .class          = &usbotg_class,
1616         /*
1617          * Erratum ID: i479  idle_req / idle_ack mechanism potentially
1618          * broken when autoidle is enabled
1619          * workaround is to disable the autoidle bit at module level.
1620          */
1621         .flags          = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1622                                 | HWMOD_SWSUP_MSTANDBY,
1623         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
1624 };
1625
1626 /*
1627  * 'mcbsp' class
1628  * multi channel buffered serial port controller
1629  */
1630
1631 static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
1632         .rev_offs       = 0x007C,
1633         .sysc_offs      = 0x008C,
1634         .sysc_flags     = (SYSC_HAS_SOFTRESET),
1635         .sysc_fields    = &omap_hwmod_sysc_type1,
1636 };
1637
1638 static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
1639         .name = "mcbsp",
1640         .sysc = &omap2430_mcbsp_sysc,
1641         .rev  = MCBSP_CONFIG_TYPE2,
1642 };
1643
1644 /* mcbsp1 */
1645 static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
1646         { .name = "tx",         .irq = 59 },
1647         { .name = "rx",         .irq = 60 },
1648         { .name = "ovr",        .irq = 61 },
1649         { .name = "common",     .irq = 64 },
1650         { .irq = -1 }
1651 };
1652
1653 /* l4_core -> mcbsp1 */
1654 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
1655         .master         = &omap2430_l4_core_hwmod,
1656         .slave          = &omap2430_mcbsp1_hwmod,
1657         .clk            = "mcbsp1_ick",
1658         .addr           = omap2_mcbsp1_addrs,
1659         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1660 };
1661
1662 /* mcbsp1 slave ports */
1663 static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
1664         &omap2430_l4_core__mcbsp1,
1665 };
1666
1667 static struct omap_hwmod omap2430_mcbsp1_hwmod = {
1668         .name           = "mcbsp1",
1669         .class          = &omap2430_mcbsp_hwmod_class,
1670         .mpu_irqs       = omap2430_mcbsp1_irqs,
1671         .sdma_reqs      = omap2_mcbsp1_sdma_reqs,
1672         .main_clk       = "mcbsp1_fck",
1673         .prcm           = {
1674                 .omap2 = {
1675                         .prcm_reg_id = 1,
1676                         .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1677                         .module_offs = CORE_MOD,
1678                         .idlest_reg_id = 1,
1679                         .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1680                 },
1681         },
1682         .slaves         = omap2430_mcbsp1_slaves,
1683         .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp1_slaves),
1684         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1685 };
1686
1687 /* mcbsp2 */
1688 static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
1689         { .name = "tx",         .irq = 62 },
1690         { .name = "rx",         .irq = 63 },
1691         { .name = "common",     .irq = 16 },
1692         { .irq = -1 }
1693 };
1694
1695 /* l4_core -> mcbsp2 */
1696 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
1697         .master         = &omap2430_l4_core_hwmod,
1698         .slave          = &omap2430_mcbsp2_hwmod,
1699         .clk            = "mcbsp2_ick",
1700         .addr           = omap2xxx_mcbsp2_addrs,
1701         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1702 };
1703
1704 /* mcbsp2 slave ports */
1705 static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
1706         &omap2430_l4_core__mcbsp2,
1707 };
1708
1709 static struct omap_hwmod omap2430_mcbsp2_hwmod = {
1710         .name           = "mcbsp2",
1711         .class          = &omap2430_mcbsp_hwmod_class,
1712         .mpu_irqs       = omap2430_mcbsp2_irqs,
1713         .sdma_reqs      = omap2_mcbsp2_sdma_reqs,
1714         .main_clk       = "mcbsp2_fck",
1715         .prcm           = {
1716                 .omap2 = {
1717                         .prcm_reg_id = 1,
1718                         .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1719                         .module_offs = CORE_MOD,
1720                         .idlest_reg_id = 1,
1721                         .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1722                 },
1723         },
1724         .slaves         = omap2430_mcbsp2_slaves,
1725         .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp2_slaves),
1726         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1727 };
1728
1729 /* mcbsp3 */
1730 static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
1731         { .name = "tx",         .irq = 89 },
1732         { .name = "rx",         .irq = 90 },
1733         { .name = "common",     .irq = 17 },
1734         { .irq = -1 }
1735 };
1736
1737 static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
1738         {
1739                 .name           = "mpu",
1740                 .pa_start       = 0x4808C000,
1741                 .pa_end         = 0x4808C0ff,
1742                 .flags          = ADDR_TYPE_RT
1743         },
1744         { }
1745 };
1746
1747 /* l4_core -> mcbsp3 */
1748 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
1749         .master         = &omap2430_l4_core_hwmod,
1750         .slave          = &omap2430_mcbsp3_hwmod,
1751         .clk            = "mcbsp3_ick",
1752         .addr           = omap2430_mcbsp3_addrs,
1753         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1754 };
1755
1756 /* mcbsp3 slave ports */
1757 static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
1758         &omap2430_l4_core__mcbsp3,
1759 };
1760
1761 static struct omap_hwmod omap2430_mcbsp3_hwmod = {
1762         .name           = "mcbsp3",
1763         .class          = &omap2430_mcbsp_hwmod_class,
1764         .mpu_irqs       = omap2430_mcbsp3_irqs,
1765         .sdma_reqs      = omap2_mcbsp3_sdma_reqs,
1766         .main_clk       = "mcbsp3_fck",
1767         .prcm           = {
1768                 .omap2 = {
1769                         .prcm_reg_id = 1,
1770                         .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
1771                         .module_offs = CORE_MOD,
1772                         .idlest_reg_id = 2,
1773                         .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
1774                 },
1775         },
1776         .slaves         = omap2430_mcbsp3_slaves,
1777         .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp3_slaves),
1778         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1779 };
1780
1781 /* mcbsp4 */
1782 static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
1783         { .name = "tx",         .irq = 54 },
1784         { .name = "rx",         .irq = 55 },
1785         { .name = "common",     .irq = 18 },
1786         { .irq = -1 }
1787 };
1788
1789 static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
1790         { .name = "rx", .dma_req = 20 },
1791         { .name = "tx", .dma_req = 19 },
1792         { .dma_req = -1 }
1793 };
1794
1795 static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
1796         {
1797                 .name           = "mpu",
1798                 .pa_start       = 0x4808E000,
1799                 .pa_end         = 0x4808E0ff,
1800                 .flags          = ADDR_TYPE_RT
1801         },
1802         { }
1803 };
1804
1805 /* l4_core -> mcbsp4 */
1806 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
1807         .master         = &omap2430_l4_core_hwmod,
1808         .slave          = &omap2430_mcbsp4_hwmod,
1809         .clk            = "mcbsp4_ick",
1810         .addr           = omap2430_mcbsp4_addrs,
1811         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1812 };
1813
1814 /* mcbsp4 slave ports */
1815 static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
1816         &omap2430_l4_core__mcbsp4,
1817 };
1818
1819 static struct omap_hwmod omap2430_mcbsp4_hwmod = {
1820         .name           = "mcbsp4",
1821         .class          = &omap2430_mcbsp_hwmod_class,
1822         .mpu_irqs       = omap2430_mcbsp4_irqs,
1823         .sdma_reqs      = omap2430_mcbsp4_sdma_chs,
1824         .main_clk       = "mcbsp4_fck",
1825         .prcm           = {
1826                 .omap2 = {
1827                         .prcm_reg_id = 1,
1828                         .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
1829                         .module_offs = CORE_MOD,
1830                         .idlest_reg_id = 2,
1831                         .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
1832                 },
1833         },
1834         .slaves         = omap2430_mcbsp4_slaves,
1835         .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp4_slaves),
1836         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1837 };
1838
1839 /* mcbsp5 */
1840 static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
1841         { .name = "tx",         .irq = 81 },
1842         { .name = "rx",         .irq = 82 },
1843         { .name = "common",     .irq = 19 },
1844         { .irq = -1 }
1845 };
1846
1847 static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
1848         { .name = "rx", .dma_req = 22 },
1849         { .name = "tx", .dma_req = 21 },
1850         { .dma_req = -1 }
1851 };
1852
1853 static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
1854         {
1855                 .name           = "mpu",
1856                 .pa_start       = 0x48096000,
1857                 .pa_end         = 0x480960ff,
1858                 .flags          = ADDR_TYPE_RT
1859         },
1860         { }
1861 };
1862
1863 /* l4_core -> mcbsp5 */
1864 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
1865         .master         = &omap2430_l4_core_hwmod,
1866         .slave          = &omap2430_mcbsp5_hwmod,
1867         .clk            = "mcbsp5_ick",
1868         .addr           = omap2430_mcbsp5_addrs,
1869         .user           = OCP_USER_MPU | OCP_USER_SDMA,
1870 };
1871
1872 /* mcbsp5 slave ports */
1873 static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
1874         &omap2430_l4_core__mcbsp5,
1875 };
1876
1877 static struct omap_hwmod omap2430_mcbsp5_hwmod = {
1878         .name           = "mcbsp5",
1879         .class          = &omap2430_mcbsp_hwmod_class,
1880         .mpu_irqs       = omap2430_mcbsp5_irqs,
1881         .sdma_reqs      = omap2430_mcbsp5_sdma_chs,
1882         .main_clk       = "mcbsp5_fck",
1883         .prcm           = {
1884                 .omap2 = {
1885                         .prcm_reg_id = 1,
1886                         .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
1887                         .module_offs = CORE_MOD,
1888                         .idlest_reg_id = 2,
1889                         .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
1890                 },
1891         },
1892         .slaves         = omap2430_mcbsp5_slaves,
1893         .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp5_slaves),
1894         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1895 };
1896
1897 /* MMC/SD/SDIO common */
1898
1899 static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
1900         .rev_offs       = 0x1fc,
1901         .sysc_offs      = 0x10,
1902         .syss_offs      = 0x14,
1903         .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1904                            SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1905                            SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1906         .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1907         .sysc_fields    = &omap_hwmod_sysc_type1,
1908 };
1909
1910 static struct omap_hwmod_class omap2430_mmc_class = {
1911         .name = "mmc",
1912         .sysc = &omap2430_mmc_sysc,
1913 };
1914
1915 /* MMC/SD/SDIO1 */
1916
1917 static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
1918         { .irq = 83 },
1919         { .irq = -1 }
1920 };
1921
1922 static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
1923         { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
1924         { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
1925         { .dma_req = -1 }
1926 };
1927
1928 static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
1929         { .role = "dbck", .clk = "mmchsdb1_fck" },
1930 };
1931
1932 static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
1933         &omap2430_l4_core__mmc1,
1934 };
1935
1936 static struct omap_mmc_dev_attr mmc1_dev_attr = {
1937         .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1938 };
1939
1940 static struct omap_hwmod omap2430_mmc1_hwmod = {
1941         .name           = "mmc1",
1942         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1943         .mpu_irqs       = omap2430_mmc1_mpu_irqs,
1944         .sdma_reqs      = omap2430_mmc1_sdma_reqs,
1945         .opt_clks       = omap2430_mmc1_opt_clks,
1946         .opt_clks_cnt   = ARRAY_SIZE(omap2430_mmc1_opt_clks),
1947         .main_clk       = "mmchs1_fck",
1948         .prcm           = {
1949                 .omap2 = {
1950                         .module_offs = CORE_MOD,
1951                         .prcm_reg_id = 2,
1952                         .module_bit  = OMAP2430_EN_MMCHS1_SHIFT,
1953                         .idlest_reg_id = 2,
1954                         .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
1955                 },
1956         },
1957         .dev_attr       = &mmc1_dev_attr,
1958         .slaves         = omap2430_mmc1_slaves,
1959         .slaves_cnt     = ARRAY_SIZE(omap2430_mmc1_slaves),
1960         .class          = &omap2430_mmc_class,
1961         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1962 };
1963
1964 /* MMC/SD/SDIO2 */
1965
1966 static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
1967         { .irq = 86 },
1968         { .irq = -1 }
1969 };
1970
1971 static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
1972         { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
1973         { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
1974         { .dma_req = -1 }
1975 };
1976
1977 static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
1978         { .role = "dbck", .clk = "mmchsdb2_fck" },
1979 };
1980
1981 static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
1982         &omap2430_l4_core__mmc2,
1983 };
1984
1985 static struct omap_hwmod omap2430_mmc2_hwmod = {
1986         .name           = "mmc2",
1987         .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1988         .mpu_irqs       = omap2430_mmc2_mpu_irqs,
1989         .sdma_reqs      = omap2430_mmc2_sdma_reqs,
1990         .opt_clks       = omap2430_mmc2_opt_clks,
1991         .opt_clks_cnt   = ARRAY_SIZE(omap2430_mmc2_opt_clks),
1992         .main_clk       = "mmchs2_fck",
1993         .prcm           = {
1994                 .omap2 = {
1995                         .module_offs = CORE_MOD,
1996                         .prcm_reg_id = 2,
1997                         .module_bit  = OMAP2430_EN_MMCHS2_SHIFT,
1998                         .idlest_reg_id = 2,
1999                         .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
2000                 },
2001         },
2002         .slaves         = omap2430_mmc2_slaves,
2003         .slaves_cnt     = ARRAY_SIZE(omap2430_mmc2_slaves),
2004         .class          = &omap2430_mmc_class,
2005         .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2006 };
2007
2008 static __initdata struct omap_hwmod *omap2430_hwmods[] = {
2009         &omap2430_l3_main_hwmod,
2010         &omap2430_l4_core_hwmod,
2011         &omap2430_l4_wkup_hwmod,
2012         &omap2430_mpu_hwmod,
2013         &omap2430_iva_hwmod,
2014
2015         &omap2430_timer1_hwmod,
2016         &omap2430_timer2_hwmod,
2017         &omap2430_timer3_hwmod,
2018         &omap2430_timer4_hwmod,
2019         &omap2430_timer5_hwmod,
2020         &omap2430_timer6_hwmod,
2021         &omap2430_timer7_hwmod,
2022         &omap2430_timer8_hwmod,
2023         &omap2430_timer9_hwmod,
2024         &omap2430_timer10_hwmod,
2025         &omap2430_timer11_hwmod,
2026         &omap2430_timer12_hwmod,
2027
2028         &omap2430_wd_timer2_hwmod,
2029         &omap2430_uart1_hwmod,
2030         &omap2430_uart2_hwmod,
2031         &omap2430_uart3_hwmod,
2032         /* dss class */
2033         &omap2430_dss_core_hwmod,
2034         &omap2430_dss_dispc_hwmod,
2035         &omap2430_dss_rfbi_hwmod,
2036         &omap2430_dss_venc_hwmod,
2037         /* i2c class */
2038         &omap2430_i2c1_hwmod,
2039         &omap2430_i2c2_hwmod,
2040         &omap2430_mmc1_hwmod,
2041         &omap2430_mmc2_hwmod,
2042
2043         /* gpio class */
2044         &omap2430_gpio1_hwmod,
2045         &omap2430_gpio2_hwmod,
2046         &omap2430_gpio3_hwmod,
2047         &omap2430_gpio4_hwmod,
2048         &omap2430_gpio5_hwmod,
2049
2050         /* dma_system class*/
2051         &omap2430_dma_system_hwmod,
2052
2053         /* mcbsp class */
2054         &omap2430_mcbsp1_hwmod,
2055         &omap2430_mcbsp2_hwmod,
2056         &omap2430_mcbsp3_hwmod,
2057         &omap2430_mcbsp4_hwmod,
2058         &omap2430_mcbsp5_hwmod,
2059
2060         /* mailbox class */
2061         &omap2430_mailbox_hwmod,
2062
2063         /* mcspi class */
2064         &omap2430_mcspi1_hwmod,
2065         &omap2430_mcspi2_hwmod,
2066         &omap2430_mcspi3_hwmod,
2067
2068         /* usbotg class*/
2069         &omap2430_usbhsotg_hwmod,
2070
2071         NULL,
2072 };
2073
2074 int __init omap2430_hwmod_init(void)
2075 {
2076         return omap_hwmod_register(omap2430_hwmods);
2077 }