aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorCharulatha V <charu@ti.com>2011-02-24 15:51:46 -0500
committerTony Lindgren <tony@atomide.com>2011-02-24 15:51:46 -0500
commit3cb72fa4fed52437484a699ba78ad926ff4483c5 (patch)
treedae1c06325d0dd70bd35321d73595e87a8f8d003 /arch/arm/mach-omap2
parent3cf32bba8ca0e0052ca41d74d455a5805b7fea85 (diff)
OMAP2420: hwmod data: Add McBSP
Add McBSP hwmod data for OMAP2420. Also add macros in prcm-common.h for idlest bit of OMAP24XX McBSP devices Signed-off-by: Charulatha V <charu@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Cc: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c129
-rw-r--r--arch/arm/mach-omap2/prcm-common.h4
2 files changed, 133 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 19ad9d053ded..e44ecb465519 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -109,6 +109,8 @@ static struct omap_hwmod omap2420_uart2_hwmod;
109static struct omap_hwmod omap2420_uart3_hwmod; 109static struct omap_hwmod omap2420_uart3_hwmod;
110static struct omap_hwmod omap2420_i2c1_hwmod; 110static struct omap_hwmod omap2420_i2c1_hwmod;
111static struct omap_hwmod omap2420_i2c2_hwmod; 111static struct omap_hwmod omap2420_i2c2_hwmod;
112static struct omap_hwmod omap2420_mcbsp1_hwmod;
113static struct omap_hwmod omap2420_mcbsp2_hwmod;
112 114
113/* l4 core -> mcspi1 interface */ 115/* l4 core -> mcspi1 interface */
114static struct omap_hwmod_addr_space omap2420_mcspi1_addr_space[] = { 116static struct omap_hwmod_addr_space omap2420_mcspi1_addr_space[] = {
@@ -1390,6 +1392,129 @@ static struct omap_hwmod omap2420_mcspi2_hwmod = {
1390 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 1392 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1391}; 1393};
1392 1394
1395/*
1396 * 'mcbsp' class
1397 * multi channel buffered serial port controller
1398 */
1399
1400static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
1401 .name = "mcbsp",
1402};
1403
1404/* mcbsp1 */
1405static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
1406 { .name = "tx", .irq = 59 },
1407 { .name = "rx", .irq = 60 },
1408};
1409
1410static struct omap_hwmod_dma_info omap2420_mcbsp1_sdma_chs[] = {
1411 { .name = "rx", .dma_req = 32 },
1412 { .name = "tx", .dma_req = 31 },
1413};
1414
1415static struct omap_hwmod_addr_space omap2420_mcbsp1_addrs[] = {
1416 {
1417 .name = "mpu",
1418 .pa_start = 0x48074000,
1419 .pa_end = 0x480740ff,
1420 .flags = ADDR_TYPE_RT
1421 },
1422};
1423
1424/* l4_core -> mcbsp1 */
1425static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
1426 .master = &omap2420_l4_core_hwmod,
1427 .slave = &omap2420_mcbsp1_hwmod,
1428 .clk = "mcbsp1_ick",
1429 .addr = omap2420_mcbsp1_addrs,
1430 .addr_cnt = ARRAY_SIZE(omap2420_mcbsp1_addrs),
1431 .user = OCP_USER_MPU | OCP_USER_SDMA,
1432};
1433
1434/* mcbsp1 slave ports */
1435static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
1436 &omap2420_l4_core__mcbsp1,
1437};
1438
1439static struct omap_hwmod omap2420_mcbsp1_hwmod = {
1440 .name = "mcbsp1",
1441 .class = &omap2420_mcbsp_hwmod_class,
1442 .mpu_irqs = omap2420_mcbsp1_irqs,
1443 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_irqs),
1444 .sdma_reqs = omap2420_mcbsp1_sdma_chs,
1445 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_sdma_chs),
1446 .main_clk = "mcbsp1_fck",
1447 .prcm = {
1448 .omap2 = {
1449 .prcm_reg_id = 1,
1450 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1451 .module_offs = CORE_MOD,
1452 .idlest_reg_id = 1,
1453 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1454 },
1455 },
1456 .slaves = omap2420_mcbsp1_slaves,
1457 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
1458 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1459};
1460
1461/* mcbsp2 */
1462static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
1463 { .name = "tx", .irq = 62 },
1464 { .name = "rx", .irq = 63 },
1465};
1466
1467static struct omap_hwmod_dma_info omap2420_mcbsp2_sdma_chs[] = {
1468 { .name = "rx", .dma_req = 34 },
1469 { .name = "tx", .dma_req = 33 },
1470};
1471
1472static struct omap_hwmod_addr_space omap2420_mcbsp2_addrs[] = {
1473 {
1474 .name = "mpu",
1475 .pa_start = 0x48076000,
1476 .pa_end = 0x480760ff,
1477 .flags = ADDR_TYPE_RT
1478 },
1479};
1480
1481/* l4_core -> mcbsp2 */
1482static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
1483 .master = &omap2420_l4_core_hwmod,
1484 .slave = &omap2420_mcbsp2_hwmod,
1485 .clk = "mcbsp2_ick",
1486 .addr = omap2420_mcbsp2_addrs,
1487 .addr_cnt = ARRAY_SIZE(omap2420_mcbsp2_addrs),
1488 .user = OCP_USER_MPU | OCP_USER_SDMA,
1489};
1490
1491/* mcbsp2 slave ports */
1492static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {
1493 &omap2420_l4_core__mcbsp2,
1494};
1495
1496static struct omap_hwmod omap2420_mcbsp2_hwmod = {
1497 .name = "mcbsp2",
1498 .class = &omap2420_mcbsp_hwmod_class,
1499 .mpu_irqs = omap2420_mcbsp2_irqs,
1500 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_irqs),
1501 .sdma_reqs = omap2420_mcbsp2_sdma_chs,
1502 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_sdma_chs),
1503 .main_clk = "mcbsp2_fck",
1504 .prcm = {
1505 .omap2 = {
1506 .prcm_reg_id = 1,
1507 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1508 .module_offs = CORE_MOD,
1509 .idlest_reg_id = 1,
1510 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1511 },
1512 },
1513 .slaves = omap2420_mcbsp2_slaves,
1514 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
1515 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1516};
1517
1393static __initdata struct omap_hwmod *omap2420_hwmods[] = { 1518static __initdata struct omap_hwmod *omap2420_hwmods[] = {
1394 &omap2420_l3_main_hwmod, 1519 &omap2420_l3_main_hwmod,
1395 &omap2420_l4_core_hwmod, 1520 &omap2420_l4_core_hwmod,
@@ -1421,6 +1546,10 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = {
1421 /* mailbox class */ 1546 /* mailbox class */
1422 &omap2420_mailbox_hwmod, 1547 &omap2420_mailbox_hwmod,
1423 1548
1549 /* mcbsp class */
1550 &omap2420_mcbsp1_hwmod,
1551 &omap2420_mcbsp2_hwmod,
1552
1424 /* mcspi class */ 1553 /* mcspi class */
1425 &omap2420_mcspi1_hwmod, 1554 &omap2420_mcspi1_hwmod,
1426 &omap2420_mcspi2_hwmod, 1555 &omap2420_mcspi2_hwmod,
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index 87486f559784..d4af21d1b618 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -121,6 +121,10 @@
121#define OMAP24XX_ST_MCSPI2_MASK (1 << 18) 121#define OMAP24XX_ST_MCSPI2_MASK (1 << 18)
122#define OMAP24XX_ST_MCSPI1_SHIFT 17 122#define OMAP24XX_ST_MCSPI1_SHIFT 17
123#define OMAP24XX_ST_MCSPI1_MASK (1 << 17) 123#define OMAP24XX_ST_MCSPI1_MASK (1 << 17)
124#define OMAP24XX_ST_MCBSP2_SHIFT 16
125#define OMAP24XX_ST_MCBSP2_MASK (1 << 16)
126#define OMAP24XX_ST_MCBSP1_SHIFT 15
127#define OMAP24XX_ST_MCBSP1_MASK (1 << 15)
124#define OMAP24XX_ST_GPT12_SHIFT 14 128#define OMAP24XX_ST_GPT12_SHIFT 14
125#define OMAP24XX_ST_GPT12_MASK (1 << 14) 129#define OMAP24XX_ST_GPT12_MASK (1 << 14)
126#define OMAP24XX_ST_GPT11_SHIFT 13 130#define OMAP24XX_ST_GPT11_SHIFT 13