aboutsummaryrefslogtreecommitdiffstats
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
commit37801b3df60a000cc1d65ea8b472e841dc93ea75 (patch)
tree981e56a046141fff2df7da19217844d480e944c8
parent3cb72fa4fed52437484a699ba78ad926ff4483c5 (diff)
OMAP2430: hwmod data: Add McBSP
Add McBSP hwmod data for OMAP2430. Added a revision member inorder to facilitate the driver to differentiate between mcbsp in different omap. 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>
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c320
-rw-r--r--arch/arm/plat-omap/include/plat/mcbsp.h2
2 files changed, 322 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 91d2581c770a..1e65a4f5117b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -18,6 +18,7 @@
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/l3_2xxx.h> 23#include <plat/l3_2xxx.h>
23 24
@@ -51,6 +52,11 @@ static struct omap_hwmod omap2430_gpio3_hwmod;
51static struct omap_hwmod omap2430_gpio4_hwmod; 52static struct omap_hwmod omap2430_gpio4_hwmod;
52static struct omap_hwmod omap2430_gpio5_hwmod; 53static struct omap_hwmod omap2430_gpio5_hwmod;
53static struct omap_hwmod omap2430_dma_system_hwmod; 54static struct omap_hwmod omap2430_dma_system_hwmod;
55static struct omap_hwmod omap2430_mcbsp1_hwmod;
56static struct omap_hwmod omap2430_mcbsp2_hwmod;
57static struct omap_hwmod omap2430_mcbsp3_hwmod;
58static struct omap_hwmod omap2430_mcbsp4_hwmod;
59static struct omap_hwmod omap2430_mcbsp5_hwmod;
54static struct omap_hwmod omap2430_mcspi1_hwmod; 60static struct omap_hwmod omap2430_mcspi1_hwmod;
55static struct omap_hwmod omap2430_mcspi2_hwmod; 61static struct omap_hwmod omap2430_mcspi2_hwmod;
56static struct omap_hwmod omap2430_mcspi3_hwmod; 62static struct omap_hwmod omap2430_mcspi3_hwmod;
@@ -1575,7 +1581,314 @@ static struct omap_hwmod omap2430_usbhsotg_hwmod = {
1575 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 1581 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
1576}; 1582};
1577 1583
1584/*
1585 * 'mcbsp' class
1586 * multi channel buffered serial port controller
1587 */
1588
1589static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
1590 .rev_offs = 0x007C,
1591 .sysc_offs = 0x008C,
1592 .sysc_flags = (SYSC_HAS_SOFTRESET),
1593 .sysc_fields = &omap_hwmod_sysc_type1,
1594};
1595
1596static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
1597 .name = "mcbsp",
1598 .sysc = &omap2430_mcbsp_sysc,
1599 .rev = MCBSP_CONFIG_TYPE2,
1600};
1601
1602/* mcbsp1 */
1603static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
1604 { .name = "tx", .irq = 59 },
1605 { .name = "rx", .irq = 60 },
1606 { .name = "ovr", .irq = 61 },
1607 { .name = "common", .irq = 64 },
1608};
1609
1610static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
1611 { .name = "rx", .dma_req = 32 },
1612 { .name = "tx", .dma_req = 31 },
1613};
1614
1615static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = {
1616 {
1617 .name = "mpu",
1618 .pa_start = 0x48074000,
1619 .pa_end = 0x480740ff,
1620 .flags = ADDR_TYPE_RT
1621 },
1622};
1623
1624/* l4_core -> mcbsp1 */
1625static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
1626 .master = &omap2430_l4_core_hwmod,
1627 .slave = &omap2430_mcbsp1_hwmod,
1628 .clk = "mcbsp1_ick",
1629 .addr = omap2430_mcbsp1_addrs,
1630 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp1_addrs),
1631 .user = OCP_USER_MPU | OCP_USER_SDMA,
1632};
1633
1634/* mcbsp1 slave ports */
1635static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
1636 &omap2430_l4_core__mcbsp1,
1637};
1638
1639static struct omap_hwmod omap2430_mcbsp1_hwmod = {
1640 .name = "mcbsp1",
1641 .class = &omap2430_mcbsp_hwmod_class,
1642 .mpu_irqs = omap2430_mcbsp1_irqs,
1643 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs),
1644 .sdma_reqs = omap2430_mcbsp1_sdma_chs,
1645 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
1646 .main_clk = "mcbsp1_fck",
1647 .prcm = {
1648 .omap2 = {
1649 .prcm_reg_id = 1,
1650 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1651 .module_offs = CORE_MOD,
1652 .idlest_reg_id = 1,
1653 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1654 },
1655 },
1656 .slaves = omap2430_mcbsp1_slaves,
1657 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
1658 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1659};
1660
1661/* mcbsp2 */
1662static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
1663 { .name = "tx", .irq = 62 },
1664 { .name = "rx", .irq = 63 },
1665 { .name = "common", .irq = 16 },
1666};
1667
1668static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
1669 { .name = "rx", .dma_req = 34 },
1670 { .name = "tx", .dma_req = 33 },
1671};
1672
1673static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = {
1674 {
1675 .name = "mpu",
1676 .pa_start = 0x48076000,
1677 .pa_end = 0x480760ff,
1678 .flags = ADDR_TYPE_RT
1679 },
1680};
1681
1682/* l4_core -> mcbsp2 */
1683static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
1684 .master = &omap2430_l4_core_hwmod,
1685 .slave = &omap2430_mcbsp2_hwmod,
1686 .clk = "mcbsp2_ick",
1687 .addr = omap2430_mcbsp2_addrs,
1688 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp2_addrs),
1689 .user = OCP_USER_MPU | OCP_USER_SDMA,
1690};
1691
1692/* mcbsp2 slave ports */
1693static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
1694 &omap2430_l4_core__mcbsp2,
1695};
1696
1697static struct omap_hwmod omap2430_mcbsp2_hwmod = {
1698 .name = "mcbsp2",
1699 .class = &omap2430_mcbsp_hwmod_class,
1700 .mpu_irqs = omap2430_mcbsp2_irqs,
1701 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs),
1702 .sdma_reqs = omap2430_mcbsp2_sdma_chs,
1703 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
1704 .main_clk = "mcbsp2_fck",
1705 .prcm = {
1706 .omap2 = {
1707 .prcm_reg_id = 1,
1708 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1709 .module_offs = CORE_MOD,
1710 .idlest_reg_id = 1,
1711 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1712 },
1713 },
1714 .slaves = omap2430_mcbsp2_slaves,
1715 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
1716 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1717};
1718
1719/* mcbsp3 */
1720static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
1721 { .name = "tx", .irq = 89 },
1722 { .name = "rx", .irq = 90 },
1723 { .name = "common", .irq = 17 },
1724};
1725
1726static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
1727 { .name = "rx", .dma_req = 18 },
1728 { .name = "tx", .dma_req = 17 },
1729};
1730
1731static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
1732 {
1733 .name = "mpu",
1734 .pa_start = 0x4808C000,
1735 .pa_end = 0x4808C0ff,
1736 .flags = ADDR_TYPE_RT
1737 },
1738};
1578 1739
1740/* l4_core -> mcbsp3 */
1741static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
1742 .master = &omap2430_l4_core_hwmod,
1743 .slave = &omap2430_mcbsp3_hwmod,
1744 .clk = "mcbsp3_ick",
1745 .addr = omap2430_mcbsp3_addrs,
1746 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp3_addrs),
1747 .user = OCP_USER_MPU | OCP_USER_SDMA,
1748};
1749
1750/* mcbsp3 slave ports */
1751static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
1752 &omap2430_l4_core__mcbsp3,
1753};
1754
1755static struct omap_hwmod omap2430_mcbsp3_hwmod = {
1756 .name = "mcbsp3",
1757 .class = &omap2430_mcbsp_hwmod_class,
1758 .mpu_irqs = omap2430_mcbsp3_irqs,
1759 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs),
1760 .sdma_reqs = omap2430_mcbsp3_sdma_chs,
1761 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
1762 .main_clk = "mcbsp3_fck",
1763 .prcm = {
1764 .omap2 = {
1765 .prcm_reg_id = 1,
1766 .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
1767 .module_offs = CORE_MOD,
1768 .idlest_reg_id = 2,
1769 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
1770 },
1771 },
1772 .slaves = omap2430_mcbsp3_slaves,
1773 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
1774 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1775};
1776
1777/* mcbsp4 */
1778static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
1779 { .name = "tx", .irq = 54 },
1780 { .name = "rx", .irq = 55 },
1781 { .name = "common", .irq = 18 },
1782};
1783
1784static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
1785 { .name = "rx", .dma_req = 20 },
1786 { .name = "tx", .dma_req = 19 },
1787};
1788
1789static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
1790 {
1791 .name = "mpu",
1792 .pa_start = 0x4808E000,
1793 .pa_end = 0x4808E0ff,
1794 .flags = ADDR_TYPE_RT
1795 },
1796};
1797
1798/* l4_core -> mcbsp4 */
1799static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
1800 .master = &omap2430_l4_core_hwmod,
1801 .slave = &omap2430_mcbsp4_hwmod,
1802 .clk = "mcbsp4_ick",
1803 .addr = omap2430_mcbsp4_addrs,
1804 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp4_addrs),
1805 .user = OCP_USER_MPU | OCP_USER_SDMA,
1806};
1807
1808/* mcbsp4 slave ports */
1809static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
1810 &omap2430_l4_core__mcbsp4,
1811};
1812
1813static struct omap_hwmod omap2430_mcbsp4_hwmod = {
1814 .name = "mcbsp4",
1815 .class = &omap2430_mcbsp_hwmod_class,
1816 .mpu_irqs = omap2430_mcbsp4_irqs,
1817 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs),
1818 .sdma_reqs = omap2430_mcbsp4_sdma_chs,
1819 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
1820 .main_clk = "mcbsp4_fck",
1821 .prcm = {
1822 .omap2 = {
1823 .prcm_reg_id = 1,
1824 .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
1825 .module_offs = CORE_MOD,
1826 .idlest_reg_id = 2,
1827 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
1828 },
1829 },
1830 .slaves = omap2430_mcbsp4_slaves,
1831 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
1832 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1833};
1834
1835/* mcbsp5 */
1836static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
1837 { .name = "tx", .irq = 81 },
1838 { .name = "rx", .irq = 82 },
1839 { .name = "common", .irq = 19 },
1840};
1841
1842static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
1843 { .name = "rx", .dma_req = 22 },
1844 { .name = "tx", .dma_req = 21 },
1845};
1846
1847static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
1848 {
1849 .name = "mpu",
1850 .pa_start = 0x48096000,
1851 .pa_end = 0x480960ff,
1852 .flags = ADDR_TYPE_RT
1853 },
1854};
1855
1856/* l4_core -> mcbsp5 */
1857static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
1858 .master = &omap2430_l4_core_hwmod,
1859 .slave = &omap2430_mcbsp5_hwmod,
1860 .clk = "mcbsp5_ick",
1861 .addr = omap2430_mcbsp5_addrs,
1862 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp5_addrs),
1863 .user = OCP_USER_MPU | OCP_USER_SDMA,
1864};
1865
1866/* mcbsp5 slave ports */
1867static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
1868 &omap2430_l4_core__mcbsp5,
1869};
1870
1871static struct omap_hwmod omap2430_mcbsp5_hwmod = {
1872 .name = "mcbsp5",
1873 .class = &omap2430_mcbsp_hwmod_class,
1874 .mpu_irqs = omap2430_mcbsp5_irqs,
1875 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs),
1876 .sdma_reqs = omap2430_mcbsp5_sdma_chs,
1877 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
1878 .main_clk = "mcbsp5_fck",
1879 .prcm = {
1880 .omap2 = {
1881 .prcm_reg_id = 1,
1882 .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
1883 .module_offs = CORE_MOD,
1884 .idlest_reg_id = 2,
1885 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
1886 },
1887 },
1888 .slaves = omap2430_mcbsp5_slaves,
1889 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
1890 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1891};
1579 1892
1580static __initdata struct omap_hwmod *omap2430_hwmods[] = { 1893static __initdata struct omap_hwmod *omap2430_hwmods[] = {
1581 &omap2430_l3_main_hwmod, 1894 &omap2430_l3_main_hwmod,
@@ -1606,6 +1919,13 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = {
1606 /* dma_system class*/ 1919 /* dma_system class*/
1607 &omap2430_dma_system_hwmod, 1920 &omap2430_dma_system_hwmod,
1608 1921
1922 /* mcbsp class */
1923 &omap2430_mcbsp1_hwmod,
1924 &omap2430_mcbsp2_hwmod,
1925 &omap2430_mcbsp3_hwmod,
1926 &omap2430_mcbsp4_hwmod,
1927 &omap2430_mcbsp5_hwmod,
1928
1609 /* mailbox class */ 1929 /* mailbox class */
1610 &omap2430_mailbox_hwmod, 1930 &omap2430_mailbox_hwmod,
1611 1931
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h
index dc1a28299ae2..64491a5385e9 100644
--- a/arch/arm/plat-omap/include/plat/mcbsp.h
+++ b/arch/arm/plat-omap/include/plat/mcbsp.h
@@ -37,6 +37,8 @@ static struct platform_device omap_mcbsp##port_nr = { \
37 .id = OMAP_MCBSP##port_nr, \ 37 .id = OMAP_MCBSP##port_nr, \
38} 38}
39 39
40#define MCBSP_CONFIG_TYPE2 0x2
41
40#define OMAP7XX_MCBSP1_BASE 0xfffb1000 42#define OMAP7XX_MCBSP1_BASE 0xfffb1000
41#define OMAP7XX_MCBSP2_BASE 0xfffb1800 43#define OMAP7XX_MCBSP2_BASE 0xfffb1800
42 44