blob: 62ecc685f1a20615967e56da3249d0d5632776b3 [file] [log] [blame]
Paul Walmsley02bfc0302009-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 Walmsley02bfc0302009-09-03 20:14:05 +03003 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley02bfc0302009-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 Walmsley02bfc0302009-09-03 20:14:05 +030013 */
Tony Lindgrence491cf2009-10-20 09:40:47 -070014#include <plat/omap_hwmod.h>
Paul Walmsley02bfc0302009-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 Walmsley02bfc0302009-09-03 20:14:05 +030026
Paul Walmsley43b40992010-02-22 22:09:34 -070027#include "omap_hwmod_common_data.h"
28
Paul Walmsley02bfc0302009-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 Walmsley02bfc0302009-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 Walmsley02bfc0302009-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 Walmsley02bfc0302009-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 Walmsley02bfc0302009-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 Walmsley02bfc0302009-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 Walmsley02bfc0302009-09-03 20:14:05 +030077 .master = &omap2430_mpu_hwmod,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060078 .slave = &omap2430_l3_main_hwmod,
Paul Walmsley02bfc0302009-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 Walmsley02bfc0302009-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 Walmsley02bfc0302009-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 Walmsley02bfc0302009-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 Walmsley02bfc0302009-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/* L4 CORE -> I2C1 interface */
Paul Walmsley20042902010-09-30 02:40:12 +0530135static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
136 .master = &omap2430_l4_core_hwmod,
137 .slave = &omap2430_i2c1_hwmod,
138 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600139 .addr = omap2_i2c1_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530140 .user = OCP_USER_MPU | OCP_USER_SDMA,
141};
142
143/* L4 CORE -> I2C2 interface */
Paul Walmsley20042902010-09-30 02:40:12 +0530144static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
145 .master = &omap2430_l4_core_hwmod,
146 .slave = &omap2430_i2c2_hwmod,
147 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600148 .addr = omap2_i2c2_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530149 .user = OCP_USER_MPU | OCP_USER_SDMA,
150};
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300151
152/* L4_CORE -> L4_WKUP interface */
153static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
154 .master = &omap2430_l4_core_hwmod,
155 .slave = &omap2430_l4_wkup_hwmod,
156 .user = OCP_USER_MPU | OCP_USER_SDMA,
157};
158
Kevin Hilman046465b2010-09-27 20:19:30 +0530159/* L4 CORE -> UART1 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530160static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
161 .master = &omap2430_l4_core_hwmod,
162 .slave = &omap2430_uart1_hwmod,
163 .clk = "uart1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600164 .addr = omap2xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530165 .user = OCP_USER_MPU | OCP_USER_SDMA,
166};
167
168/* L4 CORE -> UART2 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530169static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
170 .master = &omap2430_l4_core_hwmod,
171 .slave = &omap2430_uart2_hwmod,
172 .clk = "uart2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600173 .addr = omap2xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530174 .user = OCP_USER_MPU | OCP_USER_SDMA,
175};
176
177/* L4 PER -> UART3 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530178static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
179 .master = &omap2430_l4_core_hwmod,
180 .slave = &omap2430_uart3_hwmod,
181 .clk = "uart3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600182 .addr = omap2xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530183 .user = OCP_USER_MPU | OCP_USER_SDMA,
184};
185
Hema HK44d02ac2011-02-17 12:07:17 +0530186/*
187* usbhsotg interface data
188*/
189static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
190 {
191 .pa_start = OMAP243X_HS_BASE,
192 .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
193 .flags = ADDR_TYPE_RT
194 },
195};
196
197/* l4_core ->usbhsotg interface */
198static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
199 .master = &omap2430_l4_core_hwmod,
200 .slave = &omap2430_usbhsotg_hwmod,
201 .clk = "usb_l4_ick",
202 .addr = omap2430_usbhsotg_addrs,
Hema HK44d02ac2011-02-17 12:07:17 +0530203 .user = OCP_USER_MPU,
204};
205
206static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
207 &omap2430_usbhsotg__l3,
208};
209
210static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
211 &omap2430_l4_core__usbhsotg,
212};
213
Paul Walmsleybce06f32011-03-01 13:12:55 -0800214/* L4 CORE -> MMC1 interface */
Paul Walmsleybce06f32011-03-01 13:12:55 -0800215static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
216 .master = &omap2430_l4_core_hwmod,
217 .slave = &omap2430_mmc1_hwmod,
218 .clk = "mmchs1_ick",
219 .addr = omap2430_mmc1_addr_space,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800220 .user = OCP_USER_MPU | OCP_USER_SDMA,
221};
222
223/* L4 CORE -> MMC2 interface */
Paul Walmsleybce06f32011-03-01 13:12:55 -0800224static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
225 .master = &omap2430_l4_core_hwmod,
226 .slave = &omap2430_mmc2_hwmod,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800227 .clk = "mmchs2_ick",
Paul Walmsley78183f32011-07-09 19:14:05 -0600228 .addr = omap2430_mmc2_addr_space,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800229 .user = OCP_USER_MPU | OCP_USER_SDMA,
230};
231
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300232/* Slave interfaces on the L4_CORE interconnect */
233static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600234 &omap2430_l3_main__l4_core,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300235};
236
237/* Master interfaces on the L4_CORE interconnect */
238static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
239 &omap2430_l4_core__l4_wkup,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800240 &omap2430_l4_core__mmc1,
241 &omap2430_l4_core__mmc2,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300242};
243
244/* L4 CORE */
245static struct omap_hwmod omap2430_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600246 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -0700247 .class = &l4_hwmod_class,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300248 .masters = omap2430_l4_core_masters,
249 .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
250 .slaves = omap2430_l4_core_slaves,
251 .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600252 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
253 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300254};
255
256/* Slave interfaces on the L4_WKUP interconnect */
257static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
258 &omap2430_l4_core__l4_wkup,
Kevin Hilman046465b2010-09-27 20:19:30 +0530259 &omap2_l4_core__uart1,
260 &omap2_l4_core__uart2,
261 &omap2_l4_core__uart3,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300262};
263
264/* Master interfaces on the L4_WKUP interconnect */
265static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
266};
267
Charulatha V7f904c72011-02-17 09:53:10 -0800268/* l4 core -> mcspi1 interface */
Charulatha V7f904c72011-02-17 09:53:10 -0800269static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
270 .master = &omap2430_l4_core_hwmod,
271 .slave = &omap2430_mcspi1_hwmod,
272 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600273 .addr = omap2_mcspi1_addr_space,
Charulatha V7f904c72011-02-17 09:53:10 -0800274 .user = OCP_USER_MPU | OCP_USER_SDMA,
275};
276
277/* l4 core -> mcspi2 interface */
Charulatha V7f904c72011-02-17 09:53:10 -0800278static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
279 .master = &omap2430_l4_core_hwmod,
280 .slave = &omap2430_mcspi2_hwmod,
281 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600282 .addr = omap2_mcspi2_addr_space,
Charulatha V7f904c72011-02-17 09:53:10 -0800283 .user = OCP_USER_MPU | OCP_USER_SDMA,
284};
285
286/* l4 core -> mcspi3 interface */
Charulatha V7f904c72011-02-17 09:53:10 -0800287static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
288 .master = &omap2430_l4_core_hwmod,
289 .slave = &omap2430_mcspi3_hwmod,
290 .clk = "mcspi3_ick",
291 .addr = omap2430_mcspi3_addr_space,
Charulatha V7f904c72011-02-17 09:53:10 -0800292 .user = OCP_USER_MPU | OCP_USER_SDMA,
293};
294
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300295/* L4 WKUP */
296static struct omap_hwmod omap2430_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600297 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700298 .class = &l4_hwmod_class,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300299 .masters = omap2430_l4_wkup_masters,
300 .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
301 .slaves = omap2430_l4_wkup_slaves,
302 .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600303 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
304 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300305};
306
307/* Master interfaces on the MPU device */
308static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600309 &omap2430_mpu__l3_main,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300310};
311
312/* MPU */
313static struct omap_hwmod omap2430_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600314 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700315 .class = &mpu_hwmod_class,
Paul Walmsley50ebdac2010-02-22 22:09:31 -0700316 .main_clk = "mpu_ck",
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300317 .masters = omap2430_mpu_masters,
318 .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
319 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
320};
321
Paul Walmsley08072ac2010-07-26 16:34:33 -0600322/*
323 * IVA2_1 interface data
324 */
325
326/* IVA2 <- L3 interface */
327static struct omap_hwmod_ocp_if omap2430_l3__iva = {
328 .master = &omap2430_l3_main_hwmod,
329 .slave = &omap2430_iva_hwmod,
330 .clk = "dsp_fck",
331 .user = OCP_USER_MPU | OCP_USER_SDMA,
332};
333
334static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
335 &omap2430_l3__iva,
336};
337
338/*
339 * IVA2 (IVA2)
340 */
341
342static struct omap_hwmod omap2430_iva_hwmod = {
343 .name = "iva",
344 .class = &iva_hwmod_class,
345 .masters = omap2430_iva_masters,
346 .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
347 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
348};
349
Thara Gopinathb6b58222011-02-23 00:14:05 -0700350/* Timer Common */
351static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = {
352 .rev_offs = 0x0000,
353 .sysc_offs = 0x0010,
354 .syss_offs = 0x0014,
355 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
356 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
357 SYSC_HAS_AUTOIDLE),
358 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
359 .sysc_fields = &omap_hwmod_sysc_type1,
360};
361
362static struct omap_hwmod_class omap2430_timer_hwmod_class = {
363 .name = "timer",
364 .sysc = &omap2430_timer_sysc,
365 .rev = OMAP_TIMER_IP_VERSION_1,
366};
367
368/* timer1 */
369static struct omap_hwmod omap2430_timer1_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700370
371static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
372 {
373 .pa_start = 0x49018000,
374 .pa_end = 0x49018000 + SZ_1K - 1,
375 .flags = ADDR_TYPE_RT
376 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600377 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700378};
379
380/* l4_wkup -> timer1 */
381static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
382 .master = &omap2430_l4_wkup_hwmod,
383 .slave = &omap2430_timer1_hwmod,
384 .clk = "gpt1_ick",
385 .addr = omap2430_timer1_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700386 .user = OCP_USER_MPU | OCP_USER_SDMA,
387};
388
389/* timer1 slave port */
390static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
391 &omap2430_l4_wkup__timer1,
392};
393
394/* timer1 hwmod */
395static struct omap_hwmod omap2430_timer1_hwmod = {
396 .name = "timer1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600397 .mpu_irqs = omap2_timer1_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700398 .main_clk = "gpt1_fck",
399 .prcm = {
400 .omap2 = {
401 .prcm_reg_id = 1,
402 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
403 .module_offs = WKUP_MOD,
404 .idlest_reg_id = 1,
405 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
406 },
407 },
408 .slaves = omap2430_timer1_slaves,
409 .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
410 .class = &omap2430_timer_hwmod_class,
411 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
412};
413
414/* timer2 */
415static struct omap_hwmod omap2430_timer2_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700416
Thara Gopinathb6b58222011-02-23 00:14:05 -0700417/* l4_core -> timer2 */
418static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
419 .master = &omap2430_l4_core_hwmod,
420 .slave = &omap2430_timer2_hwmod,
421 .clk = "gpt2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600422 .addr = omap2xxx_timer2_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700423 .user = OCP_USER_MPU | OCP_USER_SDMA,
424};
425
426/* timer2 slave port */
427static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
428 &omap2430_l4_core__timer2,
429};
430
431/* timer2 hwmod */
432static struct omap_hwmod omap2430_timer2_hwmod = {
433 .name = "timer2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600434 .mpu_irqs = omap2_timer2_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700435 .main_clk = "gpt2_fck",
436 .prcm = {
437 .omap2 = {
438 .prcm_reg_id = 1,
439 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
440 .module_offs = CORE_MOD,
441 .idlest_reg_id = 1,
442 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
443 },
444 },
445 .slaves = omap2430_timer2_slaves,
446 .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
447 .class = &omap2430_timer_hwmod_class,
448 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
449};
450
451/* timer3 */
452static struct omap_hwmod omap2430_timer3_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700453
Thara Gopinathb6b58222011-02-23 00:14:05 -0700454/* l4_core -> timer3 */
455static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
456 .master = &omap2430_l4_core_hwmod,
457 .slave = &omap2430_timer3_hwmod,
458 .clk = "gpt3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600459 .addr = omap2xxx_timer3_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700460 .user = OCP_USER_MPU | OCP_USER_SDMA,
461};
462
463/* timer3 slave port */
464static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
465 &omap2430_l4_core__timer3,
466};
467
468/* timer3 hwmod */
469static struct omap_hwmod omap2430_timer3_hwmod = {
470 .name = "timer3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600471 .mpu_irqs = omap2_timer3_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700472 .main_clk = "gpt3_fck",
473 .prcm = {
474 .omap2 = {
475 .prcm_reg_id = 1,
476 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
477 .module_offs = CORE_MOD,
478 .idlest_reg_id = 1,
479 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
480 },
481 },
482 .slaves = omap2430_timer3_slaves,
483 .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
484 .class = &omap2430_timer_hwmod_class,
485 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
486};
487
488/* timer4 */
489static struct omap_hwmod omap2430_timer4_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700490
Thara Gopinathb6b58222011-02-23 00:14:05 -0700491/* l4_core -> timer4 */
492static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
493 .master = &omap2430_l4_core_hwmod,
494 .slave = &omap2430_timer4_hwmod,
495 .clk = "gpt4_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600496 .addr = omap2xxx_timer4_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700497 .user = OCP_USER_MPU | OCP_USER_SDMA,
498};
499
500/* timer4 slave port */
501static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
502 &omap2430_l4_core__timer4,
503};
504
505/* timer4 hwmod */
506static struct omap_hwmod omap2430_timer4_hwmod = {
507 .name = "timer4",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600508 .mpu_irqs = omap2_timer4_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700509 .main_clk = "gpt4_fck",
510 .prcm = {
511 .omap2 = {
512 .prcm_reg_id = 1,
513 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
514 .module_offs = CORE_MOD,
515 .idlest_reg_id = 1,
516 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
517 },
518 },
519 .slaves = omap2430_timer4_slaves,
520 .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
521 .class = &omap2430_timer_hwmod_class,
522 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
523};
524
525/* timer5 */
526static struct omap_hwmod omap2430_timer5_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700527
Thara Gopinathb6b58222011-02-23 00:14:05 -0700528/* l4_core -> timer5 */
529static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
530 .master = &omap2430_l4_core_hwmod,
531 .slave = &omap2430_timer5_hwmod,
532 .clk = "gpt5_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600533 .addr = omap2xxx_timer5_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700534 .user = OCP_USER_MPU | OCP_USER_SDMA,
535};
536
537/* timer5 slave port */
538static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
539 &omap2430_l4_core__timer5,
540};
541
542/* timer5 hwmod */
543static struct omap_hwmod omap2430_timer5_hwmod = {
544 .name = "timer5",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600545 .mpu_irqs = omap2_timer5_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700546 .main_clk = "gpt5_fck",
547 .prcm = {
548 .omap2 = {
549 .prcm_reg_id = 1,
550 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
551 .module_offs = CORE_MOD,
552 .idlest_reg_id = 1,
553 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
554 },
555 },
556 .slaves = omap2430_timer5_slaves,
557 .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
558 .class = &omap2430_timer_hwmod_class,
559 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
560};
561
562/* timer6 */
563static struct omap_hwmod omap2430_timer6_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700564
Thara Gopinathb6b58222011-02-23 00:14:05 -0700565/* l4_core -> timer6 */
566static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
567 .master = &omap2430_l4_core_hwmod,
568 .slave = &omap2430_timer6_hwmod,
569 .clk = "gpt6_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600570 .addr = omap2xxx_timer6_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700571 .user = OCP_USER_MPU | OCP_USER_SDMA,
572};
573
574/* timer6 slave port */
575static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
576 &omap2430_l4_core__timer6,
577};
578
579/* timer6 hwmod */
580static struct omap_hwmod omap2430_timer6_hwmod = {
581 .name = "timer6",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600582 .mpu_irqs = omap2_timer6_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700583 .main_clk = "gpt6_fck",
584 .prcm = {
585 .omap2 = {
586 .prcm_reg_id = 1,
587 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
588 .module_offs = CORE_MOD,
589 .idlest_reg_id = 1,
590 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
591 },
592 },
593 .slaves = omap2430_timer6_slaves,
594 .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
595 .class = &omap2430_timer_hwmod_class,
596 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
597};
598
599/* timer7 */
600static struct omap_hwmod omap2430_timer7_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700601
Thara Gopinathb6b58222011-02-23 00:14:05 -0700602/* l4_core -> timer7 */
603static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
604 .master = &omap2430_l4_core_hwmod,
605 .slave = &omap2430_timer7_hwmod,
606 .clk = "gpt7_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600607 .addr = omap2xxx_timer7_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700608 .user = OCP_USER_MPU | OCP_USER_SDMA,
609};
610
611/* timer7 slave port */
612static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
613 &omap2430_l4_core__timer7,
614};
615
616/* timer7 hwmod */
617static struct omap_hwmod omap2430_timer7_hwmod = {
618 .name = "timer7",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600619 .mpu_irqs = omap2_timer7_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700620 .main_clk = "gpt7_fck",
621 .prcm = {
622 .omap2 = {
623 .prcm_reg_id = 1,
624 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
625 .module_offs = CORE_MOD,
626 .idlest_reg_id = 1,
627 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
628 },
629 },
630 .slaves = omap2430_timer7_slaves,
631 .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
632 .class = &omap2430_timer_hwmod_class,
633 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
634};
635
636/* timer8 */
637static struct omap_hwmod omap2430_timer8_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700638
Thara Gopinathb6b58222011-02-23 00:14:05 -0700639/* l4_core -> timer8 */
640static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
641 .master = &omap2430_l4_core_hwmod,
642 .slave = &omap2430_timer8_hwmod,
643 .clk = "gpt8_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600644 .addr = omap2xxx_timer8_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700645 .user = OCP_USER_MPU | OCP_USER_SDMA,
646};
647
648/* timer8 slave port */
649static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
650 &omap2430_l4_core__timer8,
651};
652
653/* timer8 hwmod */
654static struct omap_hwmod omap2430_timer8_hwmod = {
655 .name = "timer8",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600656 .mpu_irqs = omap2_timer8_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700657 .main_clk = "gpt8_fck",
658 .prcm = {
659 .omap2 = {
660 .prcm_reg_id = 1,
661 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
662 .module_offs = CORE_MOD,
663 .idlest_reg_id = 1,
664 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
665 },
666 },
667 .slaves = omap2430_timer8_slaves,
668 .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
669 .class = &omap2430_timer_hwmod_class,
670 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
671};
672
673/* timer9 */
674static struct omap_hwmod omap2430_timer9_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700675
Thara Gopinathb6b58222011-02-23 00:14:05 -0700676/* l4_core -> timer9 */
677static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
678 .master = &omap2430_l4_core_hwmod,
679 .slave = &omap2430_timer9_hwmod,
680 .clk = "gpt9_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600681 .addr = omap2xxx_timer9_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700682 .user = OCP_USER_MPU | OCP_USER_SDMA,
683};
684
685/* timer9 slave port */
686static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
687 &omap2430_l4_core__timer9,
688};
689
690/* timer9 hwmod */
691static struct omap_hwmod omap2430_timer9_hwmod = {
692 .name = "timer9",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600693 .mpu_irqs = omap2_timer9_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700694 .main_clk = "gpt9_fck",
695 .prcm = {
696 .omap2 = {
697 .prcm_reg_id = 1,
698 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
699 .module_offs = CORE_MOD,
700 .idlest_reg_id = 1,
701 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
702 },
703 },
704 .slaves = omap2430_timer9_slaves,
705 .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
706 .class = &omap2430_timer_hwmod_class,
707 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
708};
709
710/* timer10 */
711static struct omap_hwmod omap2430_timer10_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700712
Thara Gopinathb6b58222011-02-23 00:14:05 -0700713/* l4_core -> timer10 */
714static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
715 .master = &omap2430_l4_core_hwmod,
716 .slave = &omap2430_timer10_hwmod,
717 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600718 .addr = omap2_timer10_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700719 .user = OCP_USER_MPU | OCP_USER_SDMA,
720};
721
722/* timer10 slave port */
723static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
724 &omap2430_l4_core__timer10,
725};
726
727/* timer10 hwmod */
728static struct omap_hwmod omap2430_timer10_hwmod = {
729 .name = "timer10",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600730 .mpu_irqs = omap2_timer10_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700731 .main_clk = "gpt10_fck",
732 .prcm = {
733 .omap2 = {
734 .prcm_reg_id = 1,
735 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
736 .module_offs = CORE_MOD,
737 .idlest_reg_id = 1,
738 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
739 },
740 },
741 .slaves = omap2430_timer10_slaves,
742 .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
743 .class = &omap2430_timer_hwmod_class,
744 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
745};
746
747/* timer11 */
748static struct omap_hwmod omap2430_timer11_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700749
Thara Gopinathb6b58222011-02-23 00:14:05 -0700750/* l4_core -> timer11 */
751static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
752 .master = &omap2430_l4_core_hwmod,
753 .slave = &omap2430_timer11_hwmod,
754 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600755 .addr = omap2_timer11_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700756 .user = OCP_USER_MPU | OCP_USER_SDMA,
757};
758
759/* timer11 slave port */
760static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
761 &omap2430_l4_core__timer11,
762};
763
764/* timer11 hwmod */
765static struct omap_hwmod omap2430_timer11_hwmod = {
766 .name = "timer11",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600767 .mpu_irqs = omap2_timer11_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700768 .main_clk = "gpt11_fck",
769 .prcm = {
770 .omap2 = {
771 .prcm_reg_id = 1,
772 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
773 .module_offs = CORE_MOD,
774 .idlest_reg_id = 1,
775 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
776 },
777 },
778 .slaves = omap2430_timer11_slaves,
779 .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
780 .class = &omap2430_timer_hwmod_class,
781 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
782};
783
784/* timer12 */
785static struct omap_hwmod omap2430_timer12_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700786
Thara Gopinathb6b58222011-02-23 00:14:05 -0700787/* l4_core -> timer12 */
788static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
789 .master = &omap2430_l4_core_hwmod,
790 .slave = &omap2430_timer12_hwmod,
791 .clk = "gpt12_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600792 .addr = omap2xxx_timer12_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700793 .user = OCP_USER_MPU | OCP_USER_SDMA,
794};
795
796/* timer12 slave port */
797static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
798 &omap2430_l4_core__timer12,
799};
800
801/* timer12 hwmod */
802static struct omap_hwmod omap2430_timer12_hwmod = {
803 .name = "timer12",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600804 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700805 .main_clk = "gpt12_fck",
806 .prcm = {
807 .omap2 = {
808 .prcm_reg_id = 1,
809 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
810 .module_offs = CORE_MOD,
811 .idlest_reg_id = 1,
812 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
813 },
814 },
815 .slaves = omap2430_timer12_slaves,
816 .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
817 .class = &omap2430_timer_hwmod_class,
818 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
819};
820
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530821/* l4_wkup -> wd_timer2 */
822static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
823 {
824 .pa_start = 0x49016000,
825 .pa_end = 0x4901607f,
826 .flags = ADDR_TYPE_RT
827 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600828 { }
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530829};
830
831static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
832 .master = &omap2430_l4_wkup_hwmod,
833 .slave = &omap2430_wd_timer2_hwmod,
834 .clk = "mpu_wdt_ick",
835 .addr = omap2430_wd_timer2_addrs,
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530836 .user = OCP_USER_MPU | OCP_USER_SDMA,
837};
838
839/*
840 * 'wd_timer' class
841 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
842 * overflow condition
843 */
844
845static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
846 .rev_offs = 0x0,
847 .sysc_offs = 0x0010,
848 .syss_offs = 0x0014,
849 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -0700850 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530851 .sysc_fields = &omap_hwmod_sysc_type1,
852};
853
854static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
Paul Walmsleyff2516f2010-12-21 15:39:15 -0700855 .name = "wd_timer",
856 .sysc = &omap2430_wd_timer_sysc,
857 .pre_shutdown = &omap2_wd_timer_disable
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530858};
859
860/* wd_timer2 */
861static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
862 &omap2430_l4_wkup__wd_timer2,
863};
864
865static struct omap_hwmod omap2430_wd_timer2_hwmod = {
866 .name = "wd_timer2",
867 .class = &omap2430_wd_timer_hwmod_class,
868 .main_clk = "mpu_wdt_fck",
869 .prcm = {
870 .omap2 = {
871 .prcm_reg_id = 1,
872 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
873 .module_offs = WKUP_MOD,
874 .idlest_reg_id = 1,
875 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
876 },
877 },
878 .slaves = omap2430_wd_timer2_slaves,
879 .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
880 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
881};
882
Kevin Hilman046465b2010-09-27 20:19:30 +0530883/* UART */
884
885static struct omap_hwmod_class_sysconfig uart_sysc = {
886 .rev_offs = 0x50,
887 .sysc_offs = 0x54,
888 .syss_offs = 0x58,
889 .sysc_flags = (SYSC_HAS_SIDLEMODE |
890 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -0700891 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
Kevin Hilman046465b2010-09-27 20:19:30 +0530892 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
893 .sysc_fields = &omap_hwmod_sysc_type1,
894};
895
896static struct omap_hwmod_class uart_class = {
897 .name = "uart",
898 .sysc = &uart_sysc,
899};
900
901/* UART1 */
902
Kevin Hilman046465b2010-09-27 20:19:30 +0530903static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
904 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
905 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
906};
907
908static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
909 &omap2_l4_core__uart1,
910};
911
912static struct omap_hwmod omap2430_uart1_hwmod = {
913 .name = "uart1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600914 .mpu_irqs = omap2_uart1_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530915 .sdma_reqs = uart1_sdma_reqs,
916 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
917 .main_clk = "uart1_fck",
918 .prcm = {
919 .omap2 = {
920 .module_offs = CORE_MOD,
921 .prcm_reg_id = 1,
922 .module_bit = OMAP24XX_EN_UART1_SHIFT,
923 .idlest_reg_id = 1,
924 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
925 },
926 },
927 .slaves = omap2430_uart1_slaves,
928 .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
929 .class = &uart_class,
930 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
931};
932
933/* UART2 */
934
Kevin Hilman046465b2010-09-27 20:19:30 +0530935static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
936 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
937 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
938};
939
940static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
941 &omap2_l4_core__uart2,
942};
943
944static struct omap_hwmod omap2430_uart2_hwmod = {
945 .name = "uart2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600946 .mpu_irqs = omap2_uart2_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530947 .sdma_reqs = uart2_sdma_reqs,
948 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
949 .main_clk = "uart2_fck",
950 .prcm = {
951 .omap2 = {
952 .module_offs = CORE_MOD,
953 .prcm_reg_id = 1,
954 .module_bit = OMAP24XX_EN_UART2_SHIFT,
955 .idlest_reg_id = 1,
956 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
957 },
958 },
959 .slaves = omap2430_uart2_slaves,
960 .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
961 .class = &uart_class,
962 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
963};
964
965/* UART3 */
966
Kevin Hilman046465b2010-09-27 20:19:30 +0530967static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
968 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
969 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
970};
971
972static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
973 &omap2_l4_core__uart3,
974};
975
976static struct omap_hwmod omap2430_uart3_hwmod = {
977 .name = "uart3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600978 .mpu_irqs = omap2_uart3_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530979 .sdma_reqs = uart3_sdma_reqs,
980 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
981 .main_clk = "uart3_fck",
982 .prcm = {
983 .omap2 = {
984 .module_offs = CORE_MOD,
985 .prcm_reg_id = 2,
986 .module_bit = OMAP24XX_EN_UART3_SHIFT,
987 .idlest_reg_id = 2,
988 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
989 },
990 },
991 .slaves = omap2430_uart3_slaves,
992 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
993 .class = &uart_class,
994 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
995};
996
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200997/*
998 * 'dss' class
999 * display sub-system
1000 */
1001
1002static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
1003 .rev_offs = 0x0000,
1004 .sysc_offs = 0x0010,
1005 .syss_offs = 0x0014,
1006 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1007 .sysc_fields = &omap_hwmod_sysc_type1,
1008};
1009
1010static struct omap_hwmod_class omap2430_dss_hwmod_class = {
1011 .name = "dss",
1012 .sysc = &omap2430_dss_sysc,
1013};
1014
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001015static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
1016 { .name = "dispc", .dma_req = 5 },
1017};
1018
1019/* dss */
1020/* dss master ports */
1021static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
1022 &omap2430_dss__l3,
1023};
1024
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001025/* l4_core -> dss */
1026static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
1027 .master = &omap2430_l4_core_hwmod,
1028 .slave = &omap2430_dss_core_hwmod,
1029 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001030 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001031 .user = OCP_USER_MPU | OCP_USER_SDMA,
1032};
1033
1034/* dss slave ports */
1035static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
1036 &omap2430_l4_core__dss,
1037};
1038
1039static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1040 { .role = "tv_clk", .clk = "dss_54m_fck" },
1041 { .role = "sys_clk", .clk = "dss2_fck" },
1042};
1043
1044static struct omap_hwmod omap2430_dss_core_hwmod = {
1045 .name = "dss_core",
1046 .class = &omap2430_dss_hwmod_class,
1047 .main_clk = "dss1_fck", /* instead of dss_fck */
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001048 .sdma_reqs = omap2430_dss_sdma_chs,
1049 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs),
1050 .prcm = {
1051 .omap2 = {
1052 .prcm_reg_id = 1,
1053 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1054 .module_offs = CORE_MOD,
1055 .idlest_reg_id = 1,
1056 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1057 },
1058 },
1059 .opt_clks = dss_opt_clks,
1060 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1061 .slaves = omap2430_dss_slaves,
1062 .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
1063 .masters = omap2430_dss_masters,
1064 .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
1065 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1066 .flags = HWMOD_NO_IDLEST,
1067};
1068
1069/*
1070 * 'dispc' class
1071 * display controller
1072 */
1073
1074static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
1075 .rev_offs = 0x0000,
1076 .sysc_offs = 0x0010,
1077 .syss_offs = 0x0014,
1078 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
1079 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1080 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1081 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1082 .sysc_fields = &omap_hwmod_sysc_type1,
1083};
1084
1085static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
1086 .name = "dispc",
1087 .sysc = &omap2430_dispc_sysc,
1088};
1089
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001090/* l4_core -> dss_dispc */
1091static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
1092 .master = &omap2430_l4_core_hwmod,
1093 .slave = &omap2430_dss_dispc_hwmod,
1094 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001095 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001096 .user = OCP_USER_MPU | OCP_USER_SDMA,
1097};
1098
1099/* dss_dispc slave ports */
1100static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
1101 &omap2430_l4_core__dss_dispc,
1102};
1103
1104static struct omap_hwmod omap2430_dss_dispc_hwmod = {
1105 .name = "dss_dispc",
1106 .class = &omap2430_dispc_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001107 .mpu_irqs = omap2_dispc_irqs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001108 .main_clk = "dss1_fck",
1109 .prcm = {
1110 .omap2 = {
1111 .prcm_reg_id = 1,
1112 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1113 .module_offs = CORE_MOD,
1114 .idlest_reg_id = 1,
1115 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1116 },
1117 },
1118 .slaves = omap2430_dss_dispc_slaves,
1119 .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
1120 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1121 .flags = HWMOD_NO_IDLEST,
1122};
1123
1124/*
1125 * 'rfbi' class
1126 * remote frame buffer interface
1127 */
1128
1129static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
1130 .rev_offs = 0x0000,
1131 .sysc_offs = 0x0010,
1132 .syss_offs = 0x0014,
1133 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1134 SYSC_HAS_AUTOIDLE),
1135 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1136 .sysc_fields = &omap_hwmod_sysc_type1,
1137};
1138
1139static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
1140 .name = "rfbi",
1141 .sysc = &omap2430_rfbi_sysc,
1142};
1143
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001144/* l4_core -> dss_rfbi */
1145static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
1146 .master = &omap2430_l4_core_hwmod,
1147 .slave = &omap2430_dss_rfbi_hwmod,
1148 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001149 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001150 .user = OCP_USER_MPU | OCP_USER_SDMA,
1151};
1152
1153/* dss_rfbi slave ports */
1154static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
1155 &omap2430_l4_core__dss_rfbi,
1156};
1157
1158static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
1159 .name = "dss_rfbi",
1160 .class = &omap2430_rfbi_hwmod_class,
1161 .main_clk = "dss1_fck",
1162 .prcm = {
1163 .omap2 = {
1164 .prcm_reg_id = 1,
1165 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1166 .module_offs = CORE_MOD,
1167 },
1168 },
1169 .slaves = omap2430_dss_rfbi_slaves,
1170 .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
1171 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1172 .flags = HWMOD_NO_IDLEST,
1173};
1174
1175/*
1176 * 'venc' class
1177 * video encoder
1178 */
1179
1180static struct omap_hwmod_class omap2430_venc_hwmod_class = {
1181 .name = "venc",
1182};
1183
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001184/* l4_core -> dss_venc */
1185static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
1186 .master = &omap2430_l4_core_hwmod,
1187 .slave = &omap2430_dss_venc_hwmod,
1188 .clk = "dss_54m_fck",
Paul Walmsleyded11382011-07-09 19:14:06 -06001189 .addr = omap2_dss_venc_addrs,
Paul Walmsleyc39bee82011-03-04 06:02:15 +00001190 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001191 .user = OCP_USER_MPU | OCP_USER_SDMA,
1192};
1193
1194/* dss_venc slave ports */
1195static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
1196 &omap2430_l4_core__dss_venc,
1197};
1198
1199static struct omap_hwmod omap2430_dss_venc_hwmod = {
1200 .name = "dss_venc",
1201 .class = &omap2430_venc_hwmod_class,
1202 .main_clk = "dss1_fck",
1203 .prcm = {
1204 .omap2 = {
1205 .prcm_reg_id = 1,
1206 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1207 .module_offs = CORE_MOD,
1208 },
1209 },
1210 .slaves = omap2430_dss_venc_slaves,
1211 .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
1212 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1213 .flags = HWMOD_NO_IDLEST,
1214};
1215
Paul Walmsley20042902010-09-30 02:40:12 +05301216/* I2C common */
1217static struct omap_hwmod_class_sysconfig i2c_sysc = {
1218 .rev_offs = 0x00,
1219 .sysc_offs = 0x20,
1220 .syss_offs = 0x10,
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001221 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1222 SYSS_HAS_RESET_STATUS),
Paul Walmsley20042902010-09-30 02:40:12 +05301223 .sysc_fields = &omap_hwmod_sysc_type1,
1224};
1225
1226static struct omap_hwmod_class i2c_class = {
1227 .name = "i2c",
1228 .sysc = &i2c_sysc,
1229};
1230
Benoit Cousson50ebb772010-12-21 21:08:34 -07001231static struct omap_i2c_dev_attr i2c_dev_attr = {
Paul Walmsley20042902010-09-30 02:40:12 +05301232 .fifo_depth = 8, /* bytes */
1233};
1234
Benoit Cousson50ebb772010-12-21 21:08:34 -07001235/* I2C1 */
1236
Paul Walmsley20042902010-09-30 02:40:12 +05301237static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
1238 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
1239 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
1240};
1241
1242static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
1243 &omap2430_l4_core__i2c1,
1244};
1245
1246static struct omap_hwmod omap2430_i2c1_hwmod = {
1247 .name = "i2c1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001248 .mpu_irqs = omap2_i2c1_mpu_irqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301249 .sdma_reqs = i2c1_sdma_reqs,
1250 .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
1251 .main_clk = "i2chs1_fck",
1252 .prcm = {
1253 .omap2 = {
1254 /*
1255 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
1256 * I2CHS IP's do not follow the usual pattern.
1257 * prcm_reg_id alone cannot be used to program
1258 * the iclk and fclk. Needs to be handled using
Lucas De Marchi25985ed2011-03-30 22:57:33 -03001259 * additional flags when clk handling is moved
Paul Walmsley20042902010-09-30 02:40:12 +05301260 * to hwmod framework.
1261 */
1262 .module_offs = CORE_MOD,
1263 .prcm_reg_id = 1,
1264 .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
1265 .idlest_reg_id = 1,
1266 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
1267 },
1268 },
1269 .slaves = omap2430_i2c1_slaves,
1270 .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
1271 .class = &i2c_class,
Benoit Cousson50ebb772010-12-21 21:08:34 -07001272 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301273 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1274};
1275
1276/* I2C2 */
1277
Paul Walmsley20042902010-09-30 02:40:12 +05301278static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
1279 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
1280 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
1281};
1282
1283static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
1284 &omap2430_l4_core__i2c2,
1285};
1286
1287static struct omap_hwmod omap2430_i2c2_hwmod = {
1288 .name = "i2c2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001289 .mpu_irqs = omap2_i2c2_mpu_irqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301290 .sdma_reqs = i2c2_sdma_reqs,
1291 .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
1292 .main_clk = "i2chs2_fck",
1293 .prcm = {
1294 .omap2 = {
1295 .module_offs = CORE_MOD,
1296 .prcm_reg_id = 1,
1297 .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
1298 .idlest_reg_id = 1,
1299 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
1300 },
1301 },
1302 .slaves = omap2430_i2c2_slaves,
1303 .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
1304 .class = &i2c_class,
Benoit Cousson50ebb772010-12-21 21:08:34 -07001305 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301306 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1307};
1308
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001309/* l4_wkup -> gpio1 */
1310static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
1311 {
1312 .pa_start = 0x4900C000,
1313 .pa_end = 0x4900C1ff,
1314 .flags = ADDR_TYPE_RT
1315 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001316 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001317};
1318
1319static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
1320 .master = &omap2430_l4_wkup_hwmod,
1321 .slave = &omap2430_gpio1_hwmod,
1322 .clk = "gpios_ick",
1323 .addr = omap2430_gpio1_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001324 .user = OCP_USER_MPU | OCP_USER_SDMA,
1325};
1326
1327/* l4_wkup -> gpio2 */
1328static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
1329 {
1330 .pa_start = 0x4900E000,
1331 .pa_end = 0x4900E1ff,
1332 .flags = ADDR_TYPE_RT
1333 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001334 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001335};
1336
1337static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
1338 .master = &omap2430_l4_wkup_hwmod,
1339 .slave = &omap2430_gpio2_hwmod,
1340 .clk = "gpios_ick",
1341 .addr = omap2430_gpio2_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001342 .user = OCP_USER_MPU | OCP_USER_SDMA,
1343};
1344
1345/* l4_wkup -> gpio3 */
1346static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
1347 {
1348 .pa_start = 0x49010000,
1349 .pa_end = 0x490101ff,
1350 .flags = ADDR_TYPE_RT
1351 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001352 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001353};
1354
1355static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
1356 .master = &omap2430_l4_wkup_hwmod,
1357 .slave = &omap2430_gpio3_hwmod,
1358 .clk = "gpios_ick",
1359 .addr = omap2430_gpio3_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001360 .user = OCP_USER_MPU | OCP_USER_SDMA,
1361};
1362
1363/* l4_wkup -> gpio4 */
1364static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
1365 {
1366 .pa_start = 0x49012000,
1367 .pa_end = 0x490121ff,
1368 .flags = ADDR_TYPE_RT
1369 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001370 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001371};
1372
1373static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
1374 .master = &omap2430_l4_wkup_hwmod,
1375 .slave = &omap2430_gpio4_hwmod,
1376 .clk = "gpios_ick",
1377 .addr = omap2430_gpio4_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001378 .user = OCP_USER_MPU | OCP_USER_SDMA,
1379};
1380
1381/* l4_core -> gpio5 */
1382static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
1383 {
1384 .pa_start = 0x480B6000,
1385 .pa_end = 0x480B61ff,
1386 .flags = ADDR_TYPE_RT
1387 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001388 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001389};
1390
1391static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
1392 .master = &omap2430_l4_core_hwmod,
1393 .slave = &omap2430_gpio5_hwmod,
1394 .clk = "gpio5_ick",
1395 .addr = omap2430_gpio5_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001396 .user = OCP_USER_MPU | OCP_USER_SDMA,
1397};
1398
1399/* gpio dev_attr */
1400static struct omap_gpio_dev_attr gpio_dev_attr = {
1401 .bank_width = 32,
1402 .dbck_flag = false,
1403};
1404
1405static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
1406 .rev_offs = 0x0000,
1407 .sysc_offs = 0x0010,
1408 .syss_offs = 0x0014,
1409 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001410 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1411 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001412 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1413 .sysc_fields = &omap_hwmod_sysc_type1,
1414};
1415
1416/*
1417 * 'gpio' class
1418 * general purpose io module
1419 */
1420static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
1421 .name = "gpio",
1422 .sysc = &omap243x_gpio_sysc,
1423 .rev = 0,
1424};
1425
1426/* gpio1 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001427static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1428 &omap2430_l4_wkup__gpio1,
1429};
1430
1431static struct omap_hwmod omap2430_gpio1_hwmod = {
1432 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301433 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001434 .mpu_irqs = omap2_gpio1_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001435 .main_clk = "gpios_fck",
1436 .prcm = {
1437 .omap2 = {
1438 .prcm_reg_id = 1,
1439 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1440 .module_offs = WKUP_MOD,
1441 .idlest_reg_id = 1,
1442 .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
1443 },
1444 },
1445 .slaves = omap2430_gpio1_slaves,
1446 .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
1447 .class = &omap243x_gpio_hwmod_class,
1448 .dev_attr = &gpio_dev_attr,
1449 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1450};
1451
1452/* gpio2 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001453static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1454 &omap2430_l4_wkup__gpio2,
1455};
1456
1457static struct omap_hwmod omap2430_gpio2_hwmod = {
1458 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301459 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001460 .mpu_irqs = omap2_gpio2_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001461 .main_clk = "gpios_fck",
1462 .prcm = {
1463 .omap2 = {
1464 .prcm_reg_id = 1,
1465 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1466 .module_offs = WKUP_MOD,
1467 .idlest_reg_id = 1,
1468 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1469 },
1470 },
1471 .slaves = omap2430_gpio2_slaves,
1472 .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
1473 .class = &omap243x_gpio_hwmod_class,
1474 .dev_attr = &gpio_dev_attr,
1475 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1476};
1477
1478/* gpio3 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001479static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1480 &omap2430_l4_wkup__gpio3,
1481};
1482
1483static struct omap_hwmod omap2430_gpio3_hwmod = {
1484 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301485 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001486 .mpu_irqs = omap2_gpio3_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001487 .main_clk = "gpios_fck",
1488 .prcm = {
1489 .omap2 = {
1490 .prcm_reg_id = 1,
1491 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1492 .module_offs = WKUP_MOD,
1493 .idlest_reg_id = 1,
1494 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1495 },
1496 },
1497 .slaves = omap2430_gpio3_slaves,
1498 .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
1499 .class = &omap243x_gpio_hwmod_class,
1500 .dev_attr = &gpio_dev_attr,
1501 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1502};
1503
1504/* gpio4 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001505static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1506 &omap2430_l4_wkup__gpio4,
1507};
1508
1509static struct omap_hwmod omap2430_gpio4_hwmod = {
1510 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301511 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001512 .mpu_irqs = omap2_gpio4_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001513 .main_clk = "gpios_fck",
1514 .prcm = {
1515 .omap2 = {
1516 .prcm_reg_id = 1,
1517 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1518 .module_offs = WKUP_MOD,
1519 .idlest_reg_id = 1,
1520 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1521 },
1522 },
1523 .slaves = omap2430_gpio4_slaves,
1524 .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
1525 .class = &omap243x_gpio_hwmod_class,
1526 .dev_attr = &gpio_dev_attr,
1527 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1528};
1529
1530/* gpio5 */
1531static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
1532 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
Paul Walmsley212738a2011-07-09 19:14:06 -06001533 { .irq = -1 }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001534};
1535
1536static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
1537 &omap2430_l4_core__gpio5,
1538};
1539
1540static struct omap_hwmod omap2430_gpio5_hwmod = {
1541 .name = "gpio5",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301542 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001543 .mpu_irqs = omap243x_gpio5_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001544 .main_clk = "gpio5_fck",
1545 .prcm = {
1546 .omap2 = {
1547 .prcm_reg_id = 2,
1548 .module_bit = OMAP2430_EN_GPIO5_SHIFT,
1549 .module_offs = CORE_MOD,
1550 .idlest_reg_id = 2,
1551 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
1552 },
1553 },
1554 .slaves = omap2430_gpio5_slaves,
1555 .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
1556 .class = &omap243x_gpio_hwmod_class,
1557 .dev_attr = &gpio_dev_attr,
1558 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1559};
1560
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001561/* dma_system */
1562static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
1563 .rev_offs = 0x0000,
1564 .sysc_offs = 0x002c,
1565 .syss_offs = 0x0028,
1566 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
1567 SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001568 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001569 .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1570 .sysc_fields = &omap_hwmod_sysc_type1,
1571};
1572
1573static struct omap_hwmod_class omap2430_dma_hwmod_class = {
1574 .name = "dma",
1575 .sysc = &omap2430_dma_sysc,
1576};
1577
1578/* dma attributes */
1579static struct omap_dma_dev_attr dma_dev_attr = {
1580 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1581 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1582 .lch_count = 32,
1583};
1584
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001585/* dma_system -> L3 */
1586static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
1587 .master = &omap2430_dma_system_hwmod,
1588 .slave = &omap2430_l3_main_hwmod,
1589 .clk = "core_l3_ck",
1590 .user = OCP_USER_MPU | OCP_USER_SDMA,
1591};
1592
1593/* dma_system master ports */
1594static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
1595 &omap2430_dma_system__l3,
1596};
1597
1598/* l4_core -> dma_system */
1599static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
1600 .master = &omap2430_l4_core_hwmod,
1601 .slave = &omap2430_dma_system_hwmod,
1602 .clk = "sdma_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001603 .addr = omap2_dma_system_addrs,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001604 .user = OCP_USER_MPU | OCP_USER_SDMA,
1605};
1606
1607/* dma_system slave ports */
1608static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
1609 &omap2430_l4_core__dma_system,
1610};
1611
1612static struct omap_hwmod omap2430_dma_system_hwmod = {
1613 .name = "dma",
1614 .class = &omap2430_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001615 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001616 .main_clk = "core_l3_ck",
1617 .slaves = omap2430_dma_system_slaves,
1618 .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
1619 .masters = omap2430_dma_system_masters,
1620 .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
1621 .dev_attr = &dma_dev_attr,
1622 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1623 .flags = HWMOD_NO_IDLEST,
1624};
1625
Charulatha V7f904c72011-02-17 09:53:10 -08001626/*
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001627 * 'mailbox' class
1628 * mailbox module allowing communication between the on-chip processors
1629 * using a queued mailbox-interrupt mechanism.
1630 */
1631
1632static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
1633 .rev_offs = 0x000,
1634 .sysc_offs = 0x010,
1635 .syss_offs = 0x014,
1636 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1637 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1638 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1639 .sysc_fields = &omap_hwmod_sysc_type1,
1640};
1641
1642static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
1643 .name = "mailbox",
1644 .sysc = &omap2430_mailbox_sysc,
1645};
1646
1647/* mailbox */
1648static struct omap_hwmod omap2430_mailbox_hwmod;
1649static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1650 { .irq = 26 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001651 { .irq = -1 }
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001652};
1653
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001654/* l4_core -> mailbox */
1655static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
1656 .master = &omap2430_l4_core_hwmod,
1657 .slave = &omap2430_mailbox_hwmod,
Paul Walmsleyded11382011-07-09 19:14:06 -06001658 .addr = omap2_mailbox_addrs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001659 .user = OCP_USER_MPU | OCP_USER_SDMA,
1660};
1661
1662/* mailbox slave ports */
1663static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
1664 &omap2430_l4_core__mailbox,
1665};
1666
1667static struct omap_hwmod omap2430_mailbox_hwmod = {
1668 .name = "mailbox",
1669 .class = &omap2430_mailbox_hwmod_class,
1670 .mpu_irqs = omap2430_mailbox_irqs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001671 .main_clk = "mailboxes_ick",
1672 .prcm = {
1673 .omap2 = {
1674 .prcm_reg_id = 1,
1675 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1676 .module_offs = CORE_MOD,
1677 .idlest_reg_id = 1,
1678 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1679 },
1680 },
1681 .slaves = omap2430_mailbox_slaves,
1682 .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
1683 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1684};
1685
1686/*
Charulatha V7f904c72011-02-17 09:53:10 -08001687 * 'mcspi' class
1688 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1689 * bus
1690 */
1691
1692static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
1693 .rev_offs = 0x0000,
1694 .sysc_offs = 0x0010,
1695 .syss_offs = 0x0014,
1696 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1697 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1698 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1699 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1700 .sysc_fields = &omap_hwmod_sysc_type1,
1701};
1702
1703static struct omap_hwmod_class omap2430_mcspi_class = {
1704 .name = "mcspi",
1705 .sysc = &omap2430_mcspi_sysc,
1706 .rev = OMAP2_MCSPI_REV,
1707};
1708
1709/* mcspi1 */
Charulatha V7f904c72011-02-17 09:53:10 -08001710static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
1711 { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
1712 { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
1713 { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
1714 { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
1715 { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
1716 { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
1717 { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
1718 { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
1719};
1720
1721static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
1722 &omap2430_l4_core__mcspi1,
1723};
1724
1725static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1726 .num_chipselect = 4,
1727};
1728
1729static struct omap_hwmod omap2430_mcspi1_hwmod = {
1730 .name = "mcspi1_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001731 .mpu_irqs = omap2_mcspi1_mpu_irqs,
Charulatha V7f904c72011-02-17 09:53:10 -08001732 .sdma_reqs = omap2430_mcspi1_sdma_reqs,
1733 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
1734 .main_clk = "mcspi1_fck",
1735 .prcm = {
1736 .omap2 = {
1737 .module_offs = CORE_MOD,
1738 .prcm_reg_id = 1,
1739 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1740 .idlest_reg_id = 1,
1741 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1742 },
1743 },
1744 .slaves = omap2430_mcspi1_slaves,
1745 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
1746 .class = &omap2430_mcspi_class,
1747 .dev_attr = &omap_mcspi1_dev_attr,
1748 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1749};
1750
1751/* mcspi2 */
Charulatha V7f904c72011-02-17 09:53:10 -08001752static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
1753 { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
1754 { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
1755 { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
1756 { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
1757};
1758
1759static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
1760 &omap2430_l4_core__mcspi2,
1761};
1762
1763static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1764 .num_chipselect = 2,
1765};
1766
1767static struct omap_hwmod omap2430_mcspi2_hwmod = {
1768 .name = "mcspi2_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001769 .mpu_irqs = omap2_mcspi2_mpu_irqs,
Charulatha V7f904c72011-02-17 09:53:10 -08001770 .sdma_reqs = omap2430_mcspi2_sdma_reqs,
1771 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
1772 .main_clk = "mcspi2_fck",
1773 .prcm = {
1774 .omap2 = {
1775 .module_offs = CORE_MOD,
1776 .prcm_reg_id = 1,
1777 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1778 .idlest_reg_id = 1,
1779 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1780 },
1781 },
1782 .slaves = omap2430_mcspi2_slaves,
1783 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
1784 .class = &omap2430_mcspi_class,
1785 .dev_attr = &omap_mcspi2_dev_attr,
1786 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1787};
1788
1789/* mcspi3 */
1790static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
1791 { .irq = 91 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001792 { .irq = -1 }
Charulatha V7f904c72011-02-17 09:53:10 -08001793};
1794
1795static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
1796 { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
1797 { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
1798 { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
1799 { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
1800};
1801
1802static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
1803 &omap2430_l4_core__mcspi3,
1804};
1805
1806static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1807 .num_chipselect = 2,
1808};
1809
1810static struct omap_hwmod omap2430_mcspi3_hwmod = {
1811 .name = "mcspi3_hwmod",
1812 .mpu_irqs = omap2430_mcspi3_mpu_irqs,
Charulatha V7f904c72011-02-17 09:53:10 -08001813 .sdma_reqs = omap2430_mcspi3_sdma_reqs,
1814 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
1815 .main_clk = "mcspi3_fck",
1816 .prcm = {
1817 .omap2 = {
1818 .module_offs = CORE_MOD,
1819 .prcm_reg_id = 2,
1820 .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
1821 .idlest_reg_id = 2,
1822 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
1823 },
1824 },
1825 .slaves = omap2430_mcspi3_slaves,
1826 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
1827 .class = &omap2430_mcspi_class,
1828 .dev_attr = &omap_mcspi3_dev_attr,
1829 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1830};
1831
Tony Lindgren04aa67d2011-02-22 10:54:12 -08001832/*
Hema HK44d02ac2011-02-17 12:07:17 +05301833 * usbhsotg
1834 */
1835static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
1836 .rev_offs = 0x0400,
1837 .sysc_offs = 0x0404,
1838 .syss_offs = 0x0408,
1839 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1840 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1841 SYSC_HAS_AUTOIDLE),
1842 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1843 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1844 .sysc_fields = &omap_hwmod_sysc_type1,
1845};
1846
1847static struct omap_hwmod_class usbotg_class = {
1848 .name = "usbotg",
1849 .sysc = &omap2430_usbhsotg_sysc,
1850};
1851
1852/* usb_otg_hs */
1853static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
1854
1855 { .name = "mc", .irq = 92 },
1856 { .name = "dma", .irq = 93 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001857 { .irq = -1 }
Hema HK44d02ac2011-02-17 12:07:17 +05301858};
1859
1860static struct omap_hwmod omap2430_usbhsotg_hwmod = {
1861 .name = "usb_otg_hs",
1862 .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
Hema HK44d02ac2011-02-17 12:07:17 +05301863 .main_clk = "usbhs_ick",
1864 .prcm = {
1865 .omap2 = {
1866 .prcm_reg_id = 1,
1867 .module_bit = OMAP2430_EN_USBHS_MASK,
1868 .module_offs = CORE_MOD,
1869 .idlest_reg_id = 1,
1870 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
1871 },
1872 },
1873 .masters = omap2430_usbhsotg_masters,
1874 .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
1875 .slaves = omap2430_usbhsotg_slaves,
1876 .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
1877 .class = &usbotg_class,
1878 /*
1879 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1880 * broken when autoidle is enabled
1881 * workaround is to disable the autoidle bit at module level.
1882 */
1883 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1884 | HWMOD_SWSUP_MSTANDBY,
1885 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
1886};
1887
Charulatha V37801b32011-02-24 12:51:46 -08001888/*
1889 * 'mcbsp' class
1890 * multi channel buffered serial port controller
1891 */
Tony Lindgren04aa67d2011-02-22 10:54:12 -08001892
Charulatha V37801b32011-02-24 12:51:46 -08001893static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
1894 .rev_offs = 0x007C,
1895 .sysc_offs = 0x008C,
1896 .sysc_flags = (SYSC_HAS_SOFTRESET),
1897 .sysc_fields = &omap_hwmod_sysc_type1,
1898};
1899
1900static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
1901 .name = "mcbsp",
1902 .sysc = &omap2430_mcbsp_sysc,
1903 .rev = MCBSP_CONFIG_TYPE2,
1904};
1905
1906/* mcbsp1 */
1907static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
1908 { .name = "tx", .irq = 59 },
1909 { .name = "rx", .irq = 60 },
1910 { .name = "ovr", .irq = 61 },
1911 { .name = "common", .irq = 64 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001912 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08001913};
1914
1915static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
1916 { .name = "rx", .dma_req = 32 },
1917 { .name = "tx", .dma_req = 31 },
1918};
1919
Charulatha V37801b32011-02-24 12:51:46 -08001920/* l4_core -> mcbsp1 */
1921static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
1922 .master = &omap2430_l4_core_hwmod,
1923 .slave = &omap2430_mcbsp1_hwmod,
1924 .clk = "mcbsp1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001925 .addr = omap2_mcbsp1_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08001926 .user = OCP_USER_MPU | OCP_USER_SDMA,
1927};
1928
1929/* mcbsp1 slave ports */
1930static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
1931 &omap2430_l4_core__mcbsp1,
1932};
1933
1934static struct omap_hwmod omap2430_mcbsp1_hwmod = {
1935 .name = "mcbsp1",
1936 .class = &omap2430_mcbsp_hwmod_class,
1937 .mpu_irqs = omap2430_mcbsp1_irqs,
Charulatha V37801b32011-02-24 12:51:46 -08001938 .sdma_reqs = omap2430_mcbsp1_sdma_chs,
1939 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
1940 .main_clk = "mcbsp1_fck",
1941 .prcm = {
1942 .omap2 = {
1943 .prcm_reg_id = 1,
1944 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1945 .module_offs = CORE_MOD,
1946 .idlest_reg_id = 1,
1947 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1948 },
1949 },
1950 .slaves = omap2430_mcbsp1_slaves,
1951 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
1952 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1953};
1954
1955/* mcbsp2 */
1956static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
1957 { .name = "tx", .irq = 62 },
1958 { .name = "rx", .irq = 63 },
1959 { .name = "common", .irq = 16 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001960 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08001961};
1962
1963static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
1964 { .name = "rx", .dma_req = 34 },
1965 { .name = "tx", .dma_req = 33 },
1966};
1967
Charulatha V37801b32011-02-24 12:51:46 -08001968/* l4_core -> mcbsp2 */
1969static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
1970 .master = &omap2430_l4_core_hwmod,
1971 .slave = &omap2430_mcbsp2_hwmod,
1972 .clk = "mcbsp2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001973 .addr = omap2xxx_mcbsp2_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08001974 .user = OCP_USER_MPU | OCP_USER_SDMA,
1975};
1976
1977/* mcbsp2 slave ports */
1978static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
1979 &omap2430_l4_core__mcbsp2,
1980};
1981
1982static struct omap_hwmod omap2430_mcbsp2_hwmod = {
1983 .name = "mcbsp2",
1984 .class = &omap2430_mcbsp_hwmod_class,
1985 .mpu_irqs = omap2430_mcbsp2_irqs,
Charulatha V37801b32011-02-24 12:51:46 -08001986 .sdma_reqs = omap2430_mcbsp2_sdma_chs,
1987 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
1988 .main_clk = "mcbsp2_fck",
1989 .prcm = {
1990 .omap2 = {
1991 .prcm_reg_id = 1,
1992 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1993 .module_offs = CORE_MOD,
1994 .idlest_reg_id = 1,
1995 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1996 },
1997 },
1998 .slaves = omap2430_mcbsp2_slaves,
1999 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
2000 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2001};
2002
2003/* mcbsp3 */
2004static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
2005 { .name = "tx", .irq = 89 },
2006 { .name = "rx", .irq = 90 },
2007 { .name = "common", .irq = 17 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002008 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08002009};
2010
2011static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
2012 { .name = "rx", .dma_req = 18 },
2013 { .name = "tx", .dma_req = 17 },
2014};
2015
2016static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
2017 {
2018 .name = "mpu",
2019 .pa_start = 0x4808C000,
2020 .pa_end = 0x4808C0ff,
2021 .flags = ADDR_TYPE_RT
2022 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002023 { }
Charulatha V37801b32011-02-24 12:51:46 -08002024};
2025
2026/* l4_core -> mcbsp3 */
2027static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
2028 .master = &omap2430_l4_core_hwmod,
2029 .slave = &omap2430_mcbsp3_hwmod,
2030 .clk = "mcbsp3_ick",
2031 .addr = omap2430_mcbsp3_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08002032 .user = OCP_USER_MPU | OCP_USER_SDMA,
2033};
2034
2035/* mcbsp3 slave ports */
2036static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
2037 &omap2430_l4_core__mcbsp3,
2038};
2039
2040static struct omap_hwmod omap2430_mcbsp3_hwmod = {
2041 .name = "mcbsp3",
2042 .class = &omap2430_mcbsp_hwmod_class,
2043 .mpu_irqs = omap2430_mcbsp3_irqs,
Charulatha V37801b32011-02-24 12:51:46 -08002044 .sdma_reqs = omap2430_mcbsp3_sdma_chs,
2045 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
2046 .main_clk = "mcbsp3_fck",
2047 .prcm = {
2048 .omap2 = {
2049 .prcm_reg_id = 1,
2050 .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
2051 .module_offs = CORE_MOD,
2052 .idlest_reg_id = 2,
2053 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
2054 },
2055 },
2056 .slaves = omap2430_mcbsp3_slaves,
2057 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
2058 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2059};
2060
2061/* mcbsp4 */
2062static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
2063 { .name = "tx", .irq = 54 },
2064 { .name = "rx", .irq = 55 },
2065 { .name = "common", .irq = 18 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002066 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08002067};
2068
2069static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
2070 { .name = "rx", .dma_req = 20 },
2071 { .name = "tx", .dma_req = 19 },
2072};
2073
2074static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
2075 {
2076 .name = "mpu",
2077 .pa_start = 0x4808E000,
2078 .pa_end = 0x4808E0ff,
2079 .flags = ADDR_TYPE_RT
2080 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002081 { }
Charulatha V37801b32011-02-24 12:51:46 -08002082};
2083
2084/* l4_core -> mcbsp4 */
2085static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
2086 .master = &omap2430_l4_core_hwmod,
2087 .slave = &omap2430_mcbsp4_hwmod,
2088 .clk = "mcbsp4_ick",
2089 .addr = omap2430_mcbsp4_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08002090 .user = OCP_USER_MPU | OCP_USER_SDMA,
2091};
2092
2093/* mcbsp4 slave ports */
2094static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
2095 &omap2430_l4_core__mcbsp4,
2096};
2097
2098static struct omap_hwmod omap2430_mcbsp4_hwmod = {
2099 .name = "mcbsp4",
2100 .class = &omap2430_mcbsp_hwmod_class,
2101 .mpu_irqs = omap2430_mcbsp4_irqs,
Charulatha V37801b32011-02-24 12:51:46 -08002102 .sdma_reqs = omap2430_mcbsp4_sdma_chs,
2103 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
2104 .main_clk = "mcbsp4_fck",
2105 .prcm = {
2106 .omap2 = {
2107 .prcm_reg_id = 1,
2108 .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
2109 .module_offs = CORE_MOD,
2110 .idlest_reg_id = 2,
2111 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
2112 },
2113 },
2114 .slaves = omap2430_mcbsp4_slaves,
2115 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
2116 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2117};
2118
2119/* mcbsp5 */
2120static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
2121 { .name = "tx", .irq = 81 },
2122 { .name = "rx", .irq = 82 },
2123 { .name = "common", .irq = 19 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002124 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08002125};
2126
2127static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
2128 { .name = "rx", .dma_req = 22 },
2129 { .name = "tx", .dma_req = 21 },
2130};
2131
2132static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
2133 {
2134 .name = "mpu",
2135 .pa_start = 0x48096000,
2136 .pa_end = 0x480960ff,
2137 .flags = ADDR_TYPE_RT
2138 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002139 { }
Charulatha V37801b32011-02-24 12:51:46 -08002140};
2141
2142/* l4_core -> mcbsp5 */
2143static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
2144 .master = &omap2430_l4_core_hwmod,
2145 .slave = &omap2430_mcbsp5_hwmod,
2146 .clk = "mcbsp5_ick",
2147 .addr = omap2430_mcbsp5_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08002148 .user = OCP_USER_MPU | OCP_USER_SDMA,
2149};
2150
2151/* mcbsp5 slave ports */
2152static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
2153 &omap2430_l4_core__mcbsp5,
2154};
2155
2156static struct omap_hwmod omap2430_mcbsp5_hwmod = {
2157 .name = "mcbsp5",
2158 .class = &omap2430_mcbsp_hwmod_class,
2159 .mpu_irqs = omap2430_mcbsp5_irqs,
Charulatha V37801b32011-02-24 12:51:46 -08002160 .sdma_reqs = omap2430_mcbsp5_sdma_chs,
2161 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
2162 .main_clk = "mcbsp5_fck",
2163 .prcm = {
2164 .omap2 = {
2165 .prcm_reg_id = 1,
2166 .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
2167 .module_offs = CORE_MOD,
2168 .idlest_reg_id = 2,
2169 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
2170 },
2171 },
2172 .slaves = omap2430_mcbsp5_slaves,
2173 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
2174 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2175};
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002176
Paul Walmsleybce06f32011-03-01 13:12:55 -08002177/* MMC/SD/SDIO common */
2178
2179static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
2180 .rev_offs = 0x1fc,
2181 .sysc_offs = 0x10,
2182 .syss_offs = 0x14,
2183 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2184 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2185 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2186 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2187 .sysc_fields = &omap_hwmod_sysc_type1,
2188};
2189
2190static struct omap_hwmod_class omap2430_mmc_class = {
2191 .name = "mmc",
2192 .sysc = &omap2430_mmc_sysc,
2193};
2194
2195/* MMC/SD/SDIO1 */
2196
2197static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
2198 { .irq = 83 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002199 { .irq = -1 }
Paul Walmsleybce06f32011-03-01 13:12:55 -08002200};
2201
2202static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
2203 { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
2204 { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
2205};
2206
2207static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
2208 { .role = "dbck", .clk = "mmchsdb1_fck" },
2209};
2210
2211static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
2212 &omap2430_l4_core__mmc1,
2213};
2214
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08002215static struct omap_mmc_dev_attr mmc1_dev_attr = {
2216 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
2217};
2218
Paul Walmsleybce06f32011-03-01 13:12:55 -08002219static struct omap_hwmod omap2430_mmc1_hwmod = {
2220 .name = "mmc1",
2221 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2222 .mpu_irqs = omap2430_mmc1_mpu_irqs,
Paul Walmsleybce06f32011-03-01 13:12:55 -08002223 .sdma_reqs = omap2430_mmc1_sdma_reqs,
2224 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs),
2225 .opt_clks = omap2430_mmc1_opt_clks,
2226 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
2227 .main_clk = "mmchs1_fck",
2228 .prcm = {
2229 .omap2 = {
2230 .module_offs = CORE_MOD,
2231 .prcm_reg_id = 2,
2232 .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
2233 .idlest_reg_id = 2,
2234 .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
2235 },
2236 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08002237 .dev_attr = &mmc1_dev_attr,
Paul Walmsleybce06f32011-03-01 13:12:55 -08002238 .slaves = omap2430_mmc1_slaves,
2239 .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
2240 .class = &omap2430_mmc_class,
2241 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2242};
2243
2244/* MMC/SD/SDIO2 */
2245
2246static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
2247 { .irq = 86 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002248 { .irq = -1 }
Paul Walmsleybce06f32011-03-01 13:12:55 -08002249};
2250
2251static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
2252 { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
2253 { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
2254};
2255
2256static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
2257 { .role = "dbck", .clk = "mmchsdb2_fck" },
2258};
2259
2260static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
2261 &omap2430_l4_core__mmc2,
2262};
2263
2264static struct omap_hwmod omap2430_mmc2_hwmod = {
2265 .name = "mmc2",
2266 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2267 .mpu_irqs = omap2430_mmc2_mpu_irqs,
Paul Walmsleybce06f32011-03-01 13:12:55 -08002268 .sdma_reqs = omap2430_mmc2_sdma_reqs,
2269 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs),
2270 .opt_clks = omap2430_mmc2_opt_clks,
2271 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
2272 .main_clk = "mmchs2_fck",
2273 .prcm = {
2274 .omap2 = {
2275 .module_offs = CORE_MOD,
2276 .prcm_reg_id = 2,
2277 .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
2278 .idlest_reg_id = 2,
2279 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
2280 },
2281 },
2282 .slaves = omap2430_mmc2_slaves,
2283 .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
2284 .class = &omap2430_mmc_class,
2285 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2286};
Paul Walmsley02bfc0302009-09-03 20:14:05 +03002287
2288static __initdata struct omap_hwmod *omap2430_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002289 &omap2430_l3_main_hwmod,
Paul Walmsley02bfc0302009-09-03 20:14:05 +03002290 &omap2430_l4_core_hwmod,
2291 &omap2430_l4_wkup_hwmod,
2292 &omap2430_mpu_hwmod,
Paul Walmsley08072ac2010-07-26 16:34:33 -06002293 &omap2430_iva_hwmod,
Thara Gopinathb6b58222011-02-23 00:14:05 -07002294
2295 &omap2430_timer1_hwmod,
2296 &omap2430_timer2_hwmod,
2297 &omap2430_timer3_hwmod,
2298 &omap2430_timer4_hwmod,
2299 &omap2430_timer5_hwmod,
2300 &omap2430_timer6_hwmod,
2301 &omap2430_timer7_hwmod,
2302 &omap2430_timer8_hwmod,
2303 &omap2430_timer9_hwmod,
2304 &omap2430_timer10_hwmod,
2305 &omap2430_timer11_hwmod,
2306 &omap2430_timer12_hwmod,
2307
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +05302308 &omap2430_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05302309 &omap2430_uart1_hwmod,
2310 &omap2430_uart2_hwmod,
2311 &omap2430_uart3_hwmod,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02002312 /* dss class */
2313 &omap2430_dss_core_hwmod,
2314 &omap2430_dss_dispc_hwmod,
2315 &omap2430_dss_rfbi_hwmod,
2316 &omap2430_dss_venc_hwmod,
2317 /* i2c class */
Paul Walmsley20042902010-09-30 02:40:12 +05302318 &omap2430_i2c1_hwmod,
2319 &omap2430_i2c2_hwmod,
Paul Walmsleybce06f32011-03-01 13:12:55 -08002320 &omap2430_mmc1_hwmod,
2321 &omap2430_mmc2_hwmod,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08002322
2323 /* gpio class */
2324 &omap2430_gpio1_hwmod,
2325 &omap2430_gpio2_hwmod,
2326 &omap2430_gpio3_hwmod,
2327 &omap2430_gpio4_hwmod,
2328 &omap2430_gpio5_hwmod,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08002329
2330 /* dma_system class*/
2331 &omap2430_dma_system_hwmod,
Charulatha V7f904c72011-02-17 09:53:10 -08002332
Charulatha V37801b32011-02-24 12:51:46 -08002333 /* mcbsp class */
2334 &omap2430_mcbsp1_hwmod,
2335 &omap2430_mcbsp2_hwmod,
2336 &omap2430_mcbsp3_hwmod,
2337 &omap2430_mcbsp4_hwmod,
2338 &omap2430_mcbsp5_hwmod,
2339
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08002340 /* mailbox class */
2341 &omap2430_mailbox_hwmod,
2342
Charulatha V7f904c72011-02-17 09:53:10 -08002343 /* mcspi class */
2344 &omap2430_mcspi1_hwmod,
2345 &omap2430_mcspi2_hwmod,
2346 &omap2430_mcspi3_hwmod,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002347
Hema HK44d02ac2011-02-17 12:07:17 +05302348 /* usbotg class*/
2349 &omap2430_usbhsotg_hwmod,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002350
Paul Walmsley02bfc0302009-09-03 20:14:05 +03002351 NULL,
2352};
2353
Paul Walmsley73591542010-02-22 22:09:32 -07002354int __init omap2430_hwmod_init(void)
2355{
Paul Walmsley550c8092011-02-28 11:58:14 -07002356 return omap_hwmod_register(omap2430_hwmods);
Paul Walmsley73591542010-02-22 22:09:32 -07002357}