diff options
author | Benoit Cousson <b-cousson@ti.com> | 2011-02-02 07:22:13 -0500 |
---|---|---|
committer | Benoit Cousson <b-cousson@ti.com> | 2011-02-17 12:18:21 -0500 |
commit | 9bcbd7f0d577b3f6d5742188563457a083b8ae7f (patch) | |
tree | 1dfef7ab3361ff658365fe0782507303a7df4689 /arch/arm | |
parent | d11c217f1a8f9ea2b2c89b8a533396482a36e8c0 (diff) |
OMAP4: hwmod data: Add McSPI
Update omap4 hwmod file with McSPI info.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Charulatha V <charu@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 249 |
1 files changed, 245 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 46da576ffaf8..8199eb26fd34 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -534,10 +534,6 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = { | |||
534 | * mcbsp3 | 534 | * mcbsp3 |
535 | * mcbsp4 | 535 | * mcbsp4 |
536 | * mcpdm | 536 | * mcpdm |
537 | * mcspi1 | ||
538 | * mcspi2 | ||
539 | * mcspi3 | ||
540 | * mcspi4 | ||
541 | * mmc1 | 537 | * mmc1 |
542 | * mmc2 | 538 | * mmc2 |
543 | * mmc3 | 539 | * mmc3 |
@@ -1434,6 +1430,245 @@ static struct omap_hwmod omap44xx_iva_hwmod = { | |||
1434 | }; | 1430 | }; |
1435 | 1431 | ||
1436 | /* | 1432 | /* |
1433 | * 'mcspi' class | ||
1434 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
1435 | * bus | ||
1436 | */ | ||
1437 | |||
1438 | static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = { | ||
1439 | .rev_offs = 0x0000, | ||
1440 | .sysc_offs = 0x0010, | ||
1441 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS | | ||
1442 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
1443 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1444 | SIDLE_SMART_WKUP), | ||
1445 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
1446 | }; | ||
1447 | |||
1448 | static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = { | ||
1449 | .name = "mcspi", | ||
1450 | .sysc = &omap44xx_mcspi_sysc, | ||
1451 | }; | ||
1452 | |||
1453 | /* mcspi1 */ | ||
1454 | static struct omap_hwmod omap44xx_mcspi1_hwmod; | ||
1455 | static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { | ||
1456 | { .irq = 65 + OMAP44XX_IRQ_GIC_START }, | ||
1457 | }; | ||
1458 | |||
1459 | static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = { | ||
1460 | { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START }, | ||
1461 | { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START }, | ||
1462 | { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START }, | ||
1463 | { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START }, | ||
1464 | { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START }, | ||
1465 | { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START }, | ||
1466 | { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START }, | ||
1467 | { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START }, | ||
1468 | }; | ||
1469 | |||
1470 | static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = { | ||
1471 | { | ||
1472 | .pa_start = 0x48098000, | ||
1473 | .pa_end = 0x480981ff, | ||
1474 | .flags = ADDR_TYPE_RT | ||
1475 | }, | ||
1476 | }; | ||
1477 | |||
1478 | /* l4_per -> mcspi1 */ | ||
1479 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = { | ||
1480 | .master = &omap44xx_l4_per_hwmod, | ||
1481 | .slave = &omap44xx_mcspi1_hwmod, | ||
1482 | .clk = "l4_div_ck", | ||
1483 | .addr = omap44xx_mcspi1_addrs, | ||
1484 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi1_addrs), | ||
1485 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1486 | }; | ||
1487 | |||
1488 | /* mcspi1 slave ports */ | ||
1489 | static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = { | ||
1490 | &omap44xx_l4_per__mcspi1, | ||
1491 | }; | ||
1492 | |||
1493 | static struct omap_hwmod omap44xx_mcspi1_hwmod = { | ||
1494 | .name = "mcspi1", | ||
1495 | .class = &omap44xx_mcspi_hwmod_class, | ||
1496 | .mpu_irqs = omap44xx_mcspi1_irqs, | ||
1497 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_irqs), | ||
1498 | .sdma_reqs = omap44xx_mcspi1_sdma_reqs, | ||
1499 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_sdma_reqs), | ||
1500 | .main_clk = "mcspi1_fck", | ||
1501 | .prcm = { | ||
1502 | .omap4 = { | ||
1503 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL, | ||
1504 | }, | ||
1505 | }, | ||
1506 | .slaves = omap44xx_mcspi1_slaves, | ||
1507 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves), | ||
1508 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1509 | }; | ||
1510 | |||
1511 | /* mcspi2 */ | ||
1512 | static struct omap_hwmod omap44xx_mcspi2_hwmod; | ||
1513 | static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { | ||
1514 | { .irq = 66 + OMAP44XX_IRQ_GIC_START }, | ||
1515 | }; | ||
1516 | |||
1517 | static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = { | ||
1518 | { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START }, | ||
1519 | { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START }, | ||
1520 | { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START }, | ||
1521 | { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START }, | ||
1522 | }; | ||
1523 | |||
1524 | static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = { | ||
1525 | { | ||
1526 | .pa_start = 0x4809a000, | ||
1527 | .pa_end = 0x4809a1ff, | ||
1528 | .flags = ADDR_TYPE_RT | ||
1529 | }, | ||
1530 | }; | ||
1531 | |||
1532 | /* l4_per -> mcspi2 */ | ||
1533 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = { | ||
1534 | .master = &omap44xx_l4_per_hwmod, | ||
1535 | .slave = &omap44xx_mcspi2_hwmod, | ||
1536 | .clk = "l4_div_ck", | ||
1537 | .addr = omap44xx_mcspi2_addrs, | ||
1538 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi2_addrs), | ||
1539 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1540 | }; | ||
1541 | |||
1542 | /* mcspi2 slave ports */ | ||
1543 | static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = { | ||
1544 | &omap44xx_l4_per__mcspi2, | ||
1545 | }; | ||
1546 | |||
1547 | static struct omap_hwmod omap44xx_mcspi2_hwmod = { | ||
1548 | .name = "mcspi2", | ||
1549 | .class = &omap44xx_mcspi_hwmod_class, | ||
1550 | .mpu_irqs = omap44xx_mcspi2_irqs, | ||
1551 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_irqs), | ||
1552 | .sdma_reqs = omap44xx_mcspi2_sdma_reqs, | ||
1553 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_sdma_reqs), | ||
1554 | .main_clk = "mcspi2_fck", | ||
1555 | .prcm = { | ||
1556 | .omap4 = { | ||
1557 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL, | ||
1558 | }, | ||
1559 | }, | ||
1560 | .slaves = omap44xx_mcspi2_slaves, | ||
1561 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves), | ||
1562 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1563 | }; | ||
1564 | |||
1565 | /* mcspi3 */ | ||
1566 | static struct omap_hwmod omap44xx_mcspi3_hwmod; | ||
1567 | static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { | ||
1568 | { .irq = 91 + OMAP44XX_IRQ_GIC_START }, | ||
1569 | }; | ||
1570 | |||
1571 | static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = { | ||
1572 | { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START }, | ||
1573 | { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START }, | ||
1574 | { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START }, | ||
1575 | { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START }, | ||
1576 | }; | ||
1577 | |||
1578 | static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = { | ||
1579 | { | ||
1580 | .pa_start = 0x480b8000, | ||
1581 | .pa_end = 0x480b81ff, | ||
1582 | .flags = ADDR_TYPE_RT | ||
1583 | }, | ||
1584 | }; | ||
1585 | |||
1586 | /* l4_per -> mcspi3 */ | ||
1587 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = { | ||
1588 | .master = &omap44xx_l4_per_hwmod, | ||
1589 | .slave = &omap44xx_mcspi3_hwmod, | ||
1590 | .clk = "l4_div_ck", | ||
1591 | .addr = omap44xx_mcspi3_addrs, | ||
1592 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi3_addrs), | ||
1593 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1594 | }; | ||
1595 | |||
1596 | /* mcspi3 slave ports */ | ||
1597 | static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = { | ||
1598 | &omap44xx_l4_per__mcspi3, | ||
1599 | }; | ||
1600 | |||
1601 | static struct omap_hwmod omap44xx_mcspi3_hwmod = { | ||
1602 | .name = "mcspi3", | ||
1603 | .class = &omap44xx_mcspi_hwmod_class, | ||
1604 | .mpu_irqs = omap44xx_mcspi3_irqs, | ||
1605 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_irqs), | ||
1606 | .sdma_reqs = omap44xx_mcspi3_sdma_reqs, | ||
1607 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_sdma_reqs), | ||
1608 | .main_clk = "mcspi3_fck", | ||
1609 | .prcm = { | ||
1610 | .omap4 = { | ||
1611 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL, | ||
1612 | }, | ||
1613 | }, | ||
1614 | .slaves = omap44xx_mcspi3_slaves, | ||
1615 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves), | ||
1616 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1617 | }; | ||
1618 | |||
1619 | /* mcspi4 */ | ||
1620 | static struct omap_hwmod omap44xx_mcspi4_hwmod; | ||
1621 | static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { | ||
1622 | { .irq = 48 + OMAP44XX_IRQ_GIC_START }, | ||
1623 | }; | ||
1624 | |||
1625 | static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = { | ||
1626 | { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START }, | ||
1627 | { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START }, | ||
1628 | }; | ||
1629 | |||
1630 | static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = { | ||
1631 | { | ||
1632 | .pa_start = 0x480ba000, | ||
1633 | .pa_end = 0x480ba1ff, | ||
1634 | .flags = ADDR_TYPE_RT | ||
1635 | }, | ||
1636 | }; | ||
1637 | |||
1638 | /* l4_per -> mcspi4 */ | ||
1639 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = { | ||
1640 | .master = &omap44xx_l4_per_hwmod, | ||
1641 | .slave = &omap44xx_mcspi4_hwmod, | ||
1642 | .clk = "l4_div_ck", | ||
1643 | .addr = omap44xx_mcspi4_addrs, | ||
1644 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi4_addrs), | ||
1645 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1646 | }; | ||
1647 | |||
1648 | /* mcspi4 slave ports */ | ||
1649 | static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = { | ||
1650 | &omap44xx_l4_per__mcspi4, | ||
1651 | }; | ||
1652 | |||
1653 | static struct omap_hwmod omap44xx_mcspi4_hwmod = { | ||
1654 | .name = "mcspi4", | ||
1655 | .class = &omap44xx_mcspi_hwmod_class, | ||
1656 | .mpu_irqs = omap44xx_mcspi4_irqs, | ||
1657 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_irqs), | ||
1658 | .sdma_reqs = omap44xx_mcspi4_sdma_reqs, | ||
1659 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_sdma_reqs), | ||
1660 | .main_clk = "mcspi4_fck", | ||
1661 | .prcm = { | ||
1662 | .omap4 = { | ||
1663 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL, | ||
1664 | }, | ||
1665 | }, | ||
1666 | .slaves = omap44xx_mcspi4_slaves, | ||
1667 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves), | ||
1668 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1669 | }; | ||
1670 | |||
1671 | /* | ||
1437 | * 'mpu' class | 1672 | * 'mpu' class |
1438 | * mpu sub-system | 1673 | * mpu sub-system |
1439 | */ | 1674 | */ |
@@ -2110,6 +2345,12 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
2110 | &omap44xx_iva_seq0_hwmod, | 2345 | &omap44xx_iva_seq0_hwmod, |
2111 | &omap44xx_iva_seq1_hwmod, | 2346 | &omap44xx_iva_seq1_hwmod, |
2112 | 2347 | ||
2348 | /* mcspi class */ | ||
2349 | &omap44xx_mcspi1_hwmod, | ||
2350 | &omap44xx_mcspi2_hwmod, | ||
2351 | &omap44xx_mcspi3_hwmod, | ||
2352 | &omap44xx_mcspi4_hwmod, | ||
2353 | |||
2113 | /* mpu class */ | 2354 | /* mpu class */ |
2114 | &omap44xx_mpu_hwmod, | 2355 | &omap44xx_mpu_hwmod, |
2115 | 2356 | ||