blob: 95f547cf35d8a02810eff97c40e1540f48b30185 [file] [log] [blame]
Paul Walmsley02bfc032009-09-03 20:14:05 +03001/*
Paul Walmsley73591542010-02-22 22:09:32 -07002 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 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, Charulatha59c348c2010-12-07 16:26:56 -080020#include <plat/gpio.h>
Charulatha V617871d2011-02-17 09:53:09 -080021#include <plat/mcspi.h>
Thara Gopinatheddb1262011-02-23 00:14:04 -070022#include <plat/dmtimer.h>
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +020023#include <plat/l3_2xxx.h>
24#include <plat/l4_2xxx.h>
Paul Walmsley02bfc032009-09-03 20:14:05 +030025
Paul Walmsley43b40992010-02-22 22:09:34 -070026#include "omap_hwmod_common_data.h"
27
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +053028#include "cm-regbits-24xx.h"
Paul Walmsley20042902010-09-30 02:40:12 +053029#include "prm-regbits-24xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070030#include "wd_timer.h"
Paul Walmsley02bfc032009-09-03 20:14:05 +030031
Paul Walmsley73591542010-02-22 22:09:32 -070032/*
33 * OMAP2420 hardware module integration data
34 *
35 * ALl of the data in this section should be autogeneratable from the
36 * TI hardware database or other technical documentation. Data that
37 * is driver-specific or driver-kernel integration-specific belongs
38 * elsewhere.
39 */
40
Paul Walmsley02bfc032009-09-03 20:14:05 +030041static struct omap_hwmod omap2420_mpu_hwmod;
Paul Walmsley08072ac2010-07-26 16:34:33 -060042static struct omap_hwmod omap2420_iva_hwmod;
Kevin Hilman4a7cf902010-07-26 16:34:32 -060043static struct omap_hwmod omap2420_l3_main_hwmod;
Paul Walmsley02bfc032009-09-03 20:14:05 +030044static struct omap_hwmod omap2420_l4_core_hwmod;
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +020045static struct omap_hwmod omap2420_dss_core_hwmod;
46static struct omap_hwmod omap2420_dss_dispc_hwmod;
47static struct omap_hwmod omap2420_dss_rfbi_hwmod;
48static struct omap_hwmod omap2420_dss_venc_hwmod;
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +053049static struct omap_hwmod omap2420_wd_timer2_hwmod;
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -080050static struct omap_hwmod omap2420_gpio1_hwmod;
51static struct omap_hwmod omap2420_gpio2_hwmod;
52static struct omap_hwmod omap2420_gpio3_hwmod;
53static struct omap_hwmod omap2420_gpio4_hwmod;
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -080054static struct omap_hwmod omap2420_dma_system_hwmod;
Charulatha V617871d2011-02-17 09:53:09 -080055static struct omap_hwmod omap2420_mcspi1_hwmod;
56static struct omap_hwmod omap2420_mcspi2_hwmod;
Paul Walmsley02bfc032009-09-03 20:14:05 +030057
58/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060059static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
60 .master = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030061 .slave = &omap2420_l4_core_hwmod,
62 .user = OCP_USER_MPU | OCP_USER_SDMA,
63};
64
65/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060066static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
Paul Walmsley02bfc032009-09-03 20:14:05 +030067 .master = &omap2420_mpu_hwmod,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060068 .slave = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030069 .user = OCP_USER_MPU,
70};
71
72/* Slave interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060073static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
74 &omap2420_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +030075};
76
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +020077/* DSS -> l3 */
78static struct omap_hwmod_ocp_if omap2420_dss__l3 = {
79 .master = &omap2420_dss_core_hwmod,
80 .slave = &omap2420_l3_main_hwmod,
81 .fw = {
82 .omap2 = {
83 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
84 .flags = OMAP_FIREWALL_L3,
85 }
86 },
87 .user = OCP_USER_MPU | OCP_USER_SDMA,
88};
89
Paul Walmsley02bfc032009-09-03 20:14:05 +030090/* Master interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060091static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
92 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +030093};
94
95/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060096static struct omap_hwmod omap2420_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -060097 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -070098 .class = &l3_hwmod_class,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060099 .masters = omap2420_l3_main_masters,
100 .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
101 .slaves = omap2420_l3_main_slaves,
102 .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600103 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
104 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300105};
106
107static struct omap_hwmod omap2420_l4_wkup_hwmod;
Kevin Hilman046465b2010-09-27 20:19:30 +0530108static struct omap_hwmod omap2420_uart1_hwmod;
109static struct omap_hwmod omap2420_uart2_hwmod;
110static struct omap_hwmod omap2420_uart3_hwmod;
Paul Walmsley20042902010-09-30 02:40:12 +0530111static struct omap_hwmod omap2420_i2c1_hwmod;
112static struct omap_hwmod omap2420_i2c2_hwmod;
Charulatha V3cb72fa2011-02-24 12:51:46 -0800113static struct omap_hwmod omap2420_mcbsp1_hwmod;
114static struct omap_hwmod omap2420_mcbsp2_hwmod;
Paul Walmsley02bfc032009-09-03 20:14:05 +0300115
Charulatha V617871d2011-02-17 09:53:09 -0800116/* l4 core -> mcspi1 interface */
Charulatha V617871d2011-02-17 09:53:09 -0800117static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
118 .master = &omap2420_l4_core_hwmod,
119 .slave = &omap2420_mcspi1_hwmod,
120 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600121 .addr = omap2_mcspi1_addr_space,
Charulatha V617871d2011-02-17 09:53:09 -0800122 .user = OCP_USER_MPU | OCP_USER_SDMA,
123};
124
125/* l4 core -> mcspi2 interface */
Charulatha V617871d2011-02-17 09:53:09 -0800126static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
127 .master = &omap2420_l4_core_hwmod,
128 .slave = &omap2420_mcspi2_hwmod,
129 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600130 .addr = omap2_mcspi2_addr_space,
Charulatha V617871d2011-02-17 09:53:09 -0800131 .user = OCP_USER_MPU | OCP_USER_SDMA,
132};
133
Paul Walmsley02bfc032009-09-03 20:14:05 +0300134/* L4_CORE -> L4_WKUP interface */
135static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
136 .master = &omap2420_l4_core_hwmod,
137 .slave = &omap2420_l4_wkup_hwmod,
138 .user = OCP_USER_MPU | OCP_USER_SDMA,
139};
140
Kevin Hilman046465b2010-09-27 20:19:30 +0530141/* L4 CORE -> UART1 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530142static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
143 .master = &omap2420_l4_core_hwmod,
144 .slave = &omap2420_uart1_hwmod,
145 .clk = "uart1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600146 .addr = omap2xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530147 .user = OCP_USER_MPU | OCP_USER_SDMA,
148};
149
150/* L4 CORE -> UART2 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530151static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
152 .master = &omap2420_l4_core_hwmod,
153 .slave = &omap2420_uart2_hwmod,
154 .clk = "uart2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600155 .addr = omap2xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530156 .user = OCP_USER_MPU | OCP_USER_SDMA,
157};
158
159/* L4 PER -> UART3 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530160static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
161 .master = &omap2420_l4_core_hwmod,
162 .slave = &omap2420_uart3_hwmod,
163 .clk = "uart3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600164 .addr = omap2xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530165 .user = OCP_USER_MPU | OCP_USER_SDMA,
166};
167
Paul Walmsley20042902010-09-30 02:40:12 +0530168/* L4 CORE -> I2C1 interface */
Paul Walmsley20042902010-09-30 02:40:12 +0530169static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
170 .master = &omap2420_l4_core_hwmod,
171 .slave = &omap2420_i2c1_hwmod,
172 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600173 .addr = omap2_i2c1_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530174 .user = OCP_USER_MPU | OCP_USER_SDMA,
175};
176
177/* L4 CORE -> I2C2 interface */
Paul Walmsley20042902010-09-30 02:40:12 +0530178static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
179 .master = &omap2420_l4_core_hwmod,
180 .slave = &omap2420_i2c2_hwmod,
181 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600182 .addr = omap2_i2c2_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530183 .user = OCP_USER_MPU | OCP_USER_SDMA,
184};
185
Paul Walmsley02bfc032009-09-03 20:14:05 +0300186/* Slave interfaces on the L4_CORE interconnect */
187static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600188 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300189};
190
191/* Master interfaces on the L4_CORE interconnect */
192static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
193 &omap2420_l4_core__l4_wkup,
Kevin Hilman046465b2010-09-27 20:19:30 +0530194 &omap2_l4_core__uart1,
195 &omap2_l4_core__uart2,
196 &omap2_l4_core__uart3,
Paul Walmsley20042902010-09-30 02:40:12 +0530197 &omap2420_l4_core__i2c1,
198 &omap2420_l4_core__i2c2
Paul Walmsley02bfc032009-09-03 20:14:05 +0300199};
200
201/* L4 CORE */
202static struct omap_hwmod omap2420_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600203 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -0700204 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300205 .masters = omap2420_l4_core_masters,
206 .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
207 .slaves = omap2420_l4_core_slaves,
208 .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600209 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
210 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300211};
212
213/* Slave interfaces on the L4_WKUP interconnect */
214static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
215 &omap2420_l4_core__l4_wkup,
216};
217
218/* Master interfaces on the L4_WKUP interconnect */
219static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
220};
221
222/* L4 WKUP */
223static struct omap_hwmod omap2420_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600224 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700225 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300226 .masters = omap2420_l4_wkup_masters,
227 .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
228 .slaves = omap2420_l4_wkup_slaves,
229 .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600230 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
231 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300232};
233
234/* Master interfaces on the MPU device */
235static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600236 &omap2420_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300237};
238
239/* MPU */
240static struct omap_hwmod omap2420_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600241 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700242 .class = &mpu_hwmod_class,
Paul Walmsley50ebdac2010-02-22 22:09:31 -0700243 .main_clk = "mpu_ck",
Paul Walmsley02bfc032009-09-03 20:14:05 +0300244 .masters = omap2420_mpu_masters,
245 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
246 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
247};
248
Paul Walmsley08072ac2010-07-26 16:34:33 -0600249/*
250 * IVA1 interface data
251 */
252
253/* IVA <- L3 interface */
254static struct omap_hwmod_ocp_if omap2420_l3__iva = {
255 .master = &omap2420_l3_main_hwmod,
256 .slave = &omap2420_iva_hwmod,
257 .clk = "iva1_ifck",
258 .user = OCP_USER_MPU | OCP_USER_SDMA,
259};
260
261static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
262 &omap2420_l3__iva,
263};
264
265/*
266 * IVA2 (IVA2)
267 */
268
269static struct omap_hwmod omap2420_iva_hwmod = {
270 .name = "iva",
271 .class = &iva_hwmod_class,
272 .masters = omap2420_iva_masters,
273 .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
274 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
275};
276
Thara Gopinatheddb1262011-02-23 00:14:04 -0700277/* timer1 */
278static struct omap_hwmod omap2420_timer1_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700279
280static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
281 {
282 .pa_start = 0x48028000,
283 .pa_end = 0x48028000 + SZ_1K - 1,
284 .flags = ADDR_TYPE_RT
285 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600286 { }
Thara Gopinatheddb1262011-02-23 00:14:04 -0700287};
288
289/* l4_wkup -> timer1 */
290static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
291 .master = &omap2420_l4_wkup_hwmod,
292 .slave = &omap2420_timer1_hwmod,
293 .clk = "gpt1_ick",
294 .addr = omap2420_timer1_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700295 .user = OCP_USER_MPU | OCP_USER_SDMA,
296};
297
298/* timer1 slave port */
299static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
300 &omap2420_l4_wkup__timer1,
301};
302
303/* timer1 hwmod */
304static struct omap_hwmod omap2420_timer1_hwmod = {
305 .name = "timer1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600306 .mpu_irqs = omap2_timer1_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700307 .main_clk = "gpt1_fck",
308 .prcm = {
309 .omap2 = {
310 .prcm_reg_id = 1,
311 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
312 .module_offs = WKUP_MOD,
313 .idlest_reg_id = 1,
314 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
315 },
316 },
317 .slaves = omap2420_timer1_slaves,
318 .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600319 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700320 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
321};
322
323/* timer2 */
324static struct omap_hwmod omap2420_timer2_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700325
326/* l4_core -> timer2 */
327static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
328 .master = &omap2420_l4_core_hwmod,
329 .slave = &omap2420_timer2_hwmod,
330 .clk = "gpt2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600331 .addr = omap2xxx_timer2_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700332 .user = OCP_USER_MPU | OCP_USER_SDMA,
333};
334
335/* timer2 slave port */
336static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
337 &omap2420_l4_core__timer2,
338};
339
340/* timer2 hwmod */
341static struct omap_hwmod omap2420_timer2_hwmod = {
342 .name = "timer2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600343 .mpu_irqs = omap2_timer2_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700344 .main_clk = "gpt2_fck",
345 .prcm = {
346 .omap2 = {
347 .prcm_reg_id = 1,
348 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
349 .module_offs = CORE_MOD,
350 .idlest_reg_id = 1,
351 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
352 },
353 },
354 .slaves = omap2420_timer2_slaves,
355 .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600356 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700357 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
358};
359
360/* timer3 */
361static struct omap_hwmod omap2420_timer3_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700362
Thara Gopinatheddb1262011-02-23 00:14:04 -0700363/* l4_core -> timer3 */
364static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
365 .master = &omap2420_l4_core_hwmod,
366 .slave = &omap2420_timer3_hwmod,
367 .clk = "gpt3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600368 .addr = omap2xxx_timer3_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700369 .user = OCP_USER_MPU | OCP_USER_SDMA,
370};
371
372/* timer3 slave port */
373static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
374 &omap2420_l4_core__timer3,
375};
376
377/* timer3 hwmod */
378static struct omap_hwmod omap2420_timer3_hwmod = {
379 .name = "timer3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600380 .mpu_irqs = omap2_timer3_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700381 .main_clk = "gpt3_fck",
382 .prcm = {
383 .omap2 = {
384 .prcm_reg_id = 1,
385 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
386 .module_offs = CORE_MOD,
387 .idlest_reg_id = 1,
388 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
389 },
390 },
391 .slaves = omap2420_timer3_slaves,
392 .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600393 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700394 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
395};
396
397/* timer4 */
398static struct omap_hwmod omap2420_timer4_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700399
Thara Gopinatheddb1262011-02-23 00:14:04 -0700400/* l4_core -> timer4 */
401static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
402 .master = &omap2420_l4_core_hwmod,
403 .slave = &omap2420_timer4_hwmod,
404 .clk = "gpt4_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600405 .addr = omap2xxx_timer4_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700406 .user = OCP_USER_MPU | OCP_USER_SDMA,
407};
408
409/* timer4 slave port */
410static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
411 &omap2420_l4_core__timer4,
412};
413
414/* timer4 hwmod */
415static struct omap_hwmod omap2420_timer4_hwmod = {
416 .name = "timer4",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600417 .mpu_irqs = omap2_timer4_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700418 .main_clk = "gpt4_fck",
419 .prcm = {
420 .omap2 = {
421 .prcm_reg_id = 1,
422 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
423 .module_offs = CORE_MOD,
424 .idlest_reg_id = 1,
425 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
426 },
427 },
428 .slaves = omap2420_timer4_slaves,
429 .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600430 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700431 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
432};
433
434/* timer5 */
435static struct omap_hwmod omap2420_timer5_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700436
Thara Gopinatheddb1262011-02-23 00:14:04 -0700437/* l4_core -> timer5 */
438static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
439 .master = &omap2420_l4_core_hwmod,
440 .slave = &omap2420_timer5_hwmod,
441 .clk = "gpt5_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600442 .addr = omap2xxx_timer5_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700443 .user = OCP_USER_MPU | OCP_USER_SDMA,
444};
445
446/* timer5 slave port */
447static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
448 &omap2420_l4_core__timer5,
449};
450
451/* timer5 hwmod */
452static struct omap_hwmod omap2420_timer5_hwmod = {
453 .name = "timer5",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600454 .mpu_irqs = omap2_timer5_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700455 .main_clk = "gpt5_fck",
456 .prcm = {
457 .omap2 = {
458 .prcm_reg_id = 1,
459 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
460 .module_offs = CORE_MOD,
461 .idlest_reg_id = 1,
462 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
463 },
464 },
465 .slaves = omap2420_timer5_slaves,
466 .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600467 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700468 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
469};
470
471
472/* timer6 */
473static struct omap_hwmod omap2420_timer6_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700474
Thara Gopinatheddb1262011-02-23 00:14:04 -0700475/* l4_core -> timer6 */
476static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
477 .master = &omap2420_l4_core_hwmod,
478 .slave = &omap2420_timer6_hwmod,
479 .clk = "gpt6_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600480 .addr = omap2xxx_timer6_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700481 .user = OCP_USER_MPU | OCP_USER_SDMA,
482};
483
484/* timer6 slave port */
485static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
486 &omap2420_l4_core__timer6,
487};
488
489/* timer6 hwmod */
490static struct omap_hwmod omap2420_timer6_hwmod = {
491 .name = "timer6",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600492 .mpu_irqs = omap2_timer6_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700493 .main_clk = "gpt6_fck",
494 .prcm = {
495 .omap2 = {
496 .prcm_reg_id = 1,
497 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
498 .module_offs = CORE_MOD,
499 .idlest_reg_id = 1,
500 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
501 },
502 },
503 .slaves = omap2420_timer6_slaves,
504 .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600505 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700506 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
507};
508
509/* timer7 */
510static struct omap_hwmod omap2420_timer7_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700511
Thara Gopinatheddb1262011-02-23 00:14:04 -0700512/* l4_core -> timer7 */
513static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {
514 .master = &omap2420_l4_core_hwmod,
515 .slave = &omap2420_timer7_hwmod,
516 .clk = "gpt7_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600517 .addr = omap2xxx_timer7_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700518 .user = OCP_USER_MPU | OCP_USER_SDMA,
519};
520
521/* timer7 slave port */
522static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {
523 &omap2420_l4_core__timer7,
524};
525
526/* timer7 hwmod */
527static struct omap_hwmod omap2420_timer7_hwmod = {
528 .name = "timer7",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600529 .mpu_irqs = omap2_timer7_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700530 .main_clk = "gpt7_fck",
531 .prcm = {
532 .omap2 = {
533 .prcm_reg_id = 1,
534 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
535 .module_offs = CORE_MOD,
536 .idlest_reg_id = 1,
537 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
538 },
539 },
540 .slaves = omap2420_timer7_slaves,
541 .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600542 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700543 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
544};
545
546/* timer8 */
547static struct omap_hwmod omap2420_timer8_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700548
Thara Gopinatheddb1262011-02-23 00:14:04 -0700549/* l4_core -> timer8 */
550static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = {
551 .master = &omap2420_l4_core_hwmod,
552 .slave = &omap2420_timer8_hwmod,
553 .clk = "gpt8_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600554 .addr = omap2xxx_timer8_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700555 .user = OCP_USER_MPU | OCP_USER_SDMA,
556};
557
558/* timer8 slave port */
559static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
560 &omap2420_l4_core__timer8,
561};
562
563/* timer8 hwmod */
564static struct omap_hwmod omap2420_timer8_hwmod = {
565 .name = "timer8",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600566 .mpu_irqs = omap2_timer8_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700567 .main_clk = "gpt8_fck",
568 .prcm = {
569 .omap2 = {
570 .prcm_reg_id = 1,
571 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
572 .module_offs = CORE_MOD,
573 .idlest_reg_id = 1,
574 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
575 },
576 },
577 .slaves = omap2420_timer8_slaves,
578 .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600579 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700580 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
581};
582
583/* timer9 */
584static struct omap_hwmod omap2420_timer9_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700585
Thara Gopinatheddb1262011-02-23 00:14:04 -0700586/* l4_core -> timer9 */
587static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
588 .master = &omap2420_l4_core_hwmod,
589 .slave = &omap2420_timer9_hwmod,
590 .clk = "gpt9_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600591 .addr = omap2xxx_timer9_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700592 .user = OCP_USER_MPU | OCP_USER_SDMA,
593};
594
595/* timer9 slave port */
596static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
597 &omap2420_l4_core__timer9,
598};
599
600/* timer9 hwmod */
601static struct omap_hwmod omap2420_timer9_hwmod = {
602 .name = "timer9",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600603 .mpu_irqs = omap2_timer9_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700604 .main_clk = "gpt9_fck",
605 .prcm = {
606 .omap2 = {
607 .prcm_reg_id = 1,
608 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
609 .module_offs = CORE_MOD,
610 .idlest_reg_id = 1,
611 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
612 },
613 },
614 .slaves = omap2420_timer9_slaves,
615 .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600616 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700617 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
618};
619
620/* timer10 */
621static struct omap_hwmod omap2420_timer10_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700622
Thara Gopinatheddb1262011-02-23 00:14:04 -0700623/* l4_core -> timer10 */
624static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = {
625 .master = &omap2420_l4_core_hwmod,
626 .slave = &omap2420_timer10_hwmod,
627 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600628 .addr = omap2_timer10_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700629 .user = OCP_USER_MPU | OCP_USER_SDMA,
630};
631
632/* timer10 slave port */
633static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
634 &omap2420_l4_core__timer10,
635};
636
637/* timer10 hwmod */
638static struct omap_hwmod omap2420_timer10_hwmod = {
639 .name = "timer10",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600640 .mpu_irqs = omap2_timer10_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700641 .main_clk = "gpt10_fck",
642 .prcm = {
643 .omap2 = {
644 .prcm_reg_id = 1,
645 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
646 .module_offs = CORE_MOD,
647 .idlest_reg_id = 1,
648 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
649 },
650 },
651 .slaves = omap2420_timer10_slaves,
652 .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600653 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700654 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
655};
656
657/* timer11 */
658static struct omap_hwmod omap2420_timer11_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700659
Thara Gopinatheddb1262011-02-23 00:14:04 -0700660/* l4_core -> timer11 */
661static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = {
662 .master = &omap2420_l4_core_hwmod,
663 .slave = &omap2420_timer11_hwmod,
664 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600665 .addr = omap2_timer11_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700666 .user = OCP_USER_MPU | OCP_USER_SDMA,
667};
668
669/* timer11 slave port */
670static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
671 &omap2420_l4_core__timer11,
672};
673
674/* timer11 hwmod */
675static struct omap_hwmod omap2420_timer11_hwmod = {
676 .name = "timer11",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600677 .mpu_irqs = omap2_timer11_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700678 .main_clk = "gpt11_fck",
679 .prcm = {
680 .omap2 = {
681 .prcm_reg_id = 1,
682 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
683 .module_offs = CORE_MOD,
684 .idlest_reg_id = 1,
685 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
686 },
687 },
688 .slaves = omap2420_timer11_slaves,
689 .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600690 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700691 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
692};
693
694/* timer12 */
695static struct omap_hwmod omap2420_timer12_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700696
Thara Gopinatheddb1262011-02-23 00:14:04 -0700697/* l4_core -> timer12 */
698static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {
699 .master = &omap2420_l4_core_hwmod,
700 .slave = &omap2420_timer12_hwmod,
701 .clk = "gpt12_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600702 .addr = omap2xxx_timer12_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700703 .user = OCP_USER_MPU | OCP_USER_SDMA,
704};
705
706/* timer12 slave port */
707static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
708 &omap2420_l4_core__timer12,
709};
710
711/* timer12 hwmod */
712static struct omap_hwmod omap2420_timer12_hwmod = {
713 .name = "timer12",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600714 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700715 .main_clk = "gpt12_fck",
716 .prcm = {
717 .omap2 = {
718 .prcm_reg_id = 1,
719 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
720 .module_offs = CORE_MOD,
721 .idlest_reg_id = 1,
722 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
723 },
724 },
725 .slaves = omap2420_timer12_slaves,
726 .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600727 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700728 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
729};
730
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530731/* l4_wkup -> wd_timer2 */
732static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
733 {
734 .pa_start = 0x48022000,
735 .pa_end = 0x4802207f,
736 .flags = ADDR_TYPE_RT
737 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600738 { }
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530739};
740
741static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
742 .master = &omap2420_l4_wkup_hwmod,
743 .slave = &omap2420_wd_timer2_hwmod,
744 .clk = "mpu_wdt_ick",
745 .addr = omap2420_wd_timer2_addrs,
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530746 .user = OCP_USER_MPU | OCP_USER_SDMA,
747};
748
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530749/* wd_timer2 */
750static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
751 &omap2420_l4_wkup__wd_timer2,
752};
753
754static struct omap_hwmod omap2420_wd_timer2_hwmod = {
755 .name = "wd_timer2",
Paul Walmsley273b9462011-07-09 19:14:08 -0600756 .class = &omap2xxx_wd_timer_hwmod_class,
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530757 .main_clk = "mpu_wdt_fck",
758 .prcm = {
759 .omap2 = {
760 .prcm_reg_id = 1,
761 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
762 .module_offs = WKUP_MOD,
763 .idlest_reg_id = 1,
764 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
765 },
766 },
767 .slaves = omap2420_wd_timer2_slaves,
768 .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
769 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
770};
771
Kevin Hilman046465b2010-09-27 20:19:30 +0530772/* UART1 */
773
Kevin Hilman046465b2010-09-27 20:19:30 +0530774static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
775 &omap2_l4_core__uart1,
776};
777
778static struct omap_hwmod omap2420_uart1_hwmod = {
779 .name = "uart1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600780 .mpu_irqs = omap2_uart1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600781 .sdma_reqs = omap2_uart1_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530782 .main_clk = "uart1_fck",
783 .prcm = {
784 .omap2 = {
785 .module_offs = CORE_MOD,
786 .prcm_reg_id = 1,
787 .module_bit = OMAP24XX_EN_UART1_SHIFT,
788 .idlest_reg_id = 1,
789 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
790 },
791 },
792 .slaves = omap2420_uart1_slaves,
793 .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600794 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +0530795 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
796};
797
798/* UART2 */
799
Kevin Hilman046465b2010-09-27 20:19:30 +0530800static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
801 &omap2_l4_core__uart2,
802};
803
804static struct omap_hwmod omap2420_uart2_hwmod = {
805 .name = "uart2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600806 .mpu_irqs = omap2_uart2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600807 .sdma_reqs = omap2_uart2_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530808 .main_clk = "uart2_fck",
809 .prcm = {
810 .omap2 = {
811 .module_offs = CORE_MOD,
812 .prcm_reg_id = 1,
813 .module_bit = OMAP24XX_EN_UART2_SHIFT,
814 .idlest_reg_id = 1,
815 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
816 },
817 },
818 .slaves = omap2420_uart2_slaves,
819 .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600820 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +0530821 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
822};
823
824/* UART3 */
825
Kevin Hilman046465b2010-09-27 20:19:30 +0530826static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
827 &omap2_l4_core__uart3,
828};
829
830static struct omap_hwmod omap2420_uart3_hwmod = {
831 .name = "uart3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600832 .mpu_irqs = omap2_uart3_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600833 .sdma_reqs = omap2_uart3_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530834 .main_clk = "uart3_fck",
835 .prcm = {
836 .omap2 = {
837 .module_offs = CORE_MOD,
838 .prcm_reg_id = 2,
839 .module_bit = OMAP24XX_EN_UART3_SHIFT,
840 .idlest_reg_id = 2,
841 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
842 },
843 },
844 .slaves = omap2420_uart3_slaves,
845 .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600846 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +0530847 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
848};
849
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200850/* dss */
851/* dss master ports */
852static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
853 &omap2420_dss__l3,
854};
855
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200856/* l4_core -> dss */
857static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
858 .master = &omap2420_l4_core_hwmod,
859 .slave = &omap2420_dss_core_hwmod,
860 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600861 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200862 .fw = {
863 .omap2 = {
864 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
865 .flags = OMAP_FIREWALL_L4,
866 }
867 },
868 .user = OCP_USER_MPU | OCP_USER_SDMA,
869};
870
871/* dss slave ports */
872static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = {
873 &omap2420_l4_core__dss,
874};
875
876static struct omap_hwmod_opt_clk dss_opt_clks[] = {
877 { .role = "tv_clk", .clk = "dss_54m_fck" },
878 { .role = "sys_clk", .clk = "dss2_fck" },
879};
880
881static struct omap_hwmod omap2420_dss_core_hwmod = {
882 .name = "dss_core",
Paul Walmsley273b9462011-07-09 19:14:08 -0600883 .class = &omap2_dss_hwmod_class,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200884 .main_clk = "dss1_fck", /* instead of dss_fck */
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600885 .sdma_reqs = omap2xxx_dss_sdma_chs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200886 .prcm = {
887 .omap2 = {
888 .prcm_reg_id = 1,
889 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
890 .module_offs = CORE_MOD,
891 .idlest_reg_id = 1,
892 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
893 },
894 },
895 .opt_clks = dss_opt_clks,
896 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
897 .slaves = omap2420_dss_slaves,
898 .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves),
899 .masters = omap2420_dss_masters,
900 .masters_cnt = ARRAY_SIZE(omap2420_dss_masters),
901 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
902 .flags = HWMOD_NO_IDLEST,
903};
904
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200905/* l4_core -> dss_dispc */
906static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
907 .master = &omap2420_l4_core_hwmod,
908 .slave = &omap2420_dss_dispc_hwmod,
909 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600910 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200911 .fw = {
912 .omap2 = {
913 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
914 .flags = OMAP_FIREWALL_L4,
915 }
916 },
917 .user = OCP_USER_MPU | OCP_USER_SDMA,
918};
919
920/* dss_dispc slave ports */
921static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
922 &omap2420_l4_core__dss_dispc,
923};
924
925static struct omap_hwmod omap2420_dss_dispc_hwmod = {
926 .name = "dss_dispc",
Paul Walmsley273b9462011-07-09 19:14:08 -0600927 .class = &omap2_dispc_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -0600928 .mpu_irqs = omap2_dispc_irqs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200929 .main_clk = "dss1_fck",
930 .prcm = {
931 .omap2 = {
932 .prcm_reg_id = 1,
933 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
934 .module_offs = CORE_MOD,
935 .idlest_reg_id = 1,
936 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
937 },
938 },
939 .slaves = omap2420_dss_dispc_slaves,
940 .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves),
941 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
942 .flags = HWMOD_NO_IDLEST,
943};
944
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200945/* l4_core -> dss_rfbi */
946static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
947 .master = &omap2420_l4_core_hwmod,
948 .slave = &omap2420_dss_rfbi_hwmod,
949 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600950 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200951 .fw = {
952 .omap2 = {
953 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
954 .flags = OMAP_FIREWALL_L4,
955 }
956 },
957 .user = OCP_USER_MPU | OCP_USER_SDMA,
958};
959
960/* dss_rfbi slave ports */
961static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
962 &omap2420_l4_core__dss_rfbi,
963};
964
965static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
966 .name = "dss_rfbi",
Paul Walmsley273b9462011-07-09 19:14:08 -0600967 .class = &omap2_rfbi_hwmod_class,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200968 .main_clk = "dss1_fck",
969 .prcm = {
970 .omap2 = {
971 .prcm_reg_id = 1,
972 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
973 .module_offs = CORE_MOD,
974 },
975 },
976 .slaves = omap2420_dss_rfbi_slaves,
977 .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves),
978 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
979 .flags = HWMOD_NO_IDLEST,
980};
981
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200982/* l4_core -> dss_venc */
983static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
984 .master = &omap2420_l4_core_hwmod,
985 .slave = &omap2420_dss_venc_hwmod,
986 .clk = "dss_54m_fck",
Paul Walmsleyded11382011-07-09 19:14:06 -0600987 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200988 .fw = {
989 .omap2 = {
990 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
991 .flags = OMAP_FIREWALL_L4,
992 }
993 },
Paul Walmsleyc39bee82011-03-04 06:02:15 +0000994 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200995 .user = OCP_USER_MPU | OCP_USER_SDMA,
996};
997
998/* dss_venc slave ports */
999static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
1000 &omap2420_l4_core__dss_venc,
1001};
1002
1003static struct omap_hwmod omap2420_dss_venc_hwmod = {
1004 .name = "dss_venc",
Paul Walmsley273b9462011-07-09 19:14:08 -06001005 .class = &omap2_venc_hwmod_class,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +02001006 .main_clk = "dss1_fck",
1007 .prcm = {
1008 .omap2 = {
1009 .prcm_reg_id = 1,
1010 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1011 .module_offs = CORE_MOD,
1012 },
1013 },
1014 .slaves = omap2420_dss_venc_slaves,
1015 .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves),
1016 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1017 .flags = HWMOD_NO_IDLEST,
1018};
1019
Paul Walmsley20042902010-09-30 02:40:12 +05301020/* I2C common */
1021static struct omap_hwmod_class_sysconfig i2c_sysc = {
1022 .rev_offs = 0x00,
1023 .sysc_offs = 0x20,
1024 .syss_offs = 0x10,
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001025 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Paul Walmsley20042902010-09-30 02:40:12 +05301026 .sysc_fields = &omap_hwmod_sysc_type1,
1027};
1028
1029static struct omap_hwmod_class i2c_class = {
1030 .name = "i2c",
1031 .sysc = &i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06001032 .rev = OMAP_I2C_IP_VERSION_1,
Paul Walmsley20042902010-09-30 02:40:12 +05301033};
1034
1035static struct omap_i2c_dev_attr i2c_dev_attr;
1036
1037/* I2C1 */
1038
Paul Walmsley20042902010-09-30 02:40:12 +05301039static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1040 &omap2420_l4_core__i2c1,
1041};
1042
1043static struct omap_hwmod omap2420_i2c1_hwmod = {
1044 .name = "i2c1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001045 .mpu_irqs = omap2_i2c1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001046 .sdma_reqs = omap2_i2c1_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301047 .main_clk = "i2c1_fck",
1048 .prcm = {
1049 .omap2 = {
1050 .module_offs = CORE_MOD,
1051 .prcm_reg_id = 1,
1052 .module_bit = OMAP2420_EN_I2C1_SHIFT,
1053 .idlest_reg_id = 1,
1054 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
1055 },
1056 },
1057 .slaves = omap2420_i2c1_slaves,
1058 .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
1059 .class = &i2c_class,
1060 .dev_attr = &i2c_dev_attr,
1061 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1062 .flags = HWMOD_16BIT_REG,
1063};
1064
1065/* I2C2 */
1066
Paul Walmsley20042902010-09-30 02:40:12 +05301067static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
1068 &omap2420_l4_core__i2c2,
1069};
1070
1071static struct omap_hwmod omap2420_i2c2_hwmod = {
1072 .name = "i2c2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001073 .mpu_irqs = omap2_i2c2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001074 .sdma_reqs = omap2_i2c2_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301075 .main_clk = "i2c2_fck",
1076 .prcm = {
1077 .omap2 = {
1078 .module_offs = CORE_MOD,
1079 .prcm_reg_id = 1,
1080 .module_bit = OMAP2420_EN_I2C2_SHIFT,
1081 .idlest_reg_id = 1,
1082 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
1083 },
1084 },
1085 .slaves = omap2420_i2c2_slaves,
1086 .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
1087 .class = &i2c_class,
1088 .dev_attr = &i2c_dev_attr,
1089 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1090 .flags = HWMOD_16BIT_REG,
1091};
1092
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001093/* l4_wkup -> gpio1 */
1094static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
1095 {
1096 .pa_start = 0x48018000,
1097 .pa_end = 0x480181ff,
1098 .flags = ADDR_TYPE_RT
1099 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001100 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001101};
1102
1103static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
1104 .master = &omap2420_l4_wkup_hwmod,
1105 .slave = &omap2420_gpio1_hwmod,
1106 .clk = "gpios_ick",
1107 .addr = omap2420_gpio1_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001108 .user = OCP_USER_MPU | OCP_USER_SDMA,
1109};
1110
1111/* l4_wkup -> gpio2 */
1112static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
1113 {
1114 .pa_start = 0x4801a000,
1115 .pa_end = 0x4801a1ff,
1116 .flags = ADDR_TYPE_RT
1117 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001118 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001119};
1120
1121static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
1122 .master = &omap2420_l4_wkup_hwmod,
1123 .slave = &omap2420_gpio2_hwmod,
1124 .clk = "gpios_ick",
1125 .addr = omap2420_gpio2_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001126 .user = OCP_USER_MPU | OCP_USER_SDMA,
1127};
1128
1129/* l4_wkup -> gpio3 */
1130static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
1131 {
1132 .pa_start = 0x4801c000,
1133 .pa_end = 0x4801c1ff,
1134 .flags = ADDR_TYPE_RT
1135 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001136 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001137};
1138
1139static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
1140 .master = &omap2420_l4_wkup_hwmod,
1141 .slave = &omap2420_gpio3_hwmod,
1142 .clk = "gpios_ick",
1143 .addr = omap2420_gpio3_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001144 .user = OCP_USER_MPU | OCP_USER_SDMA,
1145};
1146
1147/* l4_wkup -> gpio4 */
1148static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
1149 {
1150 .pa_start = 0x4801e000,
1151 .pa_end = 0x4801e1ff,
1152 .flags = ADDR_TYPE_RT
1153 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001154 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001155};
1156
1157static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
1158 .master = &omap2420_l4_wkup_hwmod,
1159 .slave = &omap2420_gpio4_hwmod,
1160 .clk = "gpios_ick",
1161 .addr = omap2420_gpio4_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001162 .user = OCP_USER_MPU | OCP_USER_SDMA,
1163};
1164
1165/* gpio dev_attr */
1166static struct omap_gpio_dev_attr gpio_dev_attr = {
1167 .bank_width = 32,
1168 .dbck_flag = false,
1169};
1170
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001171/* gpio1 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001172static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1173 &omap2420_l4_wkup__gpio1,
1174};
1175
1176static struct omap_hwmod omap2420_gpio1_hwmod = {
1177 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301178 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001179 .mpu_irqs = omap2_gpio1_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001180 .main_clk = "gpios_fck",
1181 .prcm = {
1182 .omap2 = {
1183 .prcm_reg_id = 1,
1184 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1185 .module_offs = WKUP_MOD,
1186 .idlest_reg_id = 1,
1187 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1188 },
1189 },
1190 .slaves = omap2420_gpio1_slaves,
1191 .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001192 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001193 .dev_attr = &gpio_dev_attr,
1194 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1195};
1196
1197/* gpio2 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001198static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1199 &omap2420_l4_wkup__gpio2,
1200};
1201
1202static struct omap_hwmod omap2420_gpio2_hwmod = {
1203 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301204 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001205 .mpu_irqs = omap2_gpio2_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001206 .main_clk = "gpios_fck",
1207 .prcm = {
1208 .omap2 = {
1209 .prcm_reg_id = 1,
1210 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1211 .module_offs = WKUP_MOD,
1212 .idlest_reg_id = 1,
1213 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1214 },
1215 },
1216 .slaves = omap2420_gpio2_slaves,
1217 .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001218 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001219 .dev_attr = &gpio_dev_attr,
1220 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1221};
1222
1223/* gpio3 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001224static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1225 &omap2420_l4_wkup__gpio3,
1226};
1227
1228static struct omap_hwmod omap2420_gpio3_hwmod = {
1229 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301230 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001231 .mpu_irqs = omap2_gpio3_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001232 .main_clk = "gpios_fck",
1233 .prcm = {
1234 .omap2 = {
1235 .prcm_reg_id = 1,
1236 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1237 .module_offs = WKUP_MOD,
1238 .idlest_reg_id = 1,
1239 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1240 },
1241 },
1242 .slaves = omap2420_gpio3_slaves,
1243 .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001244 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001245 .dev_attr = &gpio_dev_attr,
1246 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1247};
1248
1249/* gpio4 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001250static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1251 &omap2420_l4_wkup__gpio4,
1252};
1253
1254static struct omap_hwmod omap2420_gpio4_hwmod = {
1255 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301256 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001257 .mpu_irqs = omap2_gpio4_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001258 .main_clk = "gpios_fck",
1259 .prcm = {
1260 .omap2 = {
1261 .prcm_reg_id = 1,
1262 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1263 .module_offs = WKUP_MOD,
1264 .idlest_reg_id = 1,
1265 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1266 },
1267 },
1268 .slaves = omap2420_gpio4_slaves,
1269 .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001270 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001271 .dev_attr = &gpio_dev_attr,
1272 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1273};
1274
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001275/* dma attributes */
1276static struct omap_dma_dev_attr dma_dev_attr = {
1277 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1278 IS_CSSA_32 | IS_CDSA_32,
1279 .lch_count = 32,
1280};
1281
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001282/* dma_system -> L3 */
1283static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
1284 .master = &omap2420_dma_system_hwmod,
1285 .slave = &omap2420_l3_main_hwmod,
1286 .clk = "core_l3_ck",
1287 .user = OCP_USER_MPU | OCP_USER_SDMA,
1288};
1289
1290/* dma_system master ports */
1291static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
1292 &omap2420_dma_system__l3,
1293};
1294
1295/* l4_core -> dma_system */
1296static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
1297 .master = &omap2420_l4_core_hwmod,
1298 .slave = &omap2420_dma_system_hwmod,
1299 .clk = "sdma_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001300 .addr = omap2_dma_system_addrs,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001301 .user = OCP_USER_MPU | OCP_USER_SDMA,
1302};
1303
1304/* dma_system slave ports */
1305static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
1306 &omap2420_l4_core__dma_system,
1307};
1308
1309static struct omap_hwmod omap2420_dma_system_hwmod = {
1310 .name = "dma",
Paul Walmsley273b9462011-07-09 19:14:08 -06001311 .class = &omap2xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001312 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001313 .main_clk = "core_l3_ck",
1314 .slaves = omap2420_dma_system_slaves,
1315 .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
1316 .masters = omap2420_dma_system_masters,
1317 .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters),
1318 .dev_attr = &dma_dev_attr,
1319 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1320 .flags = HWMOD_NO_IDLEST,
1321};
1322
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001323/* mailbox */
1324static struct omap_hwmod omap2420_mailbox_hwmod;
1325static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
1326 { .name = "dsp", .irq = 26 },
1327 { .name = "iva", .irq = 34 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001328 { .irq = -1 }
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001329};
1330
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001331/* l4_core -> mailbox */
1332static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
1333 .master = &omap2420_l4_core_hwmod,
1334 .slave = &omap2420_mailbox_hwmod,
Paul Walmsleyded11382011-07-09 19:14:06 -06001335 .addr = omap2_mailbox_addrs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001336 .user = OCP_USER_MPU | OCP_USER_SDMA,
1337};
1338
1339/* mailbox slave ports */
1340static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
1341 &omap2420_l4_core__mailbox,
1342};
1343
1344static struct omap_hwmod omap2420_mailbox_hwmod = {
1345 .name = "mailbox",
Paul Walmsley273b9462011-07-09 19:14:08 -06001346 .class = &omap2xxx_mailbox_hwmod_class,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001347 .mpu_irqs = omap2420_mailbox_irqs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001348 .main_clk = "mailboxes_ick",
1349 .prcm = {
1350 .omap2 = {
1351 .prcm_reg_id = 1,
1352 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1353 .module_offs = CORE_MOD,
1354 .idlest_reg_id = 1,
1355 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1356 },
1357 },
1358 .slaves = omap2420_mailbox_slaves,
1359 .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
1360 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1361};
1362
Charulatha V617871d2011-02-17 09:53:09 -08001363/* mcspi1 */
Charulatha V617871d2011-02-17 09:53:09 -08001364static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
1365 &omap2420_l4_core__mcspi1,
1366};
1367
1368static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1369 .num_chipselect = 4,
1370};
1371
1372static struct omap_hwmod omap2420_mcspi1_hwmod = {
1373 .name = "mcspi1_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001374 .mpu_irqs = omap2_mcspi1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001375 .sdma_reqs = omap2_mcspi1_sdma_reqs,
Charulatha V617871d2011-02-17 09:53:09 -08001376 .main_clk = "mcspi1_fck",
1377 .prcm = {
1378 .omap2 = {
1379 .module_offs = CORE_MOD,
1380 .prcm_reg_id = 1,
1381 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1382 .idlest_reg_id = 1,
1383 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1384 },
1385 },
1386 .slaves = omap2420_mcspi1_slaves,
1387 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001388 .class = &omap2xxx_mcspi_class,
1389 .dev_attr = &omap_mcspi1_dev_attr,
Charulatha V617871d2011-02-17 09:53:09 -08001390 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1391};
1392
1393/* mcspi2 */
Charulatha V617871d2011-02-17 09:53:09 -08001394static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
1395 &omap2420_l4_core__mcspi2,
1396};
1397
1398static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1399 .num_chipselect = 2,
1400};
1401
1402static struct omap_hwmod omap2420_mcspi2_hwmod = {
1403 .name = "mcspi2_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001404 .mpu_irqs = omap2_mcspi2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001405 .sdma_reqs = omap2_mcspi2_sdma_reqs,
Charulatha V617871d2011-02-17 09:53:09 -08001406 .main_clk = "mcspi2_fck",
1407 .prcm = {
1408 .omap2 = {
1409 .module_offs = CORE_MOD,
1410 .prcm_reg_id = 1,
1411 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1412 .idlest_reg_id = 1,
1413 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1414 },
1415 },
1416 .slaves = omap2420_mcspi2_slaves,
1417 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001418 .class = &omap2xxx_mcspi_class,
1419 .dev_attr = &omap_mcspi2_dev_attr,
Charulatha V617871d2011-02-17 09:53:09 -08001420 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1421};
1422
Charulatha V3cb72fa2011-02-24 12:51:46 -08001423/*
1424 * 'mcbsp' class
1425 * multi channel buffered serial port controller
1426 */
1427
1428static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
1429 .name = "mcbsp",
1430};
1431
1432/* mcbsp1 */
1433static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
1434 { .name = "tx", .irq = 59 },
1435 { .name = "rx", .irq = 60 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001436 { .irq = -1 }
Charulatha V3cb72fa2011-02-24 12:51:46 -08001437};
1438
Charulatha V3cb72fa2011-02-24 12:51:46 -08001439/* l4_core -> mcbsp1 */
1440static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
1441 .master = &omap2420_l4_core_hwmod,
1442 .slave = &omap2420_mcbsp1_hwmod,
1443 .clk = "mcbsp1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001444 .addr = omap2_mcbsp1_addrs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001445 .user = OCP_USER_MPU | OCP_USER_SDMA,
1446};
1447
1448/* mcbsp1 slave ports */
1449static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
1450 &omap2420_l4_core__mcbsp1,
1451};
1452
1453static struct omap_hwmod omap2420_mcbsp1_hwmod = {
1454 .name = "mcbsp1",
1455 .class = &omap2420_mcbsp_hwmod_class,
1456 .mpu_irqs = omap2420_mcbsp1_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001457 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001458 .main_clk = "mcbsp1_fck",
1459 .prcm = {
1460 .omap2 = {
1461 .prcm_reg_id = 1,
1462 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1463 .module_offs = CORE_MOD,
1464 .idlest_reg_id = 1,
1465 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1466 },
1467 },
1468 .slaves = omap2420_mcbsp1_slaves,
1469 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
1470 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1471};
1472
1473/* mcbsp2 */
1474static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
1475 { .name = "tx", .irq = 62 },
1476 { .name = "rx", .irq = 63 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001477 { .irq = -1 }
Charulatha V3cb72fa2011-02-24 12:51:46 -08001478};
1479
Charulatha V3cb72fa2011-02-24 12:51:46 -08001480/* l4_core -> mcbsp2 */
1481static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
1482 .master = &omap2420_l4_core_hwmod,
1483 .slave = &omap2420_mcbsp2_hwmod,
1484 .clk = "mcbsp2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001485 .addr = omap2xxx_mcbsp2_addrs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001486 .user = OCP_USER_MPU | OCP_USER_SDMA,
1487};
1488
1489/* mcbsp2 slave ports */
1490static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {
1491 &omap2420_l4_core__mcbsp2,
1492};
1493
1494static struct omap_hwmod omap2420_mcbsp2_hwmod = {
1495 .name = "mcbsp2",
1496 .class = &omap2420_mcbsp_hwmod_class,
1497 .mpu_irqs = omap2420_mcbsp2_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001498 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001499 .main_clk = "mcbsp2_fck",
1500 .prcm = {
1501 .omap2 = {
1502 .prcm_reg_id = 1,
1503 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1504 .module_offs = CORE_MOD,
1505 .idlest_reg_id = 1,
1506 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1507 },
1508 },
1509 .slaves = omap2420_mcbsp2_slaves,
1510 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
1511 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1512};
1513
Paul Walmsley02bfc032009-09-03 20:14:05 +03001514static __initdata struct omap_hwmod *omap2420_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001515 &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +03001516 &omap2420_l4_core_hwmod,
1517 &omap2420_l4_wkup_hwmod,
1518 &omap2420_mpu_hwmod,
Paul Walmsley08072ac2010-07-26 16:34:33 -06001519 &omap2420_iva_hwmod,
Thara Gopinatheddb1262011-02-23 00:14:04 -07001520
1521 &omap2420_timer1_hwmod,
1522 &omap2420_timer2_hwmod,
1523 &omap2420_timer3_hwmod,
1524 &omap2420_timer4_hwmod,
1525 &omap2420_timer5_hwmod,
1526 &omap2420_timer6_hwmod,
1527 &omap2420_timer7_hwmod,
1528 &omap2420_timer8_hwmod,
1529 &omap2420_timer9_hwmod,
1530 &omap2420_timer10_hwmod,
1531 &omap2420_timer11_hwmod,
1532 &omap2420_timer12_hwmod,
1533
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +05301534 &omap2420_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05301535 &omap2420_uart1_hwmod,
1536 &omap2420_uart2_hwmod,
1537 &omap2420_uart3_hwmod,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +02001538 /* dss class */
1539 &omap2420_dss_core_hwmod,
1540 &omap2420_dss_dispc_hwmod,
1541 &omap2420_dss_rfbi_hwmod,
1542 &omap2420_dss_venc_hwmod,
1543 /* i2c class */
Paul Walmsley20042902010-09-30 02:40:12 +05301544 &omap2420_i2c1_hwmod,
1545 &omap2420_i2c2_hwmod,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001546
1547 /* gpio class */
1548 &omap2420_gpio1_hwmod,
1549 &omap2420_gpio2_hwmod,
1550 &omap2420_gpio3_hwmod,
1551 &omap2420_gpio4_hwmod,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001552
1553 /* dma_system class*/
1554 &omap2420_dma_system_hwmod,
Charulatha V617871d2011-02-17 09:53:09 -08001555
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001556 /* mailbox class */
1557 &omap2420_mailbox_hwmod,
1558
Charulatha V3cb72fa2011-02-24 12:51:46 -08001559 /* mcbsp class */
1560 &omap2420_mcbsp1_hwmod,
1561 &omap2420_mcbsp2_hwmod,
1562
Charulatha V617871d2011-02-17 09:53:09 -08001563 /* mcspi class */
1564 &omap2420_mcspi1_hwmod,
1565 &omap2420_mcspi2_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +03001566 NULL,
1567};
1568
Paul Walmsley73591542010-02-22 22:09:32 -07001569int __init omap2420_hwmod_init(void)
1570{
Paul Walmsley550c8092011-02-28 11:58:14 -07001571 return omap_hwmod_register(omap2420_hwmods);
Paul Walmsley73591542010-02-22 22:09:32 -07001572}