blob: fac255058c81afa88ee195fddb0b83c3c17f4c45 [file] [log] [blame]
Paul Walmsley73591542010-02-22 22:09:32 -07001/*
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06005 * Copyright (C) 2012 Texas Instruments, Inc.
Paul Walmsley73591542010-02-22 22:09:32 -07006 * Paul Walmsley
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * The data in this file should be completely autogeneratable from
13 * the TI hardware database or other technical documentation.
14 *
15 * XXX these should be marked initdata for multi-OMAP kernels
16 */
Tony Lindgren3a8761c2012-10-08 09:11:22 -070017
18#include <linux/i2c-omap.h>
Jean Pihetb86aeaf2012-04-25 16:06:20 +053019#include <linux/power/smartreflex.h>
Tony Lindgren4b254082012-08-30 15:37:24 -070020#include <linux/platform_data/gpio-omap.h>
Jean Pihetb86aeaf2012-04-25 16:06:20 +053021
Lokesh Vutla2b6c4e72012-10-15 14:04:53 -070022#include <plat-omap/dma-omap.h>
Tony Lindgren79e3cb222012-09-20 11:42:04 -070023#include "l3_3xxx.h"
Tony Lindgren957988c2012-09-20 11:42:10 -070024#include "l4_3xxx.h"
Arnd Bergmann22037472012-08-24 15:21:06 +020025#include <linux/platform_data/asoc-ti-mcbsp.h>
26#include <linux/platform_data/spi-omap2-mcspi.h>
Thara Gopinathce722d22011-02-23 00:14:05 -070027#include <plat/dmtimer.h>
Paul Walmsley54864742012-09-23 17:28:23 -060028#include <plat/iommu.h>
Paul Walmsley73591542010-02-22 22:09:32 -070029
Tony Lindgren4f9ed542012-09-20 11:40:52 -070030#include "am35xx.h"
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -070031
Tony Lindgrendbc04162012-08-31 10:59:07 -070032#include "soc.h"
Tony Lindgren2a296c82012-10-02 17:41:35 -070033#include "omap_hwmod.h"
Paul Walmsley43b40992010-02-22 22:09:34 -070034#include "omap_hwmod_common_data.h"
Paul Walmsley73591542010-02-22 22:09:32 -070035#include "prm-regbits-34xx.h"
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053036#include "cm-regbits-34xx.h"
Lokesh Vutlad5e7c862012-10-15 14:03:51 -070037
38#include "dma.h"
Tony Lindgren3a8761c2012-10-08 09:11:22 -070039#include "i2c.h"
Tony Lindgren68f39e72012-10-15 12:09:43 -070040#include "mmc.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070041#include "wd_timer.h"
Tony Lindgren3d82cbb2012-10-15 12:50:46 -070042#include "serial.h"
Paul Walmsley73591542010-02-22 22:09:32 -070043
44/*
45 * OMAP3xxx hardware module integration data
46 *
Paul Walmsley844a3b62012-04-19 04:04:33 -060047 * All of the data in this section should be autogeneratable from the
Paul Walmsley73591542010-02-22 22:09:32 -070048 * TI hardware database or other technical documentation. Data that
49 * is driver-specific or driver-kernel integration-specific belongs
50 * elsewhere.
51 */
52
Paul Walmsley844a3b62012-04-19 04:04:33 -060053/*
54 * IP blocks
55 */
Paul Walmsley73591542010-02-22 22:09:32 -070056
Paul Walmsley844a3b62012-04-19 04:04:33 -060057/* L3 */
58static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -070059 { .irq = 9 + OMAP_INTC_START, },
60 { .irq = 10 + OMAP_INTC_START, },
61 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -060062};
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -080063
Paul Walmsley844a3b62012-04-19 04:04:33 -060064static struct omap_hwmod omap3xxx_l3_main_hwmod = {
65 .name = "l3_main",
66 .class = &l3_hwmod_class,
67 .mpu_irqs = omap3xxx_l3_main_irqs,
68 .flags = HWMOD_NO_IDLEST,
69};
70
71/* L4 CORE */
72static struct omap_hwmod omap3xxx_l4_core_hwmod = {
73 .name = "l4_core",
74 .class = &l4_hwmod_class,
75 .flags = HWMOD_NO_IDLEST,
76};
77
78/* L4 PER */
79static struct omap_hwmod omap3xxx_l4_per_hwmod = {
80 .name = "l4_per",
81 .class = &l4_hwmod_class,
82 .flags = HWMOD_NO_IDLEST,
83};
84
85/* L4 WKUP */
86static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
87 .name = "l4_wkup",
88 .class = &l4_hwmod_class,
89 .flags = HWMOD_NO_IDLEST,
90};
91
92/* L4 SEC */
93static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
94 .name = "l4_sec",
95 .class = &l4_hwmod_class,
96 .flags = HWMOD_NO_IDLEST,
97};
98
99/* MPU */
Jon Hunteree75d952012-09-23 17:28:29 -0600100static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = {
Jon Hunter3dc34012012-10-07 13:09:59 -0600101 { .name = "pmu", .irq = 3 + OMAP_INTC_START },
Jon Hunteree75d952012-09-23 17:28:29 -0600102 { .irq = -1 }
103};
104
Paul Walmsley844a3b62012-04-19 04:04:33 -0600105static struct omap_hwmod omap3xxx_mpu_hwmod = {
106 .name = "mpu",
Jon Hunteree75d952012-09-23 17:28:29 -0600107 .mpu_irqs = omap3xxx_mpu_irqs,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600108 .class = &mpu_hwmod_class,
109 .main_clk = "arm_fck",
110};
111
112/* IVA2 (IVA2) */
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600113static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
Tero Kristoed733612012-09-03 11:50:52 -0600114 { .name = "logic", .rst_shift = 0, .st_shift = 8 },
115 { .name = "seq0", .rst_shift = 1, .st_shift = 9 },
116 { .name = "seq1", .rst_shift = 2, .st_shift = 10 },
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600117};
118
Paul Walmsley844a3b62012-04-19 04:04:33 -0600119static struct omap_hwmod omap3xxx_iva_hwmod = {
120 .name = "iva",
121 .class = &iva_hwmod_class,
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600122 .clkdm_name = "iva2_clkdm",
123 .rst_lines = omap3xxx_iva_resets,
124 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
125 .main_clk = "iva2_ck",
Tero Kristoed733612012-09-03 11:50:52 -0600126 .prcm = {
127 .omap2 = {
128 .module_offs = OMAP3430_IVA2_MOD,
129 .prcm_reg_id = 1,
130 .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
131 .idlest_reg_id = 1,
132 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
133 }
134 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600135};
136
Jon Hunterc7dad45f2012-09-23 17:28:28 -0600137/*
138 * 'debugss' class
139 * debug and emulation sub system
140 */
141
142static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = {
143 .name = "debugss",
144};
145
146/* debugss */
147static struct omap_hwmod omap3xxx_debugss_hwmod = {
148 .name = "debugss",
149 .class = &omap3xxx_debugss_hwmod_class,
150 .clkdm_name = "emu_clkdm",
151 .main_clk = "emu_src_ck",
152 .flags = HWMOD_NO_IDLEST,
153};
154
Paul Walmsley844a3b62012-04-19 04:04:33 -0600155/* timer class */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600156static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
157 .rev_offs = 0x0000,
158 .sysc_offs = 0x0010,
159 .syss_offs = 0x0014,
Jon Hunter725a8fe2012-08-28 12:49:39 -0500160 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
161 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
162 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
Paul Walmsley844a3b62012-04-19 04:04:33 -0600163 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
164 .sysc_fields = &omap_hwmod_sysc_type1,
165};
166
167static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
168 .name = "timer",
169 .sysc = &omap3xxx_timer_sysc,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600170};
171
172/* secure timers dev attribute */
173static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
Jon Hunter139486f2012-06-05 12:34:53 -0500174 .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600175};
176
177/* always-on timers dev attribute */
178static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
179 .timer_capability = OMAP_TIMER_ALWON,
180};
181
182/* pwm timers dev attribute */
183static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
184 .timer_capability = OMAP_TIMER_HAS_PWM,
185};
186
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600187/* timers with DSP interrupt dev attribute */
188static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
189 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
190};
191
192/* pwm timers with DSP interrupt dev attribute */
193static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
194 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
195};
196
Paul Walmsley844a3b62012-04-19 04:04:33 -0600197/* timer1 */
198static struct omap_hwmod omap3xxx_timer1_hwmod = {
199 .name = "timer1",
200 .mpu_irqs = omap2_timer1_mpu_irqs,
201 .main_clk = "gpt1_fck",
202 .prcm = {
203 .omap2 = {
204 .prcm_reg_id = 1,
205 .module_bit = OMAP3430_EN_GPT1_SHIFT,
206 .module_offs = WKUP_MOD,
207 .idlest_reg_id = 1,
208 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
209 },
210 },
211 .dev_attr = &capability_alwon_dev_attr,
Jon Hunter725a8fe2012-08-28 12:49:39 -0500212 .class = &omap3xxx_timer_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600213};
214
215/* timer2 */
216static struct omap_hwmod omap3xxx_timer2_hwmod = {
217 .name = "timer2",
218 .mpu_irqs = omap2_timer2_mpu_irqs,
219 .main_clk = "gpt2_fck",
220 .prcm = {
221 .omap2 = {
222 .prcm_reg_id = 1,
223 .module_bit = OMAP3430_EN_GPT2_SHIFT,
224 .module_offs = OMAP3430_PER_MOD,
225 .idlest_reg_id = 1,
226 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
227 },
228 },
Jon Hunter725a8fe2012-08-28 12:49:39 -0500229 .class = &omap3xxx_timer_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600230};
231
232/* timer3 */
233static struct omap_hwmod omap3xxx_timer3_hwmod = {
234 .name = "timer3",
235 .mpu_irqs = omap2_timer3_mpu_irqs,
236 .main_clk = "gpt3_fck",
237 .prcm = {
238 .omap2 = {
239 .prcm_reg_id = 1,
240 .module_bit = OMAP3430_EN_GPT3_SHIFT,
241 .module_offs = OMAP3430_PER_MOD,
242 .idlest_reg_id = 1,
243 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
244 },
245 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600246 .class = &omap3xxx_timer_hwmod_class,
247};
248
249/* timer4 */
250static struct omap_hwmod omap3xxx_timer4_hwmod = {
251 .name = "timer4",
252 .mpu_irqs = omap2_timer4_mpu_irqs,
253 .main_clk = "gpt4_fck",
254 .prcm = {
255 .omap2 = {
256 .prcm_reg_id = 1,
257 .module_bit = OMAP3430_EN_GPT4_SHIFT,
258 .module_offs = OMAP3430_PER_MOD,
259 .idlest_reg_id = 1,
260 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
261 },
262 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600263 .class = &omap3xxx_timer_hwmod_class,
264};
265
266/* timer5 */
267static struct omap_hwmod omap3xxx_timer5_hwmod = {
268 .name = "timer5",
269 .mpu_irqs = omap2_timer5_mpu_irqs,
270 .main_clk = "gpt5_fck",
271 .prcm = {
272 .omap2 = {
273 .prcm_reg_id = 1,
274 .module_bit = OMAP3430_EN_GPT5_SHIFT,
275 .module_offs = OMAP3430_PER_MOD,
276 .idlest_reg_id = 1,
277 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
278 },
279 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600280 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600281 .class = &omap3xxx_timer_hwmod_class,
282};
283
284/* timer6 */
285static struct omap_hwmod omap3xxx_timer6_hwmod = {
286 .name = "timer6",
287 .mpu_irqs = omap2_timer6_mpu_irqs,
288 .main_clk = "gpt6_fck",
289 .prcm = {
290 .omap2 = {
291 .prcm_reg_id = 1,
292 .module_bit = OMAP3430_EN_GPT6_SHIFT,
293 .module_offs = OMAP3430_PER_MOD,
294 .idlest_reg_id = 1,
295 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
296 },
297 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600298 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600299 .class = &omap3xxx_timer_hwmod_class,
300};
301
302/* timer7 */
303static struct omap_hwmod omap3xxx_timer7_hwmod = {
304 .name = "timer7",
305 .mpu_irqs = omap2_timer7_mpu_irqs,
306 .main_clk = "gpt7_fck",
307 .prcm = {
308 .omap2 = {
309 .prcm_reg_id = 1,
310 .module_bit = OMAP3430_EN_GPT7_SHIFT,
311 .module_offs = OMAP3430_PER_MOD,
312 .idlest_reg_id = 1,
313 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
314 },
315 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600316 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600317 .class = &omap3xxx_timer_hwmod_class,
318};
319
320/* timer8 */
321static struct omap_hwmod omap3xxx_timer8_hwmod = {
322 .name = "timer8",
323 .mpu_irqs = omap2_timer8_mpu_irqs,
324 .main_clk = "gpt8_fck",
325 .prcm = {
326 .omap2 = {
327 .prcm_reg_id = 1,
328 .module_bit = OMAP3430_EN_GPT8_SHIFT,
329 .module_offs = OMAP3430_PER_MOD,
330 .idlest_reg_id = 1,
331 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
332 },
333 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600334 .dev_attr = &capability_dsp_pwm_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600335 .class = &omap3xxx_timer_hwmod_class,
336};
337
338/* timer9 */
339static struct omap_hwmod omap3xxx_timer9_hwmod = {
340 .name = "timer9",
341 .mpu_irqs = omap2_timer9_mpu_irqs,
342 .main_clk = "gpt9_fck",
343 .prcm = {
344 .omap2 = {
345 .prcm_reg_id = 1,
346 .module_bit = OMAP3430_EN_GPT9_SHIFT,
347 .module_offs = OMAP3430_PER_MOD,
348 .idlest_reg_id = 1,
349 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
350 },
351 },
352 .dev_attr = &capability_pwm_dev_attr,
353 .class = &omap3xxx_timer_hwmod_class,
354};
355
356/* timer10 */
357static struct omap_hwmod omap3xxx_timer10_hwmod = {
358 .name = "timer10",
359 .mpu_irqs = omap2_timer10_mpu_irqs,
360 .main_clk = "gpt10_fck",
361 .prcm = {
362 .omap2 = {
363 .prcm_reg_id = 1,
364 .module_bit = OMAP3430_EN_GPT10_SHIFT,
365 .module_offs = CORE_MOD,
366 .idlest_reg_id = 1,
367 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
368 },
369 },
370 .dev_attr = &capability_pwm_dev_attr,
Jon Hunter725a8fe2012-08-28 12:49:39 -0500371 .class = &omap3xxx_timer_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600372};
373
374/* timer11 */
375static struct omap_hwmod omap3xxx_timer11_hwmod = {
376 .name = "timer11",
377 .mpu_irqs = omap2_timer11_mpu_irqs,
378 .main_clk = "gpt11_fck",
379 .prcm = {
380 .omap2 = {
381 .prcm_reg_id = 1,
382 .module_bit = OMAP3430_EN_GPT11_SHIFT,
383 .module_offs = CORE_MOD,
384 .idlest_reg_id = 1,
385 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
386 },
387 },
388 .dev_attr = &capability_pwm_dev_attr,
389 .class = &omap3xxx_timer_hwmod_class,
390};
391
392/* timer12 */
393static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700394 { .irq = 95 + OMAP_INTC_START, },
395 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600396};
397
398static struct omap_hwmod omap3xxx_timer12_hwmod = {
399 .name = "timer12",
400 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
401 .main_clk = "gpt12_fck",
402 .prcm = {
403 .omap2 = {
404 .prcm_reg_id = 1,
405 .module_bit = OMAP3430_EN_GPT12_SHIFT,
406 .module_offs = WKUP_MOD,
407 .idlest_reg_id = 1,
408 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
409 },
410 },
411 .dev_attr = &capability_secure_dev_attr,
412 .class = &omap3xxx_timer_hwmod_class,
413};
414
415/*
416 * 'wd_timer' class
417 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
418 * overflow condition
419 */
420
421static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
422 .rev_offs = 0x0000,
423 .sysc_offs = 0x0010,
424 .syss_offs = 0x0014,
425 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
426 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
427 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
428 SYSS_HAS_RESET_STATUS),
429 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
430 .sysc_fields = &omap_hwmod_sysc_type1,
431};
432
433/* I2C common */
434static struct omap_hwmod_class_sysconfig i2c_sysc = {
435 .rev_offs = 0x00,
436 .sysc_offs = 0x20,
437 .syss_offs = 0x10,
438 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
439 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
440 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
441 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
442 .clockact = CLOCKACT_TEST_ICLK,
443 .sysc_fields = &omap_hwmod_sysc_type1,
444};
445
446static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
447 .name = "wd_timer",
448 .sysc = &omap3xxx_wd_timer_sysc,
Kevin Hilman414e4122012-05-08 11:34:30 -0600449 .pre_shutdown = &omap2_wd_timer_disable,
450 .reset = &omap2_wd_timer_reset,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600451};
452
453static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
454 .name = "wd_timer2",
455 .class = &omap3xxx_wd_timer_hwmod_class,
456 .main_clk = "wdt2_fck",
457 .prcm = {
458 .omap2 = {
459 .prcm_reg_id = 1,
460 .module_bit = OMAP3430_EN_WDT2_SHIFT,
461 .module_offs = WKUP_MOD,
462 .idlest_reg_id = 1,
463 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
464 },
465 },
466 /*
467 * XXX: Use software supervised mode, HW supervised smartidle seems to
468 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
469 */
470 .flags = HWMOD_SWSUP_SIDLE,
471};
472
473/* UART1 */
474static struct omap_hwmod omap3xxx_uart1_hwmod = {
475 .name = "uart1",
476 .mpu_irqs = omap2_uart1_mpu_irqs,
477 .sdma_reqs = omap2_uart1_sdma_reqs,
478 .main_clk = "uart1_fck",
479 .prcm = {
480 .omap2 = {
481 .module_offs = CORE_MOD,
482 .prcm_reg_id = 1,
483 .module_bit = OMAP3430_EN_UART1_SHIFT,
484 .idlest_reg_id = 1,
485 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
486 },
487 },
488 .class = &omap2_uart_class,
489};
490
491/* UART2 */
492static struct omap_hwmod omap3xxx_uart2_hwmod = {
493 .name = "uart2",
494 .mpu_irqs = omap2_uart2_mpu_irqs,
495 .sdma_reqs = omap2_uart2_sdma_reqs,
496 .main_clk = "uart2_fck",
497 .prcm = {
498 .omap2 = {
499 .module_offs = CORE_MOD,
500 .prcm_reg_id = 1,
501 .module_bit = OMAP3430_EN_UART2_SHIFT,
502 .idlest_reg_id = 1,
503 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
504 },
505 },
506 .class = &omap2_uart_class,
507};
508
509/* UART3 */
510static struct omap_hwmod omap3xxx_uart3_hwmod = {
511 .name = "uart3",
512 .mpu_irqs = omap2_uart3_mpu_irqs,
513 .sdma_reqs = omap2_uart3_sdma_reqs,
514 .main_clk = "uart3_fck",
515 .prcm = {
516 .omap2 = {
517 .module_offs = OMAP3430_PER_MOD,
518 .prcm_reg_id = 1,
519 .module_bit = OMAP3430_EN_UART3_SHIFT,
520 .idlest_reg_id = 1,
521 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
522 },
523 },
524 .class = &omap2_uart_class,
525};
526
527/* UART4 */
528static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700529 { .irq = 80 + OMAP_INTC_START, },
530 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600531};
532
533static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
534 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
535 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
536 { .dma_req = -1 }
537};
538
539static struct omap_hwmod omap36xx_uart4_hwmod = {
540 .name = "uart4",
541 .mpu_irqs = uart4_mpu_irqs,
542 .sdma_reqs = uart4_sdma_reqs,
543 .main_clk = "uart4_fck",
544 .prcm = {
545 .omap2 = {
546 .module_offs = OMAP3430_PER_MOD,
547 .prcm_reg_id = 1,
548 .module_bit = OMAP3630_EN_UART4_SHIFT,
549 .idlest_reg_id = 1,
550 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
551 },
552 },
553 .class = &omap2_uart_class,
554};
555
556static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700557 { .irq = 84 + OMAP_INTC_START, },
558 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600559};
560
561static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
562 { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
563 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
Paul Walmsleybf765232012-06-27 14:53:46 -0600564 { .dma_req = -1 }
Paul Walmsley844a3b62012-04-19 04:04:33 -0600565};
566
Paul Walmsley82ee6202012-06-27 14:53:46 -0600567/*
568 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
569 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
570 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
571 * should not be needed. The functional clock structure of the AM35xx
572 * UART4 is extremely unclear and opaque; it is unclear what the role
573 * of uart1/2_fck is for the UART4. Any clarification from either
574 * empirical testing or the AM3505/3517 hardware designers would be
575 * most welcome.
576 */
577static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
578 { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
579};
580
Paul Walmsley844a3b62012-04-19 04:04:33 -0600581static struct omap_hwmod am35xx_uart4_hwmod = {
582 .name = "uart4",
583 .mpu_irqs = am35xx_uart4_mpu_irqs,
584 .sdma_reqs = am35xx_uart4_sdma_reqs,
585 .main_clk = "uart4_fck",
586 .prcm = {
587 .omap2 = {
588 .module_offs = CORE_MOD,
589 .prcm_reg_id = 1,
Paul Walmsleybf765232012-06-27 14:53:46 -0600590 .module_bit = AM35XX_EN_UART4_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600591 .idlest_reg_id = 1,
Paul Walmsleybf765232012-06-27 14:53:46 -0600592 .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600593 },
594 },
Paul Walmsley82ee6202012-06-27 14:53:46 -0600595 .opt_clks = am35xx_uart4_opt_clks,
596 .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
597 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600598 .class = &omap2_uart_class,
599};
600
601static struct omap_hwmod_class i2c_class = {
602 .name = "i2c",
603 .sysc = &i2c_sysc,
604 .rev = OMAP_I2C_IP_VERSION_1,
605 .reset = &omap_i2c_reset,
606};
607
608static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
609 { .name = "dispc", .dma_req = 5 },
610 { .name = "dsi1", .dma_req = 74 },
611 { .dma_req = -1 }
612};
613
614/* dss */
615static struct omap_hwmod_opt_clk dss_opt_clks[] = {
616 /*
617 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
618 * driver does not use these clocks.
619 */
620 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
621 { .role = "tv_clk", .clk = "dss_tv_fck" },
622 /* required only on OMAP3430 */
623 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
624};
625
626static struct omap_hwmod omap3430es1_dss_core_hwmod = {
627 .name = "dss_core",
628 .class = &omap2_dss_hwmod_class,
629 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
630 .sdma_reqs = omap3xxx_dss_sdma_chs,
631 .prcm = {
632 .omap2 = {
633 .prcm_reg_id = 1,
634 .module_bit = OMAP3430_EN_DSS1_SHIFT,
635 .module_offs = OMAP3430_DSS_MOD,
636 .idlest_reg_id = 1,
637 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
638 },
639 },
640 .opt_clks = dss_opt_clks,
641 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
642 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
643};
644
645static struct omap_hwmod omap3xxx_dss_core_hwmod = {
646 .name = "dss_core",
647 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
648 .class = &omap2_dss_hwmod_class,
649 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
650 .sdma_reqs = omap3xxx_dss_sdma_chs,
651 .prcm = {
652 .omap2 = {
653 .prcm_reg_id = 1,
654 .module_bit = OMAP3430_EN_DSS1_SHIFT,
655 .module_offs = OMAP3430_DSS_MOD,
656 .idlest_reg_id = 1,
657 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
658 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
659 },
660 },
661 .opt_clks = dss_opt_clks,
662 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
663};
664
665/*
666 * 'dispc' class
667 * display controller
668 */
669
670static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
671 .rev_offs = 0x0000,
672 .sysc_offs = 0x0010,
673 .syss_offs = 0x0014,
674 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
675 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
676 SYSC_HAS_ENAWAKEUP),
677 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
678 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
679 .sysc_fields = &omap_hwmod_sysc_type1,
680};
681
682static struct omap_hwmod_class omap3_dispc_hwmod_class = {
683 .name = "dispc",
684 .sysc = &omap3_dispc_sysc,
685};
686
687static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
688 .name = "dss_dispc",
689 .class = &omap3_dispc_hwmod_class,
690 .mpu_irqs = omap2_dispc_irqs,
691 .main_clk = "dss1_alwon_fck",
692 .prcm = {
693 .omap2 = {
694 .prcm_reg_id = 1,
695 .module_bit = OMAP3430_EN_DSS1_SHIFT,
696 .module_offs = OMAP3430_DSS_MOD,
697 },
698 },
699 .flags = HWMOD_NO_IDLEST,
700 .dev_attr = &omap2_3_dss_dispc_dev_attr
701};
702
703/*
704 * 'dsi' class
705 * display serial interface controller
706 */
707
708static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
709 .name = "dsi",
710};
711
712static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700713 { .irq = 25 + OMAP_INTC_START, },
714 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600715};
716
717/* dss_dsi1 */
718static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
719 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
720};
721
722static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
723 .name = "dss_dsi1",
724 .class = &omap3xxx_dsi_hwmod_class,
725 .mpu_irqs = omap3xxx_dsi1_irqs,
726 .main_clk = "dss1_alwon_fck",
727 .prcm = {
728 .omap2 = {
729 .prcm_reg_id = 1,
730 .module_bit = OMAP3430_EN_DSS1_SHIFT,
731 .module_offs = OMAP3430_DSS_MOD,
732 },
733 },
734 .opt_clks = dss_dsi1_opt_clks,
735 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
736 .flags = HWMOD_NO_IDLEST,
737};
738
739static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
740 { .role = "ick", .clk = "dss_ick" },
741};
742
743static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
744 .name = "dss_rfbi",
745 .class = &omap2_rfbi_hwmod_class,
746 .main_clk = "dss1_alwon_fck",
747 .prcm = {
748 .omap2 = {
749 .prcm_reg_id = 1,
750 .module_bit = OMAP3430_EN_DSS1_SHIFT,
751 .module_offs = OMAP3430_DSS_MOD,
752 },
753 },
754 .opt_clks = dss_rfbi_opt_clks,
755 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
756 .flags = HWMOD_NO_IDLEST,
757};
758
759static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
760 /* required only on OMAP3430 */
761 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
762};
763
764static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
765 .name = "dss_venc",
766 .class = &omap2_venc_hwmod_class,
767 .main_clk = "dss_tv_fck",
768 .prcm = {
769 .omap2 = {
770 .prcm_reg_id = 1,
771 .module_bit = OMAP3430_EN_DSS1_SHIFT,
772 .module_offs = OMAP3430_DSS_MOD,
773 },
774 },
775 .opt_clks = dss_venc_opt_clks,
776 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
777 .flags = HWMOD_NO_IDLEST,
778};
779
780/* I2C1 */
781static struct omap_i2c_dev_attr i2c1_dev_attr = {
782 .fifo_depth = 8, /* bytes */
783 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
784 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
785 OMAP_I2C_FLAG_BUS_SHIFT_2,
786};
787
788static struct omap_hwmod omap3xxx_i2c1_hwmod = {
789 .name = "i2c1",
790 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
791 .mpu_irqs = omap2_i2c1_mpu_irqs,
792 .sdma_reqs = omap2_i2c1_sdma_reqs,
793 .main_clk = "i2c1_fck",
794 .prcm = {
795 .omap2 = {
796 .module_offs = CORE_MOD,
797 .prcm_reg_id = 1,
798 .module_bit = OMAP3430_EN_I2C1_SHIFT,
799 .idlest_reg_id = 1,
800 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
801 },
802 },
803 .class = &i2c_class,
804 .dev_attr = &i2c1_dev_attr,
805};
806
807/* I2C2 */
808static struct omap_i2c_dev_attr i2c2_dev_attr = {
809 .fifo_depth = 8, /* bytes */
810 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
811 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
812 OMAP_I2C_FLAG_BUS_SHIFT_2,
813};
814
815static struct omap_hwmod omap3xxx_i2c2_hwmod = {
816 .name = "i2c2",
817 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
818 .mpu_irqs = omap2_i2c2_mpu_irqs,
819 .sdma_reqs = omap2_i2c2_sdma_reqs,
820 .main_clk = "i2c2_fck",
821 .prcm = {
822 .omap2 = {
823 .module_offs = CORE_MOD,
824 .prcm_reg_id = 1,
825 .module_bit = OMAP3430_EN_I2C2_SHIFT,
826 .idlest_reg_id = 1,
827 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
828 },
829 },
830 .class = &i2c_class,
831 .dev_attr = &i2c2_dev_attr,
832};
833
834/* I2C3 */
835static struct omap_i2c_dev_attr i2c3_dev_attr = {
836 .fifo_depth = 64, /* bytes */
837 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
838 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
839 OMAP_I2C_FLAG_BUS_SHIFT_2,
840};
841
842static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700843 { .irq = 61 + OMAP_INTC_START, },
844 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600845};
846
847static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
848 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
849 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
850 { .dma_req = -1 }
851};
852
853static struct omap_hwmod omap3xxx_i2c3_hwmod = {
854 .name = "i2c3",
855 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
856 .mpu_irqs = i2c3_mpu_irqs,
857 .sdma_reqs = i2c3_sdma_reqs,
858 .main_clk = "i2c3_fck",
859 .prcm = {
860 .omap2 = {
861 .module_offs = CORE_MOD,
862 .prcm_reg_id = 1,
863 .module_bit = OMAP3430_EN_I2C3_SHIFT,
864 .idlest_reg_id = 1,
865 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
866 },
867 },
868 .class = &i2c_class,
869 .dev_attr = &i2c3_dev_attr,
870};
871
872/*
873 * 'gpio' class
874 * general purpose io module
875 */
876
877static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
878 .rev_offs = 0x0000,
879 .sysc_offs = 0x0010,
880 .syss_offs = 0x0014,
881 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
882 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
883 SYSS_HAS_RESET_STATUS),
884 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
885 .sysc_fields = &omap_hwmod_sysc_type1,
886};
887
888static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
889 .name = "gpio",
890 .sysc = &omap3xxx_gpio_sysc,
891 .rev = 1,
892};
893
894/* gpio_dev_attr */
895static struct omap_gpio_dev_attr gpio_dev_attr = {
896 .bank_width = 32,
897 .dbck_flag = true,
898};
899
900/* gpio1 */
901static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
902 { .role = "dbclk", .clk = "gpio1_dbck", },
903};
904
905static struct omap_hwmod omap3xxx_gpio1_hwmod = {
906 .name = "gpio1",
907 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
908 .mpu_irqs = omap2_gpio1_irqs,
909 .main_clk = "gpio1_ick",
910 .opt_clks = gpio1_opt_clks,
911 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
912 .prcm = {
913 .omap2 = {
914 .prcm_reg_id = 1,
915 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
916 .module_offs = WKUP_MOD,
917 .idlest_reg_id = 1,
918 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
919 },
920 },
921 .class = &omap3xxx_gpio_hwmod_class,
922 .dev_attr = &gpio_dev_attr,
923};
924
925/* gpio2 */
926static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
927 { .role = "dbclk", .clk = "gpio2_dbck", },
928};
929
930static struct omap_hwmod omap3xxx_gpio2_hwmod = {
931 .name = "gpio2",
932 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
933 .mpu_irqs = omap2_gpio2_irqs,
934 .main_clk = "gpio2_ick",
935 .opt_clks = gpio2_opt_clks,
936 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
937 .prcm = {
938 .omap2 = {
939 .prcm_reg_id = 1,
940 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
941 .module_offs = OMAP3430_PER_MOD,
942 .idlest_reg_id = 1,
943 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
944 },
945 },
946 .class = &omap3xxx_gpio_hwmod_class,
947 .dev_attr = &gpio_dev_attr,
948};
949
950/* gpio3 */
951static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
952 { .role = "dbclk", .clk = "gpio3_dbck", },
953};
954
955static struct omap_hwmod omap3xxx_gpio3_hwmod = {
956 .name = "gpio3",
957 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
958 .mpu_irqs = omap2_gpio3_irqs,
959 .main_clk = "gpio3_ick",
960 .opt_clks = gpio3_opt_clks,
961 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
962 .prcm = {
963 .omap2 = {
964 .prcm_reg_id = 1,
965 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
966 .module_offs = OMAP3430_PER_MOD,
967 .idlest_reg_id = 1,
968 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
969 },
970 },
971 .class = &omap3xxx_gpio_hwmod_class,
972 .dev_attr = &gpio_dev_attr,
973};
974
975/* gpio4 */
976static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
977 { .role = "dbclk", .clk = "gpio4_dbck", },
978};
979
980static struct omap_hwmod omap3xxx_gpio4_hwmod = {
981 .name = "gpio4",
982 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
983 .mpu_irqs = omap2_gpio4_irqs,
984 .main_clk = "gpio4_ick",
985 .opt_clks = gpio4_opt_clks,
986 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
987 .prcm = {
988 .omap2 = {
989 .prcm_reg_id = 1,
990 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
991 .module_offs = OMAP3430_PER_MOD,
992 .idlest_reg_id = 1,
993 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
994 },
995 },
996 .class = &omap3xxx_gpio_hwmod_class,
997 .dev_attr = &gpio_dev_attr,
998};
999
1000/* gpio5 */
1001static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001002 { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
1003 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001004};
1005
1006static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
1007 { .role = "dbclk", .clk = "gpio5_dbck", },
1008};
1009
1010static struct omap_hwmod omap3xxx_gpio5_hwmod = {
1011 .name = "gpio5",
1012 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1013 .mpu_irqs = omap3xxx_gpio5_irqs,
1014 .main_clk = "gpio5_ick",
1015 .opt_clks = gpio5_opt_clks,
1016 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
1017 .prcm = {
1018 .omap2 = {
1019 .prcm_reg_id = 1,
1020 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
1021 .module_offs = OMAP3430_PER_MOD,
1022 .idlest_reg_id = 1,
1023 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
1024 },
1025 },
1026 .class = &omap3xxx_gpio_hwmod_class,
1027 .dev_attr = &gpio_dev_attr,
1028};
1029
1030/* gpio6 */
1031static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001032 { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
1033 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001034};
1035
1036static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
1037 { .role = "dbclk", .clk = "gpio6_dbck", },
1038};
1039
1040static struct omap_hwmod omap3xxx_gpio6_hwmod = {
1041 .name = "gpio6",
1042 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1043 .mpu_irqs = omap3xxx_gpio6_irqs,
1044 .main_clk = "gpio6_ick",
1045 .opt_clks = gpio6_opt_clks,
1046 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
1047 .prcm = {
1048 .omap2 = {
1049 .prcm_reg_id = 1,
1050 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
1051 .module_offs = OMAP3430_PER_MOD,
1052 .idlest_reg_id = 1,
1053 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
1054 },
1055 },
1056 .class = &omap3xxx_gpio_hwmod_class,
1057 .dev_attr = &gpio_dev_attr,
1058};
1059
1060/* dma attributes */
1061static struct omap_dma_dev_attr dma_dev_attr = {
1062 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1063 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1064 .lch_count = 32,
1065};
1066
1067static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
1068 .rev_offs = 0x0000,
1069 .sysc_offs = 0x002c,
1070 .syss_offs = 0x0028,
1071 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1072 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1073 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
1074 SYSS_HAS_RESET_STATUS),
1075 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1076 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1077 .sysc_fields = &omap_hwmod_sysc_type1,
1078};
1079
1080static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1081 .name = "dma",
1082 .sysc = &omap3xxx_dma_sysc,
1083};
1084
1085/* dma_system */
1086static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1087 .name = "dma",
1088 .class = &omap3xxx_dma_hwmod_class,
1089 .mpu_irqs = omap2_dma_system_irqs,
1090 .main_clk = "core_l3_ick",
1091 .prcm = {
1092 .omap2 = {
1093 .module_offs = CORE_MOD,
1094 .prcm_reg_id = 1,
1095 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1096 .idlest_reg_id = 1,
1097 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
1098 },
1099 },
1100 .dev_attr = &dma_dev_attr,
1101 .flags = HWMOD_NO_IDLEST,
1102};
1103
1104/*
1105 * 'mcbsp' class
1106 * multi channel buffered serial port controller
1107 */
1108
1109static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1110 .sysc_offs = 0x008c,
1111 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1112 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1113 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1114 .sysc_fields = &omap_hwmod_sysc_type1,
1115 .clockact = 0x2,
1116};
1117
1118static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1119 .name = "mcbsp",
1120 .sysc = &omap3xxx_mcbsp_sysc,
1121 .rev = MCBSP_CONFIG_TYPE3,
1122};
1123
Peter Ujfalusi70391542012-06-18 16:18:43 -06001124/* McBSP functional clock mapping */
1125static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
1126 { .role = "pad_fck", .clk = "mcbsp_clks" },
1127 { .role = "prcm_fck", .clk = "core_96m_fck" },
1128};
1129
1130static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1131 { .role = "pad_fck", .clk = "mcbsp_clks" },
1132 { .role = "prcm_fck", .clk = "per_96m_fck" },
1133};
1134
Paul Walmsley844a3b62012-04-19 04:04:33 -06001135/* mcbsp1 */
1136static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001137 { .name = "common", .irq = 16 + OMAP_INTC_START, },
1138 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
1139 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
1140 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001141};
1142
1143static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1144 .name = "mcbsp1",
1145 .class = &omap3xxx_mcbsp_hwmod_class,
1146 .mpu_irqs = omap3xxx_mcbsp1_irqs,
1147 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1148 .main_clk = "mcbsp1_fck",
1149 .prcm = {
1150 .omap2 = {
1151 .prcm_reg_id = 1,
1152 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
1153 .module_offs = CORE_MOD,
1154 .idlest_reg_id = 1,
1155 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
1156 },
1157 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001158 .opt_clks = mcbsp15_opt_clks,
1159 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001160};
1161
1162/* mcbsp2 */
1163static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001164 { .name = "common", .irq = 17 + OMAP_INTC_START, },
1165 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
1166 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
1167 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001168};
1169
1170static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1171 .sidetone = "mcbsp2_sidetone",
1172};
1173
1174static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1175 .name = "mcbsp2",
1176 .class = &omap3xxx_mcbsp_hwmod_class,
1177 .mpu_irqs = omap3xxx_mcbsp2_irqs,
1178 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1179 .main_clk = "mcbsp2_fck",
1180 .prcm = {
1181 .omap2 = {
1182 .prcm_reg_id = 1,
1183 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1184 .module_offs = OMAP3430_PER_MOD,
1185 .idlest_reg_id = 1,
1186 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1187 },
1188 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001189 .opt_clks = mcbsp234_opt_clks,
1190 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001191 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1192};
1193
1194/* mcbsp3 */
1195static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001196 { .name = "common", .irq = 22 + OMAP_INTC_START, },
1197 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
1198 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
1199 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001200};
1201
1202static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1203 .sidetone = "mcbsp3_sidetone",
1204};
1205
1206static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1207 .name = "mcbsp3",
1208 .class = &omap3xxx_mcbsp_hwmod_class,
1209 .mpu_irqs = omap3xxx_mcbsp3_irqs,
1210 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
1211 .main_clk = "mcbsp3_fck",
1212 .prcm = {
1213 .omap2 = {
1214 .prcm_reg_id = 1,
1215 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1216 .module_offs = OMAP3430_PER_MOD,
1217 .idlest_reg_id = 1,
1218 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1219 },
1220 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001221 .opt_clks = mcbsp234_opt_clks,
1222 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001223 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1224};
1225
1226/* mcbsp4 */
1227static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001228 { .name = "common", .irq = 23 + OMAP_INTC_START, },
1229 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
1230 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
1231 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001232};
1233
1234static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
1235 { .name = "rx", .dma_req = 20 },
1236 { .name = "tx", .dma_req = 19 },
1237 { .dma_req = -1 }
1238};
1239
1240static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1241 .name = "mcbsp4",
1242 .class = &omap3xxx_mcbsp_hwmod_class,
1243 .mpu_irqs = omap3xxx_mcbsp4_irqs,
1244 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
1245 .main_clk = "mcbsp4_fck",
1246 .prcm = {
1247 .omap2 = {
1248 .prcm_reg_id = 1,
1249 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
1250 .module_offs = OMAP3430_PER_MOD,
1251 .idlest_reg_id = 1,
1252 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1253 },
1254 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001255 .opt_clks = mcbsp234_opt_clks,
1256 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001257};
1258
1259/* mcbsp5 */
1260static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001261 { .name = "common", .irq = 27 + OMAP_INTC_START, },
1262 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
1263 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
1264 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001265};
1266
1267static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
1268 { .name = "rx", .dma_req = 22 },
1269 { .name = "tx", .dma_req = 21 },
1270 { .dma_req = -1 }
1271};
1272
1273static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1274 .name = "mcbsp5",
1275 .class = &omap3xxx_mcbsp_hwmod_class,
1276 .mpu_irqs = omap3xxx_mcbsp5_irqs,
1277 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
1278 .main_clk = "mcbsp5_fck",
1279 .prcm = {
1280 .omap2 = {
1281 .prcm_reg_id = 1,
1282 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
1283 .module_offs = CORE_MOD,
1284 .idlest_reg_id = 1,
1285 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1286 },
1287 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001288 .opt_clks = mcbsp15_opt_clks,
1289 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001290};
1291
1292/* 'mcbsp sidetone' class */
1293static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1294 .sysc_offs = 0x0010,
1295 .sysc_flags = SYSC_HAS_AUTOIDLE,
1296 .sysc_fields = &omap_hwmod_sysc_type1,
1297};
1298
1299static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1300 .name = "mcbsp_sidetone",
1301 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1302};
1303
1304/* mcbsp2_sidetone */
1305static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001306 { .name = "irq", .irq = 4 + OMAP_INTC_START, },
1307 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001308};
1309
1310static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1311 .name = "mcbsp2_sidetone",
1312 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1313 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
1314 .main_clk = "mcbsp2_fck",
1315 .prcm = {
1316 .omap2 = {
1317 .prcm_reg_id = 1,
1318 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1319 .module_offs = OMAP3430_PER_MOD,
1320 .idlest_reg_id = 1,
1321 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1322 },
1323 },
1324};
1325
1326/* mcbsp3_sidetone */
1327static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001328 { .name = "irq", .irq = 5 + OMAP_INTC_START, },
1329 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001330};
1331
1332static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1333 .name = "mcbsp3_sidetone",
1334 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1335 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
1336 .main_clk = "mcbsp3_fck",
1337 .prcm = {
1338 .omap2 = {
1339 .prcm_reg_id = 1,
1340 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1341 .module_offs = OMAP3430_PER_MOD,
1342 .idlest_reg_id = 1,
1343 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1344 },
1345 },
1346};
1347
1348/* SR common */
1349static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
1350 .clkact_shift = 20,
1351};
1352
1353static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1354 .sysc_offs = 0x24,
1355 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
1356 .clockact = CLOCKACT_TEST_ICLK,
1357 .sysc_fields = &omap34xx_sr_sysc_fields,
1358};
1359
1360static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1361 .name = "smartreflex",
1362 .sysc = &omap34xx_sr_sysc,
1363 .rev = 1,
1364};
1365
1366static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
1367 .sidle_shift = 24,
1368 .enwkup_shift = 26,
1369};
1370
1371static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1372 .sysc_offs = 0x38,
1373 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1374 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1375 SYSC_NO_CACHE),
1376 .sysc_fields = &omap36xx_sr_sysc_fields,
1377};
1378
1379static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1380 .name = "smartreflex",
1381 .sysc = &omap36xx_sr_sysc,
1382 .rev = 2,
1383};
1384
1385/* SR1 */
1386static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1387 .sensor_voltdm_name = "mpu_iva",
1388};
1389
1390static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001391 { .irq = 18 + OMAP_INTC_START, },
1392 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001393};
1394
1395static struct omap_hwmod omap34xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301396 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001397 .class = &omap34xx_smartreflex_hwmod_class,
1398 .main_clk = "sr1_fck",
1399 .prcm = {
1400 .omap2 = {
1401 .prcm_reg_id = 1,
1402 .module_bit = OMAP3430_EN_SR1_SHIFT,
1403 .module_offs = WKUP_MOD,
1404 .idlest_reg_id = 1,
1405 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1406 },
1407 },
1408 .dev_attr = &sr1_dev_attr,
1409 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1410 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1411};
1412
1413static struct omap_hwmod omap36xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301414 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001415 .class = &omap36xx_smartreflex_hwmod_class,
1416 .main_clk = "sr1_fck",
1417 .prcm = {
1418 .omap2 = {
1419 .prcm_reg_id = 1,
1420 .module_bit = OMAP3430_EN_SR1_SHIFT,
1421 .module_offs = WKUP_MOD,
1422 .idlest_reg_id = 1,
1423 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1424 },
1425 },
1426 .dev_attr = &sr1_dev_attr,
1427 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1428};
1429
1430/* SR2 */
1431static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1432 .sensor_voltdm_name = "core",
1433};
1434
1435static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001436 { .irq = 19 + OMAP_INTC_START, },
1437 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001438};
1439
1440static struct omap_hwmod omap34xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301441 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001442 .class = &omap34xx_smartreflex_hwmod_class,
1443 .main_clk = "sr2_fck",
1444 .prcm = {
1445 .omap2 = {
1446 .prcm_reg_id = 1,
1447 .module_bit = OMAP3430_EN_SR2_SHIFT,
1448 .module_offs = WKUP_MOD,
1449 .idlest_reg_id = 1,
1450 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1451 },
1452 },
1453 .dev_attr = &sr2_dev_attr,
1454 .mpu_irqs = omap3_smartreflex_core_irqs,
1455 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1456};
1457
1458static struct omap_hwmod omap36xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301459 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001460 .class = &omap36xx_smartreflex_hwmod_class,
1461 .main_clk = "sr2_fck",
1462 .prcm = {
1463 .omap2 = {
1464 .prcm_reg_id = 1,
1465 .module_bit = OMAP3430_EN_SR2_SHIFT,
1466 .module_offs = WKUP_MOD,
1467 .idlest_reg_id = 1,
1468 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1469 },
1470 },
1471 .dev_attr = &sr2_dev_attr,
1472 .mpu_irqs = omap3_smartreflex_core_irqs,
1473};
1474
1475/*
1476 * 'mailbox' class
1477 * mailbox module allowing communication between the on-chip processors
1478 * using a queued mailbox-interrupt mechanism.
1479 */
1480
1481static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1482 .rev_offs = 0x000,
1483 .sysc_offs = 0x010,
1484 .syss_offs = 0x014,
1485 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1486 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1487 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1488 .sysc_fields = &omap_hwmod_sysc_type1,
1489};
1490
1491static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1492 .name = "mailbox",
1493 .sysc = &omap3xxx_mailbox_sysc,
1494};
1495
1496static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001497 { .irq = 26 + OMAP_INTC_START, },
1498 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001499};
1500
1501static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1502 .name = "mailbox",
1503 .class = &omap3xxx_mailbox_hwmod_class,
1504 .mpu_irqs = omap3xxx_mailbox_irqs,
1505 .main_clk = "mailboxes_ick",
1506 .prcm = {
1507 .omap2 = {
1508 .prcm_reg_id = 1,
1509 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1510 .module_offs = CORE_MOD,
1511 .idlest_reg_id = 1,
1512 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1513 },
1514 },
1515};
1516
1517/*
1518 * 'mcspi' class
1519 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1520 * bus
1521 */
1522
1523static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1524 .rev_offs = 0x0000,
1525 .sysc_offs = 0x0010,
1526 .syss_offs = 0x0014,
1527 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1528 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1529 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1530 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1531 .sysc_fields = &omap_hwmod_sysc_type1,
1532};
1533
1534static struct omap_hwmod_class omap34xx_mcspi_class = {
1535 .name = "mcspi",
1536 .sysc = &omap34xx_mcspi_sysc,
1537 .rev = OMAP3_MCSPI_REV,
1538};
1539
1540/* mcspi1 */
1541static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1542 .num_chipselect = 4,
1543};
1544
1545static struct omap_hwmod omap34xx_mcspi1 = {
1546 .name = "mcspi1",
1547 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1548 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1549 .main_clk = "mcspi1_fck",
1550 .prcm = {
1551 .omap2 = {
1552 .module_offs = CORE_MOD,
1553 .prcm_reg_id = 1,
1554 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
1555 .idlest_reg_id = 1,
1556 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1557 },
1558 },
1559 .class = &omap34xx_mcspi_class,
1560 .dev_attr = &omap_mcspi1_dev_attr,
1561};
1562
1563/* mcspi2 */
1564static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1565 .num_chipselect = 2,
1566};
1567
1568static struct omap_hwmod omap34xx_mcspi2 = {
1569 .name = "mcspi2",
1570 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1571 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1572 .main_clk = "mcspi2_fck",
1573 .prcm = {
1574 .omap2 = {
1575 .module_offs = CORE_MOD,
1576 .prcm_reg_id = 1,
1577 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
1578 .idlest_reg_id = 1,
1579 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1580 },
1581 },
1582 .class = &omap34xx_mcspi_class,
1583 .dev_attr = &omap_mcspi2_dev_attr,
1584};
1585
1586/* mcspi3 */
1587static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001588 { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
1589 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001590};
1591
1592static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
1593 { .name = "tx0", .dma_req = 15 },
1594 { .name = "rx0", .dma_req = 16 },
1595 { .name = "tx1", .dma_req = 23 },
1596 { .name = "rx1", .dma_req = 24 },
1597 { .dma_req = -1 }
1598};
1599
1600static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1601 .num_chipselect = 2,
1602};
1603
1604static struct omap_hwmod omap34xx_mcspi3 = {
1605 .name = "mcspi3",
1606 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
1607 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
1608 .main_clk = "mcspi3_fck",
1609 .prcm = {
1610 .omap2 = {
1611 .module_offs = CORE_MOD,
1612 .prcm_reg_id = 1,
1613 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
1614 .idlest_reg_id = 1,
1615 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1616 },
1617 },
1618 .class = &omap34xx_mcspi_class,
1619 .dev_attr = &omap_mcspi3_dev_attr,
1620};
1621
1622/* mcspi4 */
1623static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001624 { .name = "irq", .irq = 48 + OMAP_INTC_START, },
1625 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001626};
1627
1628static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
1629 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
1630 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
1631 { .dma_req = -1 }
1632};
1633
1634static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1635 .num_chipselect = 1,
1636};
1637
1638static struct omap_hwmod omap34xx_mcspi4 = {
1639 .name = "mcspi4",
1640 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
1641 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
1642 .main_clk = "mcspi4_fck",
1643 .prcm = {
1644 .omap2 = {
1645 .module_offs = CORE_MOD,
1646 .prcm_reg_id = 1,
1647 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
1648 .idlest_reg_id = 1,
1649 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1650 },
1651 },
1652 .class = &omap34xx_mcspi_class,
1653 .dev_attr = &omap_mcspi4_dev_attr,
1654};
1655
1656/* usbhsotg */
1657static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1658 .rev_offs = 0x0400,
1659 .sysc_offs = 0x0404,
1660 .syss_offs = 0x0408,
1661 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1662 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1663 SYSC_HAS_AUTOIDLE),
1664 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1665 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1666 .sysc_fields = &omap_hwmod_sysc_type1,
1667};
1668
1669static struct omap_hwmod_class usbotg_class = {
1670 .name = "usbotg",
1671 .sysc = &omap3xxx_usbhsotg_sysc,
1672};
1673
1674/* usb_otg_hs */
1675static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1676
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001677 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
1678 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
1679 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001680};
1681
1682static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1683 .name = "usb_otg_hs",
1684 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
1685 .main_clk = "hsotgusb_ick",
1686 .prcm = {
1687 .omap2 = {
1688 .prcm_reg_id = 1,
1689 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1690 .module_offs = CORE_MOD,
1691 .idlest_reg_id = 1,
1692 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
1693 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
1694 },
1695 },
1696 .class = &usbotg_class,
1697
1698 /*
1699 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1700 * broken when autoidle is enabled
1701 * workaround is to disable the autoidle bit at module level.
1702 */
1703 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1704 | HWMOD_SWSUP_MSTANDBY,
1705};
1706
1707/* usb_otg_hs */
1708static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001709 { .name = "mc", .irq = 71 + OMAP_INTC_START, },
1710 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001711};
1712
1713static struct omap_hwmod_class am35xx_usbotg_class = {
1714 .name = "am35xx_usbotg",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001715};
1716
1717static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1718 .name = "am35x_otg_hs",
1719 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001720 .main_clk = "hsotgusb_fck",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001721 .class = &am35xx_usbotg_class,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001722 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001723};
1724
1725/* MMC/SD/SDIO common */
1726static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1727 .rev_offs = 0x1fc,
1728 .sysc_offs = 0x10,
1729 .syss_offs = 0x14,
1730 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1731 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1732 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1733 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1734 .sysc_fields = &omap_hwmod_sysc_type1,
1735};
1736
1737static struct omap_hwmod_class omap34xx_mmc_class = {
1738 .name = "mmc",
1739 .sysc = &omap34xx_mmc_sysc,
1740};
1741
1742/* MMC/SD/SDIO1 */
1743
1744static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001745 { .irq = 83 + OMAP_INTC_START, },
1746 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001747};
1748
1749static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
1750 { .name = "tx", .dma_req = 61, },
1751 { .name = "rx", .dma_req = 62, },
1752 { .dma_req = -1 }
1753};
1754
1755static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1756 { .role = "dbck", .clk = "omap_32k_fck", },
1757};
1758
1759static struct omap_mmc_dev_attr mmc1_dev_attr = {
1760 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1761};
1762
1763/* See 35xx errata 2.1.1.128 in SPRZ278F */
1764static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
1765 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1766 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1767};
1768
1769static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1770 .name = "mmc1",
1771 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1772 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1773 .opt_clks = omap34xx_mmc1_opt_clks,
1774 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1775 .main_clk = "mmchs1_fck",
1776 .prcm = {
1777 .omap2 = {
1778 .module_offs = CORE_MOD,
1779 .prcm_reg_id = 1,
1780 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1781 .idlest_reg_id = 1,
1782 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1783 },
1784 },
1785 .dev_attr = &mmc1_pre_es3_dev_attr,
1786 .class = &omap34xx_mmc_class,
1787};
1788
1789static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1790 .name = "mmc1",
1791 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1792 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1793 .opt_clks = omap34xx_mmc1_opt_clks,
1794 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1795 .main_clk = "mmchs1_fck",
1796 .prcm = {
1797 .omap2 = {
1798 .module_offs = CORE_MOD,
1799 .prcm_reg_id = 1,
1800 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1801 .idlest_reg_id = 1,
1802 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1803 },
1804 },
1805 .dev_attr = &mmc1_dev_attr,
1806 .class = &omap34xx_mmc_class,
1807};
1808
1809/* MMC/SD/SDIO2 */
1810
1811static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001812 { .irq = 86 + OMAP_INTC_START, },
1813 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001814};
1815
1816static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
1817 { .name = "tx", .dma_req = 47, },
1818 { .name = "rx", .dma_req = 48, },
1819 { .dma_req = -1 }
1820};
1821
1822static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1823 { .role = "dbck", .clk = "omap_32k_fck", },
1824};
1825
1826/* See 35xx errata 2.1.1.128 in SPRZ278F */
1827static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
1828 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1829};
1830
1831static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1832 .name = "mmc2",
1833 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1834 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1835 .opt_clks = omap34xx_mmc2_opt_clks,
1836 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1837 .main_clk = "mmchs2_fck",
1838 .prcm = {
1839 .omap2 = {
1840 .module_offs = CORE_MOD,
1841 .prcm_reg_id = 1,
1842 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1843 .idlest_reg_id = 1,
1844 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1845 },
1846 },
1847 .dev_attr = &mmc2_pre_es3_dev_attr,
1848 .class = &omap34xx_mmc_class,
1849};
1850
1851static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1852 .name = "mmc2",
1853 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1854 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1855 .opt_clks = omap34xx_mmc2_opt_clks,
1856 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1857 .main_clk = "mmchs2_fck",
1858 .prcm = {
1859 .omap2 = {
1860 .module_offs = CORE_MOD,
1861 .prcm_reg_id = 1,
1862 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1863 .idlest_reg_id = 1,
1864 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1865 },
1866 },
1867 .class = &omap34xx_mmc_class,
1868};
1869
1870/* MMC/SD/SDIO3 */
1871
1872static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001873 { .irq = 94 + OMAP_INTC_START, },
1874 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001875};
1876
1877static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
1878 { .name = "tx", .dma_req = 77, },
1879 { .name = "rx", .dma_req = 78, },
1880 { .dma_req = -1 }
1881};
1882
1883static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1884 { .role = "dbck", .clk = "omap_32k_fck", },
1885};
1886
1887static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1888 .name = "mmc3",
1889 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
1890 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
1891 .opt_clks = omap34xx_mmc3_opt_clks,
1892 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1893 .main_clk = "mmchs3_fck",
1894 .prcm = {
1895 .omap2 = {
1896 .prcm_reg_id = 1,
1897 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1898 .idlest_reg_id = 1,
1899 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1900 },
1901 },
1902 .class = &omap34xx_mmc_class,
1903};
1904
1905/*
1906 * 'usb_host_hs' class
1907 * high-speed multi-port usb host controller
1908 */
1909
1910static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1911 .rev_offs = 0x0000,
1912 .sysc_offs = 0x0010,
1913 .syss_offs = 0x0014,
1914 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1915 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1916 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1917 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1918 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1919 .sysc_fields = &omap_hwmod_sysc_type1,
1920};
1921
1922static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1923 .name = "usb_host_hs",
1924 .sysc = &omap3xxx_usb_host_hs_sysc,
1925};
1926
1927static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
1928 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
1929};
1930
1931static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001932 { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
1933 { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
1934 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001935};
1936
1937static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1938 .name = "usb_host_hs",
1939 .class = &omap3xxx_usb_host_hs_hwmod_class,
1940 .clkdm_name = "l3_init_clkdm",
1941 .mpu_irqs = omap3xxx_usb_host_hs_irqs,
1942 .main_clk = "usbhost_48m_fck",
1943 .prcm = {
1944 .omap2 = {
1945 .module_offs = OMAP3430ES2_USBHOST_MOD,
1946 .prcm_reg_id = 1,
1947 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
1948 .idlest_reg_id = 1,
1949 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1950 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
1951 },
1952 },
1953 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
1954 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
1955
1956 /*
1957 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1958 * id: i660
1959 *
1960 * Description:
1961 * In the following configuration :
1962 * - USBHOST module is set to smart-idle mode
1963 * - PRCM asserts idle_req to the USBHOST module ( This typically
1964 * happens when the system is going to a low power mode : all ports
1965 * have been suspended, the master part of the USBHOST module has
1966 * entered the standby state, and SW has cut the functional clocks)
1967 * - an USBHOST interrupt occurs before the module is able to answer
1968 * idle_ack, typically a remote wakeup IRQ.
1969 * Then the USB HOST module will enter a deadlock situation where it
1970 * is no more accessible nor functional.
1971 *
1972 * Workaround:
1973 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1974 */
1975
1976 /*
1977 * Errata: USB host EHCI may stall when entering smart-standby mode
1978 * Id: i571
1979 *
1980 * Description:
1981 * When the USBHOST module is set to smart-standby mode, and when it is
1982 * ready to enter the standby state (i.e. all ports are suspended and
1983 * all attached devices are in suspend mode), then it can wrongly assert
1984 * the Mstandby signal too early while there are still some residual OCP
1985 * transactions ongoing. If this condition occurs, the internal state
1986 * machine may go to an undefined state and the USB link may be stuck
1987 * upon the next resume.
1988 *
1989 * Workaround:
1990 * Don't use smart standby; use only force standby,
1991 * hence HWMOD_SWSUP_MSTANDBY
1992 */
1993
1994 /*
1995 * During system boot; If the hwmod framework resets the module
1996 * the module will have smart idle settings; which can lead to deadlock
1997 * (above Errata Id:i660); so, dont reset the module during boot;
1998 * Use HWMOD_INIT_NO_RESET.
1999 */
2000
2001 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
2002 HWMOD_INIT_NO_RESET,
2003};
2004
2005/*
2006 * 'usb_tll_hs' class
2007 * usb_tll_hs module is the adapter on the usb_host_hs ports
2008 */
2009static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
2010 .rev_offs = 0x0000,
2011 .sysc_offs = 0x0010,
2012 .syss_offs = 0x0014,
2013 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2014 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2015 SYSC_HAS_AUTOIDLE),
2016 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2017 .sysc_fields = &omap_hwmod_sysc_type1,
2018};
2019
2020static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
2021 .name = "usb_tll_hs",
2022 .sysc = &omap3xxx_usb_tll_hs_sysc,
2023};
2024
2025static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07002026 { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
2027 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06002028};
2029
2030static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
2031 .name = "usb_tll_hs",
2032 .class = &omap3xxx_usb_tll_hs_hwmod_class,
2033 .clkdm_name = "l3_init_clkdm",
2034 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
2035 .main_clk = "usbtll_fck",
2036 .prcm = {
2037 .omap2 = {
2038 .module_offs = CORE_MOD,
2039 .prcm_reg_id = 3,
2040 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
2041 .idlest_reg_id = 3,
2042 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
2043 },
2044 },
2045};
2046
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002047static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
2048 .name = "hdq1w",
2049 .mpu_irqs = omap2_hdq1w_mpu_irqs,
2050 .main_clk = "hdq_fck",
2051 .prcm = {
2052 .omap2 = {
2053 .module_offs = CORE_MOD,
2054 .prcm_reg_id = 1,
2055 .module_bit = OMAP3430_EN_HDQ_SHIFT,
2056 .idlest_reg_id = 1,
2057 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
2058 },
2059 },
2060 .class = &omap2_hdq1w_class,
2061};
2062
Tero Kristo8f993a02012-09-23 17:28:21 -06002063/* SAD2D */
2064static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
2065 { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
2066 { .name = "rst_modem_sw", .rst_shift = 1 },
2067};
2068
2069static struct omap_hwmod_class omap3xxx_sad2d_class = {
2070 .name = "sad2d",
2071};
2072
2073static struct omap_hwmod omap3xxx_sad2d_hwmod = {
2074 .name = "sad2d",
2075 .rst_lines = omap3xxx_sad2d_resets,
2076 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
2077 .main_clk = "sad2d_ick",
2078 .prcm = {
2079 .omap2 = {
2080 .module_offs = CORE_MOD,
2081 .prcm_reg_id = 1,
2082 .module_bit = OMAP3430_EN_SAD2D_SHIFT,
2083 .idlest_reg_id = 1,
2084 .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
2085 },
2086 },
2087 .class = &omap3xxx_sad2d_class,
2088};
2089
Paul Walmsley844a3b62012-04-19 04:04:33 -06002090/*
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002091 * '32K sync counter' class
2092 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
2093 */
2094static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
2095 .rev_offs = 0x0000,
2096 .sysc_offs = 0x0004,
2097 .sysc_flags = SYSC_HAS_SIDLEMODE,
2098 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
2099 .sysc_fields = &omap_hwmod_sysc_type1,
2100};
2101
2102static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
2103 .name = "counter",
2104 .sysc = &omap3xxx_counter_sysc,
2105};
2106
2107static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
2108 .name = "counter_32k",
2109 .class = &omap3xxx_counter_hwmod_class,
2110 .clkdm_name = "wkup_clkdm",
2111 .flags = HWMOD_SWSUP_SIDLE,
2112 .main_clk = "wkup_32k_fck",
2113 .prcm = {
2114 .omap2 = {
2115 .module_offs = WKUP_MOD,
2116 .prcm_reg_id = 1,
2117 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
2118 .idlest_reg_id = 1,
2119 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
2120 },
2121 },
2122};
2123
Paul Walmsley844a3b62012-04-19 04:04:33 -06002124/*
Afzal Mohammed49484a62012-09-23 17:28:24 -06002125 * 'gpmc' class
2126 * general purpose memory controller
2127 */
2128
2129static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
2130 .rev_offs = 0x0000,
2131 .sysc_offs = 0x0010,
2132 .syss_offs = 0x0014,
2133 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
2134 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2135 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2136 .sysc_fields = &omap_hwmod_sysc_type1,
2137};
2138
2139static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
2140 .name = "gpmc",
2141 .sysc = &omap3xxx_gpmc_sysc,
2142};
2143
2144static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = {
2145 { .irq = 20 },
2146 { .irq = -1 }
2147};
2148
2149static struct omap_hwmod omap3xxx_gpmc_hwmod = {
2150 .name = "gpmc",
2151 .class = &omap3xxx_gpmc_hwmod_class,
2152 .clkdm_name = "core_l3_clkdm",
2153 .mpu_irqs = omap3xxx_gpmc_irqs,
2154 .main_clk = "gpmc_fck",
2155 /*
2156 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
2157 * block. It is not being added due to any known bugs with
2158 * resetting the GPMC IP block, but rather because any timings
2159 * set by the bootloader are not being correctly programmed by
2160 * the kernel from the board file or DT data.
2161 * HWMOD_INIT_NO_RESET should be removed ASAP.
2162 */
2163 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
2164 HWMOD_NO_IDLEST),
2165};
2166
2167/*
Paul Walmsley844a3b62012-04-19 04:04:33 -06002168 * interfaces
2169 */
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302170
Paul Walmsley73591542010-02-22 22:09:32 -07002171/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002172static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
2173 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07002174 .slave = &omap3xxx_l4_core_hwmod,
2175 .user = OCP_USER_MPU | OCP_USER_SDMA,
2176};
2177
2178/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002179static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
2180 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07002181 .slave = &omap3xxx_l4_per_hwmod,
2182 .user = OCP_USER_MPU | OCP_USER_SDMA,
2183};
2184
sricharan4bb194d2011-02-08 22:13:37 +05302185static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
2186 {
Paul Walmsley844a3b62012-04-19 04:04:33 -06002187 .pa_start = 0x68000000,
2188 .pa_end = 0x6800ffff,
2189 .flags = ADDR_TYPE_RT,
sricharan4bb194d2011-02-08 22:13:37 +05302190 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002191 { }
sricharan4bb194d2011-02-08 22:13:37 +05302192};
2193
Paul Walmsley73591542010-02-22 22:09:32 -07002194/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002195static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +05302196 .master = &omap3xxx_mpu_hwmod,
2197 .slave = &omap3xxx_l3_main_hwmod,
2198 .addr = omap3xxx_l3_main_addrs,
Paul Walmsley73591542010-02-22 22:09:32 -07002199 .user = OCP_USER_MPU,
2200};
2201
Jon Hunterc7dad45f2012-09-23 17:28:28 -06002202static struct omap_hwmod_addr_space omap3xxx_l4_emu_addrs[] = {
2203 {
2204 .pa_start = 0x54000000,
2205 .pa_end = 0x547fffff,
2206 .flags = ADDR_TYPE_RT,
2207 },
2208 { }
2209};
2210
2211/* l3 -> debugss */
2212static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
2213 .master = &omap3xxx_l3_main_hwmod,
2214 .slave = &omap3xxx_debugss_hwmod,
Jon Hunter76a5d9b2012-09-23 17:28:30 -06002215 .addr = omap3xxx_l4_emu_addrs,
Jon Hunterc7dad45f2012-09-23 17:28:28 -06002216 .user = OCP_USER_MPU,
2217};
2218
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002219/* DSS -> l3 */
Paul Walmsleyd69dc642012-04-19 04:03:52 -06002220static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
2221 .master = &omap3430es1_dss_core_hwmod,
2222 .slave = &omap3xxx_l3_main_hwmod,
2223 .user = OCP_USER_MPU | OCP_USER_SDMA,
2224};
2225
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002226static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
2227 .master = &omap3xxx_dss_core_hwmod,
2228 .slave = &omap3xxx_l3_main_hwmod,
2229 .fw = {
2230 .omap2 = {
2231 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
2232 .flags = OMAP_FIREWALL_L3,
2233 }
2234 },
2235 .user = OCP_USER_MPU | OCP_USER_SDMA,
2236};
2237
Hema HK870ea2b2011-02-17 12:07:18 +05302238/* l3_core -> usbhsotg interface */
2239static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
2240 .master = &omap3xxx_usbhsotg_hwmod,
2241 .slave = &omap3xxx_l3_main_hwmod,
2242 .clk = "core_l3_ick",
2243 .user = OCP_USER_MPU,
2244};
Paul Walmsley73591542010-02-22 22:09:32 -07002245
Hema HK273ff8c2011-02-17 12:07:19 +05302246/* l3_core -> am35xx_usbhsotg interface */
2247static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
2248 .master = &am35xx_usbhsotg_hwmod,
2249 .slave = &omap3xxx_l3_main_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06002250 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05302251 .user = OCP_USER_MPU,
2252};
Paul Walmsley89ea2582012-06-27 14:53:46 -06002253
Tero Kristo8f993a02012-09-23 17:28:21 -06002254/* l3_core -> sad2d interface */
2255static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
2256 .master = &omap3xxx_sad2d_hwmod,
2257 .slave = &omap3xxx_l3_main_hwmod,
2258 .clk = "core_l3_ick",
2259 .user = OCP_USER_MPU,
2260};
2261
Paul Walmsley73591542010-02-22 22:09:32 -07002262/* L4_CORE -> L4_WKUP interface */
2263static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
2264 .master = &omap3xxx_l4_core_hwmod,
2265 .slave = &omap3xxx_l4_wkup_hwmod,
2266 .user = OCP_USER_MPU | OCP_USER_SDMA,
2267};
2268
Paul Walmsleyb1636052011-03-01 13:12:56 -08002269/* L4 CORE -> MMC1 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002270static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002271 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002272 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
2273 .clk = "mmchs1_ick",
2274 .addr = omap2430_mmc1_addr_space,
2275 .user = OCP_USER_MPU | OCP_USER_SDMA,
2276 .flags = OMAP_FIREWALL_L4
2277};
2278
2279static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
2280 .master = &omap3xxx_l4_core_hwmod,
2281 .slave = &omap3xxx_es3plus_mmc1_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002282 .clk = "mmchs1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002283 .addr = omap2430_mmc1_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002284 .user = OCP_USER_MPU | OCP_USER_SDMA,
2285 .flags = OMAP_FIREWALL_L4
2286};
2287
2288/* L4 CORE -> MMC2 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002289static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002290 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002291 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
2292 .clk = "mmchs2_ick",
2293 .addr = omap2430_mmc2_addr_space,
2294 .user = OCP_USER_MPU | OCP_USER_SDMA,
2295 .flags = OMAP_FIREWALL_L4
2296};
2297
2298static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2299 .master = &omap3xxx_l4_core_hwmod,
2300 .slave = &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002301 .clk = "mmchs2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002302 .addr = omap2430_mmc2_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002303 .user = OCP_USER_MPU | OCP_USER_SDMA,
2304 .flags = OMAP_FIREWALL_L4
2305};
2306
2307/* L4 CORE -> MMC3 interface */
2308static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
2309 {
2310 .pa_start = 0x480ad000,
2311 .pa_end = 0x480ad1ff,
2312 .flags = ADDR_TYPE_RT,
2313 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002314 { }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002315};
2316
2317static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2318 .master = &omap3xxx_l4_core_hwmod,
2319 .slave = &omap3xxx_mmc3_hwmod,
2320 .clk = "mmchs3_ick",
2321 .addr = omap3xxx_mmc3_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002322 .user = OCP_USER_MPU | OCP_USER_SDMA,
2323 .flags = OMAP_FIREWALL_L4
2324};
2325
Kevin Hilman046465b2010-09-27 20:19:30 +05302326/* L4 CORE -> UART1 interface */
2327static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
2328 {
2329 .pa_start = OMAP3_UART1_BASE,
2330 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
2331 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2332 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002333 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302334};
2335
2336static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2337 .master = &omap3xxx_l4_core_hwmod,
2338 .slave = &omap3xxx_uart1_hwmod,
2339 .clk = "uart1_ick",
2340 .addr = omap3xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302341 .user = OCP_USER_MPU | OCP_USER_SDMA,
2342};
2343
2344/* L4 CORE -> UART2 interface */
2345static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
2346 {
2347 .pa_start = OMAP3_UART2_BASE,
2348 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
2349 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2350 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002351 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302352};
2353
2354static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2355 .master = &omap3xxx_l4_core_hwmod,
2356 .slave = &omap3xxx_uart2_hwmod,
2357 .clk = "uart2_ick",
2358 .addr = omap3xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302359 .user = OCP_USER_MPU | OCP_USER_SDMA,
2360};
2361
2362/* L4 PER -> UART3 interface */
2363static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
2364 {
2365 .pa_start = OMAP3_UART3_BASE,
2366 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
2367 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2368 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002369 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302370};
2371
2372static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2373 .master = &omap3xxx_l4_per_hwmod,
2374 .slave = &omap3xxx_uart3_hwmod,
2375 .clk = "uart3_ick",
2376 .addr = omap3xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302377 .user = OCP_USER_MPU | OCP_USER_SDMA,
2378};
2379
2380/* L4 PER -> UART4 interface */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002381static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302382 {
2383 .pa_start = OMAP3_UART4_BASE,
2384 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
2385 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2386 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002387 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302388};
2389
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002390static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302391 .master = &omap3xxx_l4_per_hwmod,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002392 .slave = &omap36xx_uart4_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05302393 .clk = "uart4_ick",
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002394 .addr = omap36xx_uart4_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302395 .user = OCP_USER_MPU | OCP_USER_SDMA,
2396};
2397
Kyle Manna4bf90f62011-10-18 13:47:41 -05002398/* AM35xx: L4 CORE -> UART4 interface */
2399static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
2400 {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002401 .pa_start = OMAP3_UART4_AM35XX_BASE,
2402 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
2403 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002404 },
Paul Walmsleybf765232012-06-27 14:53:46 -06002405 { }
Kyle Manna4bf90f62011-10-18 13:47:41 -05002406};
2407
2408static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002409 .master = &omap3xxx_l4_core_hwmod,
2410 .slave = &am35xx_uart4_hwmod,
2411 .clk = "uart4_ick",
2412 .addr = am35xx_uart4_addr_space,
2413 .user = OCP_USER_MPU | OCP_USER_SDMA,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002414};
2415
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302416/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302417static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2418 .master = &omap3xxx_l4_core_hwmod,
2419 .slave = &omap3xxx_i2c1_hwmod,
2420 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002421 .addr = omap2_i2c1_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302422 .fw = {
2423 .omap2 = {
2424 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2425 .l4_prot_group = 7,
2426 .flags = OMAP_FIREWALL_L4,
2427 }
2428 },
2429 .user = OCP_USER_MPU | OCP_USER_SDMA,
2430};
2431
2432/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302433static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2434 .master = &omap3xxx_l4_core_hwmod,
2435 .slave = &omap3xxx_i2c2_hwmod,
2436 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002437 .addr = omap2_i2c2_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302438 .fw = {
2439 .omap2 = {
2440 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2441 .l4_prot_group = 7,
2442 .flags = OMAP_FIREWALL_L4,
2443 }
2444 },
2445 .user = OCP_USER_MPU | OCP_USER_SDMA,
2446};
2447
2448/* L4 CORE -> I2C3 interface */
2449static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
2450 {
2451 .pa_start = 0x48060000,
Paul Walmsleyded11382011-07-09 19:14:06 -06002452 .pa_end = 0x48060000 + SZ_128 - 1,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302453 .flags = ADDR_TYPE_RT,
2454 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002455 { }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302456};
2457
2458static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2459 .master = &omap3xxx_l4_core_hwmod,
2460 .slave = &omap3xxx_i2c3_hwmod,
2461 .clk = "i2c3_ick",
2462 .addr = omap3xxx_i2c3_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302463 .fw = {
2464 .omap2 = {
2465 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2466 .l4_prot_group = 7,
2467 .flags = OMAP_FIREWALL_L4,
2468 }
2469 },
2470 .user = OCP_USER_MPU | OCP_USER_SDMA,
2471};
2472
Thara Gopinathd3442722010-05-29 22:02:24 +05302473/* L4 CORE -> SR1 interface */
2474static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
2475 {
2476 .pa_start = OMAP34XX_SR1_BASE,
2477 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2478 .flags = ADDR_TYPE_RT,
2479 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002480 { }
Thara Gopinathd3442722010-05-29 22:02:24 +05302481};
2482
Paul Walmsley844a3b62012-04-19 04:04:33 -06002483static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302484 .master = &omap3xxx_l4_core_hwmod,
2485 .slave = &omap34xx_sr1_hwmod,
2486 .clk = "sr_l4_ick",
2487 .addr = omap3_sr1_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302488 .user = OCP_USER_MPU,
2489};
2490
Paul Walmsley844a3b62012-04-19 04:04:33 -06002491static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2492 .master = &omap3xxx_l4_core_hwmod,
2493 .slave = &omap36xx_sr1_hwmod,
2494 .clk = "sr_l4_ick",
2495 .addr = omap3_sr1_addr_space,
2496 .user = OCP_USER_MPU,
2497};
2498
Thara Gopinathd3442722010-05-29 22:02:24 +05302499/* L4 CORE -> SR1 interface */
2500static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2501 {
2502 .pa_start = OMAP34XX_SR2_BASE,
2503 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2504 .flags = ADDR_TYPE_RT,
2505 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002506 { }
Thara Gopinathd3442722010-05-29 22:02:24 +05302507};
2508
Paul Walmsley844a3b62012-04-19 04:04:33 -06002509static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302510 .master = &omap3xxx_l4_core_hwmod,
2511 .slave = &omap34xx_sr2_hwmod,
2512 .clk = "sr_l4_ick",
2513 .addr = omap3_sr2_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302514 .user = OCP_USER_MPU,
2515};
2516
Paul Walmsley844a3b62012-04-19 04:04:33 -06002517static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2518 .master = &omap3xxx_l4_core_hwmod,
2519 .slave = &omap36xx_sr2_hwmod,
2520 .clk = "sr_l4_ick",
2521 .addr = omap3_sr2_addr_space,
2522 .user = OCP_USER_MPU,
2523};
Hema HK870ea2b2011-02-17 12:07:18 +05302524
2525static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
2526 {
2527 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
2528 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
2529 .flags = ADDR_TYPE_RT
2530 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002531 { }
Hema HK870ea2b2011-02-17 12:07:18 +05302532};
2533
2534/* l4_core -> usbhsotg */
2535static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2536 .master = &omap3xxx_l4_core_hwmod,
2537 .slave = &omap3xxx_usbhsotg_hwmod,
2538 .clk = "l4_ick",
2539 .addr = omap3xxx_usbhsotg_addrs,
Hema HK870ea2b2011-02-17 12:07:18 +05302540 .user = OCP_USER_MPU,
2541};
2542
Hema HK273ff8c2011-02-17 12:07:19 +05302543static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
2544 {
2545 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
2546 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
2547 .flags = ADDR_TYPE_RT
2548 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002549 { }
Hema HK273ff8c2011-02-17 12:07:19 +05302550};
2551
2552/* l4_core -> usbhsotg */
2553static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2554 .master = &omap3xxx_l4_core_hwmod,
2555 .slave = &am35xx_usbhsotg_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06002556 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05302557 .addr = am35xx_usbhsotg_addrs,
Hema HK273ff8c2011-02-17 12:07:19 +05302558 .user = OCP_USER_MPU,
2559};
2560
Paul Walmsley43085702012-04-19 04:03:53 -06002561/* L4_WKUP -> L4_SEC interface */
2562static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2563 .master = &omap3xxx_l4_wkup_hwmod,
2564 .slave = &omap3xxx_l4_sec_hwmod,
2565 .user = OCP_USER_MPU | OCP_USER_SDMA,
2566};
2567
Kevin Hilman540064b2010-07-26 16:34:32 -06002568/* IVA2 <- L3 interface */
2569static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2570 .master = &omap3xxx_l3_main_hwmod,
2571 .slave = &omap3xxx_iva_hwmod,
Paul Walmsley064931a2012-04-19 04:04:35 -06002572 .clk = "core_l3_ick",
Kevin Hilman540064b2010-07-26 16:34:32 -06002573 .user = OCP_USER_MPU | OCP_USER_SDMA,
2574};
2575
Thara Gopinathce722d22011-02-23 00:14:05 -07002576static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
2577 {
2578 .pa_start = 0x48318000,
2579 .pa_end = 0x48318000 + SZ_1K - 1,
2580 .flags = ADDR_TYPE_RT
2581 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002582 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002583};
2584
2585/* l4_wkup -> timer1 */
2586static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2587 .master = &omap3xxx_l4_wkup_hwmod,
2588 .slave = &omap3xxx_timer1_hwmod,
2589 .clk = "gpt1_ick",
2590 .addr = omap3xxx_timer1_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002591 .user = OCP_USER_MPU | OCP_USER_SDMA,
2592};
2593
Thara Gopinathce722d22011-02-23 00:14:05 -07002594static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
2595 {
2596 .pa_start = 0x49032000,
2597 .pa_end = 0x49032000 + SZ_1K - 1,
2598 .flags = ADDR_TYPE_RT
2599 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002600 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002601};
2602
2603/* l4_per -> timer2 */
2604static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2605 .master = &omap3xxx_l4_per_hwmod,
2606 .slave = &omap3xxx_timer2_hwmod,
2607 .clk = "gpt2_ick",
2608 .addr = omap3xxx_timer2_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002609 .user = OCP_USER_MPU | OCP_USER_SDMA,
2610};
2611
Thara Gopinathce722d22011-02-23 00:14:05 -07002612static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
2613 {
2614 .pa_start = 0x49034000,
2615 .pa_end = 0x49034000 + SZ_1K - 1,
2616 .flags = ADDR_TYPE_RT
2617 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002618 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002619};
2620
2621/* l4_per -> timer3 */
2622static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2623 .master = &omap3xxx_l4_per_hwmod,
2624 .slave = &omap3xxx_timer3_hwmod,
2625 .clk = "gpt3_ick",
2626 .addr = omap3xxx_timer3_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002627 .user = OCP_USER_MPU | OCP_USER_SDMA,
2628};
2629
Thara Gopinathce722d22011-02-23 00:14:05 -07002630static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
2631 {
2632 .pa_start = 0x49036000,
2633 .pa_end = 0x49036000 + SZ_1K - 1,
2634 .flags = ADDR_TYPE_RT
2635 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002636 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002637};
2638
2639/* l4_per -> timer4 */
2640static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2641 .master = &omap3xxx_l4_per_hwmod,
2642 .slave = &omap3xxx_timer4_hwmod,
2643 .clk = "gpt4_ick",
2644 .addr = omap3xxx_timer4_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002645 .user = OCP_USER_MPU | OCP_USER_SDMA,
2646};
2647
Thara Gopinathce722d22011-02-23 00:14:05 -07002648static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
2649 {
2650 .pa_start = 0x49038000,
2651 .pa_end = 0x49038000 + SZ_1K - 1,
2652 .flags = ADDR_TYPE_RT
2653 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002654 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002655};
2656
2657/* l4_per -> timer5 */
2658static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2659 .master = &omap3xxx_l4_per_hwmod,
2660 .slave = &omap3xxx_timer5_hwmod,
2661 .clk = "gpt5_ick",
2662 .addr = omap3xxx_timer5_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002663 .user = OCP_USER_MPU | OCP_USER_SDMA,
2664};
2665
Thara Gopinathce722d22011-02-23 00:14:05 -07002666static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
2667 {
2668 .pa_start = 0x4903A000,
2669 .pa_end = 0x4903A000 + SZ_1K - 1,
2670 .flags = ADDR_TYPE_RT
2671 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002672 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002673};
2674
2675/* l4_per -> timer6 */
2676static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2677 .master = &omap3xxx_l4_per_hwmod,
2678 .slave = &omap3xxx_timer6_hwmod,
2679 .clk = "gpt6_ick",
2680 .addr = omap3xxx_timer6_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002681 .user = OCP_USER_MPU | OCP_USER_SDMA,
2682};
2683
Thara Gopinathce722d22011-02-23 00:14:05 -07002684static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
2685 {
2686 .pa_start = 0x4903C000,
2687 .pa_end = 0x4903C000 + SZ_1K - 1,
2688 .flags = ADDR_TYPE_RT
2689 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002690 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002691};
2692
2693/* l4_per -> timer7 */
2694static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2695 .master = &omap3xxx_l4_per_hwmod,
2696 .slave = &omap3xxx_timer7_hwmod,
2697 .clk = "gpt7_ick",
2698 .addr = omap3xxx_timer7_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002699 .user = OCP_USER_MPU | OCP_USER_SDMA,
2700};
2701
Thara Gopinathce722d22011-02-23 00:14:05 -07002702static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
2703 {
2704 .pa_start = 0x4903E000,
2705 .pa_end = 0x4903E000 + SZ_1K - 1,
2706 .flags = ADDR_TYPE_RT
2707 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002708 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002709};
2710
2711/* l4_per -> timer8 */
2712static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2713 .master = &omap3xxx_l4_per_hwmod,
2714 .slave = &omap3xxx_timer8_hwmod,
2715 .clk = "gpt8_ick",
2716 .addr = omap3xxx_timer8_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002717 .user = OCP_USER_MPU | OCP_USER_SDMA,
2718};
2719
Thara Gopinathce722d22011-02-23 00:14:05 -07002720static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
2721 {
2722 .pa_start = 0x49040000,
2723 .pa_end = 0x49040000 + SZ_1K - 1,
2724 .flags = ADDR_TYPE_RT
2725 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002726 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002727};
2728
2729/* l4_per -> timer9 */
2730static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2731 .master = &omap3xxx_l4_per_hwmod,
2732 .slave = &omap3xxx_timer9_hwmod,
2733 .clk = "gpt9_ick",
2734 .addr = omap3xxx_timer9_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002735 .user = OCP_USER_MPU | OCP_USER_SDMA,
2736};
2737
Thara Gopinathce722d22011-02-23 00:14:05 -07002738/* l4_core -> timer10 */
2739static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2740 .master = &omap3xxx_l4_core_hwmod,
2741 .slave = &omap3xxx_timer10_hwmod,
2742 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002743 .addr = omap2_timer10_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002744 .user = OCP_USER_MPU | OCP_USER_SDMA,
2745};
2746
Thara Gopinathce722d22011-02-23 00:14:05 -07002747/* l4_core -> timer11 */
2748static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2749 .master = &omap3xxx_l4_core_hwmod,
2750 .slave = &omap3xxx_timer11_hwmod,
2751 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002752 .addr = omap2_timer11_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002753 .user = OCP_USER_MPU | OCP_USER_SDMA,
2754};
2755
Thara Gopinathce722d22011-02-23 00:14:05 -07002756static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
2757 {
2758 .pa_start = 0x48304000,
2759 .pa_end = 0x48304000 + SZ_1K - 1,
2760 .flags = ADDR_TYPE_RT
2761 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002762 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002763};
2764
2765/* l4_core -> timer12 */
Paul Walmsley43085702012-04-19 04:03:53 -06002766static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2767 .master = &omap3xxx_l4_sec_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07002768 .slave = &omap3xxx_timer12_hwmod,
2769 .clk = "gpt12_ick",
2770 .addr = omap3xxx_timer12_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002771 .user = OCP_USER_MPU | OCP_USER_SDMA,
2772};
2773
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302774/* l4_wkup -> wd_timer2 */
2775static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
2776 {
2777 .pa_start = 0x48314000,
2778 .pa_end = 0x4831407f,
2779 .flags = ADDR_TYPE_RT
2780 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002781 { }
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302782};
2783
2784static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2785 .master = &omap3xxx_l4_wkup_hwmod,
2786 .slave = &omap3xxx_wd_timer2_hwmod,
2787 .clk = "wdt2_ick",
2788 .addr = omap3xxx_wd_timer2_addrs,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302789 .user = OCP_USER_MPU | OCP_USER_SDMA,
2790};
2791
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002792/* l4_core -> dss */
2793static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2794 .master = &omap3xxx_l4_core_hwmod,
2795 .slave = &omap3430es1_dss_core_hwmod,
2796 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002797 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002798 .fw = {
2799 .omap2 = {
2800 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2801 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2802 .flags = OMAP_FIREWALL_L4,
2803 }
2804 },
2805 .user = OCP_USER_MPU | OCP_USER_SDMA,
2806};
2807
2808static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2809 .master = &omap3xxx_l4_core_hwmod,
2810 .slave = &omap3xxx_dss_core_hwmod,
2811 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002812 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002813 .fw = {
2814 .omap2 = {
2815 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2816 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2817 .flags = OMAP_FIREWALL_L4,
2818 }
2819 },
2820 .user = OCP_USER_MPU | OCP_USER_SDMA,
2821};
2822
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002823/* l4_core -> dss_dispc */
2824static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2825 .master = &omap3xxx_l4_core_hwmod,
2826 .slave = &omap3xxx_dss_dispc_hwmod,
2827 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002828 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002829 .fw = {
2830 .omap2 = {
2831 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2832 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2833 .flags = OMAP_FIREWALL_L4,
2834 }
2835 },
2836 .user = OCP_USER_MPU | OCP_USER_SDMA,
2837};
2838
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002839static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
2840 {
2841 .pa_start = 0x4804FC00,
2842 .pa_end = 0x4804FFFF,
2843 .flags = ADDR_TYPE_RT
2844 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002845 { }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002846};
2847
2848/* l4_core -> dss_dsi1 */
2849static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2850 .master = &omap3xxx_l4_core_hwmod,
2851 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002852 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002853 .addr = omap3xxx_dss_dsi1_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002854 .fw = {
2855 .omap2 = {
2856 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2857 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2858 .flags = OMAP_FIREWALL_L4,
2859 }
2860 },
2861 .user = OCP_USER_MPU | OCP_USER_SDMA,
2862};
2863
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002864/* l4_core -> dss_rfbi */
2865static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2866 .master = &omap3xxx_l4_core_hwmod,
2867 .slave = &omap3xxx_dss_rfbi_hwmod,
2868 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002869 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002870 .fw = {
2871 .omap2 = {
2872 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2873 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2874 .flags = OMAP_FIREWALL_L4,
2875 }
2876 },
2877 .user = OCP_USER_MPU | OCP_USER_SDMA,
2878};
2879
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002880/* l4_core -> dss_venc */
2881static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2882 .master = &omap3xxx_l4_core_hwmod,
2883 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002884 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002885 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002886 .fw = {
2887 .omap2 = {
2888 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2889 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2890 .flags = OMAP_FIREWALL_L4,
2891 }
2892 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06002893 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002894 .user = OCP_USER_MPU | OCP_USER_SDMA,
2895};
2896
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002897/* l4_wkup -> gpio1 */
2898static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2899 {
2900 .pa_start = 0x48310000,
2901 .pa_end = 0x483101ff,
2902 .flags = ADDR_TYPE_RT
2903 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002904 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002905};
2906
2907static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2908 .master = &omap3xxx_l4_wkup_hwmod,
2909 .slave = &omap3xxx_gpio1_hwmod,
2910 .addr = omap3xxx_gpio1_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002911 .user = OCP_USER_MPU | OCP_USER_SDMA,
2912};
2913
2914/* l4_per -> gpio2 */
2915static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2916 {
2917 .pa_start = 0x49050000,
2918 .pa_end = 0x490501ff,
2919 .flags = ADDR_TYPE_RT
2920 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002921 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002922};
2923
2924static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2925 .master = &omap3xxx_l4_per_hwmod,
2926 .slave = &omap3xxx_gpio2_hwmod,
2927 .addr = omap3xxx_gpio2_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002928 .user = OCP_USER_MPU | OCP_USER_SDMA,
2929};
2930
2931/* l4_per -> gpio3 */
2932static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2933 {
2934 .pa_start = 0x49052000,
2935 .pa_end = 0x490521ff,
2936 .flags = ADDR_TYPE_RT
2937 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002938 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002939};
2940
2941static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2942 .master = &omap3xxx_l4_per_hwmod,
2943 .slave = &omap3xxx_gpio3_hwmod,
2944 .addr = omap3xxx_gpio3_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002945 .user = OCP_USER_MPU | OCP_USER_SDMA,
2946};
2947
Paul Walmsley54864742012-09-23 17:28:23 -06002948/*
2949 * 'mmu' class
2950 * The memory management unit performs virtual to physical address translation
2951 * for its requestors.
2952 */
2953
2954static struct omap_hwmod_class_sysconfig mmu_sysc = {
2955 .rev_offs = 0x000,
2956 .sysc_offs = 0x010,
2957 .syss_offs = 0x014,
2958 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2959 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2960 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2961 .sysc_fields = &omap_hwmod_sysc_type1,
2962};
2963
2964static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2965 .name = "mmu",
2966 .sysc = &mmu_sysc,
2967};
2968
2969/* mmu isp */
2970
2971static struct omap_mmu_dev_attr mmu_isp_dev_attr = {
2972 .da_start = 0x0,
2973 .da_end = 0xfffff000,
2974 .nr_tlb_entries = 8,
2975};
2976
2977static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
2978static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = {
2979 { .irq = 24 },
2980 { .irq = -1 }
2981};
2982
2983static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = {
2984 {
2985 .pa_start = 0x480bd400,
2986 .pa_end = 0x480bd47f,
2987 .flags = ADDR_TYPE_RT,
2988 },
2989 { }
2990};
2991
2992/* l4_core -> mmu isp */
2993static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
2994 .master = &omap3xxx_l4_core_hwmod,
2995 .slave = &omap3xxx_mmu_isp_hwmod,
2996 .addr = omap3xxx_mmu_isp_addrs,
2997 .user = OCP_USER_MPU | OCP_USER_SDMA,
2998};
2999
3000static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
3001 .name = "mmu_isp",
3002 .class = &omap3xxx_mmu_hwmod_class,
3003 .mpu_irqs = omap3xxx_mmu_isp_irqs,
3004 .main_clk = "cam_ick",
3005 .dev_attr = &mmu_isp_dev_attr,
3006 .flags = HWMOD_NO_IDLEST,
3007};
3008
3009#ifdef CONFIG_OMAP_IOMMU_IVA2
3010
3011/* mmu iva */
3012
3013static struct omap_mmu_dev_attr mmu_iva_dev_attr = {
3014 .da_start = 0x11000000,
3015 .da_end = 0xfffff000,
3016 .nr_tlb_entries = 32,
3017};
3018
3019static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
3020static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = {
3021 { .irq = 28 },
3022 { .irq = -1 }
3023};
3024
3025static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
3026 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
3027};
3028
3029static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = {
3030 {
3031 .pa_start = 0x5d000000,
3032 .pa_end = 0x5d00007f,
3033 .flags = ADDR_TYPE_RT,
3034 },
3035 { }
3036};
3037
3038/* l3_main -> iva mmu */
3039static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
3040 .master = &omap3xxx_l3_main_hwmod,
3041 .slave = &omap3xxx_mmu_iva_hwmod,
3042 .addr = omap3xxx_mmu_iva_addrs,
3043 .user = OCP_USER_MPU | OCP_USER_SDMA,
3044};
3045
3046static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
3047 .name = "mmu_iva",
3048 .class = &omap3xxx_mmu_hwmod_class,
3049 .mpu_irqs = omap3xxx_mmu_iva_irqs,
3050 .rst_lines = omap3xxx_mmu_iva_resets,
3051 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
3052 .main_clk = "iva2_ck",
3053 .prcm = {
3054 .omap2 = {
3055 .module_offs = OMAP3430_IVA2_MOD,
3056 },
3057 },
3058 .dev_attr = &mmu_iva_dev_attr,
3059 .flags = HWMOD_NO_IDLEST,
3060};
3061
3062#endif
3063
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003064/* l4_per -> gpio4 */
3065static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
3066 {
3067 .pa_start = 0x49054000,
3068 .pa_end = 0x490541ff,
3069 .flags = ADDR_TYPE_RT
3070 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003071 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003072};
3073
3074static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
3075 .master = &omap3xxx_l4_per_hwmod,
3076 .slave = &omap3xxx_gpio4_hwmod,
3077 .addr = omap3xxx_gpio4_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003078 .user = OCP_USER_MPU | OCP_USER_SDMA,
3079};
3080
3081/* l4_per -> gpio5 */
3082static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
3083 {
3084 .pa_start = 0x49056000,
3085 .pa_end = 0x490561ff,
3086 .flags = ADDR_TYPE_RT
3087 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003088 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003089};
3090
3091static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
3092 .master = &omap3xxx_l4_per_hwmod,
3093 .slave = &omap3xxx_gpio5_hwmod,
3094 .addr = omap3xxx_gpio5_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003095 .user = OCP_USER_MPU | OCP_USER_SDMA,
3096};
3097
3098/* l4_per -> gpio6 */
3099static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
3100 {
3101 .pa_start = 0x49058000,
3102 .pa_end = 0x490581ff,
3103 .flags = ADDR_TYPE_RT
3104 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003105 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003106};
3107
3108static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
3109 .master = &omap3xxx_l4_per_hwmod,
3110 .slave = &omap3xxx_gpio6_hwmod,
3111 .addr = omap3xxx_gpio6_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003112 .user = OCP_USER_MPU | OCP_USER_SDMA,
3113};
3114
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003115/* dma_system -> L3 */
3116static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
3117 .master = &omap3xxx_dma_system_hwmod,
3118 .slave = &omap3xxx_l3_main_hwmod,
3119 .clk = "core_l3_ick",
3120 .user = OCP_USER_MPU | OCP_USER_SDMA,
3121};
3122
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003123static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
3124 {
3125 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06003126 .pa_end = 0x48056fff,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003127 .flags = ADDR_TYPE_RT
3128 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003129 { }
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003130};
3131
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003132/* l4_cfg -> dma_system */
3133static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
3134 .master = &omap3xxx_l4_core_hwmod,
3135 .slave = &omap3xxx_dma_system_hwmod,
3136 .clk = "core_l4_ick",
3137 .addr = omap3xxx_dma_system_addrs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003138 .user = OCP_USER_MPU | OCP_USER_SDMA,
3139};
3140
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303141static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
3142 {
3143 .name = "mpu",
3144 .pa_start = 0x48074000,
3145 .pa_end = 0x480740ff,
3146 .flags = ADDR_TYPE_RT
3147 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003148 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303149};
3150
3151/* l4_core -> mcbsp1 */
3152static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
3153 .master = &omap3xxx_l4_core_hwmod,
3154 .slave = &omap3xxx_mcbsp1_hwmod,
3155 .clk = "mcbsp1_ick",
3156 .addr = omap3xxx_mcbsp1_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303157 .user = OCP_USER_MPU | OCP_USER_SDMA,
3158};
3159
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303160static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
3161 {
3162 .name = "mpu",
3163 .pa_start = 0x49022000,
3164 .pa_end = 0x490220ff,
3165 .flags = ADDR_TYPE_RT
3166 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003167 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303168};
3169
3170/* l4_per -> mcbsp2 */
3171static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
3172 .master = &omap3xxx_l4_per_hwmod,
3173 .slave = &omap3xxx_mcbsp2_hwmod,
3174 .clk = "mcbsp2_ick",
3175 .addr = omap3xxx_mcbsp2_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303176 .user = OCP_USER_MPU | OCP_USER_SDMA,
3177};
3178
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303179static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
3180 {
3181 .name = "mpu",
3182 .pa_start = 0x49024000,
3183 .pa_end = 0x490240ff,
3184 .flags = ADDR_TYPE_RT
3185 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003186 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303187};
3188
3189/* l4_per -> mcbsp3 */
3190static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
3191 .master = &omap3xxx_l4_per_hwmod,
3192 .slave = &omap3xxx_mcbsp3_hwmod,
3193 .clk = "mcbsp3_ick",
3194 .addr = omap3xxx_mcbsp3_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303195 .user = OCP_USER_MPU | OCP_USER_SDMA,
3196};
3197
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303198static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
3199 {
3200 .name = "mpu",
3201 .pa_start = 0x49026000,
3202 .pa_end = 0x490260ff,
3203 .flags = ADDR_TYPE_RT
3204 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003205 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303206};
3207
3208/* l4_per -> mcbsp4 */
3209static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
3210 .master = &omap3xxx_l4_per_hwmod,
3211 .slave = &omap3xxx_mcbsp4_hwmod,
3212 .clk = "mcbsp4_ick",
3213 .addr = omap3xxx_mcbsp4_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303214 .user = OCP_USER_MPU | OCP_USER_SDMA,
3215};
3216
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303217static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
3218 {
3219 .name = "mpu",
3220 .pa_start = 0x48096000,
3221 .pa_end = 0x480960ff,
3222 .flags = ADDR_TYPE_RT
3223 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003224 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303225};
3226
3227/* l4_core -> mcbsp5 */
3228static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
3229 .master = &omap3xxx_l4_core_hwmod,
3230 .slave = &omap3xxx_mcbsp5_hwmod,
3231 .clk = "mcbsp5_ick",
3232 .addr = omap3xxx_mcbsp5_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303233 .user = OCP_USER_MPU | OCP_USER_SDMA,
3234};
3235
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303236static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
3237 {
3238 .name = "sidetone",
3239 .pa_start = 0x49028000,
3240 .pa_end = 0x490280ff,
3241 .flags = ADDR_TYPE_RT
3242 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003243 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303244};
3245
3246/* l4_per -> mcbsp2_sidetone */
3247static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
3248 .master = &omap3xxx_l4_per_hwmod,
3249 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
3250 .clk = "mcbsp2_ick",
3251 .addr = omap3xxx_mcbsp2_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303252 .user = OCP_USER_MPU,
3253};
3254
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303255static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
3256 {
3257 .name = "sidetone",
3258 .pa_start = 0x4902A000,
3259 .pa_end = 0x4902A0ff,
3260 .flags = ADDR_TYPE_RT
3261 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003262 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303263};
3264
3265/* l4_per -> mcbsp3_sidetone */
3266static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
3267 .master = &omap3xxx_l4_per_hwmod,
3268 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
3269 .clk = "mcbsp3_ick",
3270 .addr = omap3xxx_mcbsp3_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303271 .user = OCP_USER_MPU,
3272};
3273
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003274static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
3275 {
3276 .pa_start = 0x48094000,
3277 .pa_end = 0x480941ff,
3278 .flags = ADDR_TYPE_RT,
3279 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003280 { }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003281};
3282
3283/* l4_core -> mailbox */
3284static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
3285 .master = &omap3xxx_l4_core_hwmod,
3286 .slave = &omap3xxx_mailbox_hwmod,
3287 .addr = omap3xxx_mailbox_addrs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003288 .user = OCP_USER_MPU | OCP_USER_SDMA,
3289};
3290
Charulatha V0f616a42011-02-17 09:53:10 -08003291/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003292static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
3293 .master = &omap3xxx_l4_core_hwmod,
3294 .slave = &omap34xx_mcspi1,
3295 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003296 .addr = omap2_mcspi1_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003297 .user = OCP_USER_MPU | OCP_USER_SDMA,
3298};
3299
3300/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003301static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
3302 .master = &omap3xxx_l4_core_hwmod,
3303 .slave = &omap34xx_mcspi2,
3304 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003305 .addr = omap2_mcspi2_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003306 .user = OCP_USER_MPU | OCP_USER_SDMA,
3307};
3308
3309/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003310static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
3311 .master = &omap3xxx_l4_core_hwmod,
3312 .slave = &omap34xx_mcspi3,
3313 .clk = "mcspi3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003314 .addr = omap2430_mcspi3_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003315 .user = OCP_USER_MPU | OCP_USER_SDMA,
3316};
3317
3318/* l4 core -> mcspi4 interface */
3319static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
3320 {
3321 .pa_start = 0x480ba000,
3322 .pa_end = 0x480ba0ff,
3323 .flags = ADDR_TYPE_RT,
3324 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003325 { }
Charulatha V0f616a42011-02-17 09:53:10 -08003326};
3327
3328static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3329 .master = &omap3xxx_l4_core_hwmod,
3330 .slave = &omap34xx_mcspi4,
3331 .clk = "mcspi4_ick",
3332 .addr = omap34xx_mcspi4_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003333 .user = OCP_USER_MPU | OCP_USER_SDMA,
3334};
3335
Keshava Munegowdade231382011-12-15 23:14:44 -07003336static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3337 .master = &omap3xxx_usb_host_hs_hwmod,
3338 .slave = &omap3xxx_l3_main_hwmod,
3339 .clk = "core_l3_ick",
3340 .user = OCP_USER_MPU,
3341};
3342
Keshava Munegowdade231382011-12-15 23:14:44 -07003343static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3344 {
3345 .name = "uhh",
3346 .pa_start = 0x48064000,
3347 .pa_end = 0x480643ff,
3348 .flags = ADDR_TYPE_RT
3349 },
3350 {
3351 .name = "ohci",
3352 .pa_start = 0x48064400,
3353 .pa_end = 0x480647ff,
3354 },
3355 {
3356 .name = "ehci",
3357 .pa_start = 0x48064800,
3358 .pa_end = 0x48064cff,
3359 },
3360 {}
3361};
3362
3363static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3364 .master = &omap3xxx_l4_core_hwmod,
3365 .slave = &omap3xxx_usb_host_hs_hwmod,
3366 .clk = "usbhost_ick",
3367 .addr = omap3xxx_usb_host_hs_addrs,
3368 .user = OCP_USER_MPU | OCP_USER_SDMA,
3369};
3370
Keshava Munegowdade231382011-12-15 23:14:44 -07003371static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3372 {
3373 .name = "tll",
3374 .pa_start = 0x48062000,
3375 .pa_end = 0x48062fff,
3376 .flags = ADDR_TYPE_RT
3377 },
3378 {}
3379};
3380
3381static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3382 .master = &omap3xxx_l4_core_hwmod,
3383 .slave = &omap3xxx_usb_tll_hs_hwmod,
3384 .clk = "usbtll_ick",
3385 .addr = omap3xxx_usb_tll_hs_addrs,
3386 .user = OCP_USER_MPU | OCP_USER_SDMA,
3387};
3388
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003389/* l4_core -> hdq1w interface */
3390static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
3391 .master = &omap3xxx_l4_core_hwmod,
3392 .slave = &omap3xxx_hdq1w_hwmod,
3393 .clk = "hdq_ick",
3394 .addr = omap2_hdq1w_addr_space,
3395 .user = OCP_USER_MPU | OCP_USER_SDMA,
3396 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
3397};
3398
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06003399/* l4_wkup -> 32ksync_counter */
3400static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
3401 {
3402 .pa_start = 0x48320000,
3403 .pa_end = 0x4832001f,
3404 .flags = ADDR_TYPE_RT
3405 },
3406 { }
3407};
3408
Afzal Mohammed49484a62012-09-23 17:28:24 -06003409static struct omap_hwmod_addr_space omap3xxx_gpmc_addrs[] = {
3410 {
3411 .pa_start = 0x6e000000,
3412 .pa_end = 0x6e000fff,
3413 .flags = ADDR_TYPE_RT
3414 },
3415 { }
3416};
3417
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06003418static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
3419 .master = &omap3xxx_l4_wkup_hwmod,
3420 .slave = &omap3xxx_counter_32k_hwmod,
3421 .clk = "omap_32ksync_ick",
3422 .addr = omap3xxx_counter_32k_addrs,
3423 .user = OCP_USER_MPU | OCP_USER_SDMA,
3424};
3425
Mark A. Greer31ba8802012-06-27 14:59:57 -06003426/* am35xx has Davinci MDIO & EMAC */
3427static struct omap_hwmod_class am35xx_mdio_class = {
3428 .name = "davinci_mdio",
3429};
3430
3431static struct omap_hwmod am35xx_mdio_hwmod = {
3432 .name = "davinci_mdio",
3433 .class = &am35xx_mdio_class,
3434 .flags = HWMOD_NO_IDLEST,
3435};
3436
3437/*
3438 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
3439 * but this will probably require some additional hwmod core support,
3440 * so is left as a future to-do item.
3441 */
3442static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
3443 .master = &am35xx_mdio_hwmod,
3444 .slave = &omap3xxx_l3_main_hwmod,
3445 .clk = "emac_fck",
3446 .user = OCP_USER_MPU,
3447};
3448
3449static struct omap_hwmod_addr_space am35xx_mdio_addrs[] = {
3450 {
3451 .pa_start = AM35XX_IPSS_MDIO_BASE,
3452 .pa_end = AM35XX_IPSS_MDIO_BASE + SZ_4K - 1,
3453 .flags = ADDR_TYPE_RT,
3454 },
3455 { }
3456};
3457
3458/* l4_core -> davinci mdio */
3459/*
3460 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
3461 * but this will probably require some additional hwmod core support,
3462 * so is left as a future to-do item.
3463 */
3464static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
3465 .master = &omap3xxx_l4_core_hwmod,
3466 .slave = &am35xx_mdio_hwmod,
3467 .clk = "emac_fck",
3468 .addr = am35xx_mdio_addrs,
3469 .user = OCP_USER_MPU,
3470};
3471
3472static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07003473 { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
3474 { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
3475 { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
3476 { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
3477 { .irq = -1 },
Mark A. Greer31ba8802012-06-27 14:59:57 -06003478};
3479
3480static struct omap_hwmod_class am35xx_emac_class = {
3481 .name = "davinci_emac",
3482};
3483
3484static struct omap_hwmod am35xx_emac_hwmod = {
3485 .name = "davinci_emac",
3486 .mpu_irqs = am35xx_emac_mpu_irqs,
3487 .class = &am35xx_emac_class,
3488 .flags = HWMOD_NO_IDLEST,
3489};
3490
3491/* l3_core -> davinci emac interface */
3492/*
3493 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
3494 * but this will probably require some additional hwmod core support,
3495 * so is left as a future to-do item.
3496 */
3497static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
3498 .master = &am35xx_emac_hwmod,
3499 .slave = &omap3xxx_l3_main_hwmod,
3500 .clk = "emac_ick",
3501 .user = OCP_USER_MPU,
3502};
3503
3504static struct omap_hwmod_addr_space am35xx_emac_addrs[] = {
3505 {
3506 .pa_start = AM35XX_IPSS_EMAC_BASE,
3507 .pa_end = AM35XX_IPSS_EMAC_BASE + 0x30000 - 1,
3508 .flags = ADDR_TYPE_RT,
3509 },
3510 { }
3511};
3512
3513/* l4_core -> davinci emac */
3514/*
3515 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
3516 * but this will probably require some additional hwmod core support,
3517 * so is left as a future to-do item.
3518 */
3519static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
3520 .master = &omap3xxx_l4_core_hwmod,
3521 .slave = &am35xx_emac_hwmod,
3522 .clk = "emac_ick",
3523 .addr = am35xx_emac_addrs,
3524 .user = OCP_USER_MPU,
3525};
3526
Afzal Mohammed49484a62012-09-23 17:28:24 -06003527static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
3528 .master = &omap3xxx_l3_main_hwmod,
3529 .slave = &omap3xxx_gpmc_hwmod,
3530 .clk = "core_l3_ick",
3531 .addr = omap3xxx_gpmc_addrs,
3532 .user = OCP_USER_MPU | OCP_USER_SDMA,
3533};
3534
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003535static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3536 &omap3xxx_l3_main__l4_core,
3537 &omap3xxx_l3_main__l4_per,
3538 &omap3xxx_mpu__l3_main,
Jon Hunterc7dad45f2012-09-23 17:28:28 -06003539 &omap3xxx_l3_main__l4_debugss,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003540 &omap3xxx_l4_core__l4_wkup,
3541 &omap3xxx_l4_core__mmc3,
3542 &omap3_l4_core__uart1,
3543 &omap3_l4_core__uart2,
3544 &omap3_l4_per__uart3,
3545 &omap3_l4_core__i2c1,
3546 &omap3_l4_core__i2c2,
3547 &omap3_l4_core__i2c3,
3548 &omap3xxx_l4_wkup__l4_sec,
3549 &omap3xxx_l4_wkup__timer1,
3550 &omap3xxx_l4_per__timer2,
3551 &omap3xxx_l4_per__timer3,
3552 &omap3xxx_l4_per__timer4,
3553 &omap3xxx_l4_per__timer5,
3554 &omap3xxx_l4_per__timer6,
3555 &omap3xxx_l4_per__timer7,
3556 &omap3xxx_l4_per__timer8,
3557 &omap3xxx_l4_per__timer9,
3558 &omap3xxx_l4_core__timer10,
3559 &omap3xxx_l4_core__timer11,
3560 &omap3xxx_l4_wkup__wd_timer2,
3561 &omap3xxx_l4_wkup__gpio1,
3562 &omap3xxx_l4_per__gpio2,
3563 &omap3xxx_l4_per__gpio3,
3564 &omap3xxx_l4_per__gpio4,
3565 &omap3xxx_l4_per__gpio5,
3566 &omap3xxx_l4_per__gpio6,
3567 &omap3xxx_dma_system__l3,
3568 &omap3xxx_l4_core__dma_system,
3569 &omap3xxx_l4_core__mcbsp1,
3570 &omap3xxx_l4_per__mcbsp2,
3571 &omap3xxx_l4_per__mcbsp3,
3572 &omap3xxx_l4_per__mcbsp4,
3573 &omap3xxx_l4_core__mcbsp5,
3574 &omap3xxx_l4_per__mcbsp2_sidetone,
3575 &omap3xxx_l4_per__mcbsp3_sidetone,
3576 &omap34xx_l4_core__mcspi1,
3577 &omap34xx_l4_core__mcspi2,
3578 &omap34xx_l4_core__mcspi3,
3579 &omap34xx_l4_core__mcspi4,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06003580 &omap3xxx_l4_wkup__counter_32k,
Afzal Mohammed49484a62012-09-23 17:28:24 -06003581 &omap3xxx_l3_main__gpmc,
Paul Walmsley73591542010-02-22 22:09:32 -07003582 NULL,
3583};
3584
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003585/* GP-only hwmod links */
3586static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
3587 &omap3xxx_l4_sec__timer12,
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003588 NULL
3589};
3590
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003591/* 3430ES1-only hwmod links */
3592static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3593 &omap3430es1_dss__l3,
3594 &omap3430es1_l4_core__dss,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003595 NULL
3596};
3597
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003598/* 3430ES2+-only hwmod links */
3599static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3600 &omap3xxx_dss__l3,
3601 &omap3xxx_l4_core__dss,
3602 &omap3xxx_usbhsotg__l3,
3603 &omap3xxx_l4_core__usbhsotg,
3604 &omap3xxx_usb_host_hs__l3_main_2,
3605 &omap3xxx_l4_core__usb_host_hs,
3606 &omap3xxx_l4_core__usb_tll_hs,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003607 NULL
3608};
3609
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003610/* <= 3430ES3-only hwmod links */
3611static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3612 &omap3xxx_l4_core__pre_es3_mmc1,
3613 &omap3xxx_l4_core__pre_es3_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003614 NULL
3615};
3616
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003617/* 3430ES3+-only hwmod links */
3618static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3619 &omap3xxx_l4_core__es3plus_mmc1,
3620 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003621 NULL
3622};
3623
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003624/* 34xx-only hwmod links (all ES revisions) */
3625static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3626 &omap3xxx_l3__iva,
3627 &omap34xx_l4_core__sr1,
3628 &omap34xx_l4_core__sr2,
3629 &omap3xxx_l4_core__mailbox,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003630 &omap3xxx_l4_core__hdq1w,
Tero Kristo8f993a02012-09-23 17:28:21 -06003631 &omap3xxx_sad2d__l3,
Paul Walmsley54864742012-09-23 17:28:23 -06003632 &omap3xxx_l4_core__mmu_isp,
3633#ifdef CONFIG_OMAP_IOMMU_IVA2
3634 &omap3xxx_l3_main__mmu_iva,
3635#endif
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003636 NULL
3637};
3638
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003639/* 36xx-only hwmod links (all ES revisions) */
3640static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3641 &omap3xxx_l3__iva,
3642 &omap36xx_l4_per__uart4,
3643 &omap3xxx_dss__l3,
3644 &omap3xxx_l4_core__dss,
3645 &omap36xx_l4_core__sr1,
3646 &omap36xx_l4_core__sr2,
3647 &omap3xxx_usbhsotg__l3,
3648 &omap3xxx_l4_core__usbhsotg,
3649 &omap3xxx_l4_core__mailbox,
3650 &omap3xxx_usb_host_hs__l3_main_2,
3651 &omap3xxx_l4_core__usb_host_hs,
3652 &omap3xxx_l4_core__usb_tll_hs,
3653 &omap3xxx_l4_core__es3plus_mmc1,
3654 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003655 &omap3xxx_l4_core__hdq1w,
Tero Kristo8f993a02012-09-23 17:28:21 -06003656 &omap3xxx_sad2d__l3,
Paul Walmsley54864742012-09-23 17:28:23 -06003657 &omap3xxx_l4_core__mmu_isp,
3658#ifdef CONFIG_OMAP_IOMMU_IVA2
3659 &omap3xxx_l3_main__mmu_iva,
3660#endif
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003661 NULL
3662};
3663
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003664static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3665 &omap3xxx_dss__l3,
3666 &omap3xxx_l4_core__dss,
3667 &am35xx_usbhsotg__l3,
3668 &am35xx_l4_core__usbhsotg,
3669 &am35xx_l4_core__uart4,
3670 &omap3xxx_usb_host_hs__l3_main_2,
3671 &omap3xxx_l4_core__usb_host_hs,
3672 &omap3xxx_l4_core__usb_tll_hs,
3673 &omap3xxx_l4_core__es3plus_mmc1,
3674 &omap3xxx_l4_core__es3plus_mmc2,
Raphael Assenatb1a923d2012-09-17 10:56:14 -04003675 &omap3xxx_l4_core__hdq1w,
Mark A. Greer31ba8802012-06-27 14:59:57 -06003676 &am35xx_mdio__l3,
3677 &am35xx_l4_core__mdio,
3678 &am35xx_emac__l3,
3679 &am35xx_l4_core__emac,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003680 NULL
3681};
3682
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003683static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3684 &omap3xxx_l4_core__dss_dispc,
3685 &omap3xxx_l4_core__dss_dsi1,
3686 &omap3xxx_l4_core__dss_rfbi,
3687 &omap3xxx_l4_core__dss_venc,
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003688 NULL
3689};
3690
Paul Walmsley73591542010-02-22 22:09:32 -07003691int __init omap3xxx_hwmod_init(void)
3692{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003693 int r;
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003694 struct omap_hwmod_ocp_if **h = NULL;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003695 unsigned int rev;
3696
Kevin Hilman9ebfd282012-06-18 12:12:23 -06003697 omap_hwmod_init();
3698
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003699 /* Register hwmod links common to all OMAP3 */
3700 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
Paul Walmsleyace90212011-10-06 14:39:28 -06003701 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003702 return r;
3703
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003704 /* Register GP-only hwmod links. */
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003705 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003706 r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003707 if (r < 0)
3708 return r;
3709 }
3710
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003711 rev = omap_rev();
3712
3713 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003714 * Register hwmod links common to individual OMAP3 families, all
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003715 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3716 * All possible revisions should be included in this conditional.
3717 */
3718 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3719 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3720 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003721 h = omap34xx_hwmod_ocp_ifs;
Kevin Hilman68a88b92012-04-30 16:37:10 -07003722 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003723 h = am35xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003724 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3725 rev == OMAP3630_REV_ES1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003726 h = omap36xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003727 } else {
3728 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3729 return -EINVAL;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003730 }
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003731
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003732 r = omap_hwmod_register_links(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003733 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003734 return r;
3735
3736 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003737 * Register hwmod links specific to certain ES levels of a
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003738 * particular family of silicon (e.g., 34xx ES1.0)
3739 */
3740 h = NULL;
3741 if (rev == OMAP3430_REV_ES1_0) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003742 h = omap3430es1_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003743 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3744 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3745 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003746 h = omap3430es2plus_hwmod_ocp_ifs;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003747 }
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003748
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003749 if (h) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003750 r = omap_hwmod_register_links(h);
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003751 if (r < 0)
3752 return r;
3753 }
3754
3755 h = NULL;
3756 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3757 rev == OMAP3430_REV_ES2_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003758 h = omap3430_pre_es3_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003759 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3760 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003761 h = omap3430_es3plus_hwmod_ocp_ifs;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003762 }
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003763
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003764 if (h)
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003765 r = omap_hwmod_register_links(h);
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003766 if (r < 0)
3767 return r;
3768
3769 /*
3770 * DSS code presumes that dss_core hwmod is handled first,
3771 * _before_ any other DSS related hwmods so register common
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003772 * DSS hwmod links last to ensure that dss_core is already
3773 * registered. Otherwise some change things may happen, for
3774 * ex. if dispc is handled before dss_core and DSS is enabled
3775 * in bootloader DISPC will be reset with outputs enabled
3776 * which sometimes leads to unrecoverable L3 error. XXX The
3777 * long-term fix to this is to ensure hwmods are set up in
3778 * dependency order in the hwmod core code.
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003779 */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003780 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003781
3782 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003783}