blob: d02a44ea7f9b5a862112e3bee710c343f77a3b42 [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 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300114};
115
116static struct omap_hwmod omap2430_l4_wkup_hwmod;
Kevin Hilman046465b2010-09-27 20:19:30 +0530117static struct omap_hwmod omap2430_uart1_hwmod;
118static struct omap_hwmod omap2430_uart2_hwmod;
119static struct omap_hwmod omap2430_uart3_hwmod;
Paul Walmsley20042902010-09-30 02:40:12 +0530120static struct omap_hwmod omap2430_i2c1_hwmod;
121static struct omap_hwmod omap2430_i2c2_hwmod;
122
Hema HK44d02ac2011-02-17 12:07:17 +0530123static struct omap_hwmod omap2430_usbhsotg_hwmod;
124
125/* l3_core -> usbhsotg interface */
126static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
127 .master = &omap2430_usbhsotg_hwmod,
128 .slave = &omap2430_l3_main_hwmod,
129 .clk = "core_l3_ck",
130 .user = OCP_USER_MPU,
131};
132
Paul Walmsley20042902010-09-30 02:40:12 +0530133/* L4 CORE -> I2C1 interface */
Paul Walmsley20042902010-09-30 02:40:12 +0530134static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
135 .master = &omap2430_l4_core_hwmod,
136 .slave = &omap2430_i2c1_hwmod,
137 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600138 .addr = omap2_i2c1_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530139 .user = OCP_USER_MPU | OCP_USER_SDMA,
140};
141
142/* L4 CORE -> I2C2 interface */
Paul Walmsley20042902010-09-30 02:40:12 +0530143static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
144 .master = &omap2430_l4_core_hwmod,
145 .slave = &omap2430_i2c2_hwmod,
146 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600147 .addr = omap2_i2c2_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530148 .user = OCP_USER_MPU | OCP_USER_SDMA,
149};
Paul Walmsley02bfc032009-09-03 20:14:05 +0300150
151/* L4_CORE -> L4_WKUP interface */
152static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
153 .master = &omap2430_l4_core_hwmod,
154 .slave = &omap2430_l4_wkup_hwmod,
155 .user = OCP_USER_MPU | OCP_USER_SDMA,
156};
157
Kevin Hilman046465b2010-09-27 20:19:30 +0530158/* L4 CORE -> UART1 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530159static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
160 .master = &omap2430_l4_core_hwmod,
161 .slave = &omap2430_uart1_hwmod,
162 .clk = "uart1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600163 .addr = omap2xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530164 .user = OCP_USER_MPU | OCP_USER_SDMA,
165};
166
167/* L4 CORE -> UART2 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530168static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
169 .master = &omap2430_l4_core_hwmod,
170 .slave = &omap2430_uart2_hwmod,
171 .clk = "uart2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600172 .addr = omap2xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530173 .user = OCP_USER_MPU | OCP_USER_SDMA,
174};
175
176/* L4 PER -> UART3 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530177static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
178 .master = &omap2430_l4_core_hwmod,
179 .slave = &omap2430_uart3_hwmod,
180 .clk = "uart3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600181 .addr = omap2xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530182 .user = OCP_USER_MPU | OCP_USER_SDMA,
183};
184
Hema HK44d02ac2011-02-17 12:07:17 +0530185/*
186* usbhsotg interface data
187*/
188static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
189 {
190 .pa_start = OMAP243X_HS_BASE,
191 .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
192 .flags = ADDR_TYPE_RT
193 },
Paul Walmsley10167872011-09-04 20:20:53 -0600194 { }
Hema HK44d02ac2011-02-17 12:07:17 +0530195};
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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300253};
254
255/* Slave interfaces on the L4_WKUP interconnect */
256static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
257 &omap2430_l4_core__l4_wkup,
Kevin Hilman046465b2010-09-27 20:19:30 +0530258 &omap2_l4_core__uart1,
259 &omap2_l4_core__uart2,
260 &omap2_l4_core__uart3,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300261};
262
263/* Master interfaces on the L4_WKUP interconnect */
264static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
265};
266
Charulatha V7f904c72011-02-17 09:53:10 -0800267/* l4 core -> mcspi1 interface */
Charulatha V7f904c72011-02-17 09:53:10 -0800268static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
269 .master = &omap2430_l4_core_hwmod,
270 .slave = &omap2430_mcspi1_hwmod,
271 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600272 .addr = omap2_mcspi1_addr_space,
Charulatha V7f904c72011-02-17 09:53:10 -0800273 .user = OCP_USER_MPU | OCP_USER_SDMA,
274};
275
276/* l4 core -> mcspi2 interface */
Charulatha V7f904c72011-02-17 09:53:10 -0800277static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
278 .master = &omap2430_l4_core_hwmod,
279 .slave = &omap2430_mcspi2_hwmod,
280 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600281 .addr = omap2_mcspi2_addr_space,
Charulatha V7f904c72011-02-17 09:53:10 -0800282 .user = OCP_USER_MPU | OCP_USER_SDMA,
283};
284
285/* l4 core -> mcspi3 interface */
Charulatha V7f904c72011-02-17 09:53:10 -0800286static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
287 .master = &omap2430_l4_core_hwmod,
288 .slave = &omap2430_mcspi3_hwmod,
289 .clk = "mcspi3_ick",
290 .addr = omap2430_mcspi3_addr_space,
Charulatha V7f904c72011-02-17 09:53:10 -0800291 .user = OCP_USER_MPU | OCP_USER_SDMA,
292};
293
Paul Walmsley02bfc032009-09-03 20:14:05 +0300294/* L4 WKUP */
295static struct omap_hwmod omap2430_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600296 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700297 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300298 .masters = omap2430_l4_wkup_masters,
299 .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
300 .slaves = omap2430_l4_wkup_slaves,
301 .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600302 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300303};
304
305/* Master interfaces on the MPU device */
306static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600307 &omap2430_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300308};
309
310/* MPU */
311static struct omap_hwmod omap2430_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600312 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700313 .class = &mpu_hwmod_class,
Paul Walmsley50ebdac2010-02-22 22:09:31 -0700314 .main_clk = "mpu_ck",
Paul Walmsley02bfc032009-09-03 20:14:05 +0300315 .masters = omap2430_mpu_masters,
316 .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
Paul Walmsley02bfc032009-09-03 20:14:05 +0300317};
318
Paul Walmsley08072ac2010-07-26 16:34:33 -0600319/*
320 * IVA2_1 interface data
321 */
322
323/* IVA2 <- L3 interface */
324static struct omap_hwmod_ocp_if omap2430_l3__iva = {
325 .master = &omap2430_l3_main_hwmod,
326 .slave = &omap2430_iva_hwmod,
327 .clk = "dsp_fck",
328 .user = OCP_USER_MPU | OCP_USER_SDMA,
329};
330
331static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
332 &omap2430_l3__iva,
333};
334
335/*
336 * IVA2 (IVA2)
337 */
338
339static struct omap_hwmod omap2430_iva_hwmod = {
340 .name = "iva",
341 .class = &iva_hwmod_class,
342 .masters = omap2430_iva_masters,
343 .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
Paul Walmsley08072ac2010-07-26 16:34:33 -0600344};
345
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530346/* always-on timers dev attribute */
347static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
348 .timer_capability = OMAP_TIMER_ALWON,
349};
350
351/* pwm timers dev attribute */
352static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
353 .timer_capability = OMAP_TIMER_HAS_PWM,
354};
355
Thara Gopinathb6b58222011-02-23 00:14:05 -0700356/* timer1 */
357static struct omap_hwmod omap2430_timer1_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700358
359static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
360 {
361 .pa_start = 0x49018000,
362 .pa_end = 0x49018000 + SZ_1K - 1,
363 .flags = ADDR_TYPE_RT
364 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600365 { }
Thara Gopinathb6b58222011-02-23 00:14:05 -0700366};
367
368/* l4_wkup -> timer1 */
369static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
370 .master = &omap2430_l4_wkup_hwmod,
371 .slave = &omap2430_timer1_hwmod,
372 .clk = "gpt1_ick",
373 .addr = omap2430_timer1_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700374 .user = OCP_USER_MPU | OCP_USER_SDMA,
375};
376
377/* timer1 slave port */
378static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
379 &omap2430_l4_wkup__timer1,
380};
381
382/* timer1 hwmod */
383static struct omap_hwmod omap2430_timer1_hwmod = {
384 .name = "timer1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600385 .mpu_irqs = omap2_timer1_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700386 .main_clk = "gpt1_fck",
387 .prcm = {
388 .omap2 = {
389 .prcm_reg_id = 1,
390 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
391 .module_offs = WKUP_MOD,
392 .idlest_reg_id = 1,
393 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
394 },
395 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530396 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700397 .slaves = omap2430_timer1_slaves,
398 .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600399 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700400};
401
402/* timer2 */
403static struct omap_hwmod omap2430_timer2_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700404
Thara Gopinathb6b58222011-02-23 00:14:05 -0700405/* l4_core -> timer2 */
406static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
407 .master = &omap2430_l4_core_hwmod,
408 .slave = &omap2430_timer2_hwmod,
409 .clk = "gpt2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600410 .addr = omap2xxx_timer2_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700411 .user = OCP_USER_MPU | OCP_USER_SDMA,
412};
413
414/* timer2 slave port */
415static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
416 &omap2430_l4_core__timer2,
417};
418
419/* timer2 hwmod */
420static struct omap_hwmod omap2430_timer2_hwmod = {
421 .name = "timer2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600422 .mpu_irqs = omap2_timer2_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700423 .main_clk = "gpt2_fck",
424 .prcm = {
425 .omap2 = {
426 .prcm_reg_id = 1,
427 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
428 .module_offs = CORE_MOD,
429 .idlest_reg_id = 1,
430 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
431 },
432 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530433 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700434 .slaves = omap2430_timer2_slaves,
435 .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600436 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700437};
438
439/* timer3 */
440static struct omap_hwmod omap2430_timer3_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700441
Thara Gopinathb6b58222011-02-23 00:14:05 -0700442/* l4_core -> timer3 */
443static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
444 .master = &omap2430_l4_core_hwmod,
445 .slave = &omap2430_timer3_hwmod,
446 .clk = "gpt3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600447 .addr = omap2xxx_timer3_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700448 .user = OCP_USER_MPU | OCP_USER_SDMA,
449};
450
451/* timer3 slave port */
452static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
453 &omap2430_l4_core__timer3,
454};
455
456/* timer3 hwmod */
457static struct omap_hwmod omap2430_timer3_hwmod = {
458 .name = "timer3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600459 .mpu_irqs = omap2_timer3_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700460 .main_clk = "gpt3_fck",
461 .prcm = {
462 .omap2 = {
463 .prcm_reg_id = 1,
464 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
465 .module_offs = CORE_MOD,
466 .idlest_reg_id = 1,
467 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
468 },
469 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530470 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700471 .slaves = omap2430_timer3_slaves,
472 .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600473 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700474};
475
476/* timer4 */
477static struct omap_hwmod omap2430_timer4_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700478
Thara Gopinathb6b58222011-02-23 00:14:05 -0700479/* l4_core -> timer4 */
480static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
481 .master = &omap2430_l4_core_hwmod,
482 .slave = &omap2430_timer4_hwmod,
483 .clk = "gpt4_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600484 .addr = omap2xxx_timer4_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700485 .user = OCP_USER_MPU | OCP_USER_SDMA,
486};
487
488/* timer4 slave port */
489static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
490 &omap2430_l4_core__timer4,
491};
492
493/* timer4 hwmod */
494static struct omap_hwmod omap2430_timer4_hwmod = {
495 .name = "timer4",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600496 .mpu_irqs = omap2_timer4_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700497 .main_clk = "gpt4_fck",
498 .prcm = {
499 .omap2 = {
500 .prcm_reg_id = 1,
501 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
502 .module_offs = CORE_MOD,
503 .idlest_reg_id = 1,
504 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
505 },
506 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530507 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700508 .slaves = omap2430_timer4_slaves,
509 .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600510 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700511};
512
513/* timer5 */
514static struct omap_hwmod omap2430_timer5_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700515
Thara Gopinathb6b58222011-02-23 00:14:05 -0700516/* l4_core -> timer5 */
517static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
518 .master = &omap2430_l4_core_hwmod,
519 .slave = &omap2430_timer5_hwmod,
520 .clk = "gpt5_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600521 .addr = omap2xxx_timer5_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700522 .user = OCP_USER_MPU | OCP_USER_SDMA,
523};
524
525/* timer5 slave port */
526static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
527 &omap2430_l4_core__timer5,
528};
529
530/* timer5 hwmod */
531static struct omap_hwmod omap2430_timer5_hwmod = {
532 .name = "timer5",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600533 .mpu_irqs = omap2_timer5_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700534 .main_clk = "gpt5_fck",
535 .prcm = {
536 .omap2 = {
537 .prcm_reg_id = 1,
538 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
539 .module_offs = CORE_MOD,
540 .idlest_reg_id = 1,
541 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
542 },
543 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530544 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700545 .slaves = omap2430_timer5_slaves,
546 .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600547 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700548};
549
550/* timer6 */
551static struct omap_hwmod omap2430_timer6_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700552
Thara Gopinathb6b58222011-02-23 00:14:05 -0700553/* l4_core -> timer6 */
554static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
555 .master = &omap2430_l4_core_hwmod,
556 .slave = &omap2430_timer6_hwmod,
557 .clk = "gpt6_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600558 .addr = omap2xxx_timer6_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700559 .user = OCP_USER_MPU | OCP_USER_SDMA,
560};
561
562/* timer6 slave port */
563static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
564 &omap2430_l4_core__timer6,
565};
566
567/* timer6 hwmod */
568static struct omap_hwmod omap2430_timer6_hwmod = {
569 .name = "timer6",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600570 .mpu_irqs = omap2_timer6_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700571 .main_clk = "gpt6_fck",
572 .prcm = {
573 .omap2 = {
574 .prcm_reg_id = 1,
575 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
576 .module_offs = CORE_MOD,
577 .idlest_reg_id = 1,
578 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
579 },
580 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530581 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700582 .slaves = omap2430_timer6_slaves,
583 .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600584 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700585};
586
587/* timer7 */
588static struct omap_hwmod omap2430_timer7_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700589
Thara Gopinathb6b58222011-02-23 00:14:05 -0700590/* l4_core -> timer7 */
591static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
592 .master = &omap2430_l4_core_hwmod,
593 .slave = &omap2430_timer7_hwmod,
594 .clk = "gpt7_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600595 .addr = omap2xxx_timer7_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700596 .user = OCP_USER_MPU | OCP_USER_SDMA,
597};
598
599/* timer7 slave port */
600static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
601 &omap2430_l4_core__timer7,
602};
603
604/* timer7 hwmod */
605static struct omap_hwmod omap2430_timer7_hwmod = {
606 .name = "timer7",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600607 .mpu_irqs = omap2_timer7_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700608 .main_clk = "gpt7_fck",
609 .prcm = {
610 .omap2 = {
611 .prcm_reg_id = 1,
612 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
613 .module_offs = CORE_MOD,
614 .idlest_reg_id = 1,
615 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
616 },
617 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530618 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700619 .slaves = omap2430_timer7_slaves,
620 .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600621 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700622};
623
624/* timer8 */
625static struct omap_hwmod omap2430_timer8_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700626
Thara Gopinathb6b58222011-02-23 00:14:05 -0700627/* l4_core -> timer8 */
628static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
629 .master = &omap2430_l4_core_hwmod,
630 .slave = &omap2430_timer8_hwmod,
631 .clk = "gpt8_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600632 .addr = omap2xxx_timer8_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700633 .user = OCP_USER_MPU | OCP_USER_SDMA,
634};
635
636/* timer8 slave port */
637static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
638 &omap2430_l4_core__timer8,
639};
640
641/* timer8 hwmod */
642static struct omap_hwmod omap2430_timer8_hwmod = {
643 .name = "timer8",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600644 .mpu_irqs = omap2_timer8_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700645 .main_clk = "gpt8_fck",
646 .prcm = {
647 .omap2 = {
648 .prcm_reg_id = 1,
649 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
650 .module_offs = CORE_MOD,
651 .idlest_reg_id = 1,
652 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
653 },
654 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530655 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700656 .slaves = omap2430_timer8_slaves,
657 .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600658 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700659};
660
661/* timer9 */
662static struct omap_hwmod omap2430_timer9_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700663
Thara Gopinathb6b58222011-02-23 00:14:05 -0700664/* l4_core -> timer9 */
665static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
666 .master = &omap2430_l4_core_hwmod,
667 .slave = &omap2430_timer9_hwmod,
668 .clk = "gpt9_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600669 .addr = omap2xxx_timer9_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700670 .user = OCP_USER_MPU | OCP_USER_SDMA,
671};
672
673/* timer9 slave port */
674static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
675 &omap2430_l4_core__timer9,
676};
677
678/* timer9 hwmod */
679static struct omap_hwmod omap2430_timer9_hwmod = {
680 .name = "timer9",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600681 .mpu_irqs = omap2_timer9_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700682 .main_clk = "gpt9_fck",
683 .prcm = {
684 .omap2 = {
685 .prcm_reg_id = 1,
686 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
687 .module_offs = CORE_MOD,
688 .idlest_reg_id = 1,
689 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
690 },
691 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530692 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700693 .slaves = omap2430_timer9_slaves,
694 .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600695 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700696};
697
698/* timer10 */
699static struct omap_hwmod omap2430_timer10_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700700
Thara Gopinathb6b58222011-02-23 00:14:05 -0700701/* l4_core -> timer10 */
702static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
703 .master = &omap2430_l4_core_hwmod,
704 .slave = &omap2430_timer10_hwmod,
705 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600706 .addr = omap2_timer10_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700707 .user = OCP_USER_MPU | OCP_USER_SDMA,
708};
709
710/* timer10 slave port */
711static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
712 &omap2430_l4_core__timer10,
713};
714
715/* timer10 hwmod */
716static struct omap_hwmod omap2430_timer10_hwmod = {
717 .name = "timer10",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600718 .mpu_irqs = omap2_timer10_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700719 .main_clk = "gpt10_fck",
720 .prcm = {
721 .omap2 = {
722 .prcm_reg_id = 1,
723 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
724 .module_offs = CORE_MOD,
725 .idlest_reg_id = 1,
726 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
727 },
728 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530729 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700730 .slaves = omap2430_timer10_slaves,
731 .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600732 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700733};
734
735/* timer11 */
736static struct omap_hwmod omap2430_timer11_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700737
Thara Gopinathb6b58222011-02-23 00:14:05 -0700738/* l4_core -> timer11 */
739static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
740 .master = &omap2430_l4_core_hwmod,
741 .slave = &omap2430_timer11_hwmod,
742 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600743 .addr = omap2_timer11_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700744 .user = OCP_USER_MPU | OCP_USER_SDMA,
745};
746
747/* timer11 slave port */
748static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
749 &omap2430_l4_core__timer11,
750};
751
752/* timer11 hwmod */
753static struct omap_hwmod omap2430_timer11_hwmod = {
754 .name = "timer11",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600755 .mpu_irqs = omap2_timer11_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700756 .main_clk = "gpt11_fck",
757 .prcm = {
758 .omap2 = {
759 .prcm_reg_id = 1,
760 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
761 .module_offs = CORE_MOD,
762 .idlest_reg_id = 1,
763 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
764 },
765 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530766 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700767 .slaves = omap2430_timer11_slaves,
768 .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600769 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700770};
771
772/* timer12 */
773static struct omap_hwmod omap2430_timer12_hwmod;
Thara Gopinathb6b58222011-02-23 00:14:05 -0700774
Thara Gopinathb6b58222011-02-23 00:14:05 -0700775/* l4_core -> timer12 */
776static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
777 .master = &omap2430_l4_core_hwmod,
778 .slave = &omap2430_timer12_hwmod,
779 .clk = "gpt12_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600780 .addr = omap2xxx_timer12_addrs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700781 .user = OCP_USER_MPU | OCP_USER_SDMA,
782};
783
784/* timer12 slave port */
785static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
786 &omap2430_l4_core__timer12,
787};
788
789/* timer12 hwmod */
790static struct omap_hwmod omap2430_timer12_hwmod = {
791 .name = "timer12",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600792 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700793 .main_clk = "gpt12_fck",
794 .prcm = {
795 .omap2 = {
796 .prcm_reg_id = 1,
797 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
798 .module_offs = CORE_MOD,
799 .idlest_reg_id = 1,
800 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
801 },
802 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530803 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700804 .slaves = omap2430_timer12_slaves,
805 .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600806 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinathb6b58222011-02-23 00:14:05 -0700807};
808
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530809/* l4_wkup -> wd_timer2 */
810static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
811 {
812 .pa_start = 0x49016000,
813 .pa_end = 0x4901607f,
814 .flags = ADDR_TYPE_RT
815 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600816 { }
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530817};
818
819static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
820 .master = &omap2430_l4_wkup_hwmod,
821 .slave = &omap2430_wd_timer2_hwmod,
822 .clk = "mpu_wdt_ick",
823 .addr = omap2430_wd_timer2_addrs,
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530824 .user = OCP_USER_MPU | OCP_USER_SDMA,
825};
826
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530827/* wd_timer2 */
828static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
829 &omap2430_l4_wkup__wd_timer2,
830};
831
832static struct omap_hwmod omap2430_wd_timer2_hwmod = {
833 .name = "wd_timer2",
Paul Walmsley273b9462011-07-09 19:14:08 -0600834 .class = &omap2xxx_wd_timer_hwmod_class,
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530835 .main_clk = "mpu_wdt_fck",
836 .prcm = {
837 .omap2 = {
838 .prcm_reg_id = 1,
839 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
840 .module_offs = WKUP_MOD,
841 .idlest_reg_id = 1,
842 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
843 },
844 },
845 .slaves = omap2430_wd_timer2_slaves,
846 .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +0530847};
848
Kevin Hilman046465b2010-09-27 20:19:30 +0530849/* UART1 */
850
Kevin Hilman046465b2010-09-27 20:19:30 +0530851static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
852 &omap2_l4_core__uart1,
853};
854
855static struct omap_hwmod omap2430_uart1_hwmod = {
856 .name = "uart1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600857 .mpu_irqs = omap2_uart1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600858 .sdma_reqs = omap2_uart1_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530859 .main_clk = "uart1_fck",
860 .prcm = {
861 .omap2 = {
862 .module_offs = CORE_MOD,
863 .prcm_reg_id = 1,
864 .module_bit = OMAP24XX_EN_UART1_SHIFT,
865 .idlest_reg_id = 1,
866 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
867 },
868 },
869 .slaves = omap2430_uart1_slaves,
870 .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600871 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +0530872};
873
874/* UART2 */
875
Kevin Hilman046465b2010-09-27 20:19:30 +0530876static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
877 &omap2_l4_core__uart2,
878};
879
880static struct omap_hwmod omap2430_uart2_hwmod = {
881 .name = "uart2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600882 .mpu_irqs = omap2_uart2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600883 .sdma_reqs = omap2_uart2_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530884 .main_clk = "uart2_fck",
885 .prcm = {
886 .omap2 = {
887 .module_offs = CORE_MOD,
888 .prcm_reg_id = 1,
889 .module_bit = OMAP24XX_EN_UART2_SHIFT,
890 .idlest_reg_id = 1,
891 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
892 },
893 },
894 .slaves = omap2430_uart2_slaves,
895 .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600896 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +0530897};
898
899/* UART3 */
900
Kevin Hilman046465b2010-09-27 20:19:30 +0530901static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
902 &omap2_l4_core__uart3,
903};
904
905static struct omap_hwmod omap2430_uart3_hwmod = {
906 .name = "uart3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600907 .mpu_irqs = omap2_uart3_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600908 .sdma_reqs = omap2_uart3_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530909 .main_clk = "uart3_fck",
910 .prcm = {
911 .omap2 = {
912 .module_offs = CORE_MOD,
913 .prcm_reg_id = 2,
914 .module_bit = OMAP24XX_EN_UART3_SHIFT,
915 .idlest_reg_id = 2,
916 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
917 },
918 },
919 .slaves = omap2430_uart3_slaves,
920 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600921 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +0530922};
923
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200924/* dss */
925/* dss master ports */
926static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
927 &omap2430_dss__l3,
928};
929
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200930/* l4_core -> dss */
931static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
932 .master = &omap2430_l4_core_hwmod,
933 .slave = &omap2430_dss_core_hwmod,
934 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600935 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200936 .user = OCP_USER_MPU | OCP_USER_SDMA,
937};
938
939/* dss slave ports */
940static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
941 &omap2430_l4_core__dss,
942};
943
944static struct omap_hwmod_opt_clk dss_opt_clks[] = {
Tomi Valkeinen1258ea52011-11-08 03:16:09 -0700945 /*
946 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
947 * driver does not use these clocks.
948 */
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200949 { .role = "tv_clk", .clk = "dss_54m_fck" },
950 { .role = "sys_clk", .clk = "dss2_fck" },
951};
952
953static struct omap_hwmod omap2430_dss_core_hwmod = {
954 .name = "dss_core",
Paul Walmsley273b9462011-07-09 19:14:08 -0600955 .class = &omap2_dss_hwmod_class,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200956 .main_clk = "dss1_fck", /* instead of dss_fck */
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600957 .sdma_reqs = omap2xxx_dss_sdma_chs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200958 .prcm = {
959 .omap2 = {
960 .prcm_reg_id = 1,
961 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
962 .module_offs = CORE_MOD,
963 .idlest_reg_id = 1,
964 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
965 },
966 },
967 .opt_clks = dss_opt_clks,
968 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
969 .slaves = omap2430_dss_slaves,
970 .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
971 .masters = omap2430_dss_masters,
972 .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
Tomi Valkeinen1258ea52011-11-08 03:16:09 -0700973 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200974};
975
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200976/* l4_core -> dss_dispc */
977static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
978 .master = &omap2430_l4_core_hwmod,
979 .slave = &omap2430_dss_dispc_hwmod,
980 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600981 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200982 .user = OCP_USER_MPU | OCP_USER_SDMA,
983};
984
985/* dss_dispc slave ports */
986static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
987 &omap2430_l4_core__dss_dispc,
988};
989
990static struct omap_hwmod omap2430_dss_dispc_hwmod = {
991 .name = "dss_dispc",
Paul Walmsley273b9462011-07-09 19:14:08 -0600992 .class = &omap2_dispc_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -0600993 .mpu_irqs = omap2_dispc_irqs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +0200994 .main_clk = "dss1_fck",
995 .prcm = {
996 .omap2 = {
997 .prcm_reg_id = 1,
998 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
999 .module_offs = CORE_MOD,
1000 .idlest_reg_id = 1,
1001 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1002 },
1003 },
1004 .slaves = omap2430_dss_dispc_slaves,
1005 .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001006 .flags = HWMOD_NO_IDLEST,
1007};
1008
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001009/* l4_core -> dss_rfbi */
1010static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
1011 .master = &omap2430_l4_core_hwmod,
1012 .slave = &omap2430_dss_rfbi_hwmod,
1013 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001014 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001015 .user = OCP_USER_MPU | OCP_USER_SDMA,
1016};
1017
1018/* dss_rfbi slave ports */
1019static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
1020 &omap2430_l4_core__dss_rfbi,
1021};
1022
1023static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
1024 .name = "dss_rfbi",
Paul Walmsley273b9462011-07-09 19:14:08 -06001025 .class = &omap2_rfbi_hwmod_class,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001026 .main_clk = "dss1_fck",
1027 .prcm = {
1028 .omap2 = {
1029 .prcm_reg_id = 1,
1030 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1031 .module_offs = CORE_MOD,
1032 },
1033 },
1034 .slaves = omap2430_dss_rfbi_slaves,
1035 .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001036 .flags = HWMOD_NO_IDLEST,
1037};
1038
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001039/* l4_core -> dss_venc */
1040static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
1041 .master = &omap2430_l4_core_hwmod,
1042 .slave = &omap2430_dss_venc_hwmod,
1043 .clk = "dss_54m_fck",
Paul Walmsleyded11382011-07-09 19:14:06 -06001044 .addr = omap2_dss_venc_addrs,
Paul Walmsleyc39bee82011-03-04 06:02:15 +00001045 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001046 .user = OCP_USER_MPU | OCP_USER_SDMA,
1047};
1048
1049/* dss_venc slave ports */
1050static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
1051 &omap2430_l4_core__dss_venc,
1052};
1053
1054static struct omap_hwmod omap2430_dss_venc_hwmod = {
1055 .name = "dss_venc",
Paul Walmsley273b9462011-07-09 19:14:08 -06001056 .class = &omap2_venc_hwmod_class,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001057 .main_clk = "dss1_fck",
1058 .prcm = {
1059 .omap2 = {
1060 .prcm_reg_id = 1,
1061 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1062 .module_offs = CORE_MOD,
1063 },
1064 },
1065 .slaves = omap2430_dss_venc_slaves,
1066 .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02001067 .flags = HWMOD_NO_IDLEST,
1068};
1069
Paul Walmsley20042902010-09-30 02:40:12 +05301070/* I2C common */
1071static struct omap_hwmod_class_sysconfig i2c_sysc = {
1072 .rev_offs = 0x00,
1073 .sysc_offs = 0x20,
1074 .syss_offs = 0x10,
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001075 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1076 SYSS_HAS_RESET_STATUS),
Paul Walmsley20042902010-09-30 02:40:12 +05301077 .sysc_fields = &omap_hwmod_sysc_type1,
1078};
1079
1080static struct omap_hwmod_class i2c_class = {
1081 .name = "i2c",
1082 .sysc = &i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06001083 .rev = OMAP_I2C_IP_VERSION_1,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06001084 .reset = &omap_i2c_reset,
Paul Walmsley20042902010-09-30 02:40:12 +05301085};
1086
Benoit Cousson50ebb772010-12-21 21:08:34 -07001087static struct omap_i2c_dev_attr i2c_dev_attr = {
Paul Walmsley20042902010-09-30 02:40:12 +05301088 .fifo_depth = 8, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001089 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1090 OMAP_I2C_FLAG_BUS_SHIFT_2 |
1091 OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
Paul Walmsley20042902010-09-30 02:40:12 +05301092};
1093
Benoit Cousson50ebb772010-12-21 21:08:34 -07001094/* I2C1 */
1095
Paul Walmsley20042902010-09-30 02:40:12 +05301096static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
1097 &omap2430_l4_core__i2c1,
1098};
1099
1100static struct omap_hwmod omap2430_i2c1_hwmod = {
1101 .name = "i2c1",
Andy Green3e600522011-07-10 05:27:14 -06001102 .flags = HWMOD_16BIT_REG,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001103 .mpu_irqs = omap2_i2c1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001104 .sdma_reqs = omap2_i2c1_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301105 .main_clk = "i2chs1_fck",
1106 .prcm = {
1107 .omap2 = {
1108 /*
1109 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
1110 * I2CHS IP's do not follow the usual pattern.
1111 * prcm_reg_id alone cannot be used to program
1112 * the iclk and fclk. Needs to be handled using
Lucas De Marchi25985ed2011-03-30 22:57:33 -03001113 * additional flags when clk handling is moved
Paul Walmsley20042902010-09-30 02:40:12 +05301114 * to hwmod framework.
1115 */
1116 .module_offs = CORE_MOD,
1117 .prcm_reg_id = 1,
1118 .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
1119 .idlest_reg_id = 1,
1120 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
1121 },
1122 },
1123 .slaves = omap2430_i2c1_slaves,
1124 .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
1125 .class = &i2c_class,
Benoit Cousson50ebb772010-12-21 21:08:34 -07001126 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301127};
1128
1129/* I2C2 */
1130
Paul Walmsley20042902010-09-30 02:40:12 +05301131static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
1132 &omap2430_l4_core__i2c2,
1133};
1134
1135static struct omap_hwmod omap2430_i2c2_hwmod = {
1136 .name = "i2c2",
Andy Green3e600522011-07-10 05:27:14 -06001137 .flags = HWMOD_16BIT_REG,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001138 .mpu_irqs = omap2_i2c2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001139 .sdma_reqs = omap2_i2c2_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301140 .main_clk = "i2chs2_fck",
1141 .prcm = {
1142 .omap2 = {
1143 .module_offs = CORE_MOD,
1144 .prcm_reg_id = 1,
1145 .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
1146 .idlest_reg_id = 1,
1147 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
1148 },
1149 },
1150 .slaves = omap2430_i2c2_slaves,
1151 .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
1152 .class = &i2c_class,
Benoit Cousson50ebb772010-12-21 21:08:34 -07001153 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301154};
1155
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001156/* l4_wkup -> gpio1 */
1157static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
1158 {
1159 .pa_start = 0x4900C000,
1160 .pa_end = 0x4900C1ff,
1161 .flags = ADDR_TYPE_RT
1162 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001163 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001164};
1165
1166static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
1167 .master = &omap2430_l4_wkup_hwmod,
1168 .slave = &omap2430_gpio1_hwmod,
1169 .clk = "gpios_ick",
1170 .addr = omap2430_gpio1_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001171 .user = OCP_USER_MPU | OCP_USER_SDMA,
1172};
1173
1174/* l4_wkup -> gpio2 */
1175static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
1176 {
1177 .pa_start = 0x4900E000,
1178 .pa_end = 0x4900E1ff,
1179 .flags = ADDR_TYPE_RT
1180 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001181 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001182};
1183
1184static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
1185 .master = &omap2430_l4_wkup_hwmod,
1186 .slave = &omap2430_gpio2_hwmod,
1187 .clk = "gpios_ick",
1188 .addr = omap2430_gpio2_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001189 .user = OCP_USER_MPU | OCP_USER_SDMA,
1190};
1191
1192/* l4_wkup -> gpio3 */
1193static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
1194 {
1195 .pa_start = 0x49010000,
1196 .pa_end = 0x490101ff,
1197 .flags = ADDR_TYPE_RT
1198 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001199 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001200};
1201
1202static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
1203 .master = &omap2430_l4_wkup_hwmod,
1204 .slave = &omap2430_gpio3_hwmod,
1205 .clk = "gpios_ick",
1206 .addr = omap2430_gpio3_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001207 .user = OCP_USER_MPU | OCP_USER_SDMA,
1208};
1209
1210/* l4_wkup -> gpio4 */
1211static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
1212 {
1213 .pa_start = 0x49012000,
1214 .pa_end = 0x490121ff,
1215 .flags = ADDR_TYPE_RT
1216 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001217 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001218};
1219
1220static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
1221 .master = &omap2430_l4_wkup_hwmod,
1222 .slave = &omap2430_gpio4_hwmod,
1223 .clk = "gpios_ick",
1224 .addr = omap2430_gpio4_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001225 .user = OCP_USER_MPU | OCP_USER_SDMA,
1226};
1227
1228/* l4_core -> gpio5 */
1229static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
1230 {
1231 .pa_start = 0x480B6000,
1232 .pa_end = 0x480B61ff,
1233 .flags = ADDR_TYPE_RT
1234 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001235 { }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001236};
1237
1238static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
1239 .master = &omap2430_l4_core_hwmod,
1240 .slave = &omap2430_gpio5_hwmod,
1241 .clk = "gpio5_ick",
1242 .addr = omap2430_gpio5_addr_space,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001243 .user = OCP_USER_MPU | OCP_USER_SDMA,
1244};
1245
1246/* gpio dev_attr */
1247static struct omap_gpio_dev_attr gpio_dev_attr = {
1248 .bank_width = 32,
1249 .dbck_flag = false,
1250};
1251
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001252/* gpio1 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001253static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1254 &omap2430_l4_wkup__gpio1,
1255};
1256
1257static struct omap_hwmod omap2430_gpio1_hwmod = {
1258 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301259 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001260 .mpu_irqs = omap2_gpio1_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001261 .main_clk = "gpios_fck",
1262 .prcm = {
1263 .omap2 = {
1264 .prcm_reg_id = 1,
1265 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1266 .module_offs = WKUP_MOD,
1267 .idlest_reg_id = 1,
1268 .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
1269 },
1270 },
1271 .slaves = omap2430_gpio1_slaves,
1272 .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001273 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001274 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001275};
1276
1277/* gpio2 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001278static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1279 &omap2430_l4_wkup__gpio2,
1280};
1281
1282static struct omap_hwmod omap2430_gpio2_hwmod = {
1283 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301284 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001285 .mpu_irqs = omap2_gpio2_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001286 .main_clk = "gpios_fck",
1287 .prcm = {
1288 .omap2 = {
1289 .prcm_reg_id = 1,
1290 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1291 .module_offs = WKUP_MOD,
1292 .idlest_reg_id = 1,
1293 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1294 },
1295 },
1296 .slaves = omap2430_gpio2_slaves,
1297 .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001298 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001299 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001300};
1301
1302/* gpio3 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001303static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1304 &omap2430_l4_wkup__gpio3,
1305};
1306
1307static struct omap_hwmod omap2430_gpio3_hwmod = {
1308 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301309 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001310 .mpu_irqs = omap2_gpio3_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001311 .main_clk = "gpios_fck",
1312 .prcm = {
1313 .omap2 = {
1314 .prcm_reg_id = 1,
1315 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1316 .module_offs = WKUP_MOD,
1317 .idlest_reg_id = 1,
1318 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1319 },
1320 },
1321 .slaves = omap2430_gpio3_slaves,
1322 .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001323 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001324 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001325};
1326
1327/* gpio4 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001328static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1329 &omap2430_l4_wkup__gpio4,
1330};
1331
1332static struct omap_hwmod omap2430_gpio4_hwmod = {
1333 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301334 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001335 .mpu_irqs = omap2_gpio4_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001336 .main_clk = "gpios_fck",
1337 .prcm = {
1338 .omap2 = {
1339 .prcm_reg_id = 1,
1340 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1341 .module_offs = WKUP_MOD,
1342 .idlest_reg_id = 1,
1343 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1344 },
1345 },
1346 .slaves = omap2430_gpio4_slaves,
1347 .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001348 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001349 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001350};
1351
1352/* gpio5 */
1353static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
1354 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
Paul Walmsley212738a2011-07-09 19:14:06 -06001355 { .irq = -1 }
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001356};
1357
1358static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
1359 &omap2430_l4_core__gpio5,
1360};
1361
1362static struct omap_hwmod omap2430_gpio5_hwmod = {
1363 .name = "gpio5",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301364 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001365 .mpu_irqs = omap243x_gpio5_irqs,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001366 .main_clk = "gpio5_fck",
1367 .prcm = {
1368 .omap2 = {
1369 .prcm_reg_id = 2,
1370 .module_bit = OMAP2430_EN_GPIO5_SHIFT,
1371 .module_offs = CORE_MOD,
1372 .idlest_reg_id = 2,
1373 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
1374 },
1375 },
1376 .slaves = omap2430_gpio5_slaves,
1377 .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001378 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001379 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08001380};
1381
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001382/* dma attributes */
1383static struct omap_dma_dev_attr dma_dev_attr = {
1384 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1385 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1386 .lch_count = 32,
1387};
1388
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001389/* dma_system -> L3 */
1390static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
1391 .master = &omap2430_dma_system_hwmod,
1392 .slave = &omap2430_l3_main_hwmod,
1393 .clk = "core_l3_ck",
1394 .user = OCP_USER_MPU | OCP_USER_SDMA,
1395};
1396
1397/* dma_system master ports */
1398static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
1399 &omap2430_dma_system__l3,
1400};
1401
1402/* l4_core -> dma_system */
1403static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
1404 .master = &omap2430_l4_core_hwmod,
1405 .slave = &omap2430_dma_system_hwmod,
1406 .clk = "sdma_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001407 .addr = omap2_dma_system_addrs,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001408 .user = OCP_USER_MPU | OCP_USER_SDMA,
1409};
1410
1411/* dma_system slave ports */
1412static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
1413 &omap2430_l4_core__dma_system,
1414};
1415
1416static struct omap_hwmod omap2430_dma_system_hwmod = {
1417 .name = "dma",
Paul Walmsley273b9462011-07-09 19:14:08 -06001418 .class = &omap2xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001419 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001420 .main_clk = "core_l3_ck",
1421 .slaves = omap2430_dma_system_slaves,
1422 .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
1423 .masters = omap2430_dma_system_masters,
1424 .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
1425 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08001426 .flags = HWMOD_NO_IDLEST,
1427};
1428
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001429/* mailbox */
1430static struct omap_hwmod omap2430_mailbox_hwmod;
1431static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1432 { .irq = 26 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001433 { .irq = -1 }
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001434};
1435
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001436/* l4_core -> mailbox */
1437static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
1438 .master = &omap2430_l4_core_hwmod,
1439 .slave = &omap2430_mailbox_hwmod,
Paul Walmsleyded11382011-07-09 19:14:06 -06001440 .addr = omap2_mailbox_addrs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001441 .user = OCP_USER_MPU | OCP_USER_SDMA,
1442};
1443
1444/* mailbox slave ports */
1445static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
1446 &omap2430_l4_core__mailbox,
1447};
1448
1449static struct omap_hwmod omap2430_mailbox_hwmod = {
1450 .name = "mailbox",
Paul Walmsley273b9462011-07-09 19:14:08 -06001451 .class = &omap2xxx_mailbox_hwmod_class,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001452 .mpu_irqs = omap2430_mailbox_irqs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001453 .main_clk = "mailboxes_ick",
1454 .prcm = {
1455 .omap2 = {
1456 .prcm_reg_id = 1,
1457 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1458 .module_offs = CORE_MOD,
1459 .idlest_reg_id = 1,
1460 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1461 },
1462 },
1463 .slaves = omap2430_mailbox_slaves,
1464 .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001465};
1466
Charulatha V7f904c72011-02-17 09:53:10 -08001467/* mcspi1 */
Charulatha V7f904c72011-02-17 09:53:10 -08001468static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
1469 &omap2430_l4_core__mcspi1,
1470};
1471
1472static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1473 .num_chipselect = 4,
1474};
1475
1476static struct omap_hwmod omap2430_mcspi1_hwmod = {
1477 .name = "mcspi1_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001478 .mpu_irqs = omap2_mcspi1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001479 .sdma_reqs = omap2_mcspi1_sdma_reqs,
Charulatha V7f904c72011-02-17 09:53:10 -08001480 .main_clk = "mcspi1_fck",
1481 .prcm = {
1482 .omap2 = {
1483 .module_offs = CORE_MOD,
1484 .prcm_reg_id = 1,
1485 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1486 .idlest_reg_id = 1,
1487 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1488 },
1489 },
1490 .slaves = omap2430_mcspi1_slaves,
1491 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001492 .class = &omap2xxx_mcspi_class,
1493 .dev_attr = &omap_mcspi1_dev_attr,
Charulatha V7f904c72011-02-17 09:53:10 -08001494};
1495
1496/* mcspi2 */
Charulatha V7f904c72011-02-17 09:53:10 -08001497static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
1498 &omap2430_l4_core__mcspi2,
1499};
1500
1501static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1502 .num_chipselect = 2,
1503};
1504
1505static struct omap_hwmod omap2430_mcspi2_hwmod = {
1506 .name = "mcspi2_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001507 .mpu_irqs = omap2_mcspi2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001508 .sdma_reqs = omap2_mcspi2_sdma_reqs,
Charulatha V7f904c72011-02-17 09:53:10 -08001509 .main_clk = "mcspi2_fck",
1510 .prcm = {
1511 .omap2 = {
1512 .module_offs = CORE_MOD,
1513 .prcm_reg_id = 1,
1514 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1515 .idlest_reg_id = 1,
1516 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1517 },
1518 },
1519 .slaves = omap2430_mcspi2_slaves,
1520 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001521 .class = &omap2xxx_mcspi_class,
1522 .dev_attr = &omap_mcspi2_dev_attr,
Charulatha V7f904c72011-02-17 09:53:10 -08001523};
1524
1525/* mcspi3 */
1526static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
1527 { .irq = 91 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001528 { .irq = -1 }
Charulatha V7f904c72011-02-17 09:53:10 -08001529};
1530
1531static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
1532 { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
1533 { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
1534 { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
1535 { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
Paul Walmsleybc614952011-07-09 19:14:07 -06001536 { .dma_req = -1 }
Charulatha V7f904c72011-02-17 09:53:10 -08001537};
1538
1539static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
1540 &omap2430_l4_core__mcspi3,
1541};
1542
1543static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1544 .num_chipselect = 2,
1545};
1546
1547static struct omap_hwmod omap2430_mcspi3_hwmod = {
1548 .name = "mcspi3_hwmod",
1549 .mpu_irqs = omap2430_mcspi3_mpu_irqs,
Charulatha V7f904c72011-02-17 09:53:10 -08001550 .sdma_reqs = omap2430_mcspi3_sdma_reqs,
Charulatha V7f904c72011-02-17 09:53:10 -08001551 .main_clk = "mcspi3_fck",
1552 .prcm = {
1553 .omap2 = {
1554 .module_offs = CORE_MOD,
1555 .prcm_reg_id = 2,
1556 .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
1557 .idlest_reg_id = 2,
1558 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
1559 },
1560 },
1561 .slaves = omap2430_mcspi3_slaves,
1562 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001563 .class = &omap2xxx_mcspi_class,
1564 .dev_attr = &omap_mcspi3_dev_attr,
Charulatha V7f904c72011-02-17 09:53:10 -08001565};
1566
Tony Lindgren04aa67d2011-02-22 10:54:12 -08001567/*
Hema HK44d02ac2011-02-17 12:07:17 +05301568 * usbhsotg
1569 */
1570static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
1571 .rev_offs = 0x0400,
1572 .sysc_offs = 0x0404,
1573 .syss_offs = 0x0408,
1574 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1575 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1576 SYSC_HAS_AUTOIDLE),
1577 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1578 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1579 .sysc_fields = &omap_hwmod_sysc_type1,
1580};
1581
1582static struct omap_hwmod_class usbotg_class = {
1583 .name = "usbotg",
1584 .sysc = &omap2430_usbhsotg_sysc,
1585};
1586
1587/* usb_otg_hs */
1588static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
1589
1590 { .name = "mc", .irq = 92 },
1591 { .name = "dma", .irq = 93 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001592 { .irq = -1 }
Hema HK44d02ac2011-02-17 12:07:17 +05301593};
1594
1595static struct omap_hwmod omap2430_usbhsotg_hwmod = {
1596 .name = "usb_otg_hs",
1597 .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
Hema HK44d02ac2011-02-17 12:07:17 +05301598 .main_clk = "usbhs_ick",
1599 .prcm = {
1600 .omap2 = {
1601 .prcm_reg_id = 1,
1602 .module_bit = OMAP2430_EN_USBHS_MASK,
1603 .module_offs = CORE_MOD,
1604 .idlest_reg_id = 1,
1605 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
1606 },
1607 },
1608 .masters = omap2430_usbhsotg_masters,
1609 .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
1610 .slaves = omap2430_usbhsotg_slaves,
1611 .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
1612 .class = &usbotg_class,
1613 /*
1614 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1615 * broken when autoidle is enabled
1616 * workaround is to disable the autoidle bit at module level.
1617 */
1618 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1619 | HWMOD_SWSUP_MSTANDBY,
Hema HK44d02ac2011-02-17 12:07:17 +05301620};
1621
Charulatha V37801b32011-02-24 12:51:46 -08001622/*
1623 * 'mcbsp' class
1624 * multi channel buffered serial port controller
1625 */
Tony Lindgren04aa67d2011-02-22 10:54:12 -08001626
Charulatha V37801b32011-02-24 12:51:46 -08001627static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
1628 .rev_offs = 0x007C,
1629 .sysc_offs = 0x008C,
1630 .sysc_flags = (SYSC_HAS_SOFTRESET),
1631 .sysc_fields = &omap_hwmod_sysc_type1,
1632};
1633
1634static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
1635 .name = "mcbsp",
1636 .sysc = &omap2430_mcbsp_sysc,
1637 .rev = MCBSP_CONFIG_TYPE2,
1638};
1639
1640/* mcbsp1 */
1641static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
1642 { .name = "tx", .irq = 59 },
1643 { .name = "rx", .irq = 60 },
1644 { .name = "ovr", .irq = 61 },
1645 { .name = "common", .irq = 64 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001646 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08001647};
1648
Charulatha V37801b32011-02-24 12:51:46 -08001649/* l4_core -> mcbsp1 */
1650static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
1651 .master = &omap2430_l4_core_hwmod,
1652 .slave = &omap2430_mcbsp1_hwmod,
1653 .clk = "mcbsp1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001654 .addr = omap2_mcbsp1_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08001655 .user = OCP_USER_MPU | OCP_USER_SDMA,
1656};
1657
1658/* mcbsp1 slave ports */
1659static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
1660 &omap2430_l4_core__mcbsp1,
1661};
1662
1663static struct omap_hwmod omap2430_mcbsp1_hwmod = {
1664 .name = "mcbsp1",
1665 .class = &omap2430_mcbsp_hwmod_class,
1666 .mpu_irqs = omap2430_mcbsp1_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001667 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
Charulatha V37801b32011-02-24 12:51:46 -08001668 .main_clk = "mcbsp1_fck",
1669 .prcm = {
1670 .omap2 = {
1671 .prcm_reg_id = 1,
1672 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1673 .module_offs = CORE_MOD,
1674 .idlest_reg_id = 1,
1675 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1676 },
1677 },
1678 .slaves = omap2430_mcbsp1_slaves,
1679 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
Charulatha V37801b32011-02-24 12:51:46 -08001680};
1681
1682/* mcbsp2 */
1683static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
1684 { .name = "tx", .irq = 62 },
1685 { .name = "rx", .irq = 63 },
1686 { .name = "common", .irq = 16 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001687 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08001688};
1689
Charulatha V37801b32011-02-24 12:51:46 -08001690/* l4_core -> mcbsp2 */
1691static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
1692 .master = &omap2430_l4_core_hwmod,
1693 .slave = &omap2430_mcbsp2_hwmod,
1694 .clk = "mcbsp2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001695 .addr = omap2xxx_mcbsp2_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08001696 .user = OCP_USER_MPU | OCP_USER_SDMA,
1697};
1698
1699/* mcbsp2 slave ports */
1700static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
1701 &omap2430_l4_core__mcbsp2,
1702};
1703
1704static struct omap_hwmod omap2430_mcbsp2_hwmod = {
1705 .name = "mcbsp2",
1706 .class = &omap2430_mcbsp_hwmod_class,
1707 .mpu_irqs = omap2430_mcbsp2_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001708 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
Charulatha V37801b32011-02-24 12:51:46 -08001709 .main_clk = "mcbsp2_fck",
1710 .prcm = {
1711 .omap2 = {
1712 .prcm_reg_id = 1,
1713 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1714 .module_offs = CORE_MOD,
1715 .idlest_reg_id = 1,
1716 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1717 },
1718 },
1719 .slaves = omap2430_mcbsp2_slaves,
1720 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
Charulatha V37801b32011-02-24 12:51:46 -08001721};
1722
1723/* mcbsp3 */
1724static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
1725 { .name = "tx", .irq = 89 },
1726 { .name = "rx", .irq = 90 },
1727 { .name = "common", .irq = 17 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001728 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08001729};
1730
Charulatha V37801b32011-02-24 12:51:46 -08001731static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
1732 {
1733 .name = "mpu",
1734 .pa_start = 0x4808C000,
1735 .pa_end = 0x4808C0ff,
1736 .flags = ADDR_TYPE_RT
1737 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001738 { }
Charulatha V37801b32011-02-24 12:51:46 -08001739};
1740
1741/* l4_core -> mcbsp3 */
1742static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
1743 .master = &omap2430_l4_core_hwmod,
1744 .slave = &omap2430_mcbsp3_hwmod,
1745 .clk = "mcbsp3_ick",
1746 .addr = omap2430_mcbsp3_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08001747 .user = OCP_USER_MPU | OCP_USER_SDMA,
1748};
1749
1750/* mcbsp3 slave ports */
1751static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
1752 &omap2430_l4_core__mcbsp3,
1753};
1754
1755static struct omap_hwmod omap2430_mcbsp3_hwmod = {
1756 .name = "mcbsp3",
1757 .class = &omap2430_mcbsp_hwmod_class,
1758 .mpu_irqs = omap2430_mcbsp3_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001759 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
Charulatha V37801b32011-02-24 12:51:46 -08001760 .main_clk = "mcbsp3_fck",
1761 .prcm = {
1762 .omap2 = {
1763 .prcm_reg_id = 1,
1764 .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
1765 .module_offs = CORE_MOD,
1766 .idlest_reg_id = 2,
1767 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
1768 },
1769 },
1770 .slaves = omap2430_mcbsp3_slaves,
1771 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
Charulatha V37801b32011-02-24 12:51:46 -08001772};
1773
1774/* mcbsp4 */
1775static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
1776 { .name = "tx", .irq = 54 },
1777 { .name = "rx", .irq = 55 },
1778 { .name = "common", .irq = 18 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001779 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08001780};
1781
1782static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
1783 { .name = "rx", .dma_req = 20 },
1784 { .name = "tx", .dma_req = 19 },
Paul Walmsleybc614952011-07-09 19:14:07 -06001785 { .dma_req = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08001786};
1787
1788static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
1789 {
1790 .name = "mpu",
1791 .pa_start = 0x4808E000,
1792 .pa_end = 0x4808E0ff,
1793 .flags = ADDR_TYPE_RT
1794 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001795 { }
Charulatha V37801b32011-02-24 12:51:46 -08001796};
1797
1798/* l4_core -> mcbsp4 */
1799static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
1800 .master = &omap2430_l4_core_hwmod,
1801 .slave = &omap2430_mcbsp4_hwmod,
1802 .clk = "mcbsp4_ick",
1803 .addr = omap2430_mcbsp4_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08001804 .user = OCP_USER_MPU | OCP_USER_SDMA,
1805};
1806
1807/* mcbsp4 slave ports */
1808static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
1809 &omap2430_l4_core__mcbsp4,
1810};
1811
1812static struct omap_hwmod omap2430_mcbsp4_hwmod = {
1813 .name = "mcbsp4",
1814 .class = &omap2430_mcbsp_hwmod_class,
1815 .mpu_irqs = omap2430_mcbsp4_irqs,
Charulatha V37801b32011-02-24 12:51:46 -08001816 .sdma_reqs = omap2430_mcbsp4_sdma_chs,
Charulatha V37801b32011-02-24 12:51:46 -08001817 .main_clk = "mcbsp4_fck",
1818 .prcm = {
1819 .omap2 = {
1820 .prcm_reg_id = 1,
1821 .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
1822 .module_offs = CORE_MOD,
1823 .idlest_reg_id = 2,
1824 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
1825 },
1826 },
1827 .slaves = omap2430_mcbsp4_slaves,
1828 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
Charulatha V37801b32011-02-24 12:51:46 -08001829};
1830
1831/* mcbsp5 */
1832static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
1833 { .name = "tx", .irq = 81 },
1834 { .name = "rx", .irq = 82 },
1835 { .name = "common", .irq = 19 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001836 { .irq = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08001837};
1838
1839static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
1840 { .name = "rx", .dma_req = 22 },
1841 { .name = "tx", .dma_req = 21 },
Paul Walmsleybc614952011-07-09 19:14:07 -06001842 { .dma_req = -1 }
Charulatha V37801b32011-02-24 12:51:46 -08001843};
1844
1845static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
1846 {
1847 .name = "mpu",
1848 .pa_start = 0x48096000,
1849 .pa_end = 0x480960ff,
1850 .flags = ADDR_TYPE_RT
1851 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001852 { }
Charulatha V37801b32011-02-24 12:51:46 -08001853};
1854
1855/* l4_core -> mcbsp5 */
1856static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
1857 .master = &omap2430_l4_core_hwmod,
1858 .slave = &omap2430_mcbsp5_hwmod,
1859 .clk = "mcbsp5_ick",
1860 .addr = omap2430_mcbsp5_addrs,
Charulatha V37801b32011-02-24 12:51:46 -08001861 .user = OCP_USER_MPU | OCP_USER_SDMA,
1862};
1863
1864/* mcbsp5 slave ports */
1865static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
1866 &omap2430_l4_core__mcbsp5,
1867};
1868
1869static struct omap_hwmod omap2430_mcbsp5_hwmod = {
1870 .name = "mcbsp5",
1871 .class = &omap2430_mcbsp_hwmod_class,
1872 .mpu_irqs = omap2430_mcbsp5_irqs,
Charulatha V37801b32011-02-24 12:51:46 -08001873 .sdma_reqs = omap2430_mcbsp5_sdma_chs,
Charulatha V37801b32011-02-24 12:51:46 -08001874 .main_clk = "mcbsp5_fck",
1875 .prcm = {
1876 .omap2 = {
1877 .prcm_reg_id = 1,
1878 .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
1879 .module_offs = CORE_MOD,
1880 .idlest_reg_id = 2,
1881 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
1882 },
1883 },
1884 .slaves = omap2430_mcbsp5_slaves,
1885 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
Charulatha V37801b32011-02-24 12:51:46 -08001886};
Tony Lindgren04aa67d2011-02-22 10:54:12 -08001887
Paul Walmsleybce06f32011-03-01 13:12:55 -08001888/* MMC/SD/SDIO common */
1889
1890static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
1891 .rev_offs = 0x1fc,
1892 .sysc_offs = 0x10,
1893 .syss_offs = 0x14,
1894 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1895 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1896 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1897 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1898 .sysc_fields = &omap_hwmod_sysc_type1,
1899};
1900
1901static struct omap_hwmod_class omap2430_mmc_class = {
1902 .name = "mmc",
1903 .sysc = &omap2430_mmc_sysc,
1904};
1905
1906/* MMC/SD/SDIO1 */
1907
1908static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
1909 { .irq = 83 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001910 { .irq = -1 }
Paul Walmsleybce06f32011-03-01 13:12:55 -08001911};
1912
1913static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
1914 { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
1915 { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
Paul Walmsleybc614952011-07-09 19:14:07 -06001916 { .dma_req = -1 }
Paul Walmsleybce06f32011-03-01 13:12:55 -08001917};
1918
1919static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
1920 { .role = "dbck", .clk = "mmchsdb1_fck" },
1921};
1922
1923static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
1924 &omap2430_l4_core__mmc1,
1925};
1926
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08001927static struct omap_mmc_dev_attr mmc1_dev_attr = {
1928 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1929};
1930
Paul Walmsleybce06f32011-03-01 13:12:55 -08001931static struct omap_hwmod omap2430_mmc1_hwmod = {
1932 .name = "mmc1",
1933 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1934 .mpu_irqs = omap2430_mmc1_mpu_irqs,
Paul Walmsleybce06f32011-03-01 13:12:55 -08001935 .sdma_reqs = omap2430_mmc1_sdma_reqs,
Paul Walmsleybce06f32011-03-01 13:12:55 -08001936 .opt_clks = omap2430_mmc1_opt_clks,
1937 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
1938 .main_clk = "mmchs1_fck",
1939 .prcm = {
1940 .omap2 = {
1941 .module_offs = CORE_MOD,
1942 .prcm_reg_id = 2,
1943 .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
1944 .idlest_reg_id = 2,
1945 .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
1946 },
1947 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08001948 .dev_attr = &mmc1_dev_attr,
Paul Walmsleybce06f32011-03-01 13:12:55 -08001949 .slaves = omap2430_mmc1_slaves,
1950 .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
1951 .class = &omap2430_mmc_class,
Paul Walmsleybce06f32011-03-01 13:12:55 -08001952};
1953
1954/* MMC/SD/SDIO2 */
1955
1956static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
1957 { .irq = 86 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001958 { .irq = -1 }
Paul Walmsleybce06f32011-03-01 13:12:55 -08001959};
1960
1961static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
1962 { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
1963 { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
Paul Walmsleybc614952011-07-09 19:14:07 -06001964 { .dma_req = -1 }
Paul Walmsleybce06f32011-03-01 13:12:55 -08001965};
1966
1967static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
1968 { .role = "dbck", .clk = "mmchsdb2_fck" },
1969};
1970
1971static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
1972 &omap2430_l4_core__mmc2,
1973};
1974
1975static struct omap_hwmod omap2430_mmc2_hwmod = {
1976 .name = "mmc2",
1977 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1978 .mpu_irqs = omap2430_mmc2_mpu_irqs,
Paul Walmsleybce06f32011-03-01 13:12:55 -08001979 .sdma_reqs = omap2430_mmc2_sdma_reqs,
Paul Walmsleybce06f32011-03-01 13:12:55 -08001980 .opt_clks = omap2430_mmc2_opt_clks,
1981 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
1982 .main_clk = "mmchs2_fck",
1983 .prcm = {
1984 .omap2 = {
1985 .module_offs = CORE_MOD,
1986 .prcm_reg_id = 2,
1987 .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
1988 .idlest_reg_id = 2,
1989 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
1990 },
1991 },
1992 .slaves = omap2430_mmc2_slaves,
1993 .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
1994 .class = &omap2430_mmc_class,
Paul Walmsleybce06f32011-03-01 13:12:55 -08001995};
Paul Walmsley02bfc032009-09-03 20:14:05 +03001996
1997static __initdata struct omap_hwmod *omap2430_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001998 &omap2430_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +03001999 &omap2430_l4_core_hwmod,
2000 &omap2430_l4_wkup_hwmod,
2001 &omap2430_mpu_hwmod,
Paul Walmsley08072ac2010-07-26 16:34:33 -06002002 &omap2430_iva_hwmod,
Thara Gopinathb6b58222011-02-23 00:14:05 -07002003
2004 &omap2430_timer1_hwmod,
2005 &omap2430_timer2_hwmod,
2006 &omap2430_timer3_hwmod,
2007 &omap2430_timer4_hwmod,
2008 &omap2430_timer5_hwmod,
2009 &omap2430_timer6_hwmod,
2010 &omap2430_timer7_hwmod,
2011 &omap2430_timer8_hwmod,
2012 &omap2430_timer9_hwmod,
2013 &omap2430_timer10_hwmod,
2014 &omap2430_timer11_hwmod,
2015 &omap2430_timer12_hwmod,
2016
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +05302017 &omap2430_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05302018 &omap2430_uart1_hwmod,
2019 &omap2430_uart2_hwmod,
2020 &omap2430_uart3_hwmod,
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +02002021 /* dss class */
2022 &omap2430_dss_core_hwmod,
2023 &omap2430_dss_dispc_hwmod,
2024 &omap2430_dss_rfbi_hwmod,
2025 &omap2430_dss_venc_hwmod,
2026 /* i2c class */
Paul Walmsley20042902010-09-30 02:40:12 +05302027 &omap2430_i2c1_hwmod,
2028 &omap2430_i2c2_hwmod,
Paul Walmsleybce06f32011-03-01 13:12:55 -08002029 &omap2430_mmc1_hwmod,
2030 &omap2430_mmc2_hwmod,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -08002031
2032 /* gpio class */
2033 &omap2430_gpio1_hwmod,
2034 &omap2430_gpio2_hwmod,
2035 &omap2430_gpio3_hwmod,
2036 &omap2430_gpio4_hwmod,
2037 &omap2430_gpio5_hwmod,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -08002038
2039 /* dma_system class*/
2040 &omap2430_dma_system_hwmod,
Charulatha V7f904c72011-02-17 09:53:10 -08002041
Charulatha V37801b32011-02-24 12:51:46 -08002042 /* mcbsp class */
2043 &omap2430_mcbsp1_hwmod,
2044 &omap2430_mcbsp2_hwmod,
2045 &omap2430_mcbsp3_hwmod,
2046 &omap2430_mcbsp4_hwmod,
2047 &omap2430_mcbsp5_hwmod,
2048
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08002049 /* mailbox class */
2050 &omap2430_mailbox_hwmod,
2051
Charulatha V7f904c72011-02-17 09:53:10 -08002052 /* mcspi class */
2053 &omap2430_mcspi1_hwmod,
2054 &omap2430_mcspi2_hwmod,
2055 &omap2430_mcspi3_hwmod,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002056
Hema HK44d02ac2011-02-17 12:07:17 +05302057 /* usbotg class*/
2058 &omap2430_usbhsotg_hwmod,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002059
Paul Walmsley02bfc032009-09-03 20:14:05 +03002060 NULL,
2061};
2062
Paul Walmsley73591542010-02-22 22:09:32 -07002063int __init omap2430_hwmod_init(void)
2064{
Paul Walmsley550c8092011-02-28 11:58:14 -07002065 return omap_hwmod_register(omap2430_hwmods);
Paul Walmsley73591542010-02-22 22:09:32 -07002066}