2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
4 * Copyright (C) 2009-2010 Nokia Corporation
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.
11 * The data in this file should be completely autogeneratable from
12 * the TI hardware database or other technical documentation.
14 * XXX these should be marked initdata for multi-OMAP kernels
16 #include <plat/omap_hwmod.h>
17 #include <mach/irqs.h>
21 #include "omap_hwmod_common_data.h"
23 #include "prm-regbits-34xx.h"
24 #include "cm-regbits-34xx.h"
27 * OMAP3xxx hardware module integration data
29 * ALl of the data in this section should be autogeneratable from the
30 * TI hardware database or other technical documentation. Data that
31 * is driver-specific or driver-kernel integration-specific belongs
35 static struct omap_hwmod omap3xxx_mpu_hwmod;
36 static struct omap_hwmod omap3xxx_iva_hwmod;
37 static struct omap_hwmod omap3xxx_l3_main_hwmod;
38 static struct omap_hwmod omap3xxx_l4_core_hwmod;
39 static struct omap_hwmod omap3xxx_l4_per_hwmod;
40 static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
42 /* L3 -> L4_CORE interface */
43 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
44 .master = &omap3xxx_l3_main_hwmod,
45 .slave = &omap3xxx_l4_core_hwmod,
46 .user = OCP_USER_MPU | OCP_USER_SDMA,
49 /* L3 -> L4_PER interface */
50 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
51 .master = &omap3xxx_l3_main_hwmod,
52 .slave = &omap3xxx_l4_per_hwmod,
53 .user = OCP_USER_MPU | OCP_USER_SDMA,
56 /* MPU -> L3 interface */
57 static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
58 .master = &omap3xxx_mpu_hwmod,
59 .slave = &omap3xxx_l3_main_hwmod,
63 /* Slave interfaces on the L3 interconnect */
64 static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
65 &omap3xxx_mpu__l3_main,
68 /* Master interfaces on the L3 interconnect */
69 static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
70 &omap3xxx_l3_main__l4_core,
71 &omap3xxx_l3_main__l4_per,
75 static struct omap_hwmod omap3xxx_l3_main_hwmod = {
77 .class = &l3_hwmod_class,
78 .masters = omap3xxx_l3_main_masters,
79 .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
80 .slaves = omap3xxx_l3_main_slaves,
81 .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
82 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
83 .flags = HWMOD_NO_IDLEST,
86 static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
88 /* L4_CORE -> L4_WKUP interface */
89 static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
90 .master = &omap3xxx_l4_core_hwmod,
91 .slave = &omap3xxx_l4_wkup_hwmod,
92 .user = OCP_USER_MPU | OCP_USER_SDMA,
95 /* Slave interfaces on the L4_CORE interconnect */
96 static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
97 &omap3xxx_l3_main__l4_core,
100 /* Master interfaces on the L4_CORE interconnect */
101 static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
102 &omap3xxx_l4_core__l4_wkup,
106 static struct omap_hwmod omap3xxx_l4_core_hwmod = {
108 .class = &l4_hwmod_class,
109 .masters = omap3xxx_l4_core_masters,
110 .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
111 .slaves = omap3xxx_l4_core_slaves,
112 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
113 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
114 .flags = HWMOD_NO_IDLEST,
117 /* Slave interfaces on the L4_PER interconnect */
118 static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
119 &omap3xxx_l3_main__l4_per,
122 /* Master interfaces on the L4_PER interconnect */
123 static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
127 static struct omap_hwmod omap3xxx_l4_per_hwmod = {
129 .class = &l4_hwmod_class,
130 .masters = omap3xxx_l4_per_masters,
131 .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
132 .slaves = omap3xxx_l4_per_slaves,
133 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
134 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
135 .flags = HWMOD_NO_IDLEST,
138 /* Slave interfaces on the L4_WKUP interconnect */
139 static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
140 &omap3xxx_l4_core__l4_wkup,
143 /* Master interfaces on the L4_WKUP interconnect */
144 static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
148 static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
150 .class = &l4_hwmod_class,
151 .masters = omap3xxx_l4_wkup_masters,
152 .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
153 .slaves = omap3xxx_l4_wkup_slaves,
154 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
155 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
156 .flags = HWMOD_NO_IDLEST,
159 /* Master interfaces on the MPU device */
160 static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
161 &omap3xxx_mpu__l3_main,
165 static struct omap_hwmod omap3xxx_mpu_hwmod = {
167 .class = &mpu_hwmod_class,
168 .main_clk = "arm_fck",
169 .masters = omap3xxx_mpu_masters,
170 .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
171 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
175 * IVA2_2 interface data
178 /* IVA2 <- L3 interface */
179 static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
180 .master = &omap3xxx_l3_main_hwmod,
181 .slave = &omap3xxx_iva_hwmod,
183 .user = OCP_USER_MPU | OCP_USER_SDMA,
186 static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
194 static struct omap_hwmod omap3xxx_iva_hwmod = {
196 .class = &iva_hwmod_class,
197 .masters = omap3xxx_iva_masters,
198 .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
199 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
202 /* l4_wkup -> wd_timer2 */
203 static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
205 .pa_start = 0x48314000,
206 .pa_end = 0x4831407f,
207 .flags = ADDR_TYPE_RT
211 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
212 .master = &omap3xxx_l4_wkup_hwmod,
213 .slave = &omap3xxx_wd_timer2_hwmod,
215 .addr = omap3xxx_wd_timer2_addrs,
216 .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs),
217 .user = OCP_USER_MPU | OCP_USER_SDMA,
222 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
226 static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
230 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
231 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
232 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY),
233 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
234 .sysc_fields = &omap_hwmod_sysc_type1,
237 static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
239 .sysc = &omap3xxx_wd_timer_sysc,
243 static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
244 &omap3xxx_l4_wkup__wd_timer2,
247 static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
249 .class = &omap3xxx_wd_timer_hwmod_class,
250 .main_clk = "wdt2_fck",
254 .module_bit = OMAP3430_EN_WDT2_SHIFT,
255 .module_offs = WKUP_MOD,
257 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
260 .slaves = omap3xxx_wd_timer2_slaves,
261 .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
262 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
265 static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
266 &omap3xxx_l3_main_hwmod,
267 &omap3xxx_l4_core_hwmod,
268 &omap3xxx_l4_per_hwmod,
269 &omap3xxx_l4_wkup_hwmod,
272 &omap3xxx_wd_timer2_hwmod,
276 int __init omap3xxx_hwmod_init(void)
278 return omap_hwmod_init(omap3xxx_hwmods);