2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
4 * Copyright (C) 2009-2010 Nokia Corporation
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * XXX handle crossbar/shared link difference for L3?
12 * XXX these should be marked initdata for multi-OMAP kernels
14 #include <plat/omap_hwmod.h>
15 #include <mach/irqs.h>
18 #include <plat/serial.h>
20 #include "omap_hwmod_common_data.h"
22 #include "prm-regbits-24xx.h"
25 * OMAP2430 hardware module integration data
27 * ALl of the data in this section should be autogeneratable from the
28 * TI hardware database or other technical documentation. Data that
29 * is driver-specific or driver-kernel integration-specific belongs
33 static struct omap_hwmod omap2430_mpu_hwmod;
34 static struct omap_hwmod omap2430_iva_hwmod;
35 static struct omap_hwmod omap2430_l3_main_hwmod;
36 static struct omap_hwmod omap2430_l4_core_hwmod;
38 /* L3 -> L4_CORE interface */
39 static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
40 .master = &omap2430_l3_main_hwmod,
41 .slave = &omap2430_l4_core_hwmod,
42 .user = OCP_USER_MPU | OCP_USER_SDMA,
45 /* MPU -> L3 interface */
46 static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
47 .master = &omap2430_mpu_hwmod,
48 .slave = &omap2430_l3_main_hwmod,
52 /* Slave interfaces on the L3 interconnect */
53 static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
54 &omap2430_mpu__l3_main,
57 /* Master interfaces on the L3 interconnect */
58 static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
59 &omap2430_l3_main__l4_core,
63 static struct omap_hwmod omap2430_l3_main_hwmod = {
65 .class = &l3_hwmod_class,
66 .masters = omap2430_l3_main_masters,
67 .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
68 .slaves = omap2430_l3_main_slaves,
69 .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
70 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
71 .flags = HWMOD_NO_IDLEST,
74 static struct omap_hwmod omap2430_l4_wkup_hwmod;
75 static struct omap_hwmod omap2430_uart1_hwmod;
76 static struct omap_hwmod omap2430_uart2_hwmod;
77 static struct omap_hwmod omap2430_uart3_hwmod;
79 /* L4_CORE -> L4_WKUP interface */
80 static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
81 .master = &omap2430_l4_core_hwmod,
82 .slave = &omap2430_l4_wkup_hwmod,
83 .user = OCP_USER_MPU | OCP_USER_SDMA,
86 /* L4 CORE -> UART1 interface */
87 static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
89 .pa_start = OMAP2_UART1_BASE,
90 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
91 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
95 static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
96 .master = &omap2430_l4_core_hwmod,
97 .slave = &omap2430_uart1_hwmod,
99 .addr = omap2430_uart1_addr_space,
100 .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space),
101 .user = OCP_USER_MPU | OCP_USER_SDMA,
104 /* L4 CORE -> UART2 interface */
105 static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
107 .pa_start = OMAP2_UART2_BASE,
108 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
109 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
113 static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
114 .master = &omap2430_l4_core_hwmod,
115 .slave = &omap2430_uart2_hwmod,
117 .addr = omap2430_uart2_addr_space,
118 .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space),
119 .user = OCP_USER_MPU | OCP_USER_SDMA,
122 /* L4 PER -> UART3 interface */
123 static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
125 .pa_start = OMAP2_UART3_BASE,
126 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
127 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
131 static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
132 .master = &omap2430_l4_core_hwmod,
133 .slave = &omap2430_uart3_hwmod,
135 .addr = omap2430_uart3_addr_space,
136 .addr_cnt = ARRAY_SIZE(omap2430_uart3_addr_space),
137 .user = OCP_USER_MPU | OCP_USER_SDMA,
140 /* Slave interfaces on the L4_CORE interconnect */
141 static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
142 &omap2430_l3_main__l4_core,
145 /* Master interfaces on the L4_CORE interconnect */
146 static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
147 &omap2430_l4_core__l4_wkup,
151 static struct omap_hwmod omap2430_l4_core_hwmod = {
153 .class = &l4_hwmod_class,
154 .masters = omap2430_l4_core_masters,
155 .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
156 .slaves = omap2430_l4_core_slaves,
157 .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
158 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
159 .flags = HWMOD_NO_IDLEST,
162 /* Slave interfaces on the L4_WKUP interconnect */
163 static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
164 &omap2430_l4_core__l4_wkup,
165 &omap2_l4_core__uart1,
166 &omap2_l4_core__uart2,
167 &omap2_l4_core__uart3,
170 /* Master interfaces on the L4_WKUP interconnect */
171 static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
175 static struct omap_hwmod omap2430_l4_wkup_hwmod = {
177 .class = &l4_hwmod_class,
178 .masters = omap2430_l4_wkup_masters,
179 .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
180 .slaves = omap2430_l4_wkup_slaves,
181 .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
182 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
183 .flags = HWMOD_NO_IDLEST,
186 /* Master interfaces on the MPU device */
187 static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
188 &omap2430_mpu__l3_main,
192 static struct omap_hwmod omap2430_mpu_hwmod = {
194 .class = &mpu_hwmod_class,
195 .main_clk = "mpu_ck",
196 .masters = omap2430_mpu_masters,
197 .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
198 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
202 * IVA2_1 interface data
205 /* IVA2 <- L3 interface */
206 static struct omap_hwmod_ocp_if omap2430_l3__iva = {
207 .master = &omap2430_l3_main_hwmod,
208 .slave = &omap2430_iva_hwmod,
210 .user = OCP_USER_MPU | OCP_USER_SDMA,
213 static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
221 static struct omap_hwmod omap2430_iva_hwmod = {
223 .class = &iva_hwmod_class,
224 .masters = omap2430_iva_masters,
225 .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
226 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
231 static struct omap_hwmod_class_sysconfig uart_sysc = {
235 .sysc_flags = (SYSC_HAS_SIDLEMODE |
236 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
238 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
239 .sysc_fields = &omap_hwmod_sysc_type1,
242 static struct omap_hwmod_class uart_class = {
249 static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
250 { .irq = INT_24XX_UART1_IRQ, },
253 static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
254 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
255 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
258 static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
259 &omap2_l4_core__uart1,
262 static struct omap_hwmod omap2430_uart1_hwmod = {
264 .mpu_irqs = uart1_mpu_irqs,
265 .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
266 .sdma_reqs = uart1_sdma_reqs,
267 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
268 .main_clk = "uart1_fck",
271 .module_offs = CORE_MOD,
273 .module_bit = OMAP24XX_EN_UART1_SHIFT,
275 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
278 .slaves = omap2430_uart1_slaves,
279 .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
280 .class = &uart_class,
281 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
286 static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
287 { .irq = INT_24XX_UART2_IRQ, },
290 static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
291 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
292 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
295 static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
296 &omap2_l4_core__uart2,
299 static struct omap_hwmod omap2430_uart2_hwmod = {
301 .mpu_irqs = uart2_mpu_irqs,
302 .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
303 .sdma_reqs = uart2_sdma_reqs,
304 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
305 .main_clk = "uart2_fck",
308 .module_offs = CORE_MOD,
310 .module_bit = OMAP24XX_EN_UART2_SHIFT,
312 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
315 .slaves = omap2430_uart2_slaves,
316 .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
317 .class = &uart_class,
318 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
323 static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
324 { .irq = INT_24XX_UART3_IRQ, },
327 static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
328 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
329 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
332 static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
333 &omap2_l4_core__uart3,
336 static struct omap_hwmod omap2430_uart3_hwmod = {
338 .mpu_irqs = uart3_mpu_irqs,
339 .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
340 .sdma_reqs = uart3_sdma_reqs,
341 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
342 .main_clk = "uart3_fck",
345 .module_offs = CORE_MOD,
347 .module_bit = OMAP24XX_EN_UART3_SHIFT,
349 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
352 .slaves = omap2430_uart3_slaves,
353 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
354 .class = &uart_class,
355 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
358 static __initdata struct omap_hwmod *omap2430_hwmods[] = {
359 &omap2430_l3_main_hwmod,
360 &omap2430_l4_core_hwmod,
361 &omap2430_l4_wkup_hwmod,
364 &omap2430_uart1_hwmod,
365 &omap2430_uart2_hwmod,
366 &omap2430_uart3_hwmod,
370 int __init omap2430_hwmod_init(void)
372 return omap_hwmod_init(omap2430_hwmods);