aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod_2430_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_2430_data.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c546
1 files changed, 546 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index b46a54ce1a41..4aa74d78289c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -18,8 +18,10 @@
18#include <plat/serial.h> 18#include <plat/serial.h>
19#include <plat/i2c.h> 19#include <plat/i2c.h>
20#include <plat/gpio.h> 20#include <plat/gpio.h>
21#include <plat/mcbsp.h>
21#include <plat/mcspi.h> 22#include <plat/mcspi.h>
22#include <plat/dmtimer.h> 23#include <plat/dmtimer.h>
24#include <plat/mmc.h>
23#include <plat/l3_2xxx.h> 25#include <plat/l3_2xxx.h>
24 26
25#include "omap_hwmod_common_data.h" 27#include "omap_hwmod_common_data.h"
@@ -52,9 +54,16 @@ static struct omap_hwmod omap2430_gpio3_hwmod;
52static struct omap_hwmod omap2430_gpio4_hwmod; 54static struct omap_hwmod omap2430_gpio4_hwmod;
53static struct omap_hwmod omap2430_gpio5_hwmod; 55static struct omap_hwmod omap2430_gpio5_hwmod;
54static struct omap_hwmod omap2430_dma_system_hwmod; 56static struct omap_hwmod omap2430_dma_system_hwmod;
57static struct omap_hwmod omap2430_mcbsp1_hwmod;
58static struct omap_hwmod omap2430_mcbsp2_hwmod;
59static struct omap_hwmod omap2430_mcbsp3_hwmod;
60static struct omap_hwmod omap2430_mcbsp4_hwmod;
61static struct omap_hwmod omap2430_mcbsp5_hwmod;
55static struct omap_hwmod omap2430_mcspi1_hwmod; 62static struct omap_hwmod omap2430_mcspi1_hwmod;
56static struct omap_hwmod omap2430_mcspi2_hwmod; 63static struct omap_hwmod omap2430_mcspi2_hwmod;
57static struct omap_hwmod omap2430_mcspi3_hwmod; 64static struct omap_hwmod omap2430_mcspi3_hwmod;
65static struct omap_hwmod omap2430_mmc1_hwmod;
66static struct omap_hwmod omap2430_mmc2_hwmod;
58 67
59/* L3 -> L4_CORE interface */ 68/* L3 -> L4_CORE interface */
60static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = { 69static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
@@ -251,6 +260,42 @@ static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
251 &omap2430_l4_core__usbhsotg, 260 &omap2430_l4_core__usbhsotg,
252}; 261};
253 262
263/* L4 CORE -> MMC1 interface */
264static struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = {
265 {
266 .pa_start = 0x4809c000,
267 .pa_end = 0x4809c1ff,
268 .flags = ADDR_TYPE_RT,
269 },
270};
271
272static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
273 .master = &omap2430_l4_core_hwmod,
274 .slave = &omap2430_mmc1_hwmod,
275 .clk = "mmchs1_ick",
276 .addr = omap2430_mmc1_addr_space,
277 .addr_cnt = ARRAY_SIZE(omap2430_mmc1_addr_space),
278 .user = OCP_USER_MPU | OCP_USER_SDMA,
279};
280
281/* L4 CORE -> MMC2 interface */
282static struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = {
283 {
284 .pa_start = 0x480b4000,
285 .pa_end = 0x480b41ff,
286 .flags = ADDR_TYPE_RT,
287 },
288};
289
290static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
291 .master = &omap2430_l4_core_hwmod,
292 .slave = &omap2430_mmc2_hwmod,
293 .addr = omap2430_mmc2_addr_space,
294 .clk = "mmchs2_ick",
295 .addr_cnt = ARRAY_SIZE(omap2430_mmc2_addr_space),
296 .user = OCP_USER_MPU | OCP_USER_SDMA,
297};
298
254/* Slave interfaces on the L4_CORE interconnect */ 299/* Slave interfaces on the L4_CORE interconnect */
255static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { 300static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
256 &omap2430_l3_main__l4_core, 301 &omap2430_l3_main__l4_core,
@@ -259,6 +304,8 @@ static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
259/* Master interfaces on the L4_CORE interconnect */ 304/* Master interfaces on the L4_CORE interconnect */
260static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = { 305static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
261 &omap2430_l4_core__l4_wkup, 306 &omap2430_l4_core__l4_wkup,
307 &omap2430_l4_core__mmc1,
308 &omap2430_l4_core__mmc2,
262}; 309};
263 310
264/* L4 CORE */ 311/* L4 CORE */
@@ -1914,6 +1961,75 @@ static struct omap_hwmod omap2430_dma_system_hwmod = {
1914}; 1961};
1915 1962
1916/* 1963/*
1964 * 'mailbox' class
1965 * mailbox module allowing communication between the on-chip processors
1966 * using a queued mailbox-interrupt mechanism.
1967 */
1968
1969static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
1970 .rev_offs = 0x000,
1971 .sysc_offs = 0x010,
1972 .syss_offs = 0x014,
1973 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1974 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1975 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1976 .sysc_fields = &omap_hwmod_sysc_type1,
1977};
1978
1979static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
1980 .name = "mailbox",
1981 .sysc = &omap2430_mailbox_sysc,
1982};
1983
1984/* mailbox */
1985static struct omap_hwmod omap2430_mailbox_hwmod;
1986static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1987 { .irq = 26 },
1988};
1989
1990static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = {
1991 {
1992 .pa_start = 0x48094000,
1993 .pa_end = 0x480941ff,
1994 .flags = ADDR_TYPE_RT,
1995 },
1996};
1997
1998/* l4_core -> mailbox */
1999static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
2000 .master = &omap2430_l4_core_hwmod,
2001 .slave = &omap2430_mailbox_hwmod,
2002 .addr = omap2430_mailbox_addrs,
2003 .addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs),
2004 .user = OCP_USER_MPU | OCP_USER_SDMA,
2005};
2006
2007/* mailbox slave ports */
2008static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
2009 &omap2430_l4_core__mailbox,
2010};
2011
2012static struct omap_hwmod omap2430_mailbox_hwmod = {
2013 .name = "mailbox",
2014 .class = &omap2430_mailbox_hwmod_class,
2015 .mpu_irqs = omap2430_mailbox_irqs,
2016 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs),
2017 .main_clk = "mailboxes_ick",
2018 .prcm = {
2019 .omap2 = {
2020 .prcm_reg_id = 1,
2021 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
2022 .module_offs = CORE_MOD,
2023 .idlest_reg_id = 1,
2024 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
2025 },
2026 },
2027 .slaves = omap2430_mailbox_slaves,
2028 .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
2029 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2030};
2031
2032/*
1917 * 'mcspi' class 2033 * 'mcspi' class
1918 * multichannel serial port interface (mcspi) / master/slave synchronous serial 2034 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1919 * bus 2035 * bus
@@ -2125,7 +2241,425 @@ static struct omap_hwmod omap2430_usbhsotg_hwmod = {
2125 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 2241 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
2126}; 2242};
2127 2243
2244/*
2245 * 'mcbsp' class
2246 * multi channel buffered serial port controller
2247 */
2248
2249static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
2250 .rev_offs = 0x007C,
2251 .sysc_offs = 0x008C,
2252 .sysc_flags = (SYSC_HAS_SOFTRESET),
2253 .sysc_fields = &omap_hwmod_sysc_type1,
2254};
2255
2256static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
2257 .name = "mcbsp",
2258 .sysc = &omap2430_mcbsp_sysc,
2259 .rev = MCBSP_CONFIG_TYPE2,
2260};
2128 2261
2262/* mcbsp1 */
2263static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
2264 { .name = "tx", .irq = 59 },
2265 { .name = "rx", .irq = 60 },
2266 { .name = "ovr", .irq = 61 },
2267 { .name = "common", .irq = 64 },
2268};
2269
2270static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
2271 { .name = "rx", .dma_req = 32 },
2272 { .name = "tx", .dma_req = 31 },
2273};
2274
2275static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = {
2276 {
2277 .name = "mpu",
2278 .pa_start = 0x48074000,
2279 .pa_end = 0x480740ff,
2280 .flags = ADDR_TYPE_RT
2281 },
2282};
2283
2284/* l4_core -> mcbsp1 */
2285static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
2286 .master = &omap2430_l4_core_hwmod,
2287 .slave = &omap2430_mcbsp1_hwmod,
2288 .clk = "mcbsp1_ick",
2289 .addr = omap2430_mcbsp1_addrs,
2290 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp1_addrs),
2291 .user = OCP_USER_MPU | OCP_USER_SDMA,
2292};
2293
2294/* mcbsp1 slave ports */
2295static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
2296 &omap2430_l4_core__mcbsp1,
2297};
2298
2299static struct omap_hwmod omap2430_mcbsp1_hwmod = {
2300 .name = "mcbsp1",
2301 .class = &omap2430_mcbsp_hwmod_class,
2302 .mpu_irqs = omap2430_mcbsp1_irqs,
2303 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs),
2304 .sdma_reqs = omap2430_mcbsp1_sdma_chs,
2305 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
2306 .main_clk = "mcbsp1_fck",
2307 .prcm = {
2308 .omap2 = {
2309 .prcm_reg_id = 1,
2310 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
2311 .module_offs = CORE_MOD,
2312 .idlest_reg_id = 1,
2313 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
2314 },
2315 },
2316 .slaves = omap2430_mcbsp1_slaves,
2317 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
2318 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2319};
2320
2321/* mcbsp2 */
2322static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
2323 { .name = "tx", .irq = 62 },
2324 { .name = "rx", .irq = 63 },
2325 { .name = "common", .irq = 16 },
2326};
2327
2328static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
2329 { .name = "rx", .dma_req = 34 },
2330 { .name = "tx", .dma_req = 33 },
2331};
2332
2333static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = {
2334 {
2335 .name = "mpu",
2336 .pa_start = 0x48076000,
2337 .pa_end = 0x480760ff,
2338 .flags = ADDR_TYPE_RT
2339 },
2340};
2341
2342/* l4_core -> mcbsp2 */
2343static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
2344 .master = &omap2430_l4_core_hwmod,
2345 .slave = &omap2430_mcbsp2_hwmod,
2346 .clk = "mcbsp2_ick",
2347 .addr = omap2430_mcbsp2_addrs,
2348 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp2_addrs),
2349 .user = OCP_USER_MPU | OCP_USER_SDMA,
2350};
2351
2352/* mcbsp2 slave ports */
2353static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
2354 &omap2430_l4_core__mcbsp2,
2355};
2356
2357static struct omap_hwmod omap2430_mcbsp2_hwmod = {
2358 .name = "mcbsp2",
2359 .class = &omap2430_mcbsp_hwmod_class,
2360 .mpu_irqs = omap2430_mcbsp2_irqs,
2361 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs),
2362 .sdma_reqs = omap2430_mcbsp2_sdma_chs,
2363 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
2364 .main_clk = "mcbsp2_fck",
2365 .prcm = {
2366 .omap2 = {
2367 .prcm_reg_id = 1,
2368 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
2369 .module_offs = CORE_MOD,
2370 .idlest_reg_id = 1,
2371 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
2372 },
2373 },
2374 .slaves = omap2430_mcbsp2_slaves,
2375 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
2376 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2377};
2378
2379/* mcbsp3 */
2380static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
2381 { .name = "tx", .irq = 89 },
2382 { .name = "rx", .irq = 90 },
2383 { .name = "common", .irq = 17 },
2384};
2385
2386static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
2387 { .name = "rx", .dma_req = 18 },
2388 { .name = "tx", .dma_req = 17 },
2389};
2390
2391static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
2392 {
2393 .name = "mpu",
2394 .pa_start = 0x4808C000,
2395 .pa_end = 0x4808C0ff,
2396 .flags = ADDR_TYPE_RT
2397 },
2398};
2399
2400/* l4_core -> mcbsp3 */
2401static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
2402 .master = &omap2430_l4_core_hwmod,
2403 .slave = &omap2430_mcbsp3_hwmod,
2404 .clk = "mcbsp3_ick",
2405 .addr = omap2430_mcbsp3_addrs,
2406 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp3_addrs),
2407 .user = OCP_USER_MPU | OCP_USER_SDMA,
2408};
2409
2410/* mcbsp3 slave ports */
2411static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
2412 &omap2430_l4_core__mcbsp3,
2413};
2414
2415static struct omap_hwmod omap2430_mcbsp3_hwmod = {
2416 .name = "mcbsp3",
2417 .class = &omap2430_mcbsp_hwmod_class,
2418 .mpu_irqs = omap2430_mcbsp3_irqs,
2419 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs),
2420 .sdma_reqs = omap2430_mcbsp3_sdma_chs,
2421 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
2422 .main_clk = "mcbsp3_fck",
2423 .prcm = {
2424 .omap2 = {
2425 .prcm_reg_id = 1,
2426 .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
2427 .module_offs = CORE_MOD,
2428 .idlest_reg_id = 2,
2429 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
2430 },
2431 },
2432 .slaves = omap2430_mcbsp3_slaves,
2433 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
2434 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2435};
2436
2437/* mcbsp4 */
2438static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
2439 { .name = "tx", .irq = 54 },
2440 { .name = "rx", .irq = 55 },
2441 { .name = "common", .irq = 18 },
2442};
2443
2444static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
2445 { .name = "rx", .dma_req = 20 },
2446 { .name = "tx", .dma_req = 19 },
2447};
2448
2449static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
2450 {
2451 .name = "mpu",
2452 .pa_start = 0x4808E000,
2453 .pa_end = 0x4808E0ff,
2454 .flags = ADDR_TYPE_RT
2455 },
2456};
2457
2458/* l4_core -> mcbsp4 */
2459static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
2460 .master = &omap2430_l4_core_hwmod,
2461 .slave = &omap2430_mcbsp4_hwmod,
2462 .clk = "mcbsp4_ick",
2463 .addr = omap2430_mcbsp4_addrs,
2464 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp4_addrs),
2465 .user = OCP_USER_MPU | OCP_USER_SDMA,
2466};
2467
2468/* mcbsp4 slave ports */
2469static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
2470 &omap2430_l4_core__mcbsp4,
2471};
2472
2473static struct omap_hwmod omap2430_mcbsp4_hwmod = {
2474 .name = "mcbsp4",
2475 .class = &omap2430_mcbsp_hwmod_class,
2476 .mpu_irqs = omap2430_mcbsp4_irqs,
2477 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs),
2478 .sdma_reqs = omap2430_mcbsp4_sdma_chs,
2479 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
2480 .main_clk = "mcbsp4_fck",
2481 .prcm = {
2482 .omap2 = {
2483 .prcm_reg_id = 1,
2484 .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
2485 .module_offs = CORE_MOD,
2486 .idlest_reg_id = 2,
2487 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
2488 },
2489 },
2490 .slaves = omap2430_mcbsp4_slaves,
2491 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
2492 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2493};
2494
2495/* mcbsp5 */
2496static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
2497 { .name = "tx", .irq = 81 },
2498 { .name = "rx", .irq = 82 },
2499 { .name = "common", .irq = 19 },
2500};
2501
2502static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
2503 { .name = "rx", .dma_req = 22 },
2504 { .name = "tx", .dma_req = 21 },
2505};
2506
2507static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
2508 {
2509 .name = "mpu",
2510 .pa_start = 0x48096000,
2511 .pa_end = 0x480960ff,
2512 .flags = ADDR_TYPE_RT
2513 },
2514};
2515
2516/* l4_core -> mcbsp5 */
2517static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
2518 .master = &omap2430_l4_core_hwmod,
2519 .slave = &omap2430_mcbsp5_hwmod,
2520 .clk = "mcbsp5_ick",
2521 .addr = omap2430_mcbsp5_addrs,
2522 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp5_addrs),
2523 .user = OCP_USER_MPU | OCP_USER_SDMA,
2524};
2525
2526/* mcbsp5 slave ports */
2527static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
2528 &omap2430_l4_core__mcbsp5,
2529};
2530
2531static struct omap_hwmod omap2430_mcbsp5_hwmod = {
2532 .name = "mcbsp5",
2533 .class = &omap2430_mcbsp_hwmod_class,
2534 .mpu_irqs = omap2430_mcbsp5_irqs,
2535 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs),
2536 .sdma_reqs = omap2430_mcbsp5_sdma_chs,
2537 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
2538 .main_clk = "mcbsp5_fck",
2539 .prcm = {
2540 .omap2 = {
2541 .prcm_reg_id = 1,
2542 .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
2543 .module_offs = CORE_MOD,
2544 .idlest_reg_id = 2,
2545 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
2546 },
2547 },
2548 .slaves = omap2430_mcbsp5_slaves,
2549 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
2550 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2551};
2552
2553/* MMC/SD/SDIO common */
2554
2555static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
2556 .rev_offs = 0x1fc,
2557 .sysc_offs = 0x10,
2558 .syss_offs = 0x14,
2559 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2560 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2561 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2562 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2563 .sysc_fields = &omap_hwmod_sysc_type1,
2564};
2565
2566static struct omap_hwmod_class omap2430_mmc_class = {
2567 .name = "mmc",
2568 .sysc = &omap2430_mmc_sysc,
2569};
2570
2571/* MMC/SD/SDIO1 */
2572
2573static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
2574 { .irq = 83 },
2575};
2576
2577static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
2578 { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
2579 { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
2580};
2581
2582static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
2583 { .role = "dbck", .clk = "mmchsdb1_fck" },
2584};
2585
2586static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
2587 &omap2430_l4_core__mmc1,
2588};
2589
2590static struct omap_mmc_dev_attr mmc1_dev_attr = {
2591 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
2592};
2593
2594static struct omap_hwmod omap2430_mmc1_hwmod = {
2595 .name = "mmc1",
2596 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2597 .mpu_irqs = omap2430_mmc1_mpu_irqs,
2598 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc1_mpu_irqs),
2599 .sdma_reqs = omap2430_mmc1_sdma_reqs,
2600 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs),
2601 .opt_clks = omap2430_mmc1_opt_clks,
2602 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
2603 .main_clk = "mmchs1_fck",
2604 .prcm = {
2605 .omap2 = {
2606 .module_offs = CORE_MOD,
2607 .prcm_reg_id = 2,
2608 .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
2609 .idlest_reg_id = 2,
2610 .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
2611 },
2612 },
2613 .dev_attr = &mmc1_dev_attr,
2614 .slaves = omap2430_mmc1_slaves,
2615 .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
2616 .class = &omap2430_mmc_class,
2617 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2618};
2619
2620/* MMC/SD/SDIO2 */
2621
2622static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
2623 { .irq = 86 },
2624};
2625
2626static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
2627 { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
2628 { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
2629};
2630
2631static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
2632 { .role = "dbck", .clk = "mmchsdb2_fck" },
2633};
2634
2635static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
2636 &omap2430_l4_core__mmc2,
2637};
2638
2639static struct omap_hwmod omap2430_mmc2_hwmod = {
2640 .name = "mmc2",
2641 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2642 .mpu_irqs = omap2430_mmc2_mpu_irqs,
2643 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc2_mpu_irqs),
2644 .sdma_reqs = omap2430_mmc2_sdma_reqs,
2645 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs),
2646 .opt_clks = omap2430_mmc2_opt_clks,
2647 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
2648 .main_clk = "mmchs2_fck",
2649 .prcm = {
2650 .omap2 = {
2651 .module_offs = CORE_MOD,
2652 .prcm_reg_id = 2,
2653 .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
2654 .idlest_reg_id = 2,
2655 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
2656 },
2657 },
2658 .slaves = omap2430_mmc2_slaves,
2659 .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
2660 .class = &omap2430_mmc_class,
2661 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2662};
2129 2663
2130static __initdata struct omap_hwmod *omap2430_hwmods[] = { 2664static __initdata struct omap_hwmod *omap2430_hwmods[] = {
2131 &omap2430_l3_main_hwmod, 2665 &omap2430_l3_main_hwmod,
@@ -2159,6 +2693,8 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = {
2159 /* i2c class */ 2693 /* i2c class */
2160 &omap2430_i2c1_hwmod, 2694 &omap2430_i2c1_hwmod,
2161 &omap2430_i2c2_hwmod, 2695 &omap2430_i2c2_hwmod,
2696 &omap2430_mmc1_hwmod,
2697 &omap2430_mmc2_hwmod,
2162 2698
2163 /* gpio class */ 2699 /* gpio class */
2164 &omap2430_gpio1_hwmod, 2700 &omap2430_gpio1_hwmod,
@@ -2170,6 +2706,16 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = {
2170 /* dma_system class*/ 2706 /* dma_system class*/
2171 &omap2430_dma_system_hwmod, 2707 &omap2430_dma_system_hwmod,
2172 2708
2709 /* mcbsp class */
2710 &omap2430_mcbsp1_hwmod,
2711 &omap2430_mcbsp2_hwmod,
2712 &omap2430_mcbsp3_hwmod,
2713 &omap2430_mcbsp4_hwmod,
2714 &omap2430_mcbsp5_hwmod,
2715
2716 /* mailbox class */
2717 &omap2430_mailbox_hwmod,
2718
2173 /* mcspi class */ 2719 /* mcspi class */
2174 &omap2430_mcspi1_hwmod, 2720 &omap2430_mcspi1_hwmod,
2175 &omap2430_mcspi2_hwmod, 2721 &omap2430_mcspi2_hwmod,