blob: da287947cc18986e09540d556c790f1561d58304 [file] [log] [blame]
Paul Walmsley02bfc032009-09-03 20:14:05 +03001/*
Paul Walmsley73591542010-02-22 22:09:32 -07002 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
Paul Walmsley02bfc032009-09-03 20:14:05 +03003 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley02bfc032009-09-03 20:14:05 +03005 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * XXX handle crossbar/shared link difference for L3?
Paul Walmsley73591542010-02-22 22:09:32 -070012 * XXX these should be marked initdata for multi-OMAP kernels
Paul Walmsley02bfc032009-09-03 20:14:05 +030013 */
Tony Lindgrence491cf2009-10-20 09:40:47 -070014#include <plat/omap_hwmod.h>
Paul Walmsley02bfc032009-09-03 20:14:05 +030015#include <mach/irqs.h>
Tony Lindgrence491cf2009-10-20 09:40:47 -070016#include <plat/cpu.h>
17#include <plat/dma.h>
Kevin Hilman046465b2010-09-27 20:19:30 +053018#include <plat/serial.h>
Paul Walmsley20042902010-09-30 02:40:12 +053019#include <plat/i2c.h>
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -080020#include <plat/gpio.h>
Charulatha V37801b32011-02-24 12:51:46 -080021#include <plat/mcbsp.h>
Charulatha V7f904c72011-02-17 09:53:10 -080022#include <plat/mcspi.h>
Thara Gopinathb6b58222011-02-23 00:14:05 -070023#include <plat/dmtimer.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080024#include <plat/mmc.h>
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +020025#include <plat/l3_2xxx.h>
Paul Walmsley02bfc032009-09-03 20:14:05 +030026
Paul Walmsley43b40992010-02-22 22:09:34 -070027#include "omap_hwmod_common_data.h"
28
Paul Walmsley02bfc032009-09-03 20:14:05 +030029#include "prm-regbits-24xx.h"
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +053030#include "cm-regbits-24xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070031#include "wd_timer.h"
Paul Walmsley02bfc032009-09-03 20:14:05 +030032
Paul Walmsley73591542010-02-22 22:09:32 -070033/*
34 * OMAP2430 hardware module integration data
35 *
36 * ALl of the data in this section should be autogeneratable from the
37 * TI hardware database or other technical documentation. Data that
38 * is driver-specific or driver-kernel integration-specific belongs
39 * elsewhere.
40 */
41
Paul Walmsley02bfc032009-09-03 20:14:05 +030042static struct omap_hwmod omap2430_mpu_hwmod;
Paul Walmsley08072ac2010-07-26 16:34:33 -060043static struct omap_hwmod omap2430_iva_hwmod;
Kevin Hilman4a7cf902010-07-26 16:34:32 -060044static struct omap_hwmod omap2430_l3_main_hwmod;
Paul Walmsley02bfc032009-09-03 20:14:05 +030045static struct omap_hwmod omap2430_l4_core_hwmod;
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +020046static struct omap_hwmod omap2430_dss_core_hwmod;
47static struct omap_hwmod omap2430_dss_dispc_hwmod;
48static struct omap_hwmod omap2430_dss_rfbi_hwmod;
49static struct omap_hwmod omap2430_dss_venc_hwmod;
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +053050static struct omap_hwmod omap2430_wd_timer2_hwmod;
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -080051static struct omap_hwmod omap2430_gpio1_hwmod;
52static struct omap_hwmod omap2430_gpio2_hwmod;
53static struct omap_hwmod omap2430_gpio3_hwmod;
54static struct omap_hwmod omap2430_gpio4_hwmod;
55static struct omap_hwmod omap2430_gpio5_hwmod;
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -080056static struct omap_hwmod omap2430_dma_system_hwmod;
Charulatha V37801b32011-02-24 12:51:46 -080057static struct omap_hwmod omap2430_mcbsp1_hwmod;
58static struct omap_hwmod omap2430_mcbsp2_hwmod;
59static struct omap_hwmod omap2430_mcbsp3_hwmod;
60static struct omap_hwmod omap2430_mcbsp4_hwmod;
61static struct omap_hwmod omap2430_mcbsp5_hwmod;
Charulatha V7f904c72011-02-17 09:53:10 -080062static struct omap_hwmod omap2430_mcspi1_hwmod;
63static struct omap_hwmod omap2430_mcspi2_hwmod;
64static struct omap_hwmod omap2430_mcspi3_hwmod;
Paul Walmsleybce06f32011-03-01 13:12:55 -080065static struct omap_hwmod omap2430_mmc1_hwmod;
66static struct omap_hwmod omap2430_mmc2_hwmod;
Paul Walmsley02bfc032009-09-03 20:14:05 +030067
68/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060069static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
70 .master = &omap2430_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030071 .slave = &omap2430_l4_core_hwmod,
72 .user = OCP_USER_MPU | OCP_USER_SDMA,
73};
74
75/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060076static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
Paul Walmsley02bfc032009-09-03 20:14:05 +030077 .master = &omap2430_mpu_hwmod,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060078 .slave = &omap2430_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030079 .user = OCP_USER_MPU,
80};
81
82/* Slave interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060083static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
84 &omap2430_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +030085};
86
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +020087/* DSS -> l3 */
88static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
89 .master = &omap2430_dss_core_hwmod,
90 .slave = &omap2430_l3_main_hwmod,
91 .fw = {
92 .omap2 = {
93 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
94 .flags = OMAP_FIREWALL_L3,
95 }
96 },
97 .user = OCP_USER_MPU | OCP_USER_SDMA,
98};
99
Paul Walmsley02bfc032009-09-03 20:14:05 +0300100/* Master interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600101static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
102 &omap2430_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300103};
104
105/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600106static struct omap_hwmod omap2430_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600107 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -0700108 .class = &l3_hwmod_class,
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600109 .masters = omap2430_l3_main_masters,
110 .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
111 .slaves = omap2430_l3_main_slaves,
112 .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600113 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
114 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300115};
116
117static struct omap_hwmod omap2430_l4_wkup_hwmod;
Kevin Hilman046465b2010-09-27 20:19:30 +0530118static struct omap_hwmod omap2430_uart1_hwmod;
119static struct omap_hwmod omap2430_uart2_hwmod;
120static struct omap_hwmod omap2430_uart3_hwmod;
Paul Walmsley20042902010-09-30 02:40:12 +0530121static struct omap_hwmod omap2430_i2c1_hwmod;
122static struct omap_hwmod omap2430_i2c2_hwmod;
123
Hema HK44d02ac2011-02-17 12:07:17 +0530124static struct omap_hwmod omap2430_usbhsotg_hwmod;
125
126/* l3_core -> usbhsotg interface */
127static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
128 .master = &omap2430_usbhsotg_hwmod,
129 .slave = &omap2430_l3_main_hwmod,
130 .clk = "core_l3_ck",
131 .user = OCP_USER_MPU,
132};
133
Paul Walmsley20042902010-09-30 02:40:12 +0530134/* I2C IP block address space length (in bytes) */
135#define OMAP2_I2C_AS_LEN 128
136
137/* L4 CORE -> I2C1 interface */
138static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = {
139 {
140 .pa_start = 0x48070000,
141 .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
142 .flags = ADDR_TYPE_RT,
143 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600144 { }
Paul Walmsley20042902010-09-30 02:40:12 +0530145};
146
147static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
148 .master = &omap2430_l4_core_hwmod,
149 .slave = &omap2430_i2c1_hwmod,
150 .clk = "i2c1_ick",
151 .addr = omap2430_i2c1_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530152 .user = OCP_USER_MPU | OCP_USER_SDMA,
153};
154
155/* L4 CORE -> I2C2 interface */
156static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = {
157 {
158 .pa_start = 0x48072000,
159 .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
160 .flags = ADDR_TYPE_RT,
161 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600162 { }
Paul Walmsley20042902010-09-30 02:40:12 +0530163};
164
165static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
166 .master = &omap2430_l4_core_hwmod,
167 .slave = &omap2430_i2c2_hwmod,
168 .clk = "i2c2_ick",
169 .addr = omap2430_i2c2_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530170 .user = OCP_USER_MPU | OCP_USER_SDMA,
171};
Paul Walmsley02bfc032009-09-03 20:14:05 +0300172
173/* L4_CORE -> L4_WKUP interface */
174static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
175 .master = &omap2430_l4_core_hwmod,
176 .slave = &omap2430_l4_wkup_hwmod,
177 .user = OCP_USER_MPU | OCP_USER_SDMA,
178};
179
Kevin Hilman046465b2010-09-27 20:19:30 +0530180/* L4 CORE -> UART1 interface */
181static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
182 {
183 .pa_start = OMAP2_UART1_BASE,
184 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
185 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
186 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600187 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530188};
189
190static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
191 .master = &omap2430_l4_core_hwmod,
192 .slave = &omap2430_uart1_hwmod,
193 .clk = "uart1_ick",
194 .addr = omap2430_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530195 .user = OCP_USER_MPU | OCP_USER_SDMA,
196};
197
198/* L4 CORE -> UART2 interface */
199static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
200 {
201 .pa_start = OMAP2_UART2_BASE,
202 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
203 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
204 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600205 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530206};
207
208static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
209 .master = &omap2430_l4_core_hwmod,
210 .slave = &omap2430_uart2_hwmod,
211 .clk = "uart2_ick",
212 .addr = omap2430_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530213 .user = OCP_USER_MPU | OCP_USER_SDMA,
214};
215
216/* L4 PER -> UART3 interface */
217static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
218 {
219 .pa_start = OMAP2_UART3_BASE,
220 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
221 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
222 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600223 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530224};
225
226static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
227 .master = &omap2430_l4_core_hwmod,
228 .slave = &omap2430_uart3_hwmod,
229 .clk = "uart3_ick",
230 .addr = omap2430_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530231 .user = OCP_USER_MPU | OCP_USER_SDMA,
232};
233
Hema HK44d02ac2011-02-17 12:07:17 +0530234/*
235* usbhsotg interface data
236*/
237static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
238 {
239 .pa_start = OMAP243X_HS_BASE,
240 .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
241 .flags = ADDR_TYPE_RT
242 },
243};
244
245/* l4_core ->usbhsotg interface */
246static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
247 .master = &omap2430_l4_core_hwmod,
248 .slave = &omap2430_usbhsotg_hwmod,
249 .clk = "usb_l4_ick",
250 .addr = omap2430_usbhsotg_addrs,
Hema HK44d02ac2011-02-17 12:07:17 +0530251 .user = OCP_USER_MPU,
252};
253
254static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
255 &omap2430_usbhsotg__l3,
256};
257
258static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
259 &omap2430_l4_core__usbhsotg,
260};
261
Paul Walmsleybce06f32011-03-01 13:12:55 -0800262/* L4 CORE -> MMC1 interface */
263static struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = {
264 {
265 .pa_start = 0x4809c000,
266 .pa_end = 0x4809c1ff,
267 .flags = ADDR_TYPE_RT,
268 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600269 { }
Paul Walmsleybce06f32011-03-01 13:12:55 -0800270};
271
272static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
273 .master = &omap2430_l4_core_hwmod,
274 .slave = &omap2430_mmc1_hwmod,
275 .clk = "mmchs1_ick",
276 .addr = omap2430_mmc1_addr_space,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800277 .user = OCP_USER_MPU | OCP_USER_SDMA,
278};
279
280/* L4 CORE -> MMC2 interface */
281static struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = {
282 {
283 .pa_start = 0x480b4000,
284 .pa_end = 0x480b41ff,
285 .flags = ADDR_TYPE_RT,
286 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600287 { }
Paul Walmsleybce06f32011-03-01 13:12:55 -0800288};
289
290static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
291 .master = &omap2430_l4_core_hwmod,
292 .slave = &omap2430_mmc2_hwmod,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800293 .clk = "mmchs2_ick",
Paul Walmsley78183f32011-07-09 19:14:05 -0600294 .addr = omap2430_mmc2_addr_space,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800295 .user = OCP_USER_MPU | OCP_USER_SDMA,
296};
297
Paul Walmsley02bfc032009-09-03 20:14:05 +0300298/* Slave interfaces on the L4_CORE interconnect */
299static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600300 &omap2430_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300301};
302
303/* Master interfaces on the L4_CORE interconnect */
304static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
305 &omap2430_l4_core__l4_wkup,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800306 &omap2430_l4_core__mmc1,
307 &omap2430_l4_core__mmc2,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300308};
309
310/* L4 CORE */
311static struct omap_hwmod omap2430_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600312 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -0700313 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300314 .masters = omap2430_l4_core_masters,
315 .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
316 .slaves = omap2430_l4_core_slaves,
317 .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600318 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
319 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300320};
321
322/* Slave interfaces on the L4_WKUP interconnect */
323static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
324 &omap2430_l4_core__l4_wkup,
Kevin Hilman046465b2010-09-27 20:19:30 +0530325 &omap2_l4_core__uart1,
326 &omap2_l4_core__uart2,
327 &omap2_l4_core__uart3,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300328};
329
330/* Master interfaces on the L4_WKUP interconnect */
331static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
332};
333
Charulatha V7f904c72011-02-17 09:53:10 -0800334/* l4 core -> mcspi1 interface */
335static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = {
336 {
337 .pa_start = 0x48098000,
338 .pa_end = 0x480980ff,
339 .flags = ADDR_TYPE_RT,
340 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600341 { }
Charulatha V7f904c72011-02-17 09:53:10 -0800342};
343
344static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
345 .master = &omap2430_l4_core_hwmod,
346 .slave = &omap2430_mcspi1_hwmod,
347 .clk = "mcspi1_ick",
348 .addr = omap2430_mcspi1_addr_space,
Charulatha V7f904c72011-02-17 09:53:10 -0800349 .user = OCP_USER_MPU | OCP_USER_SDMA,
350};
351
352/* l4 core -> mcspi2 interface */
353static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = {
354 {
355 .pa_start = 0x4809a000,
356 .pa_end = 0x4809a0ff,
357 .flags = ADDR_TYPE_RT,
358 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600359 { }
Charulatha V7f904c72011-02-17 09:53:10 -0800360};
361
362static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
363 .master = &omap2430_l4_core_hwmod,
364 .slave = &omap2430_mcspi2_hwmod,
365 .clk = "mcspi2_ick",
366 .addr = omap2430_mcspi2_addr_space,
Charulatha V7f904c72011-02-17 09:53:10 -0800367 .user = OCP_USER_MPU | OCP_USER_SDMA,
368};
369
370/* l4 core -> mcspi3 interface */
371static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = {
372 {
373 .pa_start = 0x480b8000,
374 .pa_end = 0x480b80ff,
375 .flags = ADDR_TYPE_RT,
376 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600377 { }
Charulatha V7f904c72011-02-17 09:53:10 -0800378};
379
380static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
381 .master = &omap2430_l4_core_hwmod,
382 .slave = &omap2430_mcspi3_hwmod,
383 .clk = "mcspi3_ick",
384 .addr = omap2430_mcspi3_addr_space,
Charulatha V7f904c72011-02-17 09:53:10 -0800385 .user = OCP_USER_MPU | OCP_USER_SDMA,
386};
387
Paul Walmsley02bfc032009-09-03 20:14:05 +0300388/* L4 WKUP */
389static struct omap_hwmod omap2430_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600390 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700391 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300392 .masters = omap2430_l4_wkup_masters,
393 .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
394 .slaves = omap2430_l4_wkup_slaves,
395 .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600396 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
397 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300398};
399
400/* Master interfaces on the MPU device */
401static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600402 &omap2430_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300403};
404
405/* MPU */
406static struct omap_hwmod omap2430_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600407 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700408 .class = &mpu_hwmod_class,
Paul Walmsley50ebdac2010-02-22 22:09:31 -0700409 .main_clk = "mpu_ck",
Paul Walmsley02bfc032009-09-03 20:14:05 +0300410 .masters = omap2430_mpu_masters,
411 .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
412 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
413};
414
Paul Walmsley08072ac2010-07-26 16:34:33 -0600415/*
416 * IVA2_1 interface data
417 */
418
419/* IVA2 <- L3 interface */
420static struct omap_hwmod_ocp_if omap2430_l3__iva = {
421 .master = &omap2430_l3_main_hwmod,
422 .slave = &omap2430_iva_hwmod,
423 .clk = "dsp_fck",
424 .user = OCP_USER_MPU | OCP_USER_SDMA,
425};
426
427static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
428 &omap2430_l3__iva,
429};
430
431/*
432 * IVA2 (IVA2)
433 */
434
435static struct omap_hwmod omap2430_iva_hwmod = {
436 .name = "iva",
437 .class = &iva_hwmod_class,
438 .masters = omap2430_iva_masters,
439 .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
440 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
441};
442
Thara Gopinathb6b58222011-02-23 00:14:05 -0700443/* Timer Common */
444static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = {
445 .rev_offs = 0x0000,
446 .sysc_offs = 0x0010,
447 .syss_offs = 0x0014,
448 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
449 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
450 SYSC_HAS_AUTOIDLE),
451 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
452 .sysc_fields = &omap_hwmod_sysc_type1,
453};
454
455static struct omap_hwmod_class omap2430_timer_hwmod_class = {
456 .name = "timer",
457 .sysc = &omap2430_timer_sysc,
458 .rev = OMAP_TIMER_IP_VERSION_1,
459};
460
461/* timer1 */
462static struct omap_hwmod omap2430_timer1_hwmod;
463static struct omap_hwmod_irq_info omap2430_timer1_mpu_irqs[] = {
464 { .irq = 37, },
465};
466
467static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
468 {
469 .pa_start = 0x49018000,
470 .pa_end = 0x49018000 + SZ_1K - 1,
471 .flags = ADDR_TYPE_RT
472 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600473 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700474};
475
476/* l4_wkup -> timer1 */
477static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
478 .master = &omap2430_l4_wkup_hwmod,
479 .slave = &omap2430_timer1_hwmod,
480 .clk = "gpt1_ick",
481 .addr = omap2430_timer1_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700482 .user = OCP_USER_MPU | OCP_USER_SDMA,
483};
484
485/* timer1 slave port */
486static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
487 &omap2430_l4_wkup__timer1,
488};
489
490/* timer1 hwmod */
491static struct omap_hwmod omap2430_timer1_hwmod = {
492 .name = "timer1",
493 .mpu_irqs = omap2430_timer1_mpu_irqs,
494 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer1_mpu_irqs),
495 .main_clk = "gpt1_fck",
496 .prcm = {
497 .omap2 = {
498 .prcm_reg_id = 1,
499 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
500 .module_offs = WKUP_MOD,
501 .idlest_reg_id = 1,
502 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
503 },
504 },
505 .slaves = omap2430_timer1_slaves,
506 .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
507 .class = &omap2430_timer_hwmod_class,
508 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
509};
510
511/* timer2 */
512static struct omap_hwmod omap2430_timer2_hwmod;
513static struct omap_hwmod_irq_info omap2430_timer2_mpu_irqs[] = {
514 { .irq = 38, },
515};
516
517static struct omap_hwmod_addr_space omap2430_timer2_addrs[] = {
518 {
519 .pa_start = 0x4802a000,
520 .pa_end = 0x4802a000 + SZ_1K - 1,
521 .flags = ADDR_TYPE_RT
522 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600523 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700524};
525
526/* l4_core -> timer2 */
527static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
528 .master = &omap2430_l4_core_hwmod,
529 .slave = &omap2430_timer2_hwmod,
530 .clk = "gpt2_ick",
531 .addr = omap2430_timer2_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700532 .user = OCP_USER_MPU | OCP_USER_SDMA,
533};
534
535/* timer2 slave port */
536static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
537 &omap2430_l4_core__timer2,
538};
539
540/* timer2 hwmod */
541static struct omap_hwmod omap2430_timer2_hwmod = {
542 .name = "timer2",
543 .mpu_irqs = omap2430_timer2_mpu_irqs,
544 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer2_mpu_irqs),
545 .main_clk = "gpt2_fck",
546 .prcm = {
547 .omap2 = {
548 .prcm_reg_id = 1,
549 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
550 .module_offs = CORE_MOD,
551 .idlest_reg_id = 1,
552 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
553 },
554 },
555 .slaves = omap2430_timer2_slaves,
556 .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
557 .class = &omap2430_timer_hwmod_class,
558 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
559};
560
561/* timer3 */
562static struct omap_hwmod omap2430_timer3_hwmod;
563static struct omap_hwmod_irq_info omap2430_timer3_mpu_irqs[] = {
564 { .irq = 39, },
565};
566
567static struct omap_hwmod_addr_space omap2430_timer3_addrs[] = {
568 {
569 .pa_start = 0x48078000,
570 .pa_end = 0x48078000 + SZ_1K - 1,
571 .flags = ADDR_TYPE_RT
572 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600573 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700574};
575
576/* l4_core -> timer3 */
577static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
578 .master = &omap2430_l4_core_hwmod,
579 .slave = &omap2430_timer3_hwmod,
580 .clk = "gpt3_ick",
581 .addr = omap2430_timer3_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700582 .user = OCP_USER_MPU | OCP_USER_SDMA,
583};
584
585/* timer3 slave port */
586static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
587 &omap2430_l4_core__timer3,
588};
589
590/* timer3 hwmod */
591static struct omap_hwmod omap2430_timer3_hwmod = {
592 .name = "timer3",
593 .mpu_irqs = omap2430_timer3_mpu_irqs,
594 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer3_mpu_irqs),
595 .main_clk = "gpt3_fck",
596 .prcm = {
597 .omap2 = {
598 .prcm_reg_id = 1,
599 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
600 .module_offs = CORE_MOD,
601 .idlest_reg_id = 1,
602 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
603 },
604 },
605 .slaves = omap2430_timer3_slaves,
606 .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
607 .class = &omap2430_timer_hwmod_class,
608 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
609};
610
611/* timer4 */
612static struct omap_hwmod omap2430_timer4_hwmod;
613static struct omap_hwmod_irq_info omap2430_timer4_mpu_irqs[] = {
614 { .irq = 40, },
615};
616
617static struct omap_hwmod_addr_space omap2430_timer4_addrs[] = {
618 {
619 .pa_start = 0x4807a000,
620 .pa_end = 0x4807a000 + SZ_1K - 1,
621 .flags = ADDR_TYPE_RT
622 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600623 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700624};
625
626/* l4_core -> timer4 */
627static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
628 .master = &omap2430_l4_core_hwmod,
629 .slave = &omap2430_timer4_hwmod,
630 .clk = "gpt4_ick",
631 .addr = omap2430_timer4_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700632 .user = OCP_USER_MPU | OCP_USER_SDMA,
633};
634
635/* timer4 slave port */
636static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
637 &omap2430_l4_core__timer4,
638};
639
640/* timer4 hwmod */
641static struct omap_hwmod omap2430_timer4_hwmod = {
642 .name = "timer4",
643 .mpu_irqs = omap2430_timer4_mpu_irqs,
644 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer4_mpu_irqs),
645 .main_clk = "gpt4_fck",
646 .prcm = {
647 .omap2 = {
648 .prcm_reg_id = 1,
649 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
650 .module_offs = CORE_MOD,
651 .idlest_reg_id = 1,
652 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
653 },
654 },
655 .slaves = omap2430_timer4_slaves,
656 .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
657 .class = &omap2430_timer_hwmod_class,
658 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
659};
660
661/* timer5 */
662static struct omap_hwmod omap2430_timer5_hwmod;
663static struct omap_hwmod_irq_info omap2430_timer5_mpu_irqs[] = {
664 { .irq = 41, },
665};
666
667static struct omap_hwmod_addr_space omap2430_timer5_addrs[] = {
668 {
669 .pa_start = 0x4807c000,
670 .pa_end = 0x4807c000 + SZ_1K - 1,
671 .flags = ADDR_TYPE_RT
672 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600673 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700674};
675
676/* l4_core -> timer5 */
677static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
678 .master = &omap2430_l4_core_hwmod,
679 .slave = &omap2430_timer5_hwmod,
680 .clk = "gpt5_ick",
681 .addr = omap2430_timer5_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700682 .user = OCP_USER_MPU | OCP_USER_SDMA,
683};
684
685/* timer5 slave port */
686static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
687 &omap2430_l4_core__timer5,
688};
689
690/* timer5 hwmod */
691static struct omap_hwmod omap2430_timer5_hwmod = {
692 .name = "timer5",
693 .mpu_irqs = omap2430_timer5_mpu_irqs,
694 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer5_mpu_irqs),
695 .main_clk = "gpt5_fck",
696 .prcm = {
697 .omap2 = {
698 .prcm_reg_id = 1,
699 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
700 .module_offs = CORE_MOD,
701 .idlest_reg_id = 1,
702 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
703 },
704 },
705 .slaves = omap2430_timer5_slaves,
706 .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
707 .class = &omap2430_timer_hwmod_class,
708 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
709};
710
711/* timer6 */
712static struct omap_hwmod omap2430_timer6_hwmod;
713static struct omap_hwmod_irq_info omap2430_timer6_mpu_irqs[] = {
714 { .irq = 42, },
715};
716
717static struct omap_hwmod_addr_space omap2430_timer6_addrs[] = {
718 {
719 .pa_start = 0x4807e000,
720 .pa_end = 0x4807e000 + SZ_1K - 1,
721 .flags = ADDR_TYPE_RT
722 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600723 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700724};
725
726/* l4_core -> timer6 */
727static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
728 .master = &omap2430_l4_core_hwmod,
729 .slave = &omap2430_timer6_hwmod,
730 .clk = "gpt6_ick",
731 .addr = omap2430_timer6_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700732 .user = OCP_USER_MPU | OCP_USER_SDMA,
733};
734
735/* timer6 slave port */
736static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
737 &omap2430_l4_core__timer6,
738};
739
740/* timer6 hwmod */
741static struct omap_hwmod omap2430_timer6_hwmod = {
742 .name = "timer6",
743 .mpu_irqs = omap2430_timer6_mpu_irqs,
744 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer6_mpu_irqs),
745 .main_clk = "gpt6_fck",
746 .prcm = {
747 .omap2 = {
748 .prcm_reg_id = 1,
749 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
750 .module_offs = CORE_MOD,
751 .idlest_reg_id = 1,
752 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
753 },
754 },
755 .slaves = omap2430_timer6_slaves,
756 .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
757 .class = &omap2430_timer_hwmod_class,
758 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
759};
760
761/* timer7 */
762static struct omap_hwmod omap2430_timer7_hwmod;
763static struct omap_hwmod_irq_info omap2430_timer7_mpu_irqs[] = {
764 { .irq = 43, },
765};
766
767static struct omap_hwmod_addr_space omap2430_timer7_addrs[] = {
768 {
769 .pa_start = 0x48080000,
770 .pa_end = 0x48080000 + SZ_1K - 1,
771 .flags = ADDR_TYPE_RT
772 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600773 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700774};
775
776/* l4_core -> timer7 */
777static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
778 .master = &omap2430_l4_core_hwmod,
779 .slave = &omap2430_timer7_hwmod,
780 .clk = "gpt7_ick",
781 .addr = omap2430_timer7_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700782 .user = OCP_USER_MPU | OCP_USER_SDMA,
783};
784
785/* timer7 slave port */
786static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
787 &omap2430_l4_core__timer7,
788};
789
790/* timer7 hwmod */
791static struct omap_hwmod omap2430_timer7_hwmod = {
792 .name = "timer7",
793 .mpu_irqs = omap2430_timer7_mpu_irqs,
794 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer7_mpu_irqs),
795 .main_clk = "gpt7_fck",
796 .prcm = {
797 .omap2 = {
798 .prcm_reg_id = 1,
799 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
800 .module_offs = CORE_MOD,
801 .idlest_reg_id = 1,
802 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
803 },
804 },
805 .slaves = omap2430_timer7_slaves,
806 .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
807 .class = &omap2430_timer_hwmod_class,
808 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
809};
810
811/* timer8 */
812static struct omap_hwmod omap2430_timer8_hwmod;
813static struct omap_hwmod_irq_info omap2430_timer8_mpu_irqs[] = {
814 { .irq = 44, },
815};
816
817static struct omap_hwmod_addr_space omap2430_timer8_addrs[] = {
818 {
819 .pa_start = 0x48082000,
820 .pa_end = 0x48082000 + SZ_1K - 1,
821 .flags = ADDR_TYPE_RT
822 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600823 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700824};
825
826/* l4_core -> timer8 */
827static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
828 .master = &omap2430_l4_core_hwmod,
829 .slave = &omap2430_timer8_hwmod,
830 .clk = "gpt8_ick",
831 .addr = omap2430_timer8_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700832 .user = OCP_USER_MPU | OCP_USER_SDMA,
833};
834
835/* timer8 slave port */
836static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
837 &omap2430_l4_core__timer8,
838};
839
840/* timer8 hwmod */
841static struct omap_hwmod omap2430_timer8_hwmod = {
842 .name = "timer8",
843 .mpu_irqs = omap2430_timer8_mpu_irqs,
844 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer8_mpu_irqs),
845 .main_clk = "gpt8_fck",
846 .prcm = {
847 .omap2 = {
848 .prcm_reg_id = 1,
849 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
850 .module_offs = CORE_MOD,
851 .idlest_reg_id = 1,
852 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
853 },
854 },
855 .slaves = omap2430_timer8_slaves,
856 .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
857 .class = &omap2430_timer_hwmod_class,
858 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
859};
860
861/* timer9 */
862static struct omap_hwmod omap2430_timer9_hwmod;
863static struct omap_hwmod_irq_info omap2430_timer9_mpu_irqs[] = {
864 { .irq = 45, },
865};
866
867static struct omap_hwmod_addr_space omap2430_timer9_addrs[] = {
868 {
869 .pa_start = 0x48084000,
870 .pa_end = 0x48084000 + SZ_1K - 1,
871 .flags = ADDR_TYPE_RT
872 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600873 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700874};
875
876/* l4_core -> timer9 */
877static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
878 .master = &omap2430_l4_core_hwmod,
879 .slave = &omap2430_timer9_hwmod,
880 .clk = "gpt9_ick",
881 .addr = omap2430_timer9_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700882 .user = OCP_USER_MPU | OCP_USER_SDMA,
883};
884
885/* timer9 slave port */
886static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
887 &omap2430_l4_core__timer9,
888};
889
890/* timer9 hwmod */
891static struct omap_hwmod omap2430_timer9_hwmod = {
892 .name = "timer9",
893 .mpu_irqs = omap2430_timer9_mpu_irqs,
894 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer9_mpu_irqs),
895 .main_clk = "gpt9_fck",
896 .prcm = {
897 .omap2 = {
898 .prcm_reg_id = 1,
899 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
900 .module_offs = CORE_MOD,
901 .idlest_reg_id = 1,
902 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
903 },
904 },
905 .slaves = omap2430_timer9_slaves,
906 .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
907 .class = &omap2430_timer_hwmod_class,
908 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
909};
910
911/* timer10 */
912static struct omap_hwmod omap2430_timer10_hwmod;
913static struct omap_hwmod_irq_info omap2430_timer10_mpu_irqs[] = {
914 { .irq = 46, },
915};
916
917static struct omap_hwmod_addr_space omap2430_timer10_addrs[] = {
918 {
919 .pa_start = 0x48086000,
920 .pa_end = 0x48086000 + SZ_1K - 1,
921 .flags = ADDR_TYPE_RT
922 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600923 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700924};
925
926/* l4_core -> timer10 */
927static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
928 .master = &omap2430_l4_core_hwmod,
929 .slave = &omap2430_timer10_hwmod,
930 .clk = "gpt10_ick",
931 .addr = omap2430_timer10_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700932 .user = OCP_USER_MPU | OCP_USER_SDMA,
933};
934
935/* timer10 slave port */
936static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
937 &omap2430_l4_core__timer10,
938};
939
940/* timer10 hwmod */
941static struct omap_hwmod omap2430_timer10_hwmod = {
942 .name = "timer10",
943 .mpu_irqs = omap2430_timer10_mpu_irqs,
944 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer10_mpu_irqs),
945 .main_clk = "gpt10_fck",
946 .prcm = {
947 .omap2 = {
948 .prcm_reg_id = 1,
949 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
950 .module_offs = CORE_MOD,
951 .idlest_reg_id = 1,
952 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
953 },
954 },
955 .slaves = omap2430_timer10_slaves,
956 .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
957 .class = &omap2430_timer_hwmod_class,
958 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
959};
960
961/* timer11 */
962static struct omap_hwmod omap2430_timer11_hwmod;
963static struct omap_hwmod_irq_info omap2430_timer11_mpu_irqs[] = {
964 { .irq = 47, },
965};
966
967static struct omap_hwmod_addr_space omap2430_timer11_addrs[] = {
968 {
969 .pa_start = 0x48088000,
970 .pa_end = 0x48088000 + SZ_1K - 1,
971 .flags = ADDR_TYPE_RT
972 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600973 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700974};
975
976/* l4_core -> timer11 */
977static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
978 .master = &omap2430_l4_core_hwmod,
979 .slave = &omap2430_timer11_hwmod,
980 .clk = "gpt11_ick",
981 .addr = omap2430_timer11_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700982 .user = OCP_USER_MPU | OCP_USER_SDMA,
983};
984
985/* timer11 slave port */
986static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
987 &omap2430_l4_core__timer11,
988};
989
990/* timer11 hwmod */
991static struct omap_hwmod omap2430_timer11_hwmod = {
992 .name = "timer11",
993 .mpu_irqs = omap2430_timer11_mpu_irqs,
994 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer11_mpu_irqs),
995 .main_clk = "gpt11_fck",
996 .prcm = {
997 .omap2 = {
998 .prcm_reg_id = 1,
999 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
1000 .module_offs = CORE_MOD,
1001 .idlest_reg_id = 1,
1002 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
1003 },
1004 },
1005 .slaves = omap2430_timer11_slaves,
1006 .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
1007 .class = &omap2430_timer_hwmod_class,
1008 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
1009};
1010
1011/* timer12 */
1012static struct omap_hwmod omap2430_timer12_hwmod;
1013static struct omap_hwmod_irq_info omap2430_timer12_mpu_irqs[] = {
1014 { .irq = 48, },
1015};
1016
1017static struct omap_hwmod_addr_space omap2430_timer12_addrs[] = {
1018 {
1019 .pa_start = 0x4808a000,
1020 .pa_end = 0x4808a000 + SZ_1K - 1,
1021 .flags = ADDR_TYPE_RT
1022 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001023 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -07001024};
1025
1026/* l4_core -> timer12 */
1027static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
1028 .master = &omap2430_l4_core_hwmod,
1029 .slave = &omap2430_timer12_hwmod,
1030 .clk = "gpt12_ick",
1031 .addr = omap2430_timer12_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -07001032 .user = OCP_USER_MPU | OCP_USER_SDMA,
1033};
1034
1035/* timer12 slave port */
1036static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
1037 &omap2430_l4_core__timer12,
1038};
1039
1040/* timer12 hwmod */
1041static struct omap_hwmod omap2430_timer12_hwmod = {
1042 .name = "timer12",
1043 .mpu_irqs = omap2430_timer12_mpu_irqs,
1044 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer12_mpu_irqs),
1045 .main_clk = "gpt12_fck",
1046 .prcm = {
1047 .omap2 = {
1048 .prcm_reg_id = 1,
1049 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
1050 .module_offs = CORE_MOD,
1051 .idlest_reg_id = 1,
1052 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
1053 },
1054 },
1055 .slaves = omap2430_timer12_slaves,
1056 .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
1057 .class = &omap2430_timer_hwmod_class,
1058 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
1059};
1060
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +05301061/* l4_wkup -> wd_timer2 */
1062static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
1063 {
1064 .pa_start = 0x49016000,
1065 .pa_end = 0x4901607f,
1066 .flags = ADDR_TYPE_RT
1067 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001068 { }
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +05301069};
1070
1071static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
1072 .master = &omap2430_l4_wkup_hwmod,
1073 .slave = &omap2430_wd_timer2_hwmod,
1074 .clk = "mpu_wdt_ick",
1075 .addr = omap2430_wd_timer2_addrs,
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +05301076 .user = OCP_USER_MPU | OCP_USER_SDMA,
1077};
1078
1079/*
1080 * 'wd_timer' class
1081 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
1082 * overflow condition
1083 */
1084
1085static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
1086 .rev_offs = 0x0,
1087 .sysc_offs = 0x0010,
1088 .syss_offs = 0x0014,
1089 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001090 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +05301091 .sysc_fields = &omap_hwmod_sysc_type1,
1092};
1093
1094static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
Paul Walmsleyff2516f2010-12-21 15:39:15 -07001095 .name = "wd_timer",
1096 .sysc = &omap2430_wd_timer_sysc,
1097 .pre_shutdown = &omap2_wd_timer_disable
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +05301098};
1099
1100/* wd_timer2 */
1101static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
1102 &omap2430_l4_wkup__wd_timer2,
1103};
1104
1105static struct omap_hwmod omap2430_wd_timer2_hwmod = {
1106 .name = "wd_timer2",
1107 .class = &omap2430_wd_timer_hwmod_class,
1108 .main_clk = "mpu_wdt_fck",
1109 .prcm = {
1110 .omap2 = {
1111 .prcm_reg_id = 1,
1112 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
1113 .module_offs = WKUP_MOD,
1114 .idlest_reg_id = 1,
1115 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
1116 },
1117 },
1118 .slaves = omap2430_wd_timer2_slaves,
1119 .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
1120 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1121};
1122
Kevin Hilman046465b2010-09-27 20:19:30 +05301123/* UART */
1124
1125static struct omap_hwmod_class_sysconfig uart_sysc = {
1126 .rev_offs = 0x50,
1127 .sysc_offs = 0x54,
1128 .syss_offs = 0x58,
1129 .sysc_flags = (SYSC_HAS_SIDLEMODE |
1130 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001131 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
Kevin Hilman046465b2010-09-27 20:19:30 +05301132 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1133 .sysc_fields = &omap_hwmod_sysc_type1,
1134};
1135
1136static struct omap_hwmod_class uart_class = {
1137 .name = "uart",
1138 .sysc = &uart_sysc,
1139};
1140
1141/* UART1 */
1142
1143static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
1144 { .irq = INT_24XX_UART1_IRQ, },
1145};
1146
1147static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
1148 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
1149 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
1150};
1151
1152static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
1153 &omap2_l4_core__uart1,
1154};
1155
1156static struct omap_hwmod omap2430_uart1_hwmod = {
1157 .name = "uart1",
1158 .mpu_irqs = uart1_mpu_irqs,
1159 .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
1160 .sdma_reqs = uart1_sdma_reqs,
1161 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
1162 .main_clk = "uart1_fck",
1163 .prcm = {
1164 .omap2 = {
1165 .module_offs = CORE_MOD,
1166 .prcm_reg_id = 1,
1167 .module_bit = OMAP24XX_EN_UART1_SHIFT,
1168 .idlest_reg_id = 1,
1169 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
1170 },
1171 },
1172 .slaves = omap2430_uart1_slaves,
1173 .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
1174 .class = &uart_class,
1175 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1176};
1177
1178/* UART2 */
1179
1180static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
1181 { .irq = INT_24XX_UART2_IRQ, },
1182};
1183
1184static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
1185 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
1186 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
1187};
1188
1189static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
1190 &omap2_l4_core__uart2,
1191};
1192
1193static struct omap_hwmod omap2430_uart2_hwmod = {
1194 .name = "uart2",
1195 .mpu_irqs = uart2_mpu_irqs,
1196 .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
1197 .sdma_reqs = uart2_sdma_reqs,
1198 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
1199 .main_clk = "uart2_fck",
1200 .prcm = {
1201 .omap2 = {
1202 .module_offs = CORE_MOD,
1203 .prcm_reg_id = 1,
1204 .module_bit = OMAP24XX_EN_UART2_SHIFT,
1205 .idlest_reg_id = 1,
1206 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
1207 },
1208 },
1209 .slaves = omap2430_uart2_slaves,
1210 .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
1211 .class = &uart_class,
1212 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1213};
1214
1215/* UART3 */
1216
1217static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
1218 { .irq = INT_24XX_UART3_IRQ, },
1219};
1220
1221static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
1222 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
1223 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
1224};
1225
1226static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
1227 &omap2_l4_core__uart3,
1228};
1229
1230static struct omap_hwmod omap2430_uart3_hwmod = {
1231 .name = "uart3",
1232 .mpu_irqs = uart3_mpu_irqs,
1233 .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
1234 .sdma_reqs = uart3_sdma_reqs,
1235 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
1236 .main_clk = "uart3_fck",
1237 .prcm = {
1238 .omap2 = {
1239 .module_offs = CORE_MOD,
1240 .prcm_reg_id = 2,
1241 .module_bit = OMAP24XX_EN_UART3_SHIFT,
1242 .idlest_reg_id = 2,
1243 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
1244 },
1245 },
1246 .slaves = omap2430_uart3_slaves,
1247 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
1248 .class = &uart_class,
1249 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1250};
1251
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001252/*
1253 * 'dss' class
1254 * display sub-system
1255 */
1256
1257static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
1258 .rev_offs = 0x0000,
1259 .sysc_offs = 0x0010,
1260 .syss_offs = 0x0014,
1261 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1262 .sysc_fields = &omap_hwmod_sysc_type1,
1263};
1264
1265static struct omap_hwmod_class omap2430_dss_hwmod_class = {
1266 .name = "dss",
1267 .sysc = &omap2430_dss_sysc,
1268};
1269
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001270static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
1271 { .name = "dispc", .dma_req = 5 },
1272};
1273
1274/* dss */
1275/* dss master ports */
1276static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
1277 &omap2430_dss__l3,
1278};
1279
1280static struct omap_hwmod_addr_space omap2430_dss_addrs[] = {
1281 {
1282 .pa_start = 0x48050000,
1283 .pa_end = 0x480503FF,
1284 .flags = ADDR_TYPE_RT
1285 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001286 { }
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001287};
1288
1289/* l4_core -> dss */
1290static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
1291 .master = &omap2430_l4_core_hwmod,
1292 .slave = &omap2430_dss_core_hwmod,
1293 .clk = "dss_ick",
1294 .addr = omap2430_dss_addrs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001295 .user = OCP_USER_MPU | OCP_USER_SDMA,
1296};
1297
1298/* dss slave ports */
1299static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
1300 &omap2430_l4_core__dss,
1301};
1302
1303static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1304 { .role = "tv_clk", .clk = "dss_54m_fck" },
1305 { .role = "sys_clk", .clk = "dss2_fck" },
1306};
1307
1308static struct omap_hwmod omap2430_dss_core_hwmod = {
1309 .name = "dss_core",
1310 .class = &omap2430_dss_hwmod_class,
1311 .main_clk = "dss1_fck", /* instead of dss_fck */
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001312 .sdma_reqs = omap2430_dss_sdma_chs,
1313 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs),
1314 .prcm = {
1315 .omap2 = {
1316 .prcm_reg_id = 1,
1317 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1318 .module_offs = CORE_MOD,
1319 .idlest_reg_id = 1,
1320 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1321 },
1322 },
1323 .opt_clks = dss_opt_clks,
1324 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1325 .slaves = omap2430_dss_slaves,
1326 .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
1327 .masters = omap2430_dss_masters,
1328 .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
1329 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1330 .flags = HWMOD_NO_IDLEST,
1331};
1332
1333/*
1334 * 'dispc' class
1335 * display controller
1336 */
1337
1338static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
1339 .rev_offs = 0x0000,
1340 .sysc_offs = 0x0010,
1341 .syss_offs = 0x0014,
1342 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
1343 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1344 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1345 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1346 .sysc_fields = &omap_hwmod_sysc_type1,
1347};
1348
1349static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
1350 .name = "dispc",
1351 .sysc = &omap2430_dispc_sysc,
1352};
1353
archit tanejaaffe3602011-02-23 08:41:03 +00001354static struct omap_hwmod_irq_info omap2430_dispc_irqs[] = {
1355 { .irq = 25 },
1356};
1357
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001358static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = {
1359 {
1360 .pa_start = 0x48050400,
1361 .pa_end = 0x480507FF,
1362 .flags = ADDR_TYPE_RT
1363 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001364 { }
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001365};
1366
1367/* l4_core -> dss_dispc */
1368static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
1369 .master = &omap2430_l4_core_hwmod,
1370 .slave = &omap2430_dss_dispc_hwmod,
1371 .clk = "dss_ick",
1372 .addr = omap2430_dss_dispc_addrs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001373 .user = OCP_USER_MPU | OCP_USER_SDMA,
1374};
1375
1376/* dss_dispc slave ports */
1377static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
1378 &omap2430_l4_core__dss_dispc,
1379};
1380
1381static struct omap_hwmod omap2430_dss_dispc_hwmod = {
1382 .name = "dss_dispc",
1383 .class = &omap2430_dispc_hwmod_class,
archit tanejaaffe3602011-02-23 08:41:03 +00001384 .mpu_irqs = omap2430_dispc_irqs,
1385 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dispc_irqs),
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001386 .main_clk = "dss1_fck",
1387 .prcm = {
1388 .omap2 = {
1389 .prcm_reg_id = 1,
1390 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1391 .module_offs = CORE_MOD,
1392 .idlest_reg_id = 1,
1393 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1394 },
1395 },
1396 .slaves = omap2430_dss_dispc_slaves,
1397 .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
1398 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1399 .flags = HWMOD_NO_IDLEST,
1400};
1401
1402/*
1403 * 'rfbi' class
1404 * remote frame buffer interface
1405 */
1406
1407static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
1408 .rev_offs = 0x0000,
1409 .sysc_offs = 0x0010,
1410 .syss_offs = 0x0014,
1411 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1412 SYSC_HAS_AUTOIDLE),
1413 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1414 .sysc_fields = &omap_hwmod_sysc_type1,
1415};
1416
1417static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
1418 .name = "rfbi",
1419 .sysc = &omap2430_rfbi_sysc,
1420};
1421
1422static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = {
1423 {
1424 .pa_start = 0x48050800,
1425 .pa_end = 0x48050BFF,
1426 .flags = ADDR_TYPE_RT
1427 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001428 { }
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001429};
1430
1431/* l4_core -> dss_rfbi */
1432static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
1433 .master = &omap2430_l4_core_hwmod,
1434 .slave = &omap2430_dss_rfbi_hwmod,
1435 .clk = "dss_ick",
1436 .addr = omap2430_dss_rfbi_addrs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001437 .user = OCP_USER_MPU | OCP_USER_SDMA,
1438};
1439
1440/* dss_rfbi slave ports */
1441static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
1442 &omap2430_l4_core__dss_rfbi,
1443};
1444
1445static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
1446 .name = "dss_rfbi",
1447 .class = &omap2430_rfbi_hwmod_class,
1448 .main_clk = "dss1_fck",
1449 .prcm = {
1450 .omap2 = {
1451 .prcm_reg_id = 1,
1452 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1453 .module_offs = CORE_MOD,
1454 },
1455 },
1456 .slaves = omap2430_dss_rfbi_slaves,
1457 .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
1458 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1459 .flags = HWMOD_NO_IDLEST,
1460};
1461
1462/*
1463 * 'venc' class
1464 * video encoder
1465 */
1466
1467static struct omap_hwmod_class omap2430_venc_hwmod_class = {
1468 .name = "venc",
1469};
1470
1471/* dss_venc */
1472static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = {
1473 {
1474 .pa_start = 0x48050C00,
1475 .pa_end = 0x48050FFF,
1476 .flags = ADDR_TYPE_RT
1477 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001478 { }
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001479};
1480
1481/* l4_core -> dss_venc */
1482static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
1483 .master = &omap2430_l4_core_hwmod,
1484 .slave = &omap2430_dss_venc_hwmod,
1485 .clk = "dss_54m_fck",
1486 .addr = omap2430_dss_venc_addrs,
Paul Walmsleyc39bee82011-03-04 06:02:15 +00001487 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001488 .user = OCP_USER_MPU | OCP_USER_SDMA,
1489};
1490
1491/* dss_venc slave ports */
1492static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
1493 &omap2430_l4_core__dss_venc,
1494};
1495
1496static struct omap_hwmod omap2430_dss_venc_hwmod = {
1497 .name = "dss_venc",
1498 .class = &omap2430_venc_hwmod_class,
1499 .main_clk = "dss1_fck",
1500 .prcm = {
1501 .omap2 = {
1502 .prcm_reg_id = 1,
1503 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1504 .module_offs = CORE_MOD,
1505 },
1506 },
1507 .slaves = omap2430_dss_venc_slaves,
1508 .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
1509 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1510 .flags = HWMOD_NO_IDLEST,
1511};
1512
Paul Walmsley20042902010-09-30 02:40:12 +05301513/* I2C common */
1514static struct omap_hwmod_class_sysconfig i2c_sysc = {
1515 .rev_offs = 0x00,
1516 .sysc_offs = 0x20,
1517 .syss_offs = 0x10,
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001518 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1519 SYSS_HAS_RESET_STATUS),
Paul Walmsley20042902010-09-30 02:40:12 +05301520 .sysc_fields = &omap_hwmod_sysc_type1,
1521};
1522
1523static struct omap_hwmod_class i2c_class = {
1524 .name = "i2c",
1525 .sysc = &i2c_sysc,
1526};
1527
Benoit Cousson50ebb772010-12-21 21:08:34 -07001528static struct omap_i2c_dev_attr i2c_dev_attr = {
Paul Walmsley20042902010-09-30 02:40:12 +05301529 .fifo_depth = 8, /* bytes */
1530};
1531
Benoit Cousson50ebb772010-12-21 21:08:34 -07001532/* I2C1 */
1533
Paul Walmsley20042902010-09-30 02:40:12 +05301534static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
1535 { .irq = INT_24XX_I2C1_IRQ, },
1536};
1537
1538static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
1539 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
1540 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
1541};
1542
1543static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
1544 &omap2430_l4_core__i2c1,
1545};
1546
1547static struct omap_hwmod omap2430_i2c1_hwmod = {
1548 .name = "i2c1",
1549 .mpu_irqs = i2c1_mpu_irqs,
1550 .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
1551 .sdma_reqs = i2c1_sdma_reqs,
1552 .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
1553 .main_clk = "i2chs1_fck",
1554 .prcm = {
1555 .omap2 = {
1556 /*
1557 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
1558 * I2CHS IP's do not follow the usual pattern.
1559 * prcm_reg_id alone cannot be used to program
1560 * the iclk and fclk. Needs to be handled using
Lucas De Marchi25985ed2011-03-30 22:57:33 -03001561 * additional flags when clk handling is moved
Paul Walmsley20042902010-09-30 02:40:12 +05301562 * to hwmod framework.
1563 */
1564 .module_offs = CORE_MOD,
1565 .prcm_reg_id = 1,
1566 .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
1567 .idlest_reg_id = 1,
1568 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
1569 },
1570 },
1571 .slaves = omap2430_i2c1_slaves,
1572 .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
1573 .class = &i2c_class,
Benoit Cousson50ebb772010-12-21 21:08:34 -07001574 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301575 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1576};
1577
1578/* I2C2 */
1579
Paul Walmsley20042902010-09-30 02:40:12 +05301580static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
1581 { .irq = INT_24XX_I2C2_IRQ, },
1582};
1583
1584static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
1585 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
1586 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
1587};
1588
1589static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
1590 &omap2430_l4_core__i2c2,
1591};
1592
1593static struct omap_hwmod omap2430_i2c2_hwmod = {
1594 .name = "i2c2",
1595 .mpu_irqs = i2c2_mpu_irqs,
1596 .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
1597 .sdma_reqs = i2c2_sdma_reqs,
1598 .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
1599 .main_clk = "i2chs2_fck",
1600 .prcm = {
1601 .omap2 = {
1602 .module_offs = CORE_MOD,
1603 .prcm_reg_id = 1,
1604 .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
1605 .idlest_reg_id = 1,
1606 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
1607 },
1608 },
1609 .slaves = omap2430_i2c2_slaves,
1610 .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
1611 .class = &i2c_class,
Benoit Cousson50ebb772010-12-21 21:08:34 -07001612 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301613 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1614};
1615
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001616/* l4_wkup -> gpio1 */
1617static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
1618 {
1619 .pa_start = 0x4900C000,
1620 .pa_end = 0x4900C1ff,
1621 .flags = ADDR_TYPE_RT
1622 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001623 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001624};
1625
1626static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
1627 .master = &omap2430_l4_wkup_hwmod,
1628 .slave = &omap2430_gpio1_hwmod,
1629 .clk = "gpios_ick",
1630 .addr = omap2430_gpio1_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001631 .user = OCP_USER_MPU | OCP_USER_SDMA,
1632};
1633
1634/* l4_wkup -> gpio2 */
1635static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
1636 {
1637 .pa_start = 0x4900E000,
1638 .pa_end = 0x4900E1ff,
1639 .flags = ADDR_TYPE_RT
1640 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001641 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001642};
1643
1644static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
1645 .master = &omap2430_l4_wkup_hwmod,
1646 .slave = &omap2430_gpio2_hwmod,
1647 .clk = "gpios_ick",
1648 .addr = omap2430_gpio2_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001649 .user = OCP_USER_MPU | OCP_USER_SDMA,
1650};
1651
1652/* l4_wkup -> gpio3 */
1653static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
1654 {
1655 .pa_start = 0x49010000,
1656 .pa_end = 0x490101ff,
1657 .flags = ADDR_TYPE_RT
1658 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001659 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001660};
1661
1662static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
1663 .master = &omap2430_l4_wkup_hwmod,
1664 .slave = &omap2430_gpio3_hwmod,
1665 .clk = "gpios_ick",
1666 .addr = omap2430_gpio3_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001667 .user = OCP_USER_MPU | OCP_USER_SDMA,
1668};
1669
1670/* l4_wkup -> gpio4 */
1671static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
1672 {
1673 .pa_start = 0x49012000,
1674 .pa_end = 0x490121ff,
1675 .flags = ADDR_TYPE_RT
1676 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001677 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001678};
1679
1680static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
1681 .master = &omap2430_l4_wkup_hwmod,
1682 .slave = &omap2430_gpio4_hwmod,
1683 .clk = "gpios_ick",
1684 .addr = omap2430_gpio4_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001685 .user = OCP_USER_MPU | OCP_USER_SDMA,
1686};
1687
1688/* l4_core -> gpio5 */
1689static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
1690 {
1691 .pa_start = 0x480B6000,
1692 .pa_end = 0x480B61ff,
1693 .flags = ADDR_TYPE_RT
1694 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001695 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001696};
1697
1698static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
1699 .master = &omap2430_l4_core_hwmod,
1700 .slave = &omap2430_gpio5_hwmod,
1701 .clk = "gpio5_ick",
1702 .addr = omap2430_gpio5_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001703 .user = OCP_USER_MPU | OCP_USER_SDMA,
1704};
1705
1706/* gpio dev_attr */
1707static struct omap_gpio_dev_attr gpio_dev_attr = {
1708 .bank_width = 32,
1709 .dbck_flag = false,
1710};
1711
1712static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
1713 .rev_offs = 0x0000,
1714 .sysc_offs = 0x0010,
1715 .syss_offs = 0x0014,
1716 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001717 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1718 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001719 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1720 .sysc_fields = &omap_hwmod_sysc_type1,
1721};
1722
1723/*
1724 * 'gpio' class
1725 * general purpose io module
1726 */
1727static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
1728 .name = "gpio",
1729 .sysc = &omap243x_gpio_sysc,
1730 .rev = 0,
1731};
1732
1733/* gpio1 */
1734static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
1735 { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
1736};
1737
1738static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1739 &omap2430_l4_wkup__gpio1,
1740};
1741
1742static struct omap_hwmod omap2430_gpio1_hwmod = {
1743 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301744 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001745 .mpu_irqs = omap243x_gpio1_irqs,
1746 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs),
1747 .main_clk = "gpios_fck",
1748 .prcm = {
1749 .omap2 = {
1750 .prcm_reg_id = 1,
1751 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1752 .module_offs = WKUP_MOD,
1753 .idlest_reg_id = 1,
1754 .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
1755 },
1756 },
1757 .slaves = omap2430_gpio1_slaves,
1758 .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
1759 .class = &omap243x_gpio_hwmod_class,
1760 .dev_attr = &gpio_dev_attr,
1761 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1762};
1763
1764/* gpio2 */
1765static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
1766 { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
1767};
1768
1769static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1770 &omap2430_l4_wkup__gpio2,
1771};
1772
1773static struct omap_hwmod omap2430_gpio2_hwmod = {
1774 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301775 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001776 .mpu_irqs = omap243x_gpio2_irqs,
1777 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs),
1778 .main_clk = "gpios_fck",
1779 .prcm = {
1780 .omap2 = {
1781 .prcm_reg_id = 1,
1782 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1783 .module_offs = WKUP_MOD,
1784 .idlest_reg_id = 1,
1785 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1786 },
1787 },
1788 .slaves = omap2430_gpio2_slaves,
1789 .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
1790 .class = &omap243x_gpio_hwmod_class,
1791 .dev_attr = &gpio_dev_attr,
1792 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1793};
1794
1795/* gpio3 */
1796static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
1797 { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
1798};
1799
1800static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1801 &omap2430_l4_wkup__gpio3,
1802};
1803
1804static struct omap_hwmod omap2430_gpio3_hwmod = {
1805 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301806 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001807 .mpu_irqs = omap243x_gpio3_irqs,
1808 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs),
1809 .main_clk = "gpios_fck",
1810 .prcm = {
1811 .omap2 = {
1812 .prcm_reg_id = 1,
1813 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1814 .module_offs = WKUP_MOD,
1815 .idlest_reg_id = 1,
1816 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1817 },
1818 },
1819 .slaves = omap2430_gpio3_slaves,
1820 .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
1821 .class = &omap243x_gpio_hwmod_class,
1822 .dev_attr = &gpio_dev_attr,
1823 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1824};
1825
1826/* gpio4 */
1827static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
1828 { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
1829};
1830
1831static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1832 &omap2430_l4_wkup__gpio4,
1833};
1834
1835static struct omap_hwmod omap2430_gpio4_hwmod = {
1836 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301837 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001838 .mpu_irqs = omap243x_gpio4_irqs,
1839 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs),
1840 .main_clk = "gpios_fck",
1841 .prcm = {
1842 .omap2 = {
1843 .prcm_reg_id = 1,
1844 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1845 .module_offs = WKUP_MOD,
1846 .idlest_reg_id = 1,
1847 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1848 },
1849 },
1850 .slaves = omap2430_gpio4_slaves,
1851 .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
1852 .class = &omap243x_gpio_hwmod_class,
1853 .dev_attr = &gpio_dev_attr,
1854 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1855};
1856
1857/* gpio5 */
1858static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
1859 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
1860};
1861
1862static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
1863 &omap2430_l4_core__gpio5,
1864};
1865
1866static struct omap_hwmod omap2430_gpio5_hwmod = {
1867 .name = "gpio5",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301868 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001869 .mpu_irqs = omap243x_gpio5_irqs,
1870 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs),
1871 .main_clk = "gpio5_fck",
1872 .prcm = {
1873 .omap2 = {
1874 .prcm_reg_id = 2,
1875 .module_bit = OMAP2430_EN_GPIO5_SHIFT,
1876 .module_offs = CORE_MOD,
1877 .idlest_reg_id = 2,
1878 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
1879 },
1880 },
1881 .slaves = omap2430_gpio5_slaves,
1882 .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
1883 .class = &omap243x_gpio_hwmod_class,
1884 .dev_attr = &gpio_dev_attr,
1885 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1886};
1887
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001888/* dma_system */
1889static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
1890 .rev_offs = 0x0000,
1891 .sysc_offs = 0x002c,
1892 .syss_offs = 0x0028,
1893 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
1894 SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001895 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001896 .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1897 .sysc_fields = &omap_hwmod_sysc_type1,
1898};
1899
1900static struct omap_hwmod_class omap2430_dma_hwmod_class = {
1901 .name = "dma",
1902 .sysc = &omap2430_dma_sysc,
1903};
1904
1905/* dma attributes */
1906static struct omap_dma_dev_attr dma_dev_attr = {
1907 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1908 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1909 .lch_count = 32,
1910};
1911
1912static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
1913 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
1914 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
1915 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
1916 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
1917};
1918
1919static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = {
1920 {
1921 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06001922 .pa_end = 0x48056fff,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001923 .flags = ADDR_TYPE_RT
1924 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001925 { }
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001926};
1927
1928/* dma_system -> L3 */
1929static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
1930 .master = &omap2430_dma_system_hwmod,
1931 .slave = &omap2430_l3_main_hwmod,
1932 .clk = "core_l3_ck",
1933 .user = OCP_USER_MPU | OCP_USER_SDMA,
1934};
1935
1936/* dma_system master ports */
1937static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
1938 &omap2430_dma_system__l3,
1939};
1940
1941/* l4_core -> dma_system */
1942static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
1943 .master = &omap2430_l4_core_hwmod,
1944 .slave = &omap2430_dma_system_hwmod,
1945 .clk = "sdma_ick",
1946 .addr = omap2430_dma_system_addrs,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001947 .user = OCP_USER_MPU | OCP_USER_SDMA,
1948};
1949
1950/* dma_system slave ports */
1951static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
1952 &omap2430_l4_core__dma_system,
1953};
1954
1955static struct omap_hwmod omap2430_dma_system_hwmod = {
1956 .name = "dma",
1957 .class = &omap2430_dma_hwmod_class,
1958 .mpu_irqs = omap2430_dma_system_irqs,
1959 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dma_system_irqs),
1960 .main_clk = "core_l3_ck",
1961 .slaves = omap2430_dma_system_slaves,
1962 .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
1963 .masters = omap2430_dma_system_masters,
1964 .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
1965 .dev_attr = &dma_dev_attr,
1966 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1967 .flags = HWMOD_NO_IDLEST,
1968};
1969
Charulatha V7f904c72011-02-17 09:53:10 -08001970/*
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001971 * 'mailbox' class
1972 * mailbox module allowing communication between the on-chip processors
1973 * using a queued mailbox-interrupt mechanism.
1974 */
1975
1976static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
1977 .rev_offs = 0x000,
1978 .sysc_offs = 0x010,
1979 .syss_offs = 0x014,
1980 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1981 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1982 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1983 .sysc_fields = &omap_hwmod_sysc_type1,
1984};
1985
1986static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
1987 .name = "mailbox",
1988 .sysc = &omap2430_mailbox_sysc,
1989};
1990
1991/* mailbox */
1992static struct omap_hwmod omap2430_mailbox_hwmod;
1993static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1994 { .irq = 26 },
1995};
1996
1997static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = {
1998 {
1999 .pa_start = 0x48094000,
2000 .pa_end = 0x480941ff,
2001 .flags = ADDR_TYPE_RT,
2002 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002003 { }
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08002004};
2005
2006/* l4_core -> mailbox */
2007static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
2008 .master = &omap2430_l4_core_hwmod,
2009 .slave = &omap2430_mailbox_hwmod,
2010 .addr = omap2430_mailbox_addrs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08002011 .user = OCP_USER_MPU | OCP_USER_SDMA,
2012};
2013
2014/* mailbox slave ports */
2015static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
2016 &omap2430_l4_core__mailbox,
2017};
2018
2019static struct omap_hwmod omap2430_mailbox_hwmod = {
2020 .name = "mailbox",
2021 .class = &omap2430_mailbox_hwmod_class,
2022 .mpu_irqs = omap2430_mailbox_irqs,
2023 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs),
2024 .main_clk = "mailboxes_ick",
2025 .prcm = {
2026 .omap2 = {
2027 .prcm_reg_id = 1,
2028 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
2029 .module_offs = CORE_MOD,
2030 .idlest_reg_id = 1,
2031 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
2032 },
2033 },
2034 .slaves = omap2430_mailbox_slaves,
2035 .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
2036 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2037};
2038
2039/*
Charulatha V7f904c72011-02-17 09:53:10 -08002040 * 'mcspi' class
2041 * multichannel serial port interface (mcspi) / master/slave synchronous serial
2042 * bus
2043 */
2044
2045static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
2046 .rev_offs = 0x0000,
2047 .sysc_offs = 0x0010,
2048 .syss_offs = 0x0014,
2049 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2050 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2051 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2052 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2053 .sysc_fields = &omap_hwmod_sysc_type1,
2054};
2055
2056static struct omap_hwmod_class omap2430_mcspi_class = {
2057 .name = "mcspi",
2058 .sysc = &omap2430_mcspi_sysc,
2059 .rev = OMAP2_MCSPI_REV,
2060};
2061
2062/* mcspi1 */
2063static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = {
2064 { .irq = 65 },
2065};
2066
2067static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
2068 { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
2069 { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
2070 { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
2071 { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
2072 { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
2073 { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
2074 { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
2075 { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
2076};
2077
2078static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
2079 &omap2430_l4_core__mcspi1,
2080};
2081
2082static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
2083 .num_chipselect = 4,
2084};
2085
2086static struct omap_hwmod omap2430_mcspi1_hwmod = {
2087 .name = "mcspi1_hwmod",
2088 .mpu_irqs = omap2430_mcspi1_mpu_irqs,
2089 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs),
2090 .sdma_reqs = omap2430_mcspi1_sdma_reqs,
2091 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
2092 .main_clk = "mcspi1_fck",
2093 .prcm = {
2094 .omap2 = {
2095 .module_offs = CORE_MOD,
2096 .prcm_reg_id = 1,
2097 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
2098 .idlest_reg_id = 1,
2099 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
2100 },
2101 },
2102 .slaves = omap2430_mcspi1_slaves,
2103 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
2104 .class = &omap2430_mcspi_class,
2105 .dev_attr = &omap_mcspi1_dev_attr,
2106 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2107};
2108
2109/* mcspi2 */
2110static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = {
2111 { .irq = 66 },
2112};
2113
2114static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
2115 { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
2116 { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
2117 { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
2118 { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
2119};
2120
2121static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
2122 &omap2430_l4_core__mcspi2,
2123};
2124
2125static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
2126 .num_chipselect = 2,
2127};
2128
2129static struct omap_hwmod omap2430_mcspi2_hwmod = {
2130 .name = "mcspi2_hwmod",
2131 .mpu_irqs = omap2430_mcspi2_mpu_irqs,
2132 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs),
2133 .sdma_reqs = omap2430_mcspi2_sdma_reqs,
2134 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
2135 .main_clk = "mcspi2_fck",
2136 .prcm = {
2137 .omap2 = {
2138 .module_offs = CORE_MOD,
2139 .prcm_reg_id = 1,
2140 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
2141 .idlest_reg_id = 1,
2142 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
2143 },
2144 },
2145 .slaves = omap2430_mcspi2_slaves,
2146 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
2147 .class = &omap2430_mcspi_class,
2148 .dev_attr = &omap_mcspi2_dev_attr,
2149 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2150};
2151
2152/* mcspi3 */
2153static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
2154 { .irq = 91 },
2155};
2156
2157static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
2158 { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
2159 { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
2160 { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
2161 { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
2162};
2163
2164static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
2165 &omap2430_l4_core__mcspi3,
2166};
2167
2168static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
2169 .num_chipselect = 2,
2170};
2171
2172static struct omap_hwmod omap2430_mcspi3_hwmod = {
2173 .name = "mcspi3_hwmod",
2174 .mpu_irqs = omap2430_mcspi3_mpu_irqs,
2175 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs),
2176 .sdma_reqs = omap2430_mcspi3_sdma_reqs,
2177 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
2178 .main_clk = "mcspi3_fck",
2179 .prcm = {
2180 .omap2 = {
2181 .module_offs = CORE_MOD,
2182 .prcm_reg_id = 2,
2183 .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
2184 .idlest_reg_id = 2,
2185 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
2186 },
2187 },
2188 .slaves = omap2430_mcspi3_slaves,
2189 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
2190 .class = &omap2430_mcspi_class,
2191 .dev_attr = &omap_mcspi3_dev_attr,
2192 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2193};
2194
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002195/*
Hema HK44d02ac2011-02-17 12:07:17 +05302196 * usbhsotg
2197 */
2198static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
2199 .rev_offs = 0x0400,
2200 .sysc_offs = 0x0404,
2201 .syss_offs = 0x0408,
2202 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
2203 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2204 SYSC_HAS_AUTOIDLE),
2205 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2206 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2207 .sysc_fields = &omap_hwmod_sysc_type1,
2208};
2209
2210static struct omap_hwmod_class usbotg_class = {
2211 .name = "usbotg",
2212 .sysc = &omap2430_usbhsotg_sysc,
2213};
2214
2215/* usb_otg_hs */
2216static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
2217
2218 { .name = "mc", .irq = 92 },
2219 { .name = "dma", .irq = 93 },
2220};
2221
2222static struct omap_hwmod omap2430_usbhsotg_hwmod = {
2223 .name = "usb_otg_hs",
2224 .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
2225 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs),
2226 .main_clk = "usbhs_ick",
2227 .prcm = {
2228 .omap2 = {
2229 .prcm_reg_id = 1,
2230 .module_bit = OMAP2430_EN_USBHS_MASK,
2231 .module_offs = CORE_MOD,
2232 .idlest_reg_id = 1,
2233 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
2234 },
2235 },
2236 .masters = omap2430_usbhsotg_masters,
2237 .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
2238 .slaves = omap2430_usbhsotg_slaves,
2239 .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
2240 .class = &usbotg_class,
2241 /*
2242 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
2243 * broken when autoidle is enabled
2244 * workaround is to disable the autoidle bit at module level.
2245 */
2246 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
2247 | HWMOD_SWSUP_MSTANDBY,
2248 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
2249};
2250
Charulatha V37801b32011-02-24 12:51:46 -08002251/*
2252 * 'mcbsp' class
2253 * multi channel buffered serial port controller
2254 */
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002255
Charulatha V37801b32011-02-24 12:51:46 -08002256static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
2257 .rev_offs = 0x007C,
2258 .sysc_offs = 0x008C,
2259 .sysc_flags = (SYSC_HAS_SOFTRESET),
2260 .sysc_fields = &omap_hwmod_sysc_type1,
2261};
2262
2263static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
2264 .name = "mcbsp",
2265 .sysc = &omap2430_mcbsp_sysc,
2266 .rev = MCBSP_CONFIG_TYPE2,
2267};
2268
2269/* mcbsp1 */
2270static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
2271 { .name = "tx", .irq = 59 },
2272 { .name = "rx", .irq = 60 },
2273 { .name = "ovr", .irq = 61 },
2274 { .name = "common", .irq = 64 },
2275};
2276
2277static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
2278 { .name = "rx", .dma_req = 32 },
2279 { .name = "tx", .dma_req = 31 },
2280};
2281
2282static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = {
2283 {
2284 .name = "mpu",
2285 .pa_start = 0x48074000,
2286 .pa_end = 0x480740ff,
2287 .flags = ADDR_TYPE_RT
2288 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002289 { }
Charulatha V37801b32011-02-24 12:51:46 -08002290};
2291
2292/* l4_core -> mcbsp1 */
2293static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
2294 .master = &omap2430_l4_core_hwmod,
2295 .slave = &omap2430_mcbsp1_hwmod,
2296 .clk = "mcbsp1_ick",
2297 .addr = omap2430_mcbsp1_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08002298 .user = OCP_USER_MPU | OCP_USER_SDMA,
2299};
2300
2301/* mcbsp1 slave ports */
2302static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
2303 &omap2430_l4_core__mcbsp1,
2304};
2305
2306static struct omap_hwmod omap2430_mcbsp1_hwmod = {
2307 .name = "mcbsp1",
2308 .class = &omap2430_mcbsp_hwmod_class,
2309 .mpu_irqs = omap2430_mcbsp1_irqs,
2310 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs),
2311 .sdma_reqs = omap2430_mcbsp1_sdma_chs,
2312 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
2313 .main_clk = "mcbsp1_fck",
2314 .prcm = {
2315 .omap2 = {
2316 .prcm_reg_id = 1,
2317 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
2318 .module_offs = CORE_MOD,
2319 .idlest_reg_id = 1,
2320 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
2321 },
2322 },
2323 .slaves = omap2430_mcbsp1_slaves,
2324 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
2325 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2326};
2327
2328/* mcbsp2 */
2329static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
2330 { .name = "tx", .irq = 62 },
2331 { .name = "rx", .irq = 63 },
2332 { .name = "common", .irq = 16 },
2333};
2334
2335static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
2336 { .name = "rx", .dma_req = 34 },
2337 { .name = "tx", .dma_req = 33 },
2338};
2339
2340static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = {
2341 {
2342 .name = "mpu",
2343 .pa_start = 0x48076000,
2344 .pa_end = 0x480760ff,
2345 .flags = ADDR_TYPE_RT
2346 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002347 { }
Charulatha V37801b32011-02-24 12:51:46 -08002348};
2349
2350/* l4_core -> mcbsp2 */
2351static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
2352 .master = &omap2430_l4_core_hwmod,
2353 .slave = &omap2430_mcbsp2_hwmod,
2354 .clk = "mcbsp2_ick",
2355 .addr = omap2430_mcbsp2_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08002356 .user = OCP_USER_MPU | OCP_USER_SDMA,
2357};
2358
2359/* mcbsp2 slave ports */
2360static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
2361 &omap2430_l4_core__mcbsp2,
2362};
2363
2364static struct omap_hwmod omap2430_mcbsp2_hwmod = {
2365 .name = "mcbsp2",
2366 .class = &omap2430_mcbsp_hwmod_class,
2367 .mpu_irqs = omap2430_mcbsp2_irqs,
2368 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs),
2369 .sdma_reqs = omap2430_mcbsp2_sdma_chs,
2370 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
2371 .main_clk = "mcbsp2_fck",
2372 .prcm = {
2373 .omap2 = {
2374 .prcm_reg_id = 1,
2375 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
2376 .module_offs = CORE_MOD,
2377 .idlest_reg_id = 1,
2378 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
2379 },
2380 },
2381 .slaves = omap2430_mcbsp2_slaves,
2382 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
2383 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2384};
2385
2386/* mcbsp3 */
2387static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
2388 { .name = "tx", .irq = 89 },
2389 { .name = "rx", .irq = 90 },
2390 { .name = "common", .irq = 17 },
2391};
2392
2393static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
2394 { .name = "rx", .dma_req = 18 },
2395 { .name = "tx", .dma_req = 17 },
2396};
2397
2398static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
2399 {
2400 .name = "mpu",
2401 .pa_start = 0x4808C000,
2402 .pa_end = 0x4808C0ff,
2403 .flags = ADDR_TYPE_RT
2404 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002405 { }
Charulatha V37801b32011-02-24 12:51:46 -08002406};
2407
2408/* l4_core -> mcbsp3 */
2409static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
2410 .master = &omap2430_l4_core_hwmod,
2411 .slave = &omap2430_mcbsp3_hwmod,
2412 .clk = "mcbsp3_ick",
2413 .addr = omap2430_mcbsp3_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08002414 .user = OCP_USER_MPU | OCP_USER_SDMA,
2415};
2416
2417/* mcbsp3 slave ports */
2418static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
2419 &omap2430_l4_core__mcbsp3,
2420};
2421
2422static struct omap_hwmod omap2430_mcbsp3_hwmod = {
2423 .name = "mcbsp3",
2424 .class = &omap2430_mcbsp_hwmod_class,
2425 .mpu_irqs = omap2430_mcbsp3_irqs,
2426 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs),
2427 .sdma_reqs = omap2430_mcbsp3_sdma_chs,
2428 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
2429 .main_clk = "mcbsp3_fck",
2430 .prcm = {
2431 .omap2 = {
2432 .prcm_reg_id = 1,
2433 .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
2434 .module_offs = CORE_MOD,
2435 .idlest_reg_id = 2,
2436 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
2437 },
2438 },
2439 .slaves = omap2430_mcbsp3_slaves,
2440 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
2441 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2442};
2443
2444/* mcbsp4 */
2445static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
2446 { .name = "tx", .irq = 54 },
2447 { .name = "rx", .irq = 55 },
2448 { .name = "common", .irq = 18 },
2449};
2450
2451static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
2452 { .name = "rx", .dma_req = 20 },
2453 { .name = "tx", .dma_req = 19 },
2454};
2455
2456static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
2457 {
2458 .name = "mpu",
2459 .pa_start = 0x4808E000,
2460 .pa_end = 0x4808E0ff,
2461 .flags = ADDR_TYPE_RT
2462 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002463 { }
Charulatha V37801b32011-02-24 12:51:46 -08002464};
2465
2466/* l4_core -> mcbsp4 */
2467static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
2468 .master = &omap2430_l4_core_hwmod,
2469 .slave = &omap2430_mcbsp4_hwmod,
2470 .clk = "mcbsp4_ick",
2471 .addr = omap2430_mcbsp4_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08002472 .user = OCP_USER_MPU | OCP_USER_SDMA,
2473};
2474
2475/* mcbsp4 slave ports */
2476static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
2477 &omap2430_l4_core__mcbsp4,
2478};
2479
2480static struct omap_hwmod omap2430_mcbsp4_hwmod = {
2481 .name = "mcbsp4",
2482 .class = &omap2430_mcbsp_hwmod_class,
2483 .mpu_irqs = omap2430_mcbsp4_irqs,
2484 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs),
2485 .sdma_reqs = omap2430_mcbsp4_sdma_chs,
2486 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
2487 .main_clk = "mcbsp4_fck",
2488 .prcm = {
2489 .omap2 = {
2490 .prcm_reg_id = 1,
2491 .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
2492 .module_offs = CORE_MOD,
2493 .idlest_reg_id = 2,
2494 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
2495 },
2496 },
2497 .slaves = omap2430_mcbsp4_slaves,
2498 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
2499 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2500};
2501
2502/* mcbsp5 */
2503static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
2504 { .name = "tx", .irq = 81 },
2505 { .name = "rx", .irq = 82 },
2506 { .name = "common", .irq = 19 },
2507};
2508
2509static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
2510 { .name = "rx", .dma_req = 22 },
2511 { .name = "tx", .dma_req = 21 },
2512};
2513
2514static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
2515 {
2516 .name = "mpu",
2517 .pa_start = 0x48096000,
2518 .pa_end = 0x480960ff,
2519 .flags = ADDR_TYPE_RT
2520 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002521 { }
Charulatha V37801b32011-02-24 12:51:46 -08002522};
2523
2524/* l4_core -> mcbsp5 */
2525static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
2526 .master = &omap2430_l4_core_hwmod,
2527 .slave = &omap2430_mcbsp5_hwmod,
2528 .clk = "mcbsp5_ick",
2529 .addr = omap2430_mcbsp5_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08002530 .user = OCP_USER_MPU | OCP_USER_SDMA,
2531};
2532
2533/* mcbsp5 slave ports */
2534static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
2535 &omap2430_l4_core__mcbsp5,
2536};
2537
2538static struct omap_hwmod omap2430_mcbsp5_hwmod = {
2539 .name = "mcbsp5",
2540 .class = &omap2430_mcbsp_hwmod_class,
2541 .mpu_irqs = omap2430_mcbsp5_irqs,
2542 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs),
2543 .sdma_reqs = omap2430_mcbsp5_sdma_chs,
2544 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
2545 .main_clk = "mcbsp5_fck",
2546 .prcm = {
2547 .omap2 = {
2548 .prcm_reg_id = 1,
2549 .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
2550 .module_offs = CORE_MOD,
2551 .idlest_reg_id = 2,
2552 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
2553 },
2554 },
2555 .slaves = omap2430_mcbsp5_slaves,
2556 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
2557 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2558};
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002559
Paul Walmsleybce06f32011-03-01 13:12:55 -08002560/* MMC/SD/SDIO common */
2561
2562static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
2563 .rev_offs = 0x1fc,
2564 .sysc_offs = 0x10,
2565 .syss_offs = 0x14,
2566 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2567 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2568 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2569 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2570 .sysc_fields = &omap_hwmod_sysc_type1,
2571};
2572
2573static struct omap_hwmod_class omap2430_mmc_class = {
2574 .name = "mmc",
2575 .sysc = &omap2430_mmc_sysc,
2576};
2577
2578/* MMC/SD/SDIO1 */
2579
2580static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
2581 { .irq = 83 },
2582};
2583
2584static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
2585 { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
2586 { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
2587};
2588
2589static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
2590 { .role = "dbck", .clk = "mmchsdb1_fck" },
2591};
2592
2593static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
2594 &omap2430_l4_core__mmc1,
2595};
2596
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08002597static struct omap_mmc_dev_attr mmc1_dev_attr = {
2598 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
2599};
2600
Paul Walmsleybce06f32011-03-01 13:12:55 -08002601static struct omap_hwmod omap2430_mmc1_hwmod = {
2602 .name = "mmc1",
2603 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2604 .mpu_irqs = omap2430_mmc1_mpu_irqs,
2605 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc1_mpu_irqs),
2606 .sdma_reqs = omap2430_mmc1_sdma_reqs,
2607 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs),
2608 .opt_clks = omap2430_mmc1_opt_clks,
2609 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
2610 .main_clk = "mmchs1_fck",
2611 .prcm = {
2612 .omap2 = {
2613 .module_offs = CORE_MOD,
2614 .prcm_reg_id = 2,
2615 .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
2616 .idlest_reg_id = 2,
2617 .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
2618 },
2619 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08002620 .dev_attr = &mmc1_dev_attr,
Paul Walmsleybce06f32011-03-01 13:12:55 -08002621 .slaves = omap2430_mmc1_slaves,
2622 .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
2623 .class = &omap2430_mmc_class,
2624 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2625};
2626
2627/* MMC/SD/SDIO2 */
2628
2629static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
2630 { .irq = 86 },
2631};
2632
2633static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
2634 { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
2635 { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
2636};
2637
2638static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
2639 { .role = "dbck", .clk = "mmchsdb2_fck" },
2640};
2641
2642static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
2643 &omap2430_l4_core__mmc2,
2644};
2645
2646static struct omap_hwmod omap2430_mmc2_hwmod = {
2647 .name = "mmc2",
2648 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2649 .mpu_irqs = omap2430_mmc2_mpu_irqs,
2650 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc2_mpu_irqs),
2651 .sdma_reqs = omap2430_mmc2_sdma_reqs,
2652 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs),
2653 .opt_clks = omap2430_mmc2_opt_clks,
2654 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
2655 .main_clk = "mmchs2_fck",
2656 .prcm = {
2657 .omap2 = {
2658 .module_offs = CORE_MOD,
2659 .prcm_reg_id = 2,
2660 .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
2661 .idlest_reg_id = 2,
2662 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
2663 },
2664 },
2665 .slaves = omap2430_mmc2_slaves,
2666 .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
2667 .class = &omap2430_mmc_class,
2668 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2669};
Paul Walmsley02bfc032009-09-03 20:14:05 +03002670
2671static __initdata struct omap_hwmod *omap2430_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002672 &omap2430_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +03002673 &omap2430_l4_core_hwmod,
2674 &omap2430_l4_wkup_hwmod,
2675 &omap2430_mpu_hwmod,
Paul Walmsley08072ac2010-07-26 16:34:33 -06002676 &omap2430_iva_hwmod,
Thara Gopinathb6b58222011-02-23 00:14:05 -07002677
2678 &omap2430_timer1_hwmod,
2679 &omap2430_timer2_hwmod,
2680 &omap2430_timer3_hwmod,
2681 &omap2430_timer4_hwmod,
2682 &omap2430_timer5_hwmod,
2683 &omap2430_timer6_hwmod,
2684 &omap2430_timer7_hwmod,
2685 &omap2430_timer8_hwmod,
2686 &omap2430_timer9_hwmod,
2687 &omap2430_timer10_hwmod,
2688 &omap2430_timer11_hwmod,
2689 &omap2430_timer12_hwmod,
2690
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +05302691 &omap2430_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05302692 &omap2430_uart1_hwmod,
2693 &omap2430_uart2_hwmod,
2694 &omap2430_uart3_hwmod,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02002695 /* dss class */
2696 &omap2430_dss_core_hwmod,
2697 &omap2430_dss_dispc_hwmod,
2698 &omap2430_dss_rfbi_hwmod,
2699 &omap2430_dss_venc_hwmod,
2700 /* i2c class */
Paul Walmsley20042902010-09-30 02:40:12 +05302701 &omap2430_i2c1_hwmod,
2702 &omap2430_i2c2_hwmod,
Paul Walmsleybce06f32011-03-01 13:12:55 -08002703 &omap2430_mmc1_hwmod,
2704 &omap2430_mmc2_hwmod,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08002705
2706 /* gpio class */
2707 &omap2430_gpio1_hwmod,
2708 &omap2430_gpio2_hwmod,
2709 &omap2430_gpio3_hwmod,
2710 &omap2430_gpio4_hwmod,
2711 &omap2430_gpio5_hwmod,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08002712
2713 /* dma_system class*/
2714 &omap2430_dma_system_hwmod,
Charulatha V7f904c72011-02-17 09:53:10 -08002715
Charulatha V37801b32011-02-24 12:51:46 -08002716 /* mcbsp class */
2717 &omap2430_mcbsp1_hwmod,
2718 &omap2430_mcbsp2_hwmod,
2719 &omap2430_mcbsp3_hwmod,
2720 &omap2430_mcbsp4_hwmod,
2721 &omap2430_mcbsp5_hwmod,
2722
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08002723 /* mailbox class */
2724 &omap2430_mailbox_hwmod,
2725
Charulatha V7f904c72011-02-17 09:53:10 -08002726 /* mcspi class */
2727 &omap2430_mcspi1_hwmod,
2728 &omap2430_mcspi2_hwmod,
2729 &omap2430_mcspi3_hwmod,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002730
Hema HK44d02ac2011-02-17 12:07:17 +05302731 /* usbotg class*/
2732 &omap2430_usbhsotg_hwmod,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002733
Paul Walmsley02bfc032009-09-03 20:14:05 +03002734 NULL,
2735};
2736
Paul Walmsley73591542010-02-22 22:09:32 -07002737int __init omap2430_hwmod_init(void)
2738{
Paul Walmsley550c8092011-02-28 11:58:14 -07002739 return omap_hwmod_register(omap2430_hwmods);
Paul Walmsley73591542010-02-22 22:09:32 -07002740}