blob: caaf40911dd4838e199c45533fa6d0a7e6473135 [file] [log] [blame]
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001/*
2 * Hardware modules present on the OMAP44xx chips
3 *
Benoit Coussond63bd742011-01-27 11:17:03 +00004 * Copyright (C) 2009-2011 Texas Instruments, Inc.
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005 * Copyright (C) 2009-2010 Nokia Corporation
6 *
7 * Paul Walmsley
8 * Benoit Cousson
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#include <linux/io.h>
22
23#include <plat/omap_hwmod.h>
24#include <plat/cpu.h>
Avinash.H.M6d3c55f2011-07-10 05:27:16 -060025#include <plat/i2c.h>
Benoit Cousson9780a9c2010-12-07 16:26:57 -080026#include <plat/gpio.h>
Benoit Cousson531ce0d2010-12-20 18:27:19 -080027#include <plat/dma.h>
Benoit Cousson905a74d2011-02-18 14:01:06 +010028#include <plat/mcspi.h>
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +053029#include <plat/mcbsp.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080030#include <plat/mmc.h>
Andy Green4d4441a2011-07-10 05:27:16 -060031#include <plat/i2c.h>
Benoit Cousson55d2cb02010-05-12 17:54:36 +020032
33#include "omap_hwmod_common_data.h"
34
Paul Walmsleyd198b512010-12-21 15:30:54 -070035#include "cm1_44xx.h"
36#include "cm2_44xx.h"
37#include "prm44xx.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020038#include "prm-regbits-44xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070039#include "wd_timer.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020040
41/* Base offset for all OMAP4 interrupts external to MPUSS */
42#define OMAP44XX_IRQ_GIC_START 32
43
44/* Base offset for all OMAP4 dma requests */
45#define OMAP44XX_DMA_REQ_START 1
46
47/* Backward references (IPs with Bus Master capability) */
Benoit Cousson407a6882011-02-15 22:39:48 +010048static struct omap_hwmod omap44xx_aess_hwmod;
Benoit Cousson531ce0d2010-12-20 18:27:19 -080049static struct omap_hwmod omap44xx_dma_system_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020050static struct omap_hwmod omap44xx_dmm_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070051static struct omap_hwmod omap44xx_dsp_hwmod;
Benoit Coussond63bd742011-01-27 11:17:03 +000052static struct omap_hwmod omap44xx_dss_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020053static struct omap_hwmod omap44xx_emif_fw_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010054static struct omap_hwmod omap44xx_hsi_hwmod;
55static struct omap_hwmod omap44xx_ipu_hwmod;
56static struct omap_hwmod omap44xx_iss_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070057static struct omap_hwmod omap44xx_iva_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020058static struct omap_hwmod omap44xx_l3_instr_hwmod;
59static struct omap_hwmod omap44xx_l3_main_1_hwmod;
60static struct omap_hwmod omap44xx_l3_main_2_hwmod;
61static struct omap_hwmod omap44xx_l3_main_3_hwmod;
62static struct omap_hwmod omap44xx_l4_abe_hwmod;
63static struct omap_hwmod omap44xx_l4_cfg_hwmod;
64static struct omap_hwmod omap44xx_l4_per_hwmod;
65static struct omap_hwmod omap44xx_l4_wkup_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010066static struct omap_hwmod omap44xx_mmc1_hwmod;
67static struct omap_hwmod omap44xx_mmc2_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020068static struct omap_hwmod omap44xx_mpu_hwmod;
69static struct omap_hwmod omap44xx_mpu_private_hwmod;
Benoit Cousson5844c4e2011-02-17 12:41:05 +000070static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020071
72/*
73 * Interconnects omap_hwmod structures
74 * hwmods that compose the global OMAP interconnect
75 */
76
77/*
78 * 'dmm' class
79 * instance(s): dmm
80 */
81static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +000082 .name = "dmm",
Benoit Cousson55d2cb02010-05-12 17:54:36 +020083};
84
Benoit Cousson7e69ed92011-07-09 19:14:28 -060085/* dmm */
86static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
87 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
88 { .irq = -1 }
89};
90
Benoit Cousson55d2cb02010-05-12 17:54:36 +020091/* l3_main_1 -> dmm */
92static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
93 .master = &omap44xx_l3_main_1_hwmod,
94 .slave = &omap44xx_dmm_hwmod,
95 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -070096 .user = OCP_USER_SDMA,
97};
98
99static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
100 {
101 .pa_start = 0x4e000000,
102 .pa_end = 0x4e0007ff,
103 .flags = ADDR_TYPE_RT
104 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600105 { }
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200106};
107
108/* mpu -> dmm */
109static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
110 .master = &omap44xx_mpu_hwmod,
111 .slave = &omap44xx_dmm_hwmod,
112 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700113 .addr = omap44xx_dmm_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700114 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200115};
116
117/* dmm slave ports */
118static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
119 &omap44xx_l3_main_1__dmm,
120 &omap44xx_mpu__dmm,
121};
122
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200123static struct omap_hwmod omap44xx_dmm_hwmod = {
124 .name = "dmm",
125 .class = &omap44xx_dmm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600126 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600127 .prcm = {
128 .omap4 = {
129 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600130 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600131 },
132 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200133 .slaves = omap44xx_dmm_slaves,
134 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
Benoit Coussona5322c62011-07-10 05:56:29 -0600135 .mpu_irqs = omap44xx_dmm_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200136};
137
138/*
139 * 'emif_fw' class
140 * instance(s): emif_fw
141 */
142static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000143 .name = "emif_fw",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200144};
145
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600146/* emif_fw */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200147/* dmm -> emif_fw */
148static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
149 .master = &omap44xx_dmm_hwmod,
150 .slave = &omap44xx_emif_fw_hwmod,
151 .clk = "l3_div_ck",
152 .user = OCP_USER_MPU | OCP_USER_SDMA,
153};
154
Benoit Cousson659fa822010-12-21 21:08:34 -0700155static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
156 {
157 .pa_start = 0x4a20c000,
158 .pa_end = 0x4a20c0ff,
159 .flags = ADDR_TYPE_RT
160 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600161 { }
Benoit Cousson659fa822010-12-21 21:08:34 -0700162};
163
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200164/* l4_cfg -> emif_fw */
165static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
166 .master = &omap44xx_l4_cfg_hwmod,
167 .slave = &omap44xx_emif_fw_hwmod,
168 .clk = "l4_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700169 .addr = omap44xx_emif_fw_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700170 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200171};
172
173/* emif_fw slave ports */
174static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
175 &omap44xx_dmm__emif_fw,
176 &omap44xx_l4_cfg__emif_fw,
177};
178
179static struct omap_hwmod omap44xx_emif_fw_hwmod = {
180 .name = "emif_fw",
181 .class = &omap44xx_emif_fw_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600182 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600183 .prcm = {
184 .omap4 = {
185 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_FW_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600186 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600187 },
188 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200189 .slaves = omap44xx_emif_fw_slaves,
190 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200191};
192
193/*
194 * 'l3' class
195 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
196 */
197static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000198 .name = "l3",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200199};
200
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600201/* l3_instr */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700202/* iva -> l3_instr */
203static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
204 .master = &omap44xx_iva_hwmod,
205 .slave = &omap44xx_l3_instr_hwmod,
206 .clk = "l3_div_ck",
207 .user = OCP_USER_MPU | OCP_USER_SDMA,
208};
209
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200210/* l3_main_3 -> l3_instr */
211static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
212 .master = &omap44xx_l3_main_3_hwmod,
213 .slave = &omap44xx_l3_instr_hwmod,
214 .clk = "l3_div_ck",
215 .user = OCP_USER_MPU | OCP_USER_SDMA,
216};
217
218/* l3_instr slave ports */
219static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700220 &omap44xx_iva__l3_instr,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200221 &omap44xx_l3_main_3__l3_instr,
222};
223
224static struct omap_hwmod omap44xx_l3_instr_hwmod = {
225 .name = "l3_instr",
226 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600227 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600228 .prcm = {
229 .omap4 = {
230 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600231 .context_offs = OMAP4_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600232 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600233 },
234 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200235 .slaves = omap44xx_l3_instr_slaves,
236 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200237};
238
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600239/* l3_main_1 */
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600240static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
241 { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
242 { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
243 { .irq = -1 }
244};
245
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700246/* dsp -> l3_main_1 */
247static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
248 .master = &omap44xx_dsp_hwmod,
249 .slave = &omap44xx_l3_main_1_hwmod,
250 .clk = "l3_div_ck",
251 .user = OCP_USER_MPU | OCP_USER_SDMA,
252};
253
Benoit Coussond63bd742011-01-27 11:17:03 +0000254/* dss -> l3_main_1 */
255static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
256 .master = &omap44xx_dss_hwmod,
257 .slave = &omap44xx_l3_main_1_hwmod,
258 .clk = "l3_div_ck",
259 .user = OCP_USER_MPU | OCP_USER_SDMA,
260};
261
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200262/* l3_main_2 -> l3_main_1 */
263static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
264 .master = &omap44xx_l3_main_2_hwmod,
265 .slave = &omap44xx_l3_main_1_hwmod,
266 .clk = "l3_div_ck",
267 .user = OCP_USER_MPU | OCP_USER_SDMA,
268};
269
270/* l4_cfg -> l3_main_1 */
271static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
272 .master = &omap44xx_l4_cfg_hwmod,
273 .slave = &omap44xx_l3_main_1_hwmod,
274 .clk = "l4_div_ck",
275 .user = OCP_USER_MPU | OCP_USER_SDMA,
276};
277
Benoit Cousson407a6882011-02-15 22:39:48 +0100278/* mmc1 -> l3_main_1 */
279static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
280 .master = &omap44xx_mmc1_hwmod,
281 .slave = &omap44xx_l3_main_1_hwmod,
282 .clk = "l3_div_ck",
283 .user = OCP_USER_MPU | OCP_USER_SDMA,
284};
285
286/* mmc2 -> l3_main_1 */
287static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
288 .master = &omap44xx_mmc2_hwmod,
289 .slave = &omap44xx_l3_main_1_hwmod,
290 .clk = "l3_div_ck",
291 .user = OCP_USER_MPU | OCP_USER_SDMA,
292};
293
sricharanc4645232011-02-07 21:12:11 +0530294static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
295 {
296 .pa_start = 0x44000000,
297 .pa_end = 0x44000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600298 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530299 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600300 { }
sricharanc4645232011-02-07 21:12:11 +0530301};
302
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200303/* mpu -> l3_main_1 */
304static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
305 .master = &omap44xx_mpu_hwmod,
306 .slave = &omap44xx_l3_main_1_hwmod,
307 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530308 .addr = omap44xx_l3_main_1_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600309 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200310};
311
312/* l3_main_1 slave ports */
313static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700314 &omap44xx_dsp__l3_main_1,
Benoit Coussond63bd742011-01-27 11:17:03 +0000315 &omap44xx_dss__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200316 &omap44xx_l3_main_2__l3_main_1,
317 &omap44xx_l4_cfg__l3_main_1,
Benoit Cousson407a6882011-02-15 22:39:48 +0100318 &omap44xx_mmc1__l3_main_1,
319 &omap44xx_mmc2__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200320 &omap44xx_mpu__l3_main_1,
321};
322
323static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
324 .name = "l3_main_1",
325 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600326 .clkdm_name = "l3_1_clkdm",
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600327 .mpu_irqs = omap44xx_l3_main_1_irqs,
Benoit Coussond0f06312011-07-10 05:56:30 -0600328 .prcm = {
329 .omap4 = {
330 .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600331 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600332 },
333 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200334 .slaves = omap44xx_l3_main_1_slaves,
335 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200336};
337
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600338/* l3_main_2 */
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000339/* dma_system -> l3_main_2 */
340static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
341 .master = &omap44xx_dma_system_hwmod,
342 .slave = &omap44xx_l3_main_2_hwmod,
343 .clk = "l3_div_ck",
344 .user = OCP_USER_MPU | OCP_USER_SDMA,
345};
346
Benoit Cousson407a6882011-02-15 22:39:48 +0100347/* hsi -> l3_main_2 */
348static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
349 .master = &omap44xx_hsi_hwmod,
350 .slave = &omap44xx_l3_main_2_hwmod,
351 .clk = "l3_div_ck",
352 .user = OCP_USER_MPU | OCP_USER_SDMA,
353};
354
355/* ipu -> l3_main_2 */
356static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
357 .master = &omap44xx_ipu_hwmod,
358 .slave = &omap44xx_l3_main_2_hwmod,
359 .clk = "l3_div_ck",
360 .user = OCP_USER_MPU | OCP_USER_SDMA,
361};
362
363/* iss -> l3_main_2 */
364static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = {
365 .master = &omap44xx_iss_hwmod,
366 .slave = &omap44xx_l3_main_2_hwmod,
367 .clk = "l3_div_ck",
368 .user = OCP_USER_MPU | OCP_USER_SDMA,
369};
370
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700371/* iva -> l3_main_2 */
372static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
373 .master = &omap44xx_iva_hwmod,
374 .slave = &omap44xx_l3_main_2_hwmod,
375 .clk = "l3_div_ck",
376 .user = OCP_USER_MPU | OCP_USER_SDMA,
377};
378
sricharanc4645232011-02-07 21:12:11 +0530379static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
380 {
381 .pa_start = 0x44800000,
382 .pa_end = 0x44801fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600383 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530384 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600385 { }
sricharanc4645232011-02-07 21:12:11 +0530386};
387
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200388/* l3_main_1 -> l3_main_2 */
389static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
390 .master = &omap44xx_l3_main_1_hwmod,
391 .slave = &omap44xx_l3_main_2_hwmod,
392 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530393 .addr = omap44xx_l3_main_2_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600394 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200395};
396
397/* l4_cfg -> l3_main_2 */
398static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
399 .master = &omap44xx_l4_cfg_hwmod,
400 .slave = &omap44xx_l3_main_2_hwmod,
401 .clk = "l4_div_ck",
402 .user = OCP_USER_MPU | OCP_USER_SDMA,
403};
404
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000405/* usb_otg_hs -> l3_main_2 */
406static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
407 .master = &omap44xx_usb_otg_hs_hwmod,
408 .slave = &omap44xx_l3_main_2_hwmod,
409 .clk = "l3_div_ck",
410 .user = OCP_USER_MPU | OCP_USER_SDMA,
411};
412
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200413/* l3_main_2 slave ports */
414static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
Benoit Cousson531ce0d2010-12-20 18:27:19 -0800415 &omap44xx_dma_system__l3_main_2,
Benoit Cousson407a6882011-02-15 22:39:48 +0100416 &omap44xx_hsi__l3_main_2,
417 &omap44xx_ipu__l3_main_2,
418 &omap44xx_iss__l3_main_2,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700419 &omap44xx_iva__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200420 &omap44xx_l3_main_1__l3_main_2,
421 &omap44xx_l4_cfg__l3_main_2,
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000422 &omap44xx_usb_otg_hs__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200423};
424
425static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
426 .name = "l3_main_2",
427 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600428 .clkdm_name = "l3_2_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600429 .prcm = {
430 .omap4 = {
431 .clkctrl_offs = OMAP4_CM_L3_2_L3_2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600432 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600433 },
434 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200435 .slaves = omap44xx_l3_main_2_slaves,
436 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200437};
438
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600439/* l3_main_3 */
sricharanc4645232011-02-07 21:12:11 +0530440static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
441 {
442 .pa_start = 0x45000000,
443 .pa_end = 0x45000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600444 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530445 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600446 { }
sricharanc4645232011-02-07 21:12:11 +0530447};
448
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200449/* l3_main_1 -> l3_main_3 */
450static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
451 .master = &omap44xx_l3_main_1_hwmod,
452 .slave = &omap44xx_l3_main_3_hwmod,
453 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530454 .addr = omap44xx_l3_main_3_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600455 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200456};
457
458/* l3_main_2 -> l3_main_3 */
459static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
460 .master = &omap44xx_l3_main_2_hwmod,
461 .slave = &omap44xx_l3_main_3_hwmod,
462 .clk = "l3_div_ck",
463 .user = OCP_USER_MPU | OCP_USER_SDMA,
464};
465
466/* l4_cfg -> l3_main_3 */
467static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
468 .master = &omap44xx_l4_cfg_hwmod,
469 .slave = &omap44xx_l3_main_3_hwmod,
470 .clk = "l4_div_ck",
471 .user = OCP_USER_MPU | OCP_USER_SDMA,
472};
473
474/* l3_main_3 slave ports */
475static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
476 &omap44xx_l3_main_1__l3_main_3,
477 &omap44xx_l3_main_2__l3_main_3,
478 &omap44xx_l4_cfg__l3_main_3,
479};
480
481static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
482 .name = "l3_main_3",
483 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600484 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600485 .prcm = {
486 .omap4 = {
487 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600488 .context_offs = OMAP4_RM_L3INSTR_L3_3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600489 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600490 },
491 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200492 .slaves = omap44xx_l3_main_3_slaves,
493 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200494};
495
496/*
497 * 'l4' class
498 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
499 */
500static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000501 .name = "l4",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200502};
503
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600504/* l4_abe */
Benoit Cousson407a6882011-02-15 22:39:48 +0100505/* aess -> l4_abe */
506static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
507 .master = &omap44xx_aess_hwmod,
508 .slave = &omap44xx_l4_abe_hwmod,
509 .clk = "ocp_abe_iclk",
510 .user = OCP_USER_MPU | OCP_USER_SDMA,
511};
512
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700513/* dsp -> l4_abe */
514static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
515 .master = &omap44xx_dsp_hwmod,
516 .slave = &omap44xx_l4_abe_hwmod,
517 .clk = "ocp_abe_iclk",
518 .user = OCP_USER_MPU | OCP_USER_SDMA,
519};
520
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200521/* l3_main_1 -> l4_abe */
522static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
523 .master = &omap44xx_l3_main_1_hwmod,
524 .slave = &omap44xx_l4_abe_hwmod,
525 .clk = "l3_div_ck",
526 .user = OCP_USER_MPU | OCP_USER_SDMA,
527};
528
529/* mpu -> l4_abe */
530static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
531 .master = &omap44xx_mpu_hwmod,
532 .slave = &omap44xx_l4_abe_hwmod,
533 .clk = "ocp_abe_iclk",
534 .user = OCP_USER_MPU | OCP_USER_SDMA,
535};
536
537/* l4_abe slave ports */
538static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100539 &omap44xx_aess__l4_abe,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700540 &omap44xx_dsp__l4_abe,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200541 &omap44xx_l3_main_1__l4_abe,
542 &omap44xx_mpu__l4_abe,
543};
544
545static struct omap_hwmod omap44xx_l4_abe_hwmod = {
546 .name = "l4_abe",
547 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600548 .clkdm_name = "abe_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600549 .prcm = {
550 .omap4 = {
551 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
552 },
553 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200554 .slaves = omap44xx_l4_abe_slaves,
555 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200556};
557
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600558/* l4_cfg */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200559/* l3_main_1 -> l4_cfg */
560static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
561 .master = &omap44xx_l3_main_1_hwmod,
562 .slave = &omap44xx_l4_cfg_hwmod,
563 .clk = "l3_div_ck",
564 .user = OCP_USER_MPU | OCP_USER_SDMA,
565};
566
567/* l4_cfg slave ports */
568static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
569 &omap44xx_l3_main_1__l4_cfg,
570};
571
572static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
573 .name = "l4_cfg",
574 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600575 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600576 .prcm = {
577 .omap4 = {
578 .clkctrl_offs = OMAP4_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600579 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600580 },
581 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200582 .slaves = omap44xx_l4_cfg_slaves,
583 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200584};
585
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600586/* l4_per */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200587/* l3_main_2 -> l4_per */
588static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
589 .master = &omap44xx_l3_main_2_hwmod,
590 .slave = &omap44xx_l4_per_hwmod,
591 .clk = "l3_div_ck",
592 .user = OCP_USER_MPU | OCP_USER_SDMA,
593};
594
595/* l4_per slave ports */
596static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
597 &omap44xx_l3_main_2__l4_per,
598};
599
600static struct omap_hwmod omap44xx_l4_per_hwmod = {
601 .name = "l4_per",
602 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600603 .clkdm_name = "l4_per_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600604 .prcm = {
605 .omap4 = {
606 .clkctrl_offs = OMAP4_CM_L4PER_L4PER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600607 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600608 },
609 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200610 .slaves = omap44xx_l4_per_slaves,
611 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200612};
613
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600614/* l4_wkup */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200615/* l4_cfg -> l4_wkup */
616static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
617 .master = &omap44xx_l4_cfg_hwmod,
618 .slave = &omap44xx_l4_wkup_hwmod,
619 .clk = "l4_div_ck",
620 .user = OCP_USER_MPU | OCP_USER_SDMA,
621};
622
623/* l4_wkup slave ports */
624static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
625 &omap44xx_l4_cfg__l4_wkup,
626};
627
628static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
629 .name = "l4_wkup",
630 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600631 .clkdm_name = "l4_wkup_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600632 .prcm = {
633 .omap4 = {
634 .clkctrl_offs = OMAP4_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600635 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600636 },
637 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200638 .slaves = omap44xx_l4_wkup_slaves,
639 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200640};
641
642/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700643 * 'mpu_bus' class
644 * instance(s): mpu_private
645 */
646static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000647 .name = "mpu_bus",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700648};
649
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600650/* mpu_private */
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700651/* mpu -> mpu_private */
652static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
653 .master = &omap44xx_mpu_hwmod,
654 .slave = &omap44xx_mpu_private_hwmod,
655 .clk = "l3_div_ck",
656 .user = OCP_USER_MPU | OCP_USER_SDMA,
657};
658
659/* mpu_private slave ports */
660static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
661 &omap44xx_mpu__mpu_private,
662};
663
664static struct omap_hwmod omap44xx_mpu_private_hwmod = {
665 .name = "mpu_private",
666 .class = &omap44xx_mpu_bus_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600667 .clkdm_name = "mpuss_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700668 .slaves = omap44xx_mpu_private_slaves,
669 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700670};
671
672/*
673 * Modules omap_hwmod structures
674 *
675 * The following IPs are excluded for the moment because:
676 * - They do not need an explicit SW control using omap_hwmod API.
677 * - They still need to be validated with the driver
678 * properly adapted to omap_hwmod / omap_device
679 *
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700680 * c2c
681 * c2c_target_fw
682 * cm_core
683 * cm_core_aon
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700684 * ctrl_module_core
685 * ctrl_module_pad_core
686 * ctrl_module_pad_wkup
687 * ctrl_module_wkup
688 * debugss
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700689 * efuse_ctrl_cust
690 * efuse_ctrl_std
691 * elm
692 * emif1
693 * emif2
694 * fdif
695 * gpmc
696 * gpu
697 * hdq1w
Benoit Cousson00fe6102011-07-09 19:14:28 -0600698 * mcasp
699 * mpu_c0
700 * mpu_c1
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700701 * ocmc_ram
702 * ocp2scp_usb_phy
703 * ocp_wp_noc
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700704 * prcm_mpu
705 * prm
706 * scrm
707 * sl2if
708 * slimbus1
709 * slimbus2
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700710 * usb_host_fs
711 * usb_host_hs
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700712 * usb_phy_cm
713 * usb_tll_hs
714 * usim
715 */
716
717/*
Benoit Cousson407a6882011-02-15 22:39:48 +0100718 * 'aess' class
719 * audio engine sub system
720 */
721
722static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
723 .rev_offs = 0x0000,
724 .sysc_offs = 0x0010,
725 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
726 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
Benoit Coussonc614ebf2011-07-01 22:54:01 +0200727 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
728 MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +0100729 .sysc_fields = &omap_hwmod_sysc_type2,
730};
731
732static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
733 .name = "aess",
734 .sysc = &omap44xx_aess_sysc,
735};
736
737/* aess */
738static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
739 { .irq = 99 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600740 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100741};
742
743static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
744 { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START },
745 { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START },
746 { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START },
747 { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START },
748 { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START },
749 { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
750 { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
751 { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -0600752 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100753};
754
755/* aess master ports */
756static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = {
757 &omap44xx_aess__l4_abe,
758};
759
760static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
761 {
762 .pa_start = 0x401f1000,
763 .pa_end = 0x401f13ff,
764 .flags = ADDR_TYPE_RT
765 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600766 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100767};
768
769/* l4_abe -> aess */
770static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
771 .master = &omap44xx_l4_abe_hwmod,
772 .slave = &omap44xx_aess_hwmod,
773 .clk = "ocp_abe_iclk",
774 .addr = omap44xx_aess_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100775 .user = OCP_USER_MPU,
776};
777
778static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
779 {
780 .pa_start = 0x490f1000,
781 .pa_end = 0x490f13ff,
782 .flags = ADDR_TYPE_RT
783 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600784 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100785};
786
787/* l4_abe -> aess (dma) */
788static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
789 .master = &omap44xx_l4_abe_hwmod,
790 .slave = &omap44xx_aess_hwmod,
791 .clk = "ocp_abe_iclk",
792 .addr = omap44xx_aess_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100793 .user = OCP_USER_SDMA,
794};
795
796/* aess slave ports */
797static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = {
798 &omap44xx_l4_abe__aess,
799 &omap44xx_l4_abe__aess_dma,
800};
801
802static struct omap_hwmod omap44xx_aess_hwmod = {
803 .name = "aess",
804 .class = &omap44xx_aess_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600805 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100806 .mpu_irqs = omap44xx_aess_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100807 .sdma_reqs = omap44xx_aess_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100808 .main_clk = "aess_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600809 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100810 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600811 .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600812 .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600813 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +0100814 },
815 },
816 .slaves = omap44xx_aess_slaves,
817 .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves),
818 .masters = omap44xx_aess_masters,
819 .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +0100820};
821
822/*
823 * 'bandgap' class
824 * bangap reference for ldo regulators
825 */
826
827static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = {
828 .name = "bandgap",
829};
830
831/* bandgap */
832static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
833 { .role = "fclk", .clk = "bandgap_fclk" },
834};
835
836static struct omap_hwmod omap44xx_bandgap_hwmod = {
837 .name = "bandgap",
838 .class = &omap44xx_bandgap_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600839 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600840 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100841 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600842 .clkctrl_offs = OMAP4_CM_WKUP_BANDGAP_CLKCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100843 },
844 },
845 .opt_clks = bandgap_opt_clks,
846 .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks),
Benoit Cousson407a6882011-02-15 22:39:48 +0100847};
848
849/*
850 * 'counter' class
851 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
852 */
853
854static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = {
855 .rev_offs = 0x0000,
856 .sysc_offs = 0x0004,
857 .sysc_flags = SYSC_HAS_SIDLEMODE,
858 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
859 SIDLE_SMART_WKUP),
860 .sysc_fields = &omap_hwmod_sysc_type1,
861};
862
863static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
864 .name = "counter",
865 .sysc = &omap44xx_counter_sysc,
866};
867
868/* counter_32k */
869static struct omap_hwmod omap44xx_counter_32k_hwmod;
870static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
871 {
872 .pa_start = 0x4a304000,
873 .pa_end = 0x4a30401f,
874 .flags = ADDR_TYPE_RT
875 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600876 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100877};
878
879/* l4_wkup -> counter_32k */
880static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
881 .master = &omap44xx_l4_wkup_hwmod,
882 .slave = &omap44xx_counter_32k_hwmod,
883 .clk = "l4_wkup_clk_mux_ck",
884 .addr = omap44xx_counter_32k_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100885 .user = OCP_USER_MPU | OCP_USER_SDMA,
886};
887
888/* counter_32k slave ports */
889static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
890 &omap44xx_l4_wkup__counter_32k,
891};
892
893static struct omap_hwmod omap44xx_counter_32k_hwmod = {
894 .name = "counter_32k",
895 .class = &omap44xx_counter_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600896 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100897 .flags = HWMOD_SWSUP_SIDLE,
898 .main_clk = "sys_32k_ck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600899 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100900 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600901 .clkctrl_offs = OMAP4_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600902 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100903 },
904 },
905 .slaves = omap44xx_counter_32k_slaves,
906 .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +0100907};
908
909/*
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000910 * 'dma' class
911 * dma controller for data exchange between memory to memory (i.e. internal or
912 * external memory) and gp peripherals to memory or memory to gp peripherals
913 */
914
915static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
916 .rev_offs = 0x0000,
917 .sysc_offs = 0x002c,
918 .syss_offs = 0x0028,
919 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
920 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
921 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
922 SYSS_HAS_RESET_STATUS),
923 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
924 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
925 .sysc_fields = &omap_hwmod_sysc_type1,
926};
927
928static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
929 .name = "dma",
930 .sysc = &omap44xx_dma_sysc,
931};
932
933/* dma dev_attr */
934static struct omap_dma_dev_attr dma_dev_attr = {
935 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
936 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
937 .lch_count = 32,
938};
939
940/* dma_system */
941static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
942 { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
943 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
944 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
945 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600946 { .irq = -1 }
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000947};
948
949/* dma_system master ports */
950static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
951 &omap44xx_dma_system__l3_main_2,
952};
953
954static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
955 {
956 .pa_start = 0x4a056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -0600957 .pa_end = 0x4a056fff,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000958 .flags = ADDR_TYPE_RT
959 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600960 { }
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000961};
962
963/* l4_cfg -> dma_system */
964static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
965 .master = &omap44xx_l4_cfg_hwmod,
966 .slave = &omap44xx_dma_system_hwmod,
967 .clk = "l4_div_ck",
968 .addr = omap44xx_dma_system_addrs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000969 .user = OCP_USER_MPU | OCP_USER_SDMA,
970};
971
972/* dma_system slave ports */
973static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
974 &omap44xx_l4_cfg__dma_system,
975};
976
977static struct omap_hwmod omap44xx_dma_system_hwmod = {
978 .name = "dma_system",
979 .class = &omap44xx_dma_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600980 .clkdm_name = "l3_dma_clkdm",
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000981 .mpu_irqs = omap44xx_dma_system_irqs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000982 .main_clk = "l3_div_ck",
983 .prcm = {
984 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600985 .clkctrl_offs = OMAP4_CM_SDMA_SDMA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600986 .context_offs = OMAP4_RM_SDMA_SDMA_CONTEXT_OFFSET,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000987 },
988 },
989 .dev_attr = &dma_dev_attr,
990 .slaves = omap44xx_dma_system_slaves,
991 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
992 .masters = omap44xx_dma_system_masters,
993 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000994};
995
996/*
Benoit Cousson8ca476d2011-01-25 22:01:00 +0000997 * 'dmic' class
998 * digital microphone controller
999 */
1000
1001static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = {
1002 .rev_offs = 0x0000,
1003 .sysc_offs = 0x0010,
1004 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1005 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1006 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1007 SIDLE_SMART_WKUP),
1008 .sysc_fields = &omap_hwmod_sysc_type2,
1009};
1010
1011static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
1012 .name = "dmic",
1013 .sysc = &omap44xx_dmic_sysc,
1014};
1015
1016/* dmic */
1017static struct omap_hwmod omap44xx_dmic_hwmod;
1018static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
1019 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001020 { .irq = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001021};
1022
1023static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
1024 { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001025 { .dma_req = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001026};
1027
1028static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
1029 {
1030 .pa_start = 0x4012e000,
1031 .pa_end = 0x4012e07f,
1032 .flags = ADDR_TYPE_RT
1033 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001034 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001035};
1036
1037/* l4_abe -> dmic */
1038static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
1039 .master = &omap44xx_l4_abe_hwmod,
1040 .slave = &omap44xx_dmic_hwmod,
1041 .clk = "ocp_abe_iclk",
1042 .addr = omap44xx_dmic_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001043 .user = OCP_USER_MPU,
1044};
1045
1046static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
1047 {
1048 .pa_start = 0x4902e000,
1049 .pa_end = 0x4902e07f,
1050 .flags = ADDR_TYPE_RT
1051 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001052 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001053};
1054
1055/* l4_abe -> dmic (dma) */
1056static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
1057 .master = &omap44xx_l4_abe_hwmod,
1058 .slave = &omap44xx_dmic_hwmod,
1059 .clk = "ocp_abe_iclk",
1060 .addr = omap44xx_dmic_dma_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001061 .user = OCP_USER_SDMA,
1062};
1063
1064/* dmic slave ports */
1065static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
1066 &omap44xx_l4_abe__dmic,
1067 &omap44xx_l4_abe__dmic_dma,
1068};
1069
1070static struct omap_hwmod omap44xx_dmic_hwmod = {
1071 .name = "dmic",
1072 .class = &omap44xx_dmic_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001073 .clkdm_name = "abe_clkdm",
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001074 .mpu_irqs = omap44xx_dmic_irqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001075 .sdma_reqs = omap44xx_dmic_sdma_reqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001076 .main_clk = "dmic_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06001077 .prcm = {
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001078 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001079 .clkctrl_offs = OMAP4_CM1_ABE_DMIC_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001080 .context_offs = OMAP4_RM_ABE_DMIC_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001081 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001082 },
1083 },
1084 .slaves = omap44xx_dmic_slaves,
1085 .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves),
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001086};
1087
1088/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001089 * 'dsp' class
1090 * dsp sub-system
1091 */
1092
1093static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001094 .name = "dsp",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001095};
1096
1097/* dsp */
1098static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
1099 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001100 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001101};
1102
1103static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
1104 { .name = "mmu_cache", .rst_shift = 1 },
1105};
1106
1107static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
1108 { .name = "dsp", .rst_shift = 0 },
1109};
1110
1111/* dsp -> iva */
1112static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
1113 .master = &omap44xx_dsp_hwmod,
1114 .slave = &omap44xx_iva_hwmod,
1115 .clk = "dpll_iva_m5x2_ck",
1116};
1117
1118/* dsp master ports */
1119static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
1120 &omap44xx_dsp__l3_main_1,
1121 &omap44xx_dsp__l4_abe,
1122 &omap44xx_dsp__iva,
1123};
1124
1125/* l4_cfg -> dsp */
1126static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
1127 .master = &omap44xx_l4_cfg_hwmod,
1128 .slave = &omap44xx_dsp_hwmod,
1129 .clk = "l4_div_ck",
1130 .user = OCP_USER_MPU | OCP_USER_SDMA,
1131};
1132
1133/* dsp slave ports */
1134static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
1135 &omap44xx_l4_cfg__dsp,
1136};
1137
1138/* Pseudo hwmod for reset control purpose only */
1139static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1140 .name = "dsp_c0",
1141 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001142 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001143 .flags = HWMOD_INIT_NO_RESET,
1144 .rst_lines = omap44xx_dsp_c0_resets,
1145 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
1146 .prcm = {
1147 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06001148 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001149 },
1150 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001151};
1152
1153static struct omap_hwmod omap44xx_dsp_hwmod = {
1154 .name = "dsp",
1155 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001156 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001157 .mpu_irqs = omap44xx_dsp_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001158 .rst_lines = omap44xx_dsp_resets,
1159 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
1160 .main_clk = "dsp_fck",
1161 .prcm = {
1162 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001163 .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06001164 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001165 .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001166 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001167 },
1168 },
1169 .slaves = omap44xx_dsp_slaves,
1170 .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
1171 .masters = omap44xx_dsp_masters,
1172 .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001173};
1174
1175/*
Benoit Coussond63bd742011-01-27 11:17:03 +00001176 * 'dss' class
1177 * display sub-system
1178 */
1179
1180static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = {
1181 .rev_offs = 0x0000,
1182 .syss_offs = 0x0014,
1183 .sysc_flags = SYSS_HAS_RESET_STATUS,
1184};
1185
1186static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
1187 .name = "dss",
1188 .sysc = &omap44xx_dss_sysc,
1189};
1190
1191/* dss */
1192/* dss master ports */
1193static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = {
1194 &omap44xx_dss__l3_main_1,
1195};
1196
1197static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
1198 {
1199 .pa_start = 0x58000000,
1200 .pa_end = 0x5800007f,
1201 .flags = ADDR_TYPE_RT
1202 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001203 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001204};
1205
1206/* l3_main_2 -> dss */
1207static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
1208 .master = &omap44xx_l3_main_2_hwmod,
1209 .slave = &omap44xx_dss_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001210 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001211 .addr = omap44xx_dss_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001212 .user = OCP_USER_SDMA,
1213};
1214
1215static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
1216 {
1217 .pa_start = 0x48040000,
1218 .pa_end = 0x4804007f,
1219 .flags = ADDR_TYPE_RT
1220 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001221 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001222};
1223
1224/* l4_per -> dss */
1225static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
1226 .master = &omap44xx_l4_per_hwmod,
1227 .slave = &omap44xx_dss_hwmod,
1228 .clk = "l4_div_ck",
1229 .addr = omap44xx_dss_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001230 .user = OCP_USER_MPU,
1231};
1232
1233/* dss slave ports */
1234static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = {
1235 &omap44xx_l3_main_2__dss,
1236 &omap44xx_l4_per__dss,
1237};
1238
1239static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1240 { .role = "sys_clk", .clk = "dss_sys_clk" },
1241 { .role = "tv_clk", .clk = "dss_tv_clk" },
1242 { .role = "dss_clk", .clk = "dss_dss_clk" },
1243 { .role = "video_clk", .clk = "dss_48mhz_clk" },
1244};
1245
1246static struct omap_hwmod omap44xx_dss_hwmod = {
1247 .name = "dss_core",
1248 .class = &omap44xx_dss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001249 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001250 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001251 .prcm = {
1252 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001253 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001254 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001255 },
1256 },
1257 .opt_clks = dss_opt_clks,
1258 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1259 .slaves = omap44xx_dss_slaves,
1260 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves),
1261 .masters = omap44xx_dss_masters,
1262 .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters),
Benoit Coussond63bd742011-01-27 11:17:03 +00001263};
1264
1265/*
1266 * 'dispc' class
1267 * display controller
1268 */
1269
1270static struct omap_hwmod_class_sysconfig omap44xx_dispc_sysc = {
1271 .rev_offs = 0x0000,
1272 .sysc_offs = 0x0010,
1273 .syss_offs = 0x0014,
1274 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1275 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
1276 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1277 SYSS_HAS_RESET_STATUS),
1278 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1279 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1280 .sysc_fields = &omap_hwmod_sysc_type1,
1281};
1282
1283static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
1284 .name = "dispc",
1285 .sysc = &omap44xx_dispc_sysc,
1286};
1287
1288/* dss_dispc */
1289static struct omap_hwmod omap44xx_dss_dispc_hwmod;
1290static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
1291 { .irq = 25 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001292 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001293};
1294
1295static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
1296 { .dma_req = 5 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001297 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001298};
1299
1300static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
1301 {
1302 .pa_start = 0x58001000,
1303 .pa_end = 0x58001fff,
1304 .flags = ADDR_TYPE_RT
1305 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001306 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001307};
1308
1309/* l3_main_2 -> dss_dispc */
1310static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
1311 .master = &omap44xx_l3_main_2_hwmod,
1312 .slave = &omap44xx_dss_dispc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001313 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001314 .addr = omap44xx_dss_dispc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001315 .user = OCP_USER_SDMA,
1316};
1317
1318static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
1319 {
1320 .pa_start = 0x48041000,
1321 .pa_end = 0x48041fff,
1322 .flags = ADDR_TYPE_RT
1323 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001324 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001325};
1326
1327/* l4_per -> dss_dispc */
1328static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
1329 .master = &omap44xx_l4_per_hwmod,
1330 .slave = &omap44xx_dss_dispc_hwmod,
1331 .clk = "l4_div_ck",
1332 .addr = omap44xx_dss_dispc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001333 .user = OCP_USER_MPU,
1334};
1335
1336/* dss_dispc slave ports */
1337static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = {
1338 &omap44xx_l3_main_2__dss_dispc,
1339 &omap44xx_l4_per__dss_dispc,
1340};
1341
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001342static struct omap_hwmod_opt_clk dss_dispc_opt_clks[] = {
1343 { .role = "sys_clk", .clk = "dss_sys_clk" },
1344 { .role = "tv_clk", .clk = "dss_tv_clk" },
1345 { .role = "hdmi_clk", .clk = "dss_48mhz_clk" },
1346};
1347
Benoit Coussond63bd742011-01-27 11:17:03 +00001348static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1349 .name = "dss_dispc",
1350 .class = &omap44xx_dispc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001351 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001352 .mpu_irqs = omap44xx_dss_dispc_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001353 .sdma_reqs = omap44xx_dss_dispc_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001354 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001355 .prcm = {
1356 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001357 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001358 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001359 },
1360 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001361 .opt_clks = dss_dispc_opt_clks,
1362 .opt_clks_cnt = ARRAY_SIZE(dss_dispc_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001363 .slaves = omap44xx_dss_dispc_slaves,
1364 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001365};
1366
1367/*
1368 * 'dsi' class
1369 * display serial interface controller
1370 */
1371
1372static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = {
1373 .rev_offs = 0x0000,
1374 .sysc_offs = 0x0010,
1375 .syss_offs = 0x0014,
1376 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1377 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1378 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1379 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1380 .sysc_fields = &omap_hwmod_sysc_type1,
1381};
1382
1383static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1384 .name = "dsi",
1385 .sysc = &omap44xx_dsi_sysc,
1386};
1387
1388/* dss_dsi1 */
1389static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1390static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1391 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001392 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001393};
1394
1395static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1396 { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001397 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001398};
1399
1400static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1401 {
1402 .pa_start = 0x58004000,
1403 .pa_end = 0x580041ff,
1404 .flags = ADDR_TYPE_RT
1405 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001406 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001407};
1408
1409/* l3_main_2 -> dss_dsi1 */
1410static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1411 .master = &omap44xx_l3_main_2_hwmod,
1412 .slave = &omap44xx_dss_dsi1_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001413 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001414 .addr = omap44xx_dss_dsi1_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001415 .user = OCP_USER_SDMA,
1416};
1417
1418static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1419 {
1420 .pa_start = 0x48044000,
1421 .pa_end = 0x480441ff,
1422 .flags = ADDR_TYPE_RT
1423 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001424 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001425};
1426
1427/* l4_per -> dss_dsi1 */
1428static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1429 .master = &omap44xx_l4_per_hwmod,
1430 .slave = &omap44xx_dss_dsi1_hwmod,
1431 .clk = "l4_div_ck",
1432 .addr = omap44xx_dss_dsi1_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001433 .user = OCP_USER_MPU,
1434};
1435
1436/* dss_dsi1 slave ports */
1437static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1438 &omap44xx_l3_main_2__dss_dsi1,
1439 &omap44xx_l4_per__dss_dsi1,
1440};
1441
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001442static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1443 { .role = "sys_clk", .clk = "dss_sys_clk" },
1444};
1445
Benoit Coussond63bd742011-01-27 11:17:03 +00001446static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1447 .name = "dss_dsi1",
1448 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001449 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001450 .mpu_irqs = omap44xx_dss_dsi1_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001451 .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001452 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001453 .prcm = {
1454 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001455 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001456 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001457 },
1458 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001459 .opt_clks = dss_dsi1_opt_clks,
1460 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001461 .slaves = omap44xx_dss_dsi1_slaves,
1462 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001463};
1464
1465/* dss_dsi2 */
1466static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1467static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1468 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001469 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001470};
1471
1472static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1473 { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001474 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001475};
1476
1477static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1478 {
1479 .pa_start = 0x58005000,
1480 .pa_end = 0x580051ff,
1481 .flags = ADDR_TYPE_RT
1482 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001483 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001484};
1485
1486/* l3_main_2 -> dss_dsi2 */
1487static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1488 .master = &omap44xx_l3_main_2_hwmod,
1489 .slave = &omap44xx_dss_dsi2_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001490 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001491 .addr = omap44xx_dss_dsi2_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001492 .user = OCP_USER_SDMA,
1493};
1494
1495static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1496 {
1497 .pa_start = 0x48045000,
1498 .pa_end = 0x480451ff,
1499 .flags = ADDR_TYPE_RT
1500 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001501 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001502};
1503
1504/* l4_per -> dss_dsi2 */
1505static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1506 .master = &omap44xx_l4_per_hwmod,
1507 .slave = &omap44xx_dss_dsi2_hwmod,
1508 .clk = "l4_div_ck",
1509 .addr = omap44xx_dss_dsi2_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001510 .user = OCP_USER_MPU,
1511};
1512
1513/* dss_dsi2 slave ports */
1514static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1515 &omap44xx_l3_main_2__dss_dsi2,
1516 &omap44xx_l4_per__dss_dsi2,
1517};
1518
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001519static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
1520 { .role = "sys_clk", .clk = "dss_sys_clk" },
1521};
1522
Benoit Coussond63bd742011-01-27 11:17:03 +00001523static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1524 .name = "dss_dsi2",
1525 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001526 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001527 .mpu_irqs = omap44xx_dss_dsi2_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001528 .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001529 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001530 .prcm = {
1531 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001532 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001533 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001534 },
1535 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001536 .opt_clks = dss_dsi2_opt_clks,
1537 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001538 .slaves = omap44xx_dss_dsi2_slaves,
1539 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001540};
1541
1542/*
1543 * 'hdmi' class
1544 * hdmi controller
1545 */
1546
1547static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = {
1548 .rev_offs = 0x0000,
1549 .sysc_offs = 0x0010,
1550 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1551 SYSC_HAS_SOFTRESET),
1552 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1553 SIDLE_SMART_WKUP),
1554 .sysc_fields = &omap_hwmod_sysc_type2,
1555};
1556
1557static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1558 .name = "hdmi",
1559 .sysc = &omap44xx_hdmi_sysc,
1560};
1561
1562/* dss_hdmi */
1563static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1564static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1565 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001566 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001567};
1568
1569static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1570 { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001571 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001572};
1573
1574static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1575 {
1576 .pa_start = 0x58006000,
1577 .pa_end = 0x58006fff,
1578 .flags = ADDR_TYPE_RT
1579 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001580 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001581};
1582
1583/* l3_main_2 -> dss_hdmi */
1584static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1585 .master = &omap44xx_l3_main_2_hwmod,
1586 .slave = &omap44xx_dss_hdmi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001587 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001588 .addr = omap44xx_dss_hdmi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001589 .user = OCP_USER_SDMA,
1590};
1591
1592static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1593 {
1594 .pa_start = 0x48046000,
1595 .pa_end = 0x48046fff,
1596 .flags = ADDR_TYPE_RT
1597 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001598 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001599};
1600
1601/* l4_per -> dss_hdmi */
1602static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1603 .master = &omap44xx_l4_per_hwmod,
1604 .slave = &omap44xx_dss_hdmi_hwmod,
1605 .clk = "l4_div_ck",
1606 .addr = omap44xx_dss_hdmi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001607 .user = OCP_USER_MPU,
1608};
1609
1610/* dss_hdmi slave ports */
1611static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1612 &omap44xx_l3_main_2__dss_hdmi,
1613 &omap44xx_l4_per__dss_hdmi,
1614};
1615
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001616static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
1617 { .role = "sys_clk", .clk = "dss_sys_clk" },
1618};
1619
Benoit Coussond63bd742011-01-27 11:17:03 +00001620static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1621 .name = "dss_hdmi",
1622 .class = &omap44xx_hdmi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001623 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001624 .mpu_irqs = omap44xx_dss_hdmi_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001625 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001626 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001627 .prcm = {
1628 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001629 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001630 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001631 },
1632 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001633 .opt_clks = dss_hdmi_opt_clks,
1634 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001635 .slaves = omap44xx_dss_hdmi_slaves,
1636 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001637};
1638
1639/*
1640 * 'rfbi' class
1641 * remote frame buffer interface
1642 */
1643
1644static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = {
1645 .rev_offs = 0x0000,
1646 .sysc_offs = 0x0010,
1647 .syss_offs = 0x0014,
1648 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1649 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1650 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1651 .sysc_fields = &omap_hwmod_sysc_type1,
1652};
1653
1654static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1655 .name = "rfbi",
1656 .sysc = &omap44xx_rfbi_sysc,
1657};
1658
1659/* dss_rfbi */
1660static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1661static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1662 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001663 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001664};
1665
1666static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1667 {
1668 .pa_start = 0x58002000,
1669 .pa_end = 0x580020ff,
1670 .flags = ADDR_TYPE_RT
1671 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001672 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001673};
1674
1675/* l3_main_2 -> dss_rfbi */
1676static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1677 .master = &omap44xx_l3_main_2_hwmod,
1678 .slave = &omap44xx_dss_rfbi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001679 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001680 .addr = omap44xx_dss_rfbi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001681 .user = OCP_USER_SDMA,
1682};
1683
1684static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1685 {
1686 .pa_start = 0x48042000,
1687 .pa_end = 0x480420ff,
1688 .flags = ADDR_TYPE_RT
1689 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001690 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001691};
1692
1693/* l4_per -> dss_rfbi */
1694static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1695 .master = &omap44xx_l4_per_hwmod,
1696 .slave = &omap44xx_dss_rfbi_hwmod,
1697 .clk = "l4_div_ck",
1698 .addr = omap44xx_dss_rfbi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001699 .user = OCP_USER_MPU,
1700};
1701
1702/* dss_rfbi slave ports */
1703static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1704 &omap44xx_l3_main_2__dss_rfbi,
1705 &omap44xx_l4_per__dss_rfbi,
1706};
1707
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001708static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1709 { .role = "ick", .clk = "dss_fck" },
1710};
1711
Benoit Coussond63bd742011-01-27 11:17:03 +00001712static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1713 .name = "dss_rfbi",
1714 .class = &omap44xx_rfbi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001715 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001716 .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001717 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001718 .prcm = {
1719 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001720 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001721 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001722 },
1723 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001724 .opt_clks = dss_rfbi_opt_clks,
1725 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001726 .slaves = omap44xx_dss_rfbi_slaves,
1727 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001728};
1729
1730/*
1731 * 'venc' class
1732 * video encoder
1733 */
1734
1735static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
1736 .name = "venc",
1737};
1738
1739/* dss_venc */
1740static struct omap_hwmod omap44xx_dss_venc_hwmod;
1741static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1742 {
1743 .pa_start = 0x58003000,
1744 .pa_end = 0x580030ff,
1745 .flags = ADDR_TYPE_RT
1746 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001747 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001748};
1749
1750/* l3_main_2 -> dss_venc */
1751static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1752 .master = &omap44xx_l3_main_2_hwmod,
1753 .slave = &omap44xx_dss_venc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001754 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001755 .addr = omap44xx_dss_venc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001756 .user = OCP_USER_SDMA,
1757};
1758
1759static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1760 {
1761 .pa_start = 0x48043000,
1762 .pa_end = 0x480430ff,
1763 .flags = ADDR_TYPE_RT
1764 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001765 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001766};
1767
1768/* l4_per -> dss_venc */
1769static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1770 .master = &omap44xx_l4_per_hwmod,
1771 .slave = &omap44xx_dss_venc_hwmod,
1772 .clk = "l4_div_ck",
1773 .addr = omap44xx_dss_venc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001774 .user = OCP_USER_MPU,
1775};
1776
1777/* dss_venc slave ports */
1778static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1779 &omap44xx_l3_main_2__dss_venc,
1780 &omap44xx_l4_per__dss_venc,
1781};
1782
1783static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1784 .name = "dss_venc",
1785 .class = &omap44xx_venc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001786 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001787 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001788 .prcm = {
1789 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001790 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001791 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001792 },
1793 },
1794 .slaves = omap44xx_dss_venc_slaves,
1795 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001796};
1797
1798/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001799 * 'gpio' class
1800 * general purpose io module
1801 */
1802
1803static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
1804 .rev_offs = 0x0000,
1805 .sysc_offs = 0x0010,
1806 .syss_offs = 0x0114,
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001807 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1808 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1809 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07001810 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1811 SIDLE_SMART_WKUP),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001812 .sysc_fields = &omap_hwmod_sysc_type1,
1813};
1814
1815static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001816 .name = "gpio",
1817 .sysc = &omap44xx_gpio_sysc,
1818 .rev = 2,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001819};
1820
1821/* gpio dev_attr */
1822static struct omap_gpio_dev_attr gpio_dev_attr = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001823 .bank_width = 32,
1824 .dbck_flag = true,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001825};
1826
1827/* gpio1 */
1828static struct omap_hwmod omap44xx_gpio1_hwmod;
1829static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1830 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001831 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001832};
1833
1834static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1835 {
1836 .pa_start = 0x4a310000,
1837 .pa_end = 0x4a3101ff,
1838 .flags = ADDR_TYPE_RT
1839 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001840 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001841};
1842
1843/* l4_wkup -> gpio1 */
1844static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1845 .master = &omap44xx_l4_wkup_hwmod,
1846 .slave = &omap44xx_gpio1_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001847 .clk = "l4_wkup_clk_mux_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001848 .addr = omap44xx_gpio1_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001849 .user = OCP_USER_MPU | OCP_USER_SDMA,
1850};
1851
1852/* gpio1 slave ports */
1853static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
1854 &omap44xx_l4_wkup__gpio1,
1855};
1856
1857static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001858 { .role = "dbclk", .clk = "gpio1_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001859};
1860
1861static struct omap_hwmod omap44xx_gpio1_hwmod = {
1862 .name = "gpio1",
1863 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001864 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001865 .mpu_irqs = omap44xx_gpio1_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001866 .main_clk = "gpio1_ick",
1867 .prcm = {
1868 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001869 .clkctrl_offs = OMAP4_CM_WKUP_GPIO1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001870 .context_offs = OMAP4_RM_WKUP_GPIO1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001871 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001872 },
1873 },
1874 .opt_clks = gpio1_opt_clks,
1875 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1876 .dev_attr = &gpio_dev_attr,
1877 .slaves = omap44xx_gpio1_slaves,
1878 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001879};
1880
1881/* gpio2 */
1882static struct omap_hwmod omap44xx_gpio2_hwmod;
1883static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1884 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001885 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001886};
1887
1888static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1889 {
1890 .pa_start = 0x48055000,
1891 .pa_end = 0x480551ff,
1892 .flags = ADDR_TYPE_RT
1893 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001894 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001895};
1896
1897/* l4_per -> gpio2 */
1898static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1899 .master = &omap44xx_l4_per_hwmod,
1900 .slave = &omap44xx_gpio2_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001901 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001902 .addr = omap44xx_gpio2_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001903 .user = OCP_USER_MPU | OCP_USER_SDMA,
1904};
1905
1906/* gpio2 slave ports */
1907static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
1908 &omap44xx_l4_per__gpio2,
1909};
1910
1911static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001912 { .role = "dbclk", .clk = "gpio2_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001913};
1914
1915static struct omap_hwmod omap44xx_gpio2_hwmod = {
1916 .name = "gpio2",
1917 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001918 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001919 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001920 .mpu_irqs = omap44xx_gpio2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001921 .main_clk = "gpio2_ick",
1922 .prcm = {
1923 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001924 .clkctrl_offs = OMAP4_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001925 .context_offs = OMAP4_RM_L4PER_GPIO2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001926 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001927 },
1928 },
1929 .opt_clks = gpio2_opt_clks,
1930 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1931 .dev_attr = &gpio_dev_attr,
1932 .slaves = omap44xx_gpio2_slaves,
1933 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001934};
1935
1936/* gpio3 */
1937static struct omap_hwmod omap44xx_gpio3_hwmod;
1938static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1939 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001940 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001941};
1942
1943static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1944 {
1945 .pa_start = 0x48057000,
1946 .pa_end = 0x480571ff,
1947 .flags = ADDR_TYPE_RT
1948 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001949 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001950};
1951
1952/* l4_per -> gpio3 */
1953static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
1954 .master = &omap44xx_l4_per_hwmod,
1955 .slave = &omap44xx_gpio3_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001956 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001957 .addr = omap44xx_gpio3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001958 .user = OCP_USER_MPU | OCP_USER_SDMA,
1959};
1960
1961/* gpio3 slave ports */
1962static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
1963 &omap44xx_l4_per__gpio3,
1964};
1965
1966static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001967 { .role = "dbclk", .clk = "gpio3_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001968};
1969
1970static struct omap_hwmod omap44xx_gpio3_hwmod = {
1971 .name = "gpio3",
1972 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001973 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001974 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001975 .mpu_irqs = omap44xx_gpio3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001976 .main_clk = "gpio3_ick",
1977 .prcm = {
1978 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001979 .clkctrl_offs = OMAP4_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001980 .context_offs = OMAP4_RM_L4PER_GPIO3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001981 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001982 },
1983 },
1984 .opt_clks = gpio3_opt_clks,
1985 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1986 .dev_attr = &gpio_dev_attr,
1987 .slaves = omap44xx_gpio3_slaves,
1988 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001989};
1990
1991/* gpio4 */
1992static struct omap_hwmod omap44xx_gpio4_hwmod;
1993static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
1994 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001995 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001996};
1997
1998static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
1999 {
2000 .pa_start = 0x48059000,
2001 .pa_end = 0x480591ff,
2002 .flags = ADDR_TYPE_RT
2003 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002004 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002005};
2006
2007/* l4_per -> gpio4 */
2008static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
2009 .master = &omap44xx_l4_per_hwmod,
2010 .slave = &omap44xx_gpio4_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002011 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002012 .addr = omap44xx_gpio4_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002013 .user = OCP_USER_MPU | OCP_USER_SDMA,
2014};
2015
2016/* gpio4 slave ports */
2017static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
2018 &omap44xx_l4_per__gpio4,
2019};
2020
2021static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002022 { .role = "dbclk", .clk = "gpio4_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002023};
2024
2025static struct omap_hwmod omap44xx_gpio4_hwmod = {
2026 .name = "gpio4",
2027 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002028 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002029 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002030 .mpu_irqs = omap44xx_gpio4_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002031 .main_clk = "gpio4_ick",
2032 .prcm = {
2033 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002034 .clkctrl_offs = OMAP4_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002035 .context_offs = OMAP4_RM_L4PER_GPIO4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002036 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002037 },
2038 },
2039 .opt_clks = gpio4_opt_clks,
2040 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2041 .dev_attr = &gpio_dev_attr,
2042 .slaves = omap44xx_gpio4_slaves,
2043 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002044};
2045
2046/* gpio5 */
2047static struct omap_hwmod omap44xx_gpio5_hwmod;
2048static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
2049 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002050 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002051};
2052
2053static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
2054 {
2055 .pa_start = 0x4805b000,
2056 .pa_end = 0x4805b1ff,
2057 .flags = ADDR_TYPE_RT
2058 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002059 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002060};
2061
2062/* l4_per -> gpio5 */
2063static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
2064 .master = &omap44xx_l4_per_hwmod,
2065 .slave = &omap44xx_gpio5_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002066 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002067 .addr = omap44xx_gpio5_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002068 .user = OCP_USER_MPU | OCP_USER_SDMA,
2069};
2070
2071/* gpio5 slave ports */
2072static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
2073 &omap44xx_l4_per__gpio5,
2074};
2075
2076static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002077 { .role = "dbclk", .clk = "gpio5_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002078};
2079
2080static struct omap_hwmod omap44xx_gpio5_hwmod = {
2081 .name = "gpio5",
2082 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002083 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002084 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002085 .mpu_irqs = omap44xx_gpio5_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002086 .main_clk = "gpio5_ick",
2087 .prcm = {
2088 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002089 .clkctrl_offs = OMAP4_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002090 .context_offs = OMAP4_RM_L4PER_GPIO5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002091 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002092 },
2093 },
2094 .opt_clks = gpio5_opt_clks,
2095 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2096 .dev_attr = &gpio_dev_attr,
2097 .slaves = omap44xx_gpio5_slaves,
2098 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002099};
2100
2101/* gpio6 */
2102static struct omap_hwmod omap44xx_gpio6_hwmod;
2103static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
2104 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002105 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002106};
2107
2108static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
2109 {
2110 .pa_start = 0x4805d000,
2111 .pa_end = 0x4805d1ff,
2112 .flags = ADDR_TYPE_RT
2113 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002114 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002115};
2116
2117/* l4_per -> gpio6 */
2118static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
2119 .master = &omap44xx_l4_per_hwmod,
2120 .slave = &omap44xx_gpio6_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002121 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002122 .addr = omap44xx_gpio6_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002123 .user = OCP_USER_MPU | OCP_USER_SDMA,
2124};
2125
2126/* gpio6 slave ports */
2127static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
2128 &omap44xx_l4_per__gpio6,
2129};
2130
2131static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002132 { .role = "dbclk", .clk = "gpio6_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002133};
2134
2135static struct omap_hwmod omap44xx_gpio6_hwmod = {
2136 .name = "gpio6",
2137 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002138 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002139 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002140 .mpu_irqs = omap44xx_gpio6_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002141 .main_clk = "gpio6_ick",
2142 .prcm = {
2143 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002144 .clkctrl_offs = OMAP4_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002145 .context_offs = OMAP4_RM_L4PER_GPIO6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002146 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002147 },
2148 },
2149 .opt_clks = gpio6_opt_clks,
2150 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2151 .dev_attr = &gpio_dev_attr,
2152 .slaves = omap44xx_gpio6_slaves,
2153 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002154};
2155
2156/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002157 * 'hsi' class
2158 * mipi high-speed synchronous serial interface (multichannel and full-duplex
2159 * serial if)
2160 */
2161
2162static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
2163 .rev_offs = 0x0000,
2164 .sysc_offs = 0x0010,
2165 .syss_offs = 0x0014,
2166 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
2167 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
2168 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2169 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2170 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002171 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002172 .sysc_fields = &omap_hwmod_sysc_type1,
2173};
2174
2175static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
2176 .name = "hsi",
2177 .sysc = &omap44xx_hsi_sysc,
2178};
2179
2180/* hsi */
2181static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2182 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
2183 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
2184 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002185 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002186};
2187
2188/* hsi master ports */
2189static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = {
2190 &omap44xx_hsi__l3_main_2,
2191};
2192
2193static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2194 {
2195 .pa_start = 0x4a058000,
2196 .pa_end = 0x4a05bfff,
2197 .flags = ADDR_TYPE_RT
2198 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002199 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002200};
2201
2202/* l4_cfg -> hsi */
2203static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2204 .master = &omap44xx_l4_cfg_hwmod,
2205 .slave = &omap44xx_hsi_hwmod,
2206 .clk = "l4_div_ck",
2207 .addr = omap44xx_hsi_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002208 .user = OCP_USER_MPU | OCP_USER_SDMA,
2209};
2210
2211/* hsi slave ports */
2212static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2213 &omap44xx_l4_cfg__hsi,
2214};
2215
2216static struct omap_hwmod omap44xx_hsi_hwmod = {
2217 .name = "hsi",
2218 .class = &omap44xx_hsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002219 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002220 .mpu_irqs = omap44xx_hsi_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002221 .main_clk = "hsi_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002222 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002223 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002224 .clkctrl_offs = OMAP4_CM_L3INIT_HSI_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002225 .context_offs = OMAP4_RM_L3INIT_HSI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002226 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002227 },
2228 },
2229 .slaves = omap44xx_hsi_slaves,
2230 .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves),
2231 .masters = omap44xx_hsi_masters,
2232 .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002233};
2234
2235/*
Benoit Coussonf7764712010-09-21 19:37:14 +05302236 * 'i2c' class
2237 * multimaster high-speed i2c controller
2238 */
2239
2240static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
2241 .sysc_offs = 0x0010,
2242 .syss_offs = 0x0090,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002243 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2244 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07002245 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07002246 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2247 SIDLE_SMART_WKUP),
Benoit Coussonf7764712010-09-21 19:37:14 +05302248 .sysc_fields = &omap_hwmod_sysc_type1,
2249};
2250
2251static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002252 .name = "i2c",
2253 .sysc = &omap44xx_i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06002254 .rev = OMAP_I2C_IP_VERSION_2,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002255 .reset = &omap_i2c_reset,
Benoit Coussonf7764712010-09-21 19:37:14 +05302256};
2257
Andy Green4d4441a2011-07-10 05:27:16 -06002258static struct omap_i2c_dev_attr i2c_dev_attr = {
2259 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
2260};
2261
Benoit Coussonf7764712010-09-21 19:37:14 +05302262/* i2c1 */
2263static struct omap_hwmod omap44xx_i2c1_hwmod;
2264static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2265 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002266 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302267};
2268
2269static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2270 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
2271 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002272 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302273};
2274
2275static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2276 {
2277 .pa_start = 0x48070000,
2278 .pa_end = 0x480700ff,
2279 .flags = ADDR_TYPE_RT
2280 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002281 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302282};
2283
2284/* l4_per -> i2c1 */
2285static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2286 .master = &omap44xx_l4_per_hwmod,
2287 .slave = &omap44xx_i2c1_hwmod,
2288 .clk = "l4_div_ck",
2289 .addr = omap44xx_i2c1_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302290 .user = OCP_USER_MPU | OCP_USER_SDMA,
2291};
2292
2293/* i2c1 slave ports */
2294static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2295 &omap44xx_l4_per__i2c1,
2296};
2297
2298static struct omap_hwmod omap44xx_i2c1_hwmod = {
2299 .name = "i2c1",
2300 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002301 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002302 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302303 .mpu_irqs = omap44xx_i2c1_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302304 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302305 .main_clk = "i2c1_fck",
2306 .prcm = {
2307 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002308 .clkctrl_offs = OMAP4_CM_L4PER_I2C1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002309 .context_offs = OMAP4_RM_L4PER_I2C1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002310 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302311 },
2312 },
2313 .slaves = omap44xx_i2c1_slaves,
2314 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002315 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302316};
2317
2318/* i2c2 */
2319static struct omap_hwmod omap44xx_i2c2_hwmod;
2320static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2321 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002322 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302323};
2324
2325static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2326 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
2327 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002328 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302329};
2330
2331static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2332 {
2333 .pa_start = 0x48072000,
2334 .pa_end = 0x480720ff,
2335 .flags = ADDR_TYPE_RT
2336 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002337 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302338};
2339
2340/* l4_per -> i2c2 */
2341static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2342 .master = &omap44xx_l4_per_hwmod,
2343 .slave = &omap44xx_i2c2_hwmod,
2344 .clk = "l4_div_ck",
2345 .addr = omap44xx_i2c2_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302346 .user = OCP_USER_MPU | OCP_USER_SDMA,
2347};
2348
2349/* i2c2 slave ports */
2350static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2351 &omap44xx_l4_per__i2c2,
2352};
2353
2354static struct omap_hwmod omap44xx_i2c2_hwmod = {
2355 .name = "i2c2",
2356 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002357 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002358 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302359 .mpu_irqs = omap44xx_i2c2_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302360 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302361 .main_clk = "i2c2_fck",
2362 .prcm = {
2363 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002364 .clkctrl_offs = OMAP4_CM_L4PER_I2C2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002365 .context_offs = OMAP4_RM_L4PER_I2C2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002366 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302367 },
2368 },
2369 .slaves = omap44xx_i2c2_slaves,
2370 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002371 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302372};
2373
2374/* i2c3 */
2375static struct omap_hwmod omap44xx_i2c3_hwmod;
2376static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2377 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002378 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302379};
2380
2381static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2382 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
2383 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002384 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302385};
2386
2387static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2388 {
2389 .pa_start = 0x48060000,
2390 .pa_end = 0x480600ff,
2391 .flags = ADDR_TYPE_RT
2392 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002393 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302394};
2395
2396/* l4_per -> i2c3 */
2397static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2398 .master = &omap44xx_l4_per_hwmod,
2399 .slave = &omap44xx_i2c3_hwmod,
2400 .clk = "l4_div_ck",
2401 .addr = omap44xx_i2c3_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302402 .user = OCP_USER_MPU | OCP_USER_SDMA,
2403};
2404
2405/* i2c3 slave ports */
2406static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2407 &omap44xx_l4_per__i2c3,
2408};
2409
2410static struct omap_hwmod omap44xx_i2c3_hwmod = {
2411 .name = "i2c3",
2412 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002413 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002414 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302415 .mpu_irqs = omap44xx_i2c3_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302416 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302417 .main_clk = "i2c3_fck",
2418 .prcm = {
2419 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002420 .clkctrl_offs = OMAP4_CM_L4PER_I2C3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002421 .context_offs = OMAP4_RM_L4PER_I2C3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002422 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302423 },
2424 },
2425 .slaves = omap44xx_i2c3_slaves,
2426 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002427 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302428};
2429
2430/* i2c4 */
2431static struct omap_hwmod omap44xx_i2c4_hwmod;
2432static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2433 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002434 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302435};
2436
2437static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2438 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
2439 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002440 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302441};
2442
2443static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2444 {
2445 .pa_start = 0x48350000,
2446 .pa_end = 0x483500ff,
2447 .flags = ADDR_TYPE_RT
2448 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002449 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302450};
2451
2452/* l4_per -> i2c4 */
2453static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2454 .master = &omap44xx_l4_per_hwmod,
2455 .slave = &omap44xx_i2c4_hwmod,
2456 .clk = "l4_div_ck",
2457 .addr = omap44xx_i2c4_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302458 .user = OCP_USER_MPU | OCP_USER_SDMA,
2459};
2460
2461/* i2c4 slave ports */
2462static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2463 &omap44xx_l4_per__i2c4,
2464};
2465
2466static struct omap_hwmod omap44xx_i2c4_hwmod = {
2467 .name = "i2c4",
2468 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002469 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002470 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302471 .mpu_irqs = omap44xx_i2c4_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302472 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302473 .main_clk = "i2c4_fck",
2474 .prcm = {
2475 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002476 .clkctrl_offs = OMAP4_CM_L4PER_I2C4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002477 .context_offs = OMAP4_RM_L4PER_I2C4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002478 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302479 },
2480 },
2481 .slaves = omap44xx_i2c4_slaves,
2482 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002483 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302484};
2485
2486/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002487 * 'ipu' class
2488 * imaging processor unit
2489 */
2490
2491static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
2492 .name = "ipu",
2493};
2494
2495/* ipu */
2496static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2497 { .irq = 100 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002498 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002499};
2500
2501static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = {
2502 { .name = "cpu0", .rst_shift = 0 },
2503};
2504
2505static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = {
2506 { .name = "cpu1", .rst_shift = 1 },
2507};
2508
2509static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2510 { .name = "mmu_cache", .rst_shift = 2 },
2511};
2512
2513/* ipu master ports */
2514static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = {
2515 &omap44xx_ipu__l3_main_2,
2516};
2517
2518/* l3_main_2 -> ipu */
2519static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
2520 .master = &omap44xx_l3_main_2_hwmod,
2521 .slave = &omap44xx_ipu_hwmod,
2522 .clk = "l3_div_ck",
2523 .user = OCP_USER_MPU | OCP_USER_SDMA,
2524};
2525
2526/* ipu slave ports */
2527static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2528 &omap44xx_l3_main_2__ipu,
2529};
2530
2531/* Pseudo hwmod for reset control purpose only */
2532static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2533 .name = "ipu_c0",
2534 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002535 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002536 .flags = HWMOD_INIT_NO_RESET,
2537 .rst_lines = omap44xx_ipu_c0_resets,
2538 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002539 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002540 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002541 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002542 },
2543 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002544};
2545
2546/* Pseudo hwmod for reset control purpose only */
2547static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2548 .name = "ipu_c1",
2549 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002550 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002551 .flags = HWMOD_INIT_NO_RESET,
2552 .rst_lines = omap44xx_ipu_c1_resets,
2553 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002554 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002555 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002556 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002557 },
2558 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002559};
2560
2561static struct omap_hwmod omap44xx_ipu_hwmod = {
2562 .name = "ipu",
2563 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002564 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002565 .mpu_irqs = omap44xx_ipu_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002566 .rst_lines = omap44xx_ipu_resets,
2567 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
2568 .main_clk = "ipu_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002569 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002570 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002571 .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002572 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002573 .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002574 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002575 },
2576 },
2577 .slaves = omap44xx_ipu_slaves,
2578 .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves),
2579 .masters = omap44xx_ipu_masters,
2580 .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002581};
2582
2583/*
2584 * 'iss' class
2585 * external images sensor pixel data processor
2586 */
2587
2588static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
2589 .rev_offs = 0x0000,
2590 .sysc_offs = 0x0010,
2591 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
2592 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2593 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2594 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002595 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002596 .sysc_fields = &omap_hwmod_sysc_type2,
2597};
2598
2599static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
2600 .name = "iss",
2601 .sysc = &omap44xx_iss_sysc,
2602};
2603
2604/* iss */
2605static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
2606 { .irq = 24 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002607 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002608};
2609
2610static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2611 { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START },
2612 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
2613 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
2614 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002615 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002616};
2617
2618/* iss master ports */
2619static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = {
2620 &omap44xx_iss__l3_main_2,
2621};
2622
2623static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2624 {
2625 .pa_start = 0x52000000,
2626 .pa_end = 0x520000ff,
2627 .flags = ADDR_TYPE_RT
2628 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002629 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002630};
2631
2632/* l3_main_2 -> iss */
2633static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2634 .master = &omap44xx_l3_main_2_hwmod,
2635 .slave = &omap44xx_iss_hwmod,
2636 .clk = "l3_div_ck",
2637 .addr = omap44xx_iss_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002638 .user = OCP_USER_MPU | OCP_USER_SDMA,
2639};
2640
2641/* iss slave ports */
2642static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = {
2643 &omap44xx_l3_main_2__iss,
2644};
2645
2646static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2647 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
2648};
2649
2650static struct omap_hwmod omap44xx_iss_hwmod = {
2651 .name = "iss",
2652 .class = &omap44xx_iss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002653 .clkdm_name = "iss_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002654 .mpu_irqs = omap44xx_iss_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002655 .sdma_reqs = omap44xx_iss_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002656 .main_clk = "iss_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002657 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002658 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002659 .clkctrl_offs = OMAP4_CM_CAM_ISS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002660 .context_offs = OMAP4_RM_CAM_ISS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002661 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002662 },
2663 },
2664 .opt_clks = iss_opt_clks,
2665 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
2666 .slaves = omap44xx_iss_slaves,
2667 .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves),
2668 .masters = omap44xx_iss_masters,
2669 .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002670};
2671
2672/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002673 * 'iva' class
2674 * multi-standard video encoder/decoder hardware accelerator
2675 */
2676
2677static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002678 .name = "iva",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002679};
2680
2681/* iva */
2682static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2683 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
2684 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
2685 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002686 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002687};
2688
2689static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
2690 { .name = "logic", .rst_shift = 2 },
2691};
2692
2693static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
2694 { .name = "seq0", .rst_shift = 0 },
2695};
2696
2697static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
2698 { .name = "seq1", .rst_shift = 1 },
2699};
2700
2701/* iva master ports */
2702static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
2703 &omap44xx_iva__l3_main_2,
2704 &omap44xx_iva__l3_instr,
2705};
2706
2707static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2708 {
2709 .pa_start = 0x5a000000,
2710 .pa_end = 0x5a07ffff,
2711 .flags = ADDR_TYPE_RT
2712 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002713 { }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002714};
2715
2716/* l3_main_2 -> iva */
2717static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2718 .master = &omap44xx_l3_main_2_hwmod,
2719 .slave = &omap44xx_iva_hwmod,
2720 .clk = "l3_div_ck",
2721 .addr = omap44xx_iva_addrs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002722 .user = OCP_USER_MPU,
2723};
2724
2725/* iva slave ports */
2726static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2727 &omap44xx_dsp__iva,
2728 &omap44xx_l3_main_2__iva,
2729};
2730
2731/* Pseudo hwmod for reset control purpose only */
2732static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2733 .name = "iva_seq0",
2734 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002735 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002736 .flags = HWMOD_INIT_NO_RESET,
2737 .rst_lines = omap44xx_iva_seq0_resets,
2738 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2739 .prcm = {
2740 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002741 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002742 },
2743 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002744};
2745
2746/* Pseudo hwmod for reset control purpose only */
2747static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2748 .name = "iva_seq1",
2749 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002750 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002751 .flags = HWMOD_INIT_NO_RESET,
2752 .rst_lines = omap44xx_iva_seq1_resets,
2753 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2754 .prcm = {
2755 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002756 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002757 },
2758 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002759};
2760
2761static struct omap_hwmod omap44xx_iva_hwmod = {
2762 .name = "iva",
2763 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002764 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002765 .mpu_irqs = omap44xx_iva_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002766 .rst_lines = omap44xx_iva_resets,
2767 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
2768 .main_clk = "iva_fck",
2769 .prcm = {
2770 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002771 .clkctrl_offs = OMAP4_CM_IVAHD_IVAHD_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002772 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002773 .context_offs = OMAP4_RM_IVAHD_IVAHD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002774 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002775 },
2776 },
2777 .slaves = omap44xx_iva_slaves,
2778 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
2779 .masters = omap44xx_iva_masters,
2780 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002781};
2782
2783/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002784 * 'kbd' class
2785 * keyboard controller
2786 */
2787
2788static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = {
2789 .rev_offs = 0x0000,
2790 .sysc_offs = 0x0010,
2791 .syss_offs = 0x0014,
2792 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2793 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
2794 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2795 SYSS_HAS_RESET_STATUS),
2796 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2797 .sysc_fields = &omap_hwmod_sysc_type1,
2798};
2799
2800static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2801 .name = "kbd",
2802 .sysc = &omap44xx_kbd_sysc,
2803};
2804
2805/* kbd */
2806static struct omap_hwmod omap44xx_kbd_hwmod;
2807static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2808 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002809 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002810};
2811
2812static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2813 {
2814 .pa_start = 0x4a31c000,
2815 .pa_end = 0x4a31c07f,
2816 .flags = ADDR_TYPE_RT
2817 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002818 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002819};
2820
2821/* l4_wkup -> kbd */
2822static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2823 .master = &omap44xx_l4_wkup_hwmod,
2824 .slave = &omap44xx_kbd_hwmod,
2825 .clk = "l4_wkup_clk_mux_ck",
2826 .addr = omap44xx_kbd_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002827 .user = OCP_USER_MPU | OCP_USER_SDMA,
2828};
2829
2830/* kbd slave ports */
2831static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2832 &omap44xx_l4_wkup__kbd,
2833};
2834
2835static struct omap_hwmod omap44xx_kbd_hwmod = {
2836 .name = "kbd",
2837 .class = &omap44xx_kbd_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002838 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002839 .mpu_irqs = omap44xx_kbd_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002840 .main_clk = "kbd_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002841 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002842 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002843 .clkctrl_offs = OMAP4_CM_WKUP_KEYBOARD_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002844 .context_offs = OMAP4_RM_WKUP_KEYBOARD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002845 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002846 },
2847 },
2848 .slaves = omap44xx_kbd_slaves,
2849 .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01002850};
2851
2852/*
Benoit Coussonec5df922011-02-02 19:27:21 +00002853 * 'mailbox' class
2854 * mailbox module allowing communication between the on-chip processors using a
2855 * queued mailbox-interrupt mechanism.
2856 */
2857
2858static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
2859 .rev_offs = 0x0000,
2860 .sysc_offs = 0x0010,
2861 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
2862 SYSC_HAS_SOFTRESET),
2863 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2864 .sysc_fields = &omap_hwmod_sysc_type2,
2865};
2866
2867static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2868 .name = "mailbox",
2869 .sysc = &omap44xx_mailbox_sysc,
2870};
2871
2872/* mailbox */
2873static struct omap_hwmod omap44xx_mailbox_hwmod;
2874static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2875 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002876 { .irq = -1 }
Benoit Coussonec5df922011-02-02 19:27:21 +00002877};
2878
2879static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2880 {
2881 .pa_start = 0x4a0f4000,
2882 .pa_end = 0x4a0f41ff,
2883 .flags = ADDR_TYPE_RT
2884 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002885 { }
Benoit Coussonec5df922011-02-02 19:27:21 +00002886};
2887
2888/* l4_cfg -> mailbox */
2889static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2890 .master = &omap44xx_l4_cfg_hwmod,
2891 .slave = &omap44xx_mailbox_hwmod,
2892 .clk = "l4_div_ck",
2893 .addr = omap44xx_mailbox_addrs,
Benoit Coussonec5df922011-02-02 19:27:21 +00002894 .user = OCP_USER_MPU | OCP_USER_SDMA,
2895};
2896
2897/* mailbox slave ports */
2898static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2899 &omap44xx_l4_cfg__mailbox,
2900};
2901
2902static struct omap_hwmod omap44xx_mailbox_hwmod = {
2903 .name = "mailbox",
2904 .class = &omap44xx_mailbox_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002905 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussonec5df922011-02-02 19:27:21 +00002906 .mpu_irqs = omap44xx_mailbox_irqs,
Benoit Cousson00fe6102011-07-09 19:14:28 -06002907 .prcm = {
Benoit Coussonec5df922011-02-02 19:27:21 +00002908 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002909 .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002910 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
Benoit Coussonec5df922011-02-02 19:27:21 +00002911 },
2912 },
2913 .slaves = omap44xx_mailbox_slaves,
2914 .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
Benoit Coussonec5df922011-02-02 19:27:21 +00002915};
2916
2917/*
Benoit Cousson4ddff492011-01-31 14:50:30 +00002918 * 'mcbsp' class
2919 * multi channel buffered serial port controller
2920 */
2921
2922static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
2923 .sysc_offs = 0x008c,
2924 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2925 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2926 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2927 .sysc_fields = &omap_hwmod_sysc_type1,
2928};
2929
2930static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2931 .name = "mcbsp",
2932 .sysc = &omap44xx_mcbsp_sysc,
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302933 .rev = MCBSP_CONFIG_TYPE4,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002934};
2935
2936/* mcbsp1 */
2937static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2938static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2939 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002940 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002941};
2942
2943static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2944 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
2945 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002946 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002947};
2948
2949static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2950 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302951 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002952 .pa_start = 0x40122000,
2953 .pa_end = 0x401220ff,
2954 .flags = ADDR_TYPE_RT
2955 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002956 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002957};
2958
2959/* l4_abe -> mcbsp1 */
2960static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
2961 .master = &omap44xx_l4_abe_hwmod,
2962 .slave = &omap44xx_mcbsp1_hwmod,
2963 .clk = "ocp_abe_iclk",
2964 .addr = omap44xx_mcbsp1_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002965 .user = OCP_USER_MPU,
2966};
2967
2968static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
2969 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302970 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002971 .pa_start = 0x49022000,
2972 .pa_end = 0x490220ff,
2973 .flags = ADDR_TYPE_RT
2974 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002975 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002976};
2977
2978/* l4_abe -> mcbsp1 (dma) */
2979static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
2980 .master = &omap44xx_l4_abe_hwmod,
2981 .slave = &omap44xx_mcbsp1_hwmod,
2982 .clk = "ocp_abe_iclk",
2983 .addr = omap44xx_mcbsp1_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002984 .user = OCP_USER_SDMA,
2985};
2986
2987/* mcbsp1 slave ports */
2988static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
2989 &omap44xx_l4_abe__mcbsp1,
2990 &omap44xx_l4_abe__mcbsp1_dma,
2991};
2992
2993static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
2994 .name = "mcbsp1",
2995 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002996 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002997 .mpu_irqs = omap44xx_mcbsp1_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002998 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002999 .main_clk = "mcbsp1_fck",
3000 .prcm = {
3001 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003002 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003003 .context_offs = OMAP4_RM_ABE_MCBSP1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003004 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003005 },
3006 },
3007 .slaves = omap44xx_mcbsp1_slaves,
3008 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003009};
3010
3011/* mcbsp2 */
3012static struct omap_hwmod omap44xx_mcbsp2_hwmod;
3013static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
3014 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003015 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003016};
3017
3018static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
3019 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
3020 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003021 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003022};
3023
3024static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3025 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303026 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003027 .pa_start = 0x40124000,
3028 .pa_end = 0x401240ff,
3029 .flags = ADDR_TYPE_RT
3030 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003031 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003032};
3033
3034/* l4_abe -> mcbsp2 */
3035static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3036 .master = &omap44xx_l4_abe_hwmod,
3037 .slave = &omap44xx_mcbsp2_hwmod,
3038 .clk = "ocp_abe_iclk",
3039 .addr = omap44xx_mcbsp2_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003040 .user = OCP_USER_MPU,
3041};
3042
3043static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3044 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303045 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003046 .pa_start = 0x49024000,
3047 .pa_end = 0x490240ff,
3048 .flags = ADDR_TYPE_RT
3049 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003050 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003051};
3052
3053/* l4_abe -> mcbsp2 (dma) */
3054static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3055 .master = &omap44xx_l4_abe_hwmod,
3056 .slave = &omap44xx_mcbsp2_hwmod,
3057 .clk = "ocp_abe_iclk",
3058 .addr = omap44xx_mcbsp2_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003059 .user = OCP_USER_SDMA,
3060};
3061
3062/* mcbsp2 slave ports */
3063static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
3064 &omap44xx_l4_abe__mcbsp2,
3065 &omap44xx_l4_abe__mcbsp2_dma,
3066};
3067
3068static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3069 .name = "mcbsp2",
3070 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003071 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003072 .mpu_irqs = omap44xx_mcbsp2_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003073 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003074 .main_clk = "mcbsp2_fck",
3075 .prcm = {
3076 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003077 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003078 .context_offs = OMAP4_RM_ABE_MCBSP2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003079 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003080 },
3081 },
3082 .slaves = omap44xx_mcbsp2_slaves,
3083 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003084};
3085
3086/* mcbsp3 */
3087static struct omap_hwmod omap44xx_mcbsp3_hwmod;
3088static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
3089 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003090 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003091};
3092
3093static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
3094 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
3095 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003096 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003097};
3098
3099static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3100 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303101 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003102 .pa_start = 0x40126000,
3103 .pa_end = 0x401260ff,
3104 .flags = ADDR_TYPE_RT
3105 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003106 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003107};
3108
3109/* l4_abe -> mcbsp3 */
3110static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3111 .master = &omap44xx_l4_abe_hwmod,
3112 .slave = &omap44xx_mcbsp3_hwmod,
3113 .clk = "ocp_abe_iclk",
3114 .addr = omap44xx_mcbsp3_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003115 .user = OCP_USER_MPU,
3116};
3117
3118static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3119 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303120 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003121 .pa_start = 0x49026000,
3122 .pa_end = 0x490260ff,
3123 .flags = ADDR_TYPE_RT
3124 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003125 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003126};
3127
3128/* l4_abe -> mcbsp3 (dma) */
3129static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3130 .master = &omap44xx_l4_abe_hwmod,
3131 .slave = &omap44xx_mcbsp3_hwmod,
3132 .clk = "ocp_abe_iclk",
3133 .addr = omap44xx_mcbsp3_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003134 .user = OCP_USER_SDMA,
3135};
3136
3137/* mcbsp3 slave ports */
3138static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3139 &omap44xx_l4_abe__mcbsp3,
3140 &omap44xx_l4_abe__mcbsp3_dma,
3141};
3142
3143static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3144 .name = "mcbsp3",
3145 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003146 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003147 .mpu_irqs = omap44xx_mcbsp3_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003148 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003149 .main_clk = "mcbsp3_fck",
3150 .prcm = {
3151 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003152 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003153 .context_offs = OMAP4_RM_ABE_MCBSP3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003154 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003155 },
3156 },
3157 .slaves = omap44xx_mcbsp3_slaves,
3158 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003159};
3160
3161/* mcbsp4 */
3162static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3163static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3164 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003165 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003166};
3167
3168static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3169 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
3170 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003171 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003172};
3173
3174static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3175 {
3176 .pa_start = 0x48096000,
3177 .pa_end = 0x480960ff,
3178 .flags = ADDR_TYPE_RT
3179 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003180 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003181};
3182
3183/* l4_per -> mcbsp4 */
3184static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3185 .master = &omap44xx_l4_per_hwmod,
3186 .slave = &omap44xx_mcbsp4_hwmod,
3187 .clk = "l4_div_ck",
3188 .addr = omap44xx_mcbsp4_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003189 .user = OCP_USER_MPU | OCP_USER_SDMA,
3190};
3191
3192/* mcbsp4 slave ports */
3193static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3194 &omap44xx_l4_per__mcbsp4,
3195};
3196
3197static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3198 .name = "mcbsp4",
3199 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003200 .clkdm_name = "l4_per_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003201 .mpu_irqs = omap44xx_mcbsp4_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003202 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003203 .main_clk = "mcbsp4_fck",
3204 .prcm = {
3205 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003206 .clkctrl_offs = OMAP4_CM_L4PER_MCBSP4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003207 .context_offs = OMAP4_RM_L4PER_MCBSP4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003208 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003209 },
3210 },
3211 .slaves = omap44xx_mcbsp4_slaves,
3212 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003213};
3214
3215/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003216 * 'mcpdm' class
3217 * multi channel pdm controller (proprietary interface with phoenix power
3218 * ic)
3219 */
3220
3221static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = {
3222 .rev_offs = 0x0000,
3223 .sysc_offs = 0x0010,
3224 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3225 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3226 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3227 SIDLE_SMART_WKUP),
3228 .sysc_fields = &omap_hwmod_sysc_type2,
3229};
3230
3231static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3232 .name = "mcpdm",
3233 .sysc = &omap44xx_mcpdm_sysc,
3234};
3235
3236/* mcpdm */
3237static struct omap_hwmod omap44xx_mcpdm_hwmod;
3238static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3239 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003240 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003241};
3242
3243static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3244 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
3245 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003246 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003247};
3248
3249static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3250 {
3251 .pa_start = 0x40132000,
3252 .pa_end = 0x4013207f,
3253 .flags = ADDR_TYPE_RT
3254 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003255 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003256};
3257
3258/* l4_abe -> mcpdm */
3259static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3260 .master = &omap44xx_l4_abe_hwmod,
3261 .slave = &omap44xx_mcpdm_hwmod,
3262 .clk = "ocp_abe_iclk",
3263 .addr = omap44xx_mcpdm_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003264 .user = OCP_USER_MPU,
3265};
3266
3267static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3268 {
3269 .pa_start = 0x49032000,
3270 .pa_end = 0x4903207f,
3271 .flags = ADDR_TYPE_RT
3272 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003273 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003274};
3275
3276/* l4_abe -> mcpdm (dma) */
3277static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3278 .master = &omap44xx_l4_abe_hwmod,
3279 .slave = &omap44xx_mcpdm_hwmod,
3280 .clk = "ocp_abe_iclk",
3281 .addr = omap44xx_mcpdm_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003282 .user = OCP_USER_SDMA,
3283};
3284
3285/* mcpdm slave ports */
3286static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3287 &omap44xx_l4_abe__mcpdm,
3288 &omap44xx_l4_abe__mcpdm_dma,
3289};
3290
3291static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3292 .name = "mcpdm",
3293 .class = &omap44xx_mcpdm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003294 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003295 .mpu_irqs = omap44xx_mcpdm_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003296 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003297 .main_clk = "mcpdm_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003298 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003299 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003300 .clkctrl_offs = OMAP4_CM1_ABE_PDM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003301 .context_offs = OMAP4_RM_ABE_PDM_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003302 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003303 },
3304 },
3305 .slaves = omap44xx_mcpdm_slaves,
3306 .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003307};
3308
3309/*
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303310 * 'mcspi' class
3311 * multichannel serial port interface (mcspi) / master/slave synchronous serial
3312 * bus
3313 */
3314
3315static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = {
3316 .rev_offs = 0x0000,
3317 .sysc_offs = 0x0010,
3318 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3319 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3320 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3321 SIDLE_SMART_WKUP),
3322 .sysc_fields = &omap_hwmod_sysc_type2,
3323};
3324
3325static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3326 .name = "mcspi",
3327 .sysc = &omap44xx_mcspi_sysc,
Benoit Cousson905a74d2011-02-18 14:01:06 +01003328 .rev = OMAP4_MCSPI_REV,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303329};
3330
3331/* mcspi1 */
3332static struct omap_hwmod omap44xx_mcspi1_hwmod;
3333static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3334 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003335 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303336};
3337
3338static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3339 { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START },
3340 { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START },
3341 { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START },
3342 { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START },
3343 { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START },
3344 { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START },
3345 { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START },
3346 { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003347 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303348};
3349
3350static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3351 {
3352 .pa_start = 0x48098000,
3353 .pa_end = 0x480981ff,
3354 .flags = ADDR_TYPE_RT
3355 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003356 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303357};
3358
3359/* l4_per -> mcspi1 */
3360static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3361 .master = &omap44xx_l4_per_hwmod,
3362 .slave = &omap44xx_mcspi1_hwmod,
3363 .clk = "l4_div_ck",
3364 .addr = omap44xx_mcspi1_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303365 .user = OCP_USER_MPU | OCP_USER_SDMA,
3366};
3367
3368/* mcspi1 slave ports */
3369static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = {
3370 &omap44xx_l4_per__mcspi1,
3371};
3372
Benoit Cousson905a74d2011-02-18 14:01:06 +01003373/* mcspi1 dev_attr */
3374static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3375 .num_chipselect = 4,
3376};
3377
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303378static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3379 .name = "mcspi1",
3380 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003381 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303382 .mpu_irqs = omap44xx_mcspi1_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303383 .sdma_reqs = omap44xx_mcspi1_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303384 .main_clk = "mcspi1_fck",
3385 .prcm = {
3386 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003387 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003388 .context_offs = OMAP4_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003389 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303390 },
3391 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003392 .dev_attr = &mcspi1_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303393 .slaves = omap44xx_mcspi1_slaves,
3394 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303395};
3396
3397/* mcspi2 */
3398static struct omap_hwmod omap44xx_mcspi2_hwmod;
3399static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3400 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003401 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303402};
3403
3404static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3405 { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START },
3406 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
3407 { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START },
3408 { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003409 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303410};
3411
3412static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3413 {
3414 .pa_start = 0x4809a000,
3415 .pa_end = 0x4809a1ff,
3416 .flags = ADDR_TYPE_RT
3417 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003418 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303419};
3420
3421/* l4_per -> mcspi2 */
3422static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3423 .master = &omap44xx_l4_per_hwmod,
3424 .slave = &omap44xx_mcspi2_hwmod,
3425 .clk = "l4_div_ck",
3426 .addr = omap44xx_mcspi2_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303427 .user = OCP_USER_MPU | OCP_USER_SDMA,
3428};
3429
3430/* mcspi2 slave ports */
3431static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = {
3432 &omap44xx_l4_per__mcspi2,
3433};
3434
Benoit Cousson905a74d2011-02-18 14:01:06 +01003435/* mcspi2 dev_attr */
3436static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3437 .num_chipselect = 2,
3438};
3439
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303440static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3441 .name = "mcspi2",
3442 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003443 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303444 .mpu_irqs = omap44xx_mcspi2_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303445 .sdma_reqs = omap44xx_mcspi2_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303446 .main_clk = "mcspi2_fck",
3447 .prcm = {
3448 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003449 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003450 .context_offs = OMAP4_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003451 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303452 },
3453 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003454 .dev_attr = &mcspi2_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303455 .slaves = omap44xx_mcspi2_slaves,
3456 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303457};
3458
3459/* mcspi3 */
3460static struct omap_hwmod omap44xx_mcspi3_hwmod;
3461static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3462 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003463 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303464};
3465
3466static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3467 { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START },
3468 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
3469 { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START },
3470 { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003471 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303472};
3473
3474static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3475 {
3476 .pa_start = 0x480b8000,
3477 .pa_end = 0x480b81ff,
3478 .flags = ADDR_TYPE_RT
3479 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003480 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303481};
3482
3483/* l4_per -> mcspi3 */
3484static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3485 .master = &omap44xx_l4_per_hwmod,
3486 .slave = &omap44xx_mcspi3_hwmod,
3487 .clk = "l4_div_ck",
3488 .addr = omap44xx_mcspi3_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303489 .user = OCP_USER_MPU | OCP_USER_SDMA,
3490};
3491
3492/* mcspi3 slave ports */
3493static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = {
3494 &omap44xx_l4_per__mcspi3,
3495};
3496
Benoit Cousson905a74d2011-02-18 14:01:06 +01003497/* mcspi3 dev_attr */
3498static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3499 .num_chipselect = 2,
3500};
3501
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303502static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3503 .name = "mcspi3",
3504 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003505 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303506 .mpu_irqs = omap44xx_mcspi3_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303507 .sdma_reqs = omap44xx_mcspi3_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303508 .main_clk = "mcspi3_fck",
3509 .prcm = {
3510 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003511 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003512 .context_offs = OMAP4_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003513 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303514 },
3515 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003516 .dev_attr = &mcspi3_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303517 .slaves = omap44xx_mcspi3_slaves,
3518 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303519};
3520
3521/* mcspi4 */
3522static struct omap_hwmod omap44xx_mcspi4_hwmod;
3523static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3524 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003525 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303526};
3527
3528static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3529 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
3530 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003531 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303532};
3533
3534static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3535 {
3536 .pa_start = 0x480ba000,
3537 .pa_end = 0x480ba1ff,
3538 .flags = ADDR_TYPE_RT
3539 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003540 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303541};
3542
3543/* l4_per -> mcspi4 */
3544static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3545 .master = &omap44xx_l4_per_hwmod,
3546 .slave = &omap44xx_mcspi4_hwmod,
3547 .clk = "l4_div_ck",
3548 .addr = omap44xx_mcspi4_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303549 .user = OCP_USER_MPU | OCP_USER_SDMA,
3550};
3551
3552/* mcspi4 slave ports */
3553static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = {
3554 &omap44xx_l4_per__mcspi4,
3555};
3556
Benoit Cousson905a74d2011-02-18 14:01:06 +01003557/* mcspi4 dev_attr */
3558static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3559 .num_chipselect = 1,
3560};
3561
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303562static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3563 .name = "mcspi4",
3564 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003565 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303566 .mpu_irqs = omap44xx_mcspi4_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303567 .sdma_reqs = omap44xx_mcspi4_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303568 .main_clk = "mcspi4_fck",
3569 .prcm = {
3570 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003571 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003572 .context_offs = OMAP4_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003573 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303574 },
3575 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003576 .dev_attr = &mcspi4_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303577 .slaves = omap44xx_mcspi4_slaves,
3578 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303579};
3580
3581/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003582 * 'mmc' class
3583 * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller
3584 */
3585
3586static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
3587 .rev_offs = 0x0000,
3588 .sysc_offs = 0x0010,
3589 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
3590 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
3591 SYSC_HAS_SOFTRESET),
3592 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3593 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02003594 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01003595 .sysc_fields = &omap_hwmod_sysc_type2,
3596};
3597
3598static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
3599 .name = "mmc",
3600 .sysc = &omap44xx_mmc_sysc,
3601};
3602
3603/* mmc1 */
3604static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
3605 { .irq = 83 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003606 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003607};
3608
3609static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3610 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
3611 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003612 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003613};
3614
3615/* mmc1 master ports */
3616static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = {
3617 &omap44xx_mmc1__l3_main_1,
3618};
3619
3620static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3621 {
3622 .pa_start = 0x4809c000,
3623 .pa_end = 0x4809c3ff,
3624 .flags = ADDR_TYPE_RT
3625 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003626 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003627};
3628
3629/* l4_per -> mmc1 */
3630static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3631 .master = &omap44xx_l4_per_hwmod,
3632 .slave = &omap44xx_mmc1_hwmod,
3633 .clk = "l4_div_ck",
3634 .addr = omap44xx_mmc1_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003635 .user = OCP_USER_MPU | OCP_USER_SDMA,
3636};
3637
3638/* mmc1 slave ports */
3639static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
3640 &omap44xx_l4_per__mmc1,
3641};
3642
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003643/* mmc1 dev_attr */
3644static struct omap_mmc_dev_attr mmc1_dev_attr = {
3645 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3646};
3647
Benoit Cousson407a6882011-02-15 22:39:48 +01003648static struct omap_hwmod omap44xx_mmc1_hwmod = {
3649 .name = "mmc1",
3650 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003651 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003652 .mpu_irqs = omap44xx_mmc1_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003653 .sdma_reqs = omap44xx_mmc1_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003654 .main_clk = "mmc1_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003655 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003656 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003657 .clkctrl_offs = OMAP4_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003658 .context_offs = OMAP4_RM_L3INIT_MMC1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003659 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003660 },
3661 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003662 .dev_attr = &mmc1_dev_attr,
Benoit Cousson407a6882011-02-15 22:39:48 +01003663 .slaves = omap44xx_mmc1_slaves,
3664 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
3665 .masters = omap44xx_mmc1_masters,
3666 .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003667};
3668
3669/* mmc2 */
3670static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
3671 { .irq = 86 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003672 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003673};
3674
3675static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3676 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
3677 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003678 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003679};
3680
3681/* mmc2 master ports */
3682static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = {
3683 &omap44xx_mmc2__l3_main_1,
3684};
3685
3686static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3687 {
3688 .pa_start = 0x480b4000,
3689 .pa_end = 0x480b43ff,
3690 .flags = ADDR_TYPE_RT
3691 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003692 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003693};
3694
3695/* l4_per -> mmc2 */
3696static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3697 .master = &omap44xx_l4_per_hwmod,
3698 .slave = &omap44xx_mmc2_hwmod,
3699 .clk = "l4_div_ck",
3700 .addr = omap44xx_mmc2_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003701 .user = OCP_USER_MPU | OCP_USER_SDMA,
3702};
3703
3704/* mmc2 slave ports */
3705static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3706 &omap44xx_l4_per__mmc2,
3707};
3708
3709static struct omap_hwmod omap44xx_mmc2_hwmod = {
3710 .name = "mmc2",
3711 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003712 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003713 .mpu_irqs = omap44xx_mmc2_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003714 .sdma_reqs = omap44xx_mmc2_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003715 .main_clk = "mmc2_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003716 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003717 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003718 .clkctrl_offs = OMAP4_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003719 .context_offs = OMAP4_RM_L3INIT_MMC2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003720 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003721 },
3722 },
3723 .slaves = omap44xx_mmc2_slaves,
3724 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves),
3725 .masters = omap44xx_mmc2_masters,
3726 .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003727};
3728
3729/* mmc3 */
3730static struct omap_hwmod omap44xx_mmc3_hwmod;
3731static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3732 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003733 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003734};
3735
3736static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3737 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
3738 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003739 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003740};
3741
3742static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3743 {
3744 .pa_start = 0x480ad000,
3745 .pa_end = 0x480ad3ff,
3746 .flags = ADDR_TYPE_RT
3747 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003748 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003749};
3750
3751/* l4_per -> mmc3 */
3752static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3753 .master = &omap44xx_l4_per_hwmod,
3754 .slave = &omap44xx_mmc3_hwmod,
3755 .clk = "l4_div_ck",
3756 .addr = omap44xx_mmc3_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003757 .user = OCP_USER_MPU | OCP_USER_SDMA,
3758};
3759
3760/* mmc3 slave ports */
3761static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3762 &omap44xx_l4_per__mmc3,
3763};
3764
3765static struct omap_hwmod omap44xx_mmc3_hwmod = {
3766 .name = "mmc3",
3767 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003768 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003769 .mpu_irqs = omap44xx_mmc3_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003770 .sdma_reqs = omap44xx_mmc3_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003771 .main_clk = "mmc3_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003772 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003773 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003774 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003775 .context_offs = OMAP4_RM_L4PER_MMCSD3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003776 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003777 },
3778 },
3779 .slaves = omap44xx_mmc3_slaves,
3780 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003781};
3782
3783/* mmc4 */
3784static struct omap_hwmod omap44xx_mmc4_hwmod;
3785static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3786 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003787 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003788};
3789
3790static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3791 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
3792 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003793 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003794};
3795
3796static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3797 {
3798 .pa_start = 0x480d1000,
3799 .pa_end = 0x480d13ff,
3800 .flags = ADDR_TYPE_RT
3801 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003802 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003803};
3804
3805/* l4_per -> mmc4 */
3806static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3807 .master = &omap44xx_l4_per_hwmod,
3808 .slave = &omap44xx_mmc4_hwmod,
3809 .clk = "l4_div_ck",
3810 .addr = omap44xx_mmc4_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003811 .user = OCP_USER_MPU | OCP_USER_SDMA,
3812};
3813
3814/* mmc4 slave ports */
3815static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3816 &omap44xx_l4_per__mmc4,
3817};
3818
3819static struct omap_hwmod omap44xx_mmc4_hwmod = {
3820 .name = "mmc4",
3821 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003822 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003823 .mpu_irqs = omap44xx_mmc4_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003824
Benoit Cousson407a6882011-02-15 22:39:48 +01003825 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003826 .main_clk = "mmc4_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003827 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003828 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003829 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003830 .context_offs = OMAP4_RM_L4PER_MMCSD4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003831 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003832 },
3833 },
3834 .slaves = omap44xx_mmc4_slaves,
3835 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003836};
3837
3838/* mmc5 */
3839static struct omap_hwmod omap44xx_mmc5_hwmod;
3840static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3841 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003842 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003843};
3844
3845static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3846 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
3847 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003848 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003849};
3850
3851static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3852 {
3853 .pa_start = 0x480d5000,
3854 .pa_end = 0x480d53ff,
3855 .flags = ADDR_TYPE_RT
3856 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003857 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003858};
3859
3860/* l4_per -> mmc5 */
3861static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3862 .master = &omap44xx_l4_per_hwmod,
3863 .slave = &omap44xx_mmc5_hwmod,
3864 .clk = "l4_div_ck",
3865 .addr = omap44xx_mmc5_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003866 .user = OCP_USER_MPU | OCP_USER_SDMA,
3867};
3868
3869/* mmc5 slave ports */
3870static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3871 &omap44xx_l4_per__mmc5,
3872};
3873
3874static struct omap_hwmod omap44xx_mmc5_hwmod = {
3875 .name = "mmc5",
3876 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003877 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003878 .mpu_irqs = omap44xx_mmc5_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003879 .sdma_reqs = omap44xx_mmc5_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003880 .main_clk = "mmc5_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003881 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003882 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003883 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003884 .context_offs = OMAP4_RM_L4PER_MMCSD5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003885 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003886 },
3887 },
3888 .slaves = omap44xx_mmc5_slaves,
3889 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003890};
3891
3892/*
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003893 * 'mpu' class
3894 * mpu sub-system
3895 */
3896
3897static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003898 .name = "mpu",
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003899};
3900
3901/* mpu */
3902static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3903 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
3904 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
3905 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003906 { .irq = -1 }
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003907};
3908
3909/* mpu master ports */
3910static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3911 &omap44xx_mpu__l3_main_1,
3912 &omap44xx_mpu__l4_abe,
3913 &omap44xx_mpu__dmm,
3914};
3915
3916static struct omap_hwmod omap44xx_mpu_hwmod = {
3917 .name = "mpu",
3918 .class = &omap44xx_mpu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003919 .clkdm_name = "mpuss_clkdm",
Benoit Cousson7ecc5372011-07-09 19:14:28 -06003920 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003921 .mpu_irqs = omap44xx_mpu_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003922 .main_clk = "dpll_mpu_m2_ck",
3923 .prcm = {
3924 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003925 .clkctrl_offs = OMAP4_CM_MPU_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003926 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003927 },
3928 },
3929 .masters = omap44xx_mpu_masters,
3930 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003931};
3932
Benoit Cousson92b18d12010-09-23 20:02:41 +05303933/*
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003934 * 'smartreflex' class
3935 * smartreflex module (monitor silicon performance and outputs a measure of
3936 * performance error)
3937 */
3938
3939/* The IP is not compliant to type1 / type2 scheme */
3940static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
3941 .sidle_shift = 24,
3942 .enwkup_shift = 26,
3943};
3944
3945static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
3946 .sysc_offs = 0x0038,
3947 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
3948 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3949 SIDLE_SMART_WKUP),
3950 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
3951};
3952
3953static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003954 .name = "smartreflex",
3955 .sysc = &omap44xx_smartreflex_sysc,
3956 .rev = 2,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003957};
3958
3959/* smartreflex_core */
3960static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
3961static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
3962 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003963 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003964};
3965
3966static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
3967 {
3968 .pa_start = 0x4a0dd000,
3969 .pa_end = 0x4a0dd03f,
3970 .flags = ADDR_TYPE_RT
3971 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003972 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003973};
3974
3975/* l4_cfg -> smartreflex_core */
3976static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
3977 .master = &omap44xx_l4_cfg_hwmod,
3978 .slave = &omap44xx_smartreflex_core_hwmod,
3979 .clk = "l4_div_ck",
3980 .addr = omap44xx_smartreflex_core_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003981 .user = OCP_USER_MPU | OCP_USER_SDMA,
3982};
3983
3984/* smartreflex_core slave ports */
3985static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
3986 &omap44xx_l4_cfg__smartreflex_core,
3987};
3988
3989static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
3990 .name = "smartreflex_core",
3991 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003992 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003993 .mpu_irqs = omap44xx_smartreflex_core_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003994
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003995 .main_clk = "smartreflex_core_fck",
3996 .vdd_name = "core",
3997 .prcm = {
3998 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003999 .clkctrl_offs = OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004000 .context_offs = OMAP4_RM_ALWON_SR_CORE_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004001 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004002 },
4003 },
4004 .slaves = omap44xx_smartreflex_core_slaves,
4005 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004006};
4007
4008/* smartreflex_iva */
4009static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
4010static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
4011 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004012 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004013};
4014
4015static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4016 {
4017 .pa_start = 0x4a0db000,
4018 .pa_end = 0x4a0db03f,
4019 .flags = ADDR_TYPE_RT
4020 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004021 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004022};
4023
4024/* l4_cfg -> smartreflex_iva */
4025static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4026 .master = &omap44xx_l4_cfg_hwmod,
4027 .slave = &omap44xx_smartreflex_iva_hwmod,
4028 .clk = "l4_div_ck",
4029 .addr = omap44xx_smartreflex_iva_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004030 .user = OCP_USER_MPU | OCP_USER_SDMA,
4031};
4032
4033/* smartreflex_iva slave ports */
4034static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
4035 &omap44xx_l4_cfg__smartreflex_iva,
4036};
4037
4038static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4039 .name = "smartreflex_iva",
4040 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004041 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004042 .mpu_irqs = omap44xx_smartreflex_iva_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004043 .main_clk = "smartreflex_iva_fck",
4044 .vdd_name = "iva",
4045 .prcm = {
4046 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004047 .clkctrl_offs = OMAP4_CM_ALWON_SR_IVA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004048 .context_offs = OMAP4_RM_ALWON_SR_IVA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004049 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004050 },
4051 },
4052 .slaves = omap44xx_smartreflex_iva_slaves,
4053 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004054};
4055
4056/* smartreflex_mpu */
4057static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
4058static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
4059 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004060 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004061};
4062
4063static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4064 {
4065 .pa_start = 0x4a0d9000,
4066 .pa_end = 0x4a0d903f,
4067 .flags = ADDR_TYPE_RT
4068 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004069 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004070};
4071
4072/* l4_cfg -> smartreflex_mpu */
4073static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4074 .master = &omap44xx_l4_cfg_hwmod,
4075 .slave = &omap44xx_smartreflex_mpu_hwmod,
4076 .clk = "l4_div_ck",
4077 .addr = omap44xx_smartreflex_mpu_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004078 .user = OCP_USER_MPU | OCP_USER_SDMA,
4079};
4080
4081/* smartreflex_mpu slave ports */
4082static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
4083 &omap44xx_l4_cfg__smartreflex_mpu,
4084};
4085
4086static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4087 .name = "smartreflex_mpu",
4088 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004089 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004090 .mpu_irqs = omap44xx_smartreflex_mpu_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004091 .main_clk = "smartreflex_mpu_fck",
4092 .vdd_name = "mpu",
4093 .prcm = {
4094 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004095 .clkctrl_offs = OMAP4_CM_ALWON_SR_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004096 .context_offs = OMAP4_RM_ALWON_SR_MPU_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004097 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004098 },
4099 },
4100 .slaves = omap44xx_smartreflex_mpu_slaves,
4101 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004102};
4103
4104/*
Benoit Coussond11c2172011-02-02 12:04:36 +00004105 * 'spinlock' class
4106 * spinlock provides hardware assistance for synchronizing the processes
4107 * running on multiple processors
4108 */
4109
4110static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = {
4111 .rev_offs = 0x0000,
4112 .sysc_offs = 0x0010,
4113 .syss_offs = 0x0014,
4114 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4115 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
4116 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
4117 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4118 SIDLE_SMART_WKUP),
4119 .sysc_fields = &omap_hwmod_sysc_type1,
4120};
4121
4122static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
4123 .name = "spinlock",
4124 .sysc = &omap44xx_spinlock_sysc,
4125};
4126
4127/* spinlock */
4128static struct omap_hwmod omap44xx_spinlock_hwmod;
4129static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4130 {
4131 .pa_start = 0x4a0f6000,
4132 .pa_end = 0x4a0f6fff,
4133 .flags = ADDR_TYPE_RT
4134 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004135 { }
Benoit Coussond11c2172011-02-02 12:04:36 +00004136};
4137
4138/* l4_cfg -> spinlock */
4139static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4140 .master = &omap44xx_l4_cfg_hwmod,
4141 .slave = &omap44xx_spinlock_hwmod,
4142 .clk = "l4_div_ck",
4143 .addr = omap44xx_spinlock_addrs,
Benoit Coussond11c2172011-02-02 12:04:36 +00004144 .user = OCP_USER_MPU | OCP_USER_SDMA,
4145};
4146
4147/* spinlock slave ports */
4148static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
4149 &omap44xx_l4_cfg__spinlock,
4150};
4151
4152static struct omap_hwmod omap44xx_spinlock_hwmod = {
4153 .name = "spinlock",
4154 .class = &omap44xx_spinlock_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004155 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond11c2172011-02-02 12:04:36 +00004156 .prcm = {
4157 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004158 .clkctrl_offs = OMAP4_CM_L4CFG_HW_SEM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004159 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
Benoit Coussond11c2172011-02-02 12:04:36 +00004160 },
4161 },
4162 .slaves = omap44xx_spinlock_slaves,
4163 .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves),
Benoit Coussond11c2172011-02-02 12:04:36 +00004164};
4165
4166/*
Benoit Cousson35d1a662011-02-11 11:17:14 +00004167 * 'timer' class
4168 * general purpose timer module with accurate 1ms tick
4169 * This class contains several variants: ['timer_1ms', 'timer']
4170 */
4171
4172static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = {
4173 .rev_offs = 0x0000,
4174 .sysc_offs = 0x0010,
4175 .syss_offs = 0x0014,
4176 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4177 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
4178 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4179 SYSS_HAS_RESET_STATUS),
4180 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
4181 .sysc_fields = &omap_hwmod_sysc_type1,
4182};
4183
4184static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = {
4185 .name = "timer",
4186 .sysc = &omap44xx_timer_1ms_sysc,
4187};
4188
4189static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = {
4190 .rev_offs = 0x0000,
4191 .sysc_offs = 0x0010,
4192 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
4193 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
4194 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4195 SIDLE_SMART_WKUP),
4196 .sysc_fields = &omap_hwmod_sysc_type2,
4197};
4198
4199static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
4200 .name = "timer",
4201 .sysc = &omap44xx_timer_sysc,
4202};
4203
4204/* timer1 */
4205static struct omap_hwmod omap44xx_timer1_hwmod;
4206static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4207 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004208 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004209};
4210
4211static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4212 {
4213 .pa_start = 0x4a318000,
4214 .pa_end = 0x4a31807f,
4215 .flags = ADDR_TYPE_RT
4216 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004217 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004218};
4219
4220/* l4_wkup -> timer1 */
4221static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4222 .master = &omap44xx_l4_wkup_hwmod,
4223 .slave = &omap44xx_timer1_hwmod,
4224 .clk = "l4_wkup_clk_mux_ck",
4225 .addr = omap44xx_timer1_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004226 .user = OCP_USER_MPU | OCP_USER_SDMA,
4227};
4228
4229/* timer1 slave ports */
4230static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4231 &omap44xx_l4_wkup__timer1,
4232};
4233
4234static struct omap_hwmod omap44xx_timer1_hwmod = {
4235 .name = "timer1",
4236 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004237 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004238 .mpu_irqs = omap44xx_timer1_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004239 .main_clk = "timer1_fck",
4240 .prcm = {
4241 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004242 .clkctrl_offs = OMAP4_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004243 .context_offs = OMAP4_RM_WKUP_TIMER1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004244 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004245 },
4246 },
4247 .slaves = omap44xx_timer1_slaves,
4248 .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004249};
4250
4251/* timer2 */
4252static struct omap_hwmod omap44xx_timer2_hwmod;
4253static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4254 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004255 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004256};
4257
4258static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4259 {
4260 .pa_start = 0x48032000,
4261 .pa_end = 0x4803207f,
4262 .flags = ADDR_TYPE_RT
4263 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004264 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004265};
4266
4267/* l4_per -> timer2 */
4268static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4269 .master = &omap44xx_l4_per_hwmod,
4270 .slave = &omap44xx_timer2_hwmod,
4271 .clk = "l4_div_ck",
4272 .addr = omap44xx_timer2_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004273 .user = OCP_USER_MPU | OCP_USER_SDMA,
4274};
4275
4276/* timer2 slave ports */
4277static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4278 &omap44xx_l4_per__timer2,
4279};
4280
4281static struct omap_hwmod omap44xx_timer2_hwmod = {
4282 .name = "timer2",
4283 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004284 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004285 .mpu_irqs = omap44xx_timer2_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004286 .main_clk = "timer2_fck",
4287 .prcm = {
4288 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004289 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004290 .context_offs = OMAP4_RM_L4PER_DMTIMER2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004291 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004292 },
4293 },
4294 .slaves = omap44xx_timer2_slaves,
4295 .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004296};
4297
4298/* timer3 */
4299static struct omap_hwmod omap44xx_timer3_hwmod;
4300static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4301 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004302 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004303};
4304
4305static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4306 {
4307 .pa_start = 0x48034000,
4308 .pa_end = 0x4803407f,
4309 .flags = ADDR_TYPE_RT
4310 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004311 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004312};
4313
4314/* l4_per -> timer3 */
4315static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4316 .master = &omap44xx_l4_per_hwmod,
4317 .slave = &omap44xx_timer3_hwmod,
4318 .clk = "l4_div_ck",
4319 .addr = omap44xx_timer3_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004320 .user = OCP_USER_MPU | OCP_USER_SDMA,
4321};
4322
4323/* timer3 slave ports */
4324static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4325 &omap44xx_l4_per__timer3,
4326};
4327
4328static struct omap_hwmod omap44xx_timer3_hwmod = {
4329 .name = "timer3",
4330 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004331 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004332 .mpu_irqs = omap44xx_timer3_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004333 .main_clk = "timer3_fck",
4334 .prcm = {
4335 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004336 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004337 .context_offs = OMAP4_RM_L4PER_DMTIMER3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004338 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004339 },
4340 },
4341 .slaves = omap44xx_timer3_slaves,
4342 .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004343};
4344
4345/* timer4 */
4346static struct omap_hwmod omap44xx_timer4_hwmod;
4347static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4348 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004349 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004350};
4351
4352static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4353 {
4354 .pa_start = 0x48036000,
4355 .pa_end = 0x4803607f,
4356 .flags = ADDR_TYPE_RT
4357 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004358 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004359};
4360
4361/* l4_per -> timer4 */
4362static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4363 .master = &omap44xx_l4_per_hwmod,
4364 .slave = &omap44xx_timer4_hwmod,
4365 .clk = "l4_div_ck",
4366 .addr = omap44xx_timer4_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004367 .user = OCP_USER_MPU | OCP_USER_SDMA,
4368};
4369
4370/* timer4 slave ports */
4371static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4372 &omap44xx_l4_per__timer4,
4373};
4374
4375static struct omap_hwmod omap44xx_timer4_hwmod = {
4376 .name = "timer4",
4377 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004378 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004379 .mpu_irqs = omap44xx_timer4_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004380 .main_clk = "timer4_fck",
4381 .prcm = {
4382 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004383 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004384 .context_offs = OMAP4_RM_L4PER_DMTIMER4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004385 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004386 },
4387 },
4388 .slaves = omap44xx_timer4_slaves,
4389 .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004390};
4391
4392/* timer5 */
4393static struct omap_hwmod omap44xx_timer5_hwmod;
4394static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4395 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004396 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004397};
4398
4399static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4400 {
4401 .pa_start = 0x40138000,
4402 .pa_end = 0x4013807f,
4403 .flags = ADDR_TYPE_RT
4404 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004405 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004406};
4407
4408/* l4_abe -> timer5 */
4409static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4410 .master = &omap44xx_l4_abe_hwmod,
4411 .slave = &omap44xx_timer5_hwmod,
4412 .clk = "ocp_abe_iclk",
4413 .addr = omap44xx_timer5_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004414 .user = OCP_USER_MPU,
4415};
4416
4417static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4418 {
4419 .pa_start = 0x49038000,
4420 .pa_end = 0x4903807f,
4421 .flags = ADDR_TYPE_RT
4422 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004423 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004424};
4425
4426/* l4_abe -> timer5 (dma) */
4427static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4428 .master = &omap44xx_l4_abe_hwmod,
4429 .slave = &omap44xx_timer5_hwmod,
4430 .clk = "ocp_abe_iclk",
4431 .addr = omap44xx_timer5_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004432 .user = OCP_USER_SDMA,
4433};
4434
4435/* timer5 slave ports */
4436static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4437 &omap44xx_l4_abe__timer5,
4438 &omap44xx_l4_abe__timer5_dma,
4439};
4440
4441static struct omap_hwmod omap44xx_timer5_hwmod = {
4442 .name = "timer5",
4443 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004444 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004445 .mpu_irqs = omap44xx_timer5_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004446 .main_clk = "timer5_fck",
4447 .prcm = {
4448 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004449 .clkctrl_offs = OMAP4_CM1_ABE_TIMER5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004450 .context_offs = OMAP4_RM_ABE_TIMER5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004451 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004452 },
4453 },
4454 .slaves = omap44xx_timer5_slaves,
4455 .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004456};
4457
4458/* timer6 */
4459static struct omap_hwmod omap44xx_timer6_hwmod;
4460static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4461 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004462 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004463};
4464
4465static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4466 {
4467 .pa_start = 0x4013a000,
4468 .pa_end = 0x4013a07f,
4469 .flags = ADDR_TYPE_RT
4470 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004471 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004472};
4473
4474/* l4_abe -> timer6 */
4475static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4476 .master = &omap44xx_l4_abe_hwmod,
4477 .slave = &omap44xx_timer6_hwmod,
4478 .clk = "ocp_abe_iclk",
4479 .addr = omap44xx_timer6_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004480 .user = OCP_USER_MPU,
4481};
4482
4483static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4484 {
4485 .pa_start = 0x4903a000,
4486 .pa_end = 0x4903a07f,
4487 .flags = ADDR_TYPE_RT
4488 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004489 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004490};
4491
4492/* l4_abe -> timer6 (dma) */
4493static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4494 .master = &omap44xx_l4_abe_hwmod,
4495 .slave = &omap44xx_timer6_hwmod,
4496 .clk = "ocp_abe_iclk",
4497 .addr = omap44xx_timer6_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004498 .user = OCP_USER_SDMA,
4499};
4500
4501/* timer6 slave ports */
4502static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4503 &omap44xx_l4_abe__timer6,
4504 &omap44xx_l4_abe__timer6_dma,
4505};
4506
4507static struct omap_hwmod omap44xx_timer6_hwmod = {
4508 .name = "timer6",
4509 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004510 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004511 .mpu_irqs = omap44xx_timer6_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06004512
Benoit Cousson35d1a662011-02-11 11:17:14 +00004513 .main_clk = "timer6_fck",
4514 .prcm = {
4515 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004516 .clkctrl_offs = OMAP4_CM1_ABE_TIMER6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004517 .context_offs = OMAP4_RM_ABE_TIMER6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004518 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004519 },
4520 },
4521 .slaves = omap44xx_timer6_slaves,
4522 .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004523};
4524
4525/* timer7 */
4526static struct omap_hwmod omap44xx_timer7_hwmod;
4527static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4528 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004529 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004530};
4531
4532static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4533 {
4534 .pa_start = 0x4013c000,
4535 .pa_end = 0x4013c07f,
4536 .flags = ADDR_TYPE_RT
4537 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004538 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004539};
4540
4541/* l4_abe -> timer7 */
4542static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4543 .master = &omap44xx_l4_abe_hwmod,
4544 .slave = &omap44xx_timer7_hwmod,
4545 .clk = "ocp_abe_iclk",
4546 .addr = omap44xx_timer7_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004547 .user = OCP_USER_MPU,
4548};
4549
4550static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4551 {
4552 .pa_start = 0x4903c000,
4553 .pa_end = 0x4903c07f,
4554 .flags = ADDR_TYPE_RT
4555 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004556 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004557};
4558
4559/* l4_abe -> timer7 (dma) */
4560static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4561 .master = &omap44xx_l4_abe_hwmod,
4562 .slave = &omap44xx_timer7_hwmod,
4563 .clk = "ocp_abe_iclk",
4564 .addr = omap44xx_timer7_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004565 .user = OCP_USER_SDMA,
4566};
4567
4568/* timer7 slave ports */
4569static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4570 &omap44xx_l4_abe__timer7,
4571 &omap44xx_l4_abe__timer7_dma,
4572};
4573
4574static struct omap_hwmod omap44xx_timer7_hwmod = {
4575 .name = "timer7",
4576 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004577 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004578 .mpu_irqs = omap44xx_timer7_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004579 .main_clk = "timer7_fck",
4580 .prcm = {
4581 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004582 .clkctrl_offs = OMAP4_CM1_ABE_TIMER7_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004583 .context_offs = OMAP4_RM_ABE_TIMER7_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004584 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004585 },
4586 },
4587 .slaves = omap44xx_timer7_slaves,
4588 .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004589};
4590
4591/* timer8 */
4592static struct omap_hwmod omap44xx_timer8_hwmod;
4593static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4594 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004595 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004596};
4597
4598static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4599 {
4600 .pa_start = 0x4013e000,
4601 .pa_end = 0x4013e07f,
4602 .flags = ADDR_TYPE_RT
4603 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004604 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004605};
4606
4607/* l4_abe -> timer8 */
4608static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4609 .master = &omap44xx_l4_abe_hwmod,
4610 .slave = &omap44xx_timer8_hwmod,
4611 .clk = "ocp_abe_iclk",
4612 .addr = omap44xx_timer8_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004613 .user = OCP_USER_MPU,
4614};
4615
4616static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4617 {
4618 .pa_start = 0x4903e000,
4619 .pa_end = 0x4903e07f,
4620 .flags = ADDR_TYPE_RT
4621 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004622 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004623};
4624
4625/* l4_abe -> timer8 (dma) */
4626static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4627 .master = &omap44xx_l4_abe_hwmod,
4628 .slave = &omap44xx_timer8_hwmod,
4629 .clk = "ocp_abe_iclk",
4630 .addr = omap44xx_timer8_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004631 .user = OCP_USER_SDMA,
4632};
4633
4634/* timer8 slave ports */
4635static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4636 &omap44xx_l4_abe__timer8,
4637 &omap44xx_l4_abe__timer8_dma,
4638};
4639
4640static struct omap_hwmod omap44xx_timer8_hwmod = {
4641 .name = "timer8",
4642 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004643 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004644 .mpu_irqs = omap44xx_timer8_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004645 .main_clk = "timer8_fck",
4646 .prcm = {
4647 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004648 .clkctrl_offs = OMAP4_CM1_ABE_TIMER8_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004649 .context_offs = OMAP4_RM_ABE_TIMER8_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004650 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004651 },
4652 },
4653 .slaves = omap44xx_timer8_slaves,
4654 .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004655};
4656
4657/* timer9 */
4658static struct omap_hwmod omap44xx_timer9_hwmod;
4659static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4660 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004661 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004662};
4663
4664static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4665 {
4666 .pa_start = 0x4803e000,
4667 .pa_end = 0x4803e07f,
4668 .flags = ADDR_TYPE_RT
4669 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004670 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004671};
4672
4673/* l4_per -> timer9 */
4674static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4675 .master = &omap44xx_l4_per_hwmod,
4676 .slave = &omap44xx_timer9_hwmod,
4677 .clk = "l4_div_ck",
4678 .addr = omap44xx_timer9_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004679 .user = OCP_USER_MPU | OCP_USER_SDMA,
4680};
4681
4682/* timer9 slave ports */
4683static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4684 &omap44xx_l4_per__timer9,
4685};
4686
4687static struct omap_hwmod omap44xx_timer9_hwmod = {
4688 .name = "timer9",
4689 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004690 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004691 .mpu_irqs = omap44xx_timer9_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004692 .main_clk = "timer9_fck",
4693 .prcm = {
4694 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004695 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER9_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004696 .context_offs = OMAP4_RM_L4PER_DMTIMER9_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004697 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004698 },
4699 },
4700 .slaves = omap44xx_timer9_slaves,
4701 .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004702};
4703
4704/* timer10 */
4705static struct omap_hwmod omap44xx_timer10_hwmod;
4706static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4707 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004708 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004709};
4710
4711static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4712 {
4713 .pa_start = 0x48086000,
4714 .pa_end = 0x4808607f,
4715 .flags = ADDR_TYPE_RT
4716 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004717 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004718};
4719
4720/* l4_per -> timer10 */
4721static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4722 .master = &omap44xx_l4_per_hwmod,
4723 .slave = &omap44xx_timer10_hwmod,
4724 .clk = "l4_div_ck",
4725 .addr = omap44xx_timer10_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004726 .user = OCP_USER_MPU | OCP_USER_SDMA,
4727};
4728
4729/* timer10 slave ports */
4730static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4731 &omap44xx_l4_per__timer10,
4732};
4733
4734static struct omap_hwmod omap44xx_timer10_hwmod = {
4735 .name = "timer10",
4736 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004737 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004738 .mpu_irqs = omap44xx_timer10_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004739 .main_clk = "timer10_fck",
4740 .prcm = {
4741 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004742 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER10_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004743 .context_offs = OMAP4_RM_L4PER_DMTIMER10_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004744 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004745 },
4746 },
4747 .slaves = omap44xx_timer10_slaves,
4748 .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004749};
4750
4751/* timer11 */
4752static struct omap_hwmod omap44xx_timer11_hwmod;
4753static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4754 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004755 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004756};
4757
4758static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4759 {
4760 .pa_start = 0x48088000,
4761 .pa_end = 0x4808807f,
4762 .flags = ADDR_TYPE_RT
4763 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004764 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004765};
4766
4767/* l4_per -> timer11 */
4768static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4769 .master = &omap44xx_l4_per_hwmod,
4770 .slave = &omap44xx_timer11_hwmod,
4771 .clk = "l4_div_ck",
4772 .addr = omap44xx_timer11_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004773 .user = OCP_USER_MPU | OCP_USER_SDMA,
4774};
4775
4776/* timer11 slave ports */
4777static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4778 &omap44xx_l4_per__timer11,
4779};
4780
4781static struct omap_hwmod omap44xx_timer11_hwmod = {
4782 .name = "timer11",
4783 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004784 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004785 .mpu_irqs = omap44xx_timer11_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004786 .main_clk = "timer11_fck",
4787 .prcm = {
4788 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004789 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER11_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004790 .context_offs = OMAP4_RM_L4PER_DMTIMER11_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004791 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004792 },
4793 },
4794 .slaves = omap44xx_timer11_slaves,
4795 .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004796};
4797
4798/*
Benoit Coussondb12ba52010-09-27 20:19:19 +05304799 * 'uart' class
4800 * universal asynchronous receiver/transmitter (uart)
4801 */
4802
4803static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
4804 .rev_offs = 0x0050,
4805 .sysc_offs = 0x0054,
4806 .syss_offs = 0x0058,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004807 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07004808 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4809 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07004810 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4811 SIDLE_SMART_WKUP),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304812 .sysc_fields = &omap_hwmod_sysc_type1,
4813};
4814
4815static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00004816 .name = "uart",
4817 .sysc = &omap44xx_uart_sysc,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304818};
4819
4820/* uart1 */
4821static struct omap_hwmod omap44xx_uart1_hwmod;
4822static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4823 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004824 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304825};
4826
4827static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4828 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
4829 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004830 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304831};
4832
4833static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4834 {
4835 .pa_start = 0x4806a000,
4836 .pa_end = 0x4806a0ff,
4837 .flags = ADDR_TYPE_RT
4838 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004839 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304840};
4841
4842/* l4_per -> uart1 */
4843static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4844 .master = &omap44xx_l4_per_hwmod,
4845 .slave = &omap44xx_uart1_hwmod,
4846 .clk = "l4_div_ck",
4847 .addr = omap44xx_uart1_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304848 .user = OCP_USER_MPU | OCP_USER_SDMA,
4849};
4850
4851/* uart1 slave ports */
4852static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4853 &omap44xx_l4_per__uart1,
4854};
4855
4856static struct omap_hwmod omap44xx_uart1_hwmod = {
4857 .name = "uart1",
4858 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004859 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304860 .mpu_irqs = omap44xx_uart1_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304861 .sdma_reqs = omap44xx_uart1_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304862 .main_clk = "uart1_fck",
4863 .prcm = {
4864 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004865 .clkctrl_offs = OMAP4_CM_L4PER_UART1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004866 .context_offs = OMAP4_RM_L4PER_UART1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004867 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304868 },
4869 },
4870 .slaves = omap44xx_uart1_slaves,
4871 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304872};
4873
4874/* uart2 */
4875static struct omap_hwmod omap44xx_uart2_hwmod;
4876static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4877 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004878 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304879};
4880
4881static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
4882 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
4883 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004884 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304885};
4886
4887static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4888 {
4889 .pa_start = 0x4806c000,
4890 .pa_end = 0x4806c0ff,
4891 .flags = ADDR_TYPE_RT
4892 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004893 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304894};
4895
4896/* l4_per -> uart2 */
4897static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4898 .master = &omap44xx_l4_per_hwmod,
4899 .slave = &omap44xx_uart2_hwmod,
4900 .clk = "l4_div_ck",
4901 .addr = omap44xx_uart2_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304902 .user = OCP_USER_MPU | OCP_USER_SDMA,
4903};
4904
4905/* uart2 slave ports */
4906static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
4907 &omap44xx_l4_per__uart2,
4908};
4909
4910static struct omap_hwmod omap44xx_uart2_hwmod = {
4911 .name = "uart2",
4912 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004913 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304914 .mpu_irqs = omap44xx_uart2_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304915 .sdma_reqs = omap44xx_uart2_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304916 .main_clk = "uart2_fck",
4917 .prcm = {
4918 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004919 .clkctrl_offs = OMAP4_CM_L4PER_UART2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004920 .context_offs = OMAP4_RM_L4PER_UART2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004921 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304922 },
4923 },
4924 .slaves = omap44xx_uart2_slaves,
4925 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304926};
4927
4928/* uart3 */
4929static struct omap_hwmod omap44xx_uart3_hwmod;
4930static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
4931 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004932 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304933};
4934
4935static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
4936 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
4937 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004938 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304939};
4940
4941static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
4942 {
4943 .pa_start = 0x48020000,
4944 .pa_end = 0x480200ff,
4945 .flags = ADDR_TYPE_RT
4946 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004947 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304948};
4949
4950/* l4_per -> uart3 */
4951static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
4952 .master = &omap44xx_l4_per_hwmod,
4953 .slave = &omap44xx_uart3_hwmod,
4954 .clk = "l4_div_ck",
4955 .addr = omap44xx_uart3_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304956 .user = OCP_USER_MPU | OCP_USER_SDMA,
4957};
4958
4959/* uart3 slave ports */
4960static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
4961 &omap44xx_l4_per__uart3,
4962};
4963
4964static struct omap_hwmod omap44xx_uart3_hwmod = {
4965 .name = "uart3",
4966 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004967 .clkdm_name = "l4_per_clkdm",
Benoit Cousson7ecc5372011-07-09 19:14:28 -06004968 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304969 .mpu_irqs = omap44xx_uart3_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304970 .sdma_reqs = omap44xx_uart3_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304971 .main_clk = "uart3_fck",
4972 .prcm = {
4973 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004974 .clkctrl_offs = OMAP4_CM_L4PER_UART3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004975 .context_offs = OMAP4_RM_L4PER_UART3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004976 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304977 },
4978 },
4979 .slaves = omap44xx_uart3_slaves,
4980 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304981};
4982
4983/* uart4 */
4984static struct omap_hwmod omap44xx_uart4_hwmod;
4985static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
4986 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004987 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304988};
4989
4990static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
4991 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
4992 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004993 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304994};
4995
4996static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
4997 {
4998 .pa_start = 0x4806e000,
4999 .pa_end = 0x4806e0ff,
5000 .flags = ADDR_TYPE_RT
5001 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005002 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305003};
5004
5005/* l4_per -> uart4 */
5006static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
5007 .master = &omap44xx_l4_per_hwmod,
5008 .slave = &omap44xx_uart4_hwmod,
5009 .clk = "l4_div_ck",
5010 .addr = omap44xx_uart4_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305011 .user = OCP_USER_MPU | OCP_USER_SDMA,
5012};
5013
5014/* uart4 slave ports */
5015static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
5016 &omap44xx_l4_per__uart4,
5017};
5018
5019static struct omap_hwmod omap44xx_uart4_hwmod = {
5020 .name = "uart4",
5021 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005022 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05305023 .mpu_irqs = omap44xx_uart4_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305024 .sdma_reqs = omap44xx_uart4_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305025 .main_clk = "uart4_fck",
5026 .prcm = {
5027 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005028 .clkctrl_offs = OMAP4_CM_L4PER_UART4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005029 .context_offs = OMAP4_RM_L4PER_UART4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005030 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305031 },
5032 },
5033 .slaves = omap44xx_uart4_slaves,
5034 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05305035};
5036
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005037/*
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005038 * 'usb_otg_hs' class
5039 * high-speed on-the-go universal serial bus (usb_otg_hs) controller
5040 */
5041
5042static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
5043 .rev_offs = 0x0400,
5044 .sysc_offs = 0x0404,
5045 .syss_offs = 0x0408,
5046 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
5047 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
5048 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
5049 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5050 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
5051 MSTANDBY_SMART),
5052 .sysc_fields = &omap_hwmod_sysc_type1,
5053};
5054
5055static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
Benoit Cousson00fe6102011-07-09 19:14:28 -06005056 .name = "usb_otg_hs",
5057 .sysc = &omap44xx_usb_otg_hs_sysc,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005058};
5059
5060/* usb_otg_hs */
5061static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
5062 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
5063 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005064 { .irq = -1 }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005065};
5066
5067/* usb_otg_hs master ports */
5068static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
5069 &omap44xx_usb_otg_hs__l3_main_2,
5070};
5071
5072static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5073 {
5074 .pa_start = 0x4a0ab000,
5075 .pa_end = 0x4a0ab003,
5076 .flags = ADDR_TYPE_RT
5077 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005078 { }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005079};
5080
5081/* l4_cfg -> usb_otg_hs */
5082static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5083 .master = &omap44xx_l4_cfg_hwmod,
5084 .slave = &omap44xx_usb_otg_hs_hwmod,
5085 .clk = "l4_div_ck",
5086 .addr = omap44xx_usb_otg_hs_addrs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005087 .user = OCP_USER_MPU | OCP_USER_SDMA,
5088};
5089
5090/* usb_otg_hs slave ports */
5091static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
5092 &omap44xx_l4_cfg__usb_otg_hs,
5093};
5094
5095static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
5096 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
5097};
5098
5099static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
5100 .name = "usb_otg_hs",
5101 .class = &omap44xx_usb_otg_hs_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005102 .clkdm_name = "l3_init_clkdm",
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005103 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
5104 .mpu_irqs = omap44xx_usb_otg_hs_irqs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005105 .main_clk = "usb_otg_hs_ick",
5106 .prcm = {
5107 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005108 .clkctrl_offs = OMAP4_CM_L3INIT_USB_OTG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005109 .context_offs = OMAP4_RM_L3INIT_USB_OTG_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005110 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005111 },
5112 },
5113 .opt_clks = usb_otg_hs_opt_clks,
Benoit Cousson00fe6102011-07-09 19:14:28 -06005114 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005115 .slaves = omap44xx_usb_otg_hs_slaves,
5116 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
5117 .masters = omap44xx_usb_otg_hs_masters,
5118 .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005119};
5120
5121/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005122 * 'wd_timer' class
5123 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
5124 * overflow condition
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005125 */
5126
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005127static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005128 .rev_offs = 0x0000,
5129 .sysc_offs = 0x0010,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005130 .syss_offs = 0x0014,
5131 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07005132 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07005133 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5134 SIDLE_SMART_WKUP),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005135 .sysc_fields = &omap_hwmod_sysc_type1,
5136};
5137
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005138static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
5139 .name = "wd_timer",
5140 .sysc = &omap44xx_wd_timer_sysc,
Benoit Coussonfe134712010-12-23 22:30:32 +00005141 .pre_shutdown = &omap2_wd_timer_disable,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005142};
5143
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005144/* wd_timer2 */
5145static struct omap_hwmod omap44xx_wd_timer2_hwmod;
5146static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
5147 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005148 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005149};
5150
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005151static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005152 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005153 .pa_start = 0x4a314000,
5154 .pa_end = 0x4a31407f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005155 .flags = ADDR_TYPE_RT
5156 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005157 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005158};
5159
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005160/* l4_wkup -> wd_timer2 */
5161static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005162 .master = &omap44xx_l4_wkup_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005163 .slave = &omap44xx_wd_timer2_hwmod,
5164 .clk = "l4_wkup_clk_mux_ck",
5165 .addr = omap44xx_wd_timer2_addrs,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005166 .user = OCP_USER_MPU | OCP_USER_SDMA,
5167};
5168
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005169/* wd_timer2 slave ports */
5170static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
5171 &omap44xx_l4_wkup__wd_timer2,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005172};
5173
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005174static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5175 .name = "wd_timer2",
5176 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005177 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005178 .mpu_irqs = omap44xx_wd_timer2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005179 .main_clk = "wd_timer2_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005180 .prcm = {
5181 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005182 .clkctrl_offs = OMAP4_CM_WKUP_WDT2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005183 .context_offs = OMAP4_RM_WKUP_WDT2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005184 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005185 },
5186 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005187 .slaves = omap44xx_wd_timer2_slaves,
5188 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005189};
5190
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005191/* wd_timer3 */
5192static struct omap_hwmod omap44xx_wd_timer3_hwmod;
5193static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
5194 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005195 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005196};
5197
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005198static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005199 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005200 .pa_start = 0x40130000,
5201 .pa_end = 0x4013007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005202 .flags = ADDR_TYPE_RT
5203 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005204 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005205};
5206
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005207/* l4_abe -> wd_timer3 */
5208static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
5209 .master = &omap44xx_l4_abe_hwmod,
5210 .slave = &omap44xx_wd_timer3_hwmod,
5211 .clk = "ocp_abe_iclk",
5212 .addr = omap44xx_wd_timer3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005213 .user = OCP_USER_MPU,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005214};
5215
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005216static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005217 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005218 .pa_start = 0x49030000,
5219 .pa_end = 0x4903007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005220 .flags = ADDR_TYPE_RT
5221 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005222 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005223};
5224
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005225/* l4_abe -> wd_timer3 (dma) */
5226static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5227 .master = &omap44xx_l4_abe_hwmod,
5228 .slave = &omap44xx_wd_timer3_hwmod,
5229 .clk = "ocp_abe_iclk",
5230 .addr = omap44xx_wd_timer3_dma_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005231 .user = OCP_USER_SDMA,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005232};
5233
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005234/* wd_timer3 slave ports */
5235static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
5236 &omap44xx_l4_abe__wd_timer3,
5237 &omap44xx_l4_abe__wd_timer3_dma,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005238};
5239
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005240static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
5241 .name = "wd_timer3",
5242 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005243 .clkdm_name = "abe_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005244 .mpu_irqs = omap44xx_wd_timer3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005245 .main_clk = "wd_timer3_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005246 .prcm = {
5247 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005248 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005249 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005250 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005251 },
5252 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005253 .slaves = omap44xx_wd_timer3_slaves,
5254 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005255};
5256
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005257static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
Benoit Coussonfe134712010-12-23 22:30:32 +00005258
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005259 /* dmm class */
5260 &omap44xx_dmm_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005261
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005262 /* emif_fw class */
5263 &omap44xx_emif_fw_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005264
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005265 /* l3 class */
5266 &omap44xx_l3_instr_hwmod,
5267 &omap44xx_l3_main_1_hwmod,
5268 &omap44xx_l3_main_2_hwmod,
5269 &omap44xx_l3_main_3_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005270
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005271 /* l4 class */
5272 &omap44xx_l4_abe_hwmod,
5273 &omap44xx_l4_cfg_hwmod,
5274 &omap44xx_l4_per_hwmod,
5275 &omap44xx_l4_wkup_hwmod,
Benoit Cousson531ce0d2010-12-20 18:27:19 -08005276
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005277 /* mpu_bus class */
5278 &omap44xx_mpu_private_hwmod,
5279
Benoit Cousson407a6882011-02-15 22:39:48 +01005280 /* aess class */
5281/* &omap44xx_aess_hwmod, */
5282
5283 /* bandgap class */
5284 &omap44xx_bandgap_hwmod,
5285
5286 /* counter class */
5287/* &omap44xx_counter_32k_hwmod, */
5288
Benoit Coussond7cf5f32010-12-23 22:30:31 +00005289 /* dma class */
5290 &omap44xx_dma_system_hwmod,
5291
Benoit Cousson8ca476d2011-01-25 22:01:00 +00005292 /* dmic class */
5293 &omap44xx_dmic_hwmod,
5294
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005295 /* dsp class */
5296 &omap44xx_dsp_hwmod,
5297 &omap44xx_dsp_c0_hwmod,
5298
Benoit Coussond63bd742011-01-27 11:17:03 +00005299 /* dss class */
5300 &omap44xx_dss_hwmod,
5301 &omap44xx_dss_dispc_hwmod,
5302 &omap44xx_dss_dsi1_hwmod,
5303 &omap44xx_dss_dsi2_hwmod,
5304 &omap44xx_dss_hdmi_hwmod,
5305 &omap44xx_dss_rfbi_hwmod,
5306 &omap44xx_dss_venc_hwmod,
5307
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005308 /* gpio class */
5309 &omap44xx_gpio1_hwmod,
5310 &omap44xx_gpio2_hwmod,
5311 &omap44xx_gpio3_hwmod,
5312 &omap44xx_gpio4_hwmod,
5313 &omap44xx_gpio5_hwmod,
5314 &omap44xx_gpio6_hwmod,
5315
Benoit Cousson407a6882011-02-15 22:39:48 +01005316 /* hsi class */
5317/* &omap44xx_hsi_hwmod, */
5318
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005319 /* i2c class */
5320 &omap44xx_i2c1_hwmod,
5321 &omap44xx_i2c2_hwmod,
5322 &omap44xx_i2c3_hwmod,
5323 &omap44xx_i2c4_hwmod,
5324
Benoit Cousson407a6882011-02-15 22:39:48 +01005325 /* ipu class */
5326 &omap44xx_ipu_hwmod,
5327 &omap44xx_ipu_c0_hwmod,
5328 &omap44xx_ipu_c1_hwmod,
5329
5330 /* iss class */
5331/* &omap44xx_iss_hwmod, */
5332
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005333 /* iva class */
5334 &omap44xx_iva_hwmod,
5335 &omap44xx_iva_seq0_hwmod,
5336 &omap44xx_iva_seq1_hwmod,
5337
Benoit Cousson407a6882011-02-15 22:39:48 +01005338 /* kbd class */
Shubhrajyoti D4998b2452011-05-04 14:57:44 -07005339 &omap44xx_kbd_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005340
Benoit Coussonec5df922011-02-02 19:27:21 +00005341 /* mailbox class */
5342 &omap44xx_mailbox_hwmod,
5343
Benoit Cousson4ddff492011-01-31 14:50:30 +00005344 /* mcbsp class */
5345 &omap44xx_mcbsp1_hwmod,
5346 &omap44xx_mcbsp2_hwmod,
5347 &omap44xx_mcbsp3_hwmod,
5348 &omap44xx_mcbsp4_hwmod,
5349
Benoit Cousson407a6882011-02-15 22:39:48 +01005350 /* mcpdm class */
5351/* &omap44xx_mcpdm_hwmod, */
5352
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05305353 /* mcspi class */
5354 &omap44xx_mcspi1_hwmod,
5355 &omap44xx_mcspi2_hwmod,
5356 &omap44xx_mcspi3_hwmod,
5357 &omap44xx_mcspi4_hwmod,
5358
Benoit Cousson407a6882011-02-15 22:39:48 +01005359 /* mmc class */
Anand Gadiyar17203bd2011-03-01 13:12:56 -08005360 &omap44xx_mmc1_hwmod,
5361 &omap44xx_mmc2_hwmod,
5362 &omap44xx_mmc3_hwmod,
5363 &omap44xx_mmc4_hwmod,
5364 &omap44xx_mmc5_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005365
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005366 /* mpu class */
5367 &omap44xx_mpu_hwmod,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305368
Benoit Cousson1f6a7172010-12-23 22:30:30 +00005369 /* smartreflex class */
5370 &omap44xx_smartreflex_core_hwmod,
5371 &omap44xx_smartreflex_iva_hwmod,
5372 &omap44xx_smartreflex_mpu_hwmod,
5373
Benoit Coussond11c2172011-02-02 12:04:36 +00005374 /* spinlock class */
5375 &omap44xx_spinlock_hwmod,
5376
Benoit Cousson35d1a662011-02-11 11:17:14 +00005377 /* timer class */
5378 &omap44xx_timer1_hwmod,
5379 &omap44xx_timer2_hwmod,
5380 &omap44xx_timer3_hwmod,
5381 &omap44xx_timer4_hwmod,
5382 &omap44xx_timer5_hwmod,
5383 &omap44xx_timer6_hwmod,
5384 &omap44xx_timer7_hwmod,
5385 &omap44xx_timer8_hwmod,
5386 &omap44xx_timer9_hwmod,
5387 &omap44xx_timer10_hwmod,
5388 &omap44xx_timer11_hwmod,
5389
Benoit Coussondb12ba52010-09-27 20:19:19 +05305390 /* uart class */
5391 &omap44xx_uart1_hwmod,
5392 &omap44xx_uart2_hwmod,
5393 &omap44xx_uart3_hwmod,
5394 &omap44xx_uart4_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005395
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005396 /* usb_otg_hs class */
5397 &omap44xx_usb_otg_hs_hwmod,
5398
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005399 /* wd_timer class */
5400 &omap44xx_wd_timer2_hwmod,
5401 &omap44xx_wd_timer3_hwmod,
5402
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005403 NULL,
5404};
5405
5406int __init omap44xx_hwmod_init(void)
5407{
Paul Walmsley550c8092011-02-28 11:58:14 -07005408 return omap_hwmod_register(omap44xx_hwmods);
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005409}
5410