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