diff options
| author | Charulatha V <charu@ti.com> | 2011-02-24 04:46:49 -0500 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2011-02-24 16:01:53 -0500 |
| commit | dc48e5fc782f8d447aae2e82ba7453ddcf32c617 (patch) | |
| tree | 6a60e6645ea57f2ebe4f5d9b01ec486f6afe3f06 | |
| parent | 37801b3df60a000cc1d65ea8b472e841dc93ea75 (diff) | |
OMAP3: hwmod data: Add McBSP
Add McBSP hwmod data for OMAP3.
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_3xxx_data.c | 439 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/mcbsp.h | 1 |
2 files changed, 440 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 510d5e11a4ea..e1d89c0607e4 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <plat/i2c.h> | 23 | #include <plat/i2c.h> |
| 24 | #include <plat/gpio.h> | 24 | #include <plat/gpio.h> |
| 25 | #include <plat/smartreflex.h> | 25 | #include <plat/smartreflex.h> |
| 26 | #include <plat/mcbsp.h> | ||
| 26 | #include <plat/mcspi.h> | 27 | #include <plat/mcspi.h> |
| 27 | 28 | ||
| 28 | #include "omap_hwmod_common_data.h" | 29 | #include "omap_hwmod_common_data.h" |
| @@ -72,6 +73,14 @@ static struct omap_hwmod am35xx_usbhsotg_hwmod; | |||
| 72 | 73 | ||
| 73 | static struct omap_hwmod omap3xxx_dma_system_hwmod; | 74 | static struct omap_hwmod omap3xxx_dma_system_hwmod; |
| 74 | 75 | ||
| 76 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod; | ||
| 77 | static struct omap_hwmod omap3xxx_mcbsp2_hwmod; | ||
| 78 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod; | ||
| 79 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod; | ||
| 80 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod; | ||
| 81 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod; | ||
| 82 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod; | ||
| 83 | |||
| 75 | /* L3 -> L4_CORE interface */ | 84 | /* L3 -> L4_CORE interface */ |
| 76 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { | 85 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { |
| 77 | .master = &omap3xxx_l3_main_hwmod, | 86 | .master = &omap3xxx_l3_main_hwmod, |
| @@ -1729,6 +1738,427 @@ static struct omap_hwmod omap3xxx_dma_system_hwmod = { | |||
| 1729 | .flags = HWMOD_NO_IDLEST, | 1738 | .flags = HWMOD_NO_IDLEST, |
| 1730 | }; | 1739 | }; |
| 1731 | 1740 | ||
| 1741 | /* | ||
| 1742 | * 'mcbsp' class | ||
| 1743 | * multi channel buffered serial port controller | ||
| 1744 | */ | ||
| 1745 | |||
| 1746 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = { | ||
| 1747 | .sysc_offs = 0x008c, | ||
| 1748 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP | | ||
| 1749 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
| 1750 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 1751 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1752 | .clockact = 0x2, | ||
| 1753 | }; | ||
| 1754 | |||
| 1755 | static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = { | ||
| 1756 | .name = "mcbsp", | ||
| 1757 | .sysc = &omap3xxx_mcbsp_sysc, | ||
| 1758 | .rev = MCBSP_CONFIG_TYPE3, | ||
| 1759 | }; | ||
| 1760 | |||
| 1761 | /* mcbsp1 */ | ||
| 1762 | static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { | ||
| 1763 | { .name = "irq", .irq = 16 }, | ||
| 1764 | { .name = "tx", .irq = 59 }, | ||
| 1765 | { .name = "rx", .irq = 60 }, | ||
| 1766 | }; | ||
| 1767 | |||
| 1768 | static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = { | ||
| 1769 | { .name = "rx", .dma_req = 32 }, | ||
| 1770 | { .name = "tx", .dma_req = 31 }, | ||
| 1771 | }; | ||
| 1772 | |||
| 1773 | static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = { | ||
| 1774 | { | ||
| 1775 | .name = "mpu", | ||
| 1776 | .pa_start = 0x48074000, | ||
| 1777 | .pa_end = 0x480740ff, | ||
| 1778 | .flags = ADDR_TYPE_RT | ||
| 1779 | }, | ||
| 1780 | }; | ||
| 1781 | |||
| 1782 | /* l4_core -> mcbsp1 */ | ||
| 1783 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = { | ||
| 1784 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1785 | .slave = &omap3xxx_mcbsp1_hwmod, | ||
| 1786 | .clk = "mcbsp1_ick", | ||
| 1787 | .addr = omap3xxx_mcbsp1_addrs, | ||
| 1788 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_addrs), | ||
| 1789 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1790 | }; | ||
| 1791 | |||
| 1792 | /* mcbsp1 slave ports */ | ||
| 1793 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = { | ||
| 1794 | &omap3xxx_l4_core__mcbsp1, | ||
| 1795 | }; | ||
| 1796 | |||
| 1797 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { | ||
| 1798 | .name = "mcbsp1", | ||
| 1799 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 1800 | .mpu_irqs = omap3xxx_mcbsp1_irqs, | ||
| 1801 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_irqs), | ||
| 1802 | .sdma_reqs = omap3xxx_mcbsp1_sdma_chs, | ||
| 1803 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_sdma_chs), | ||
| 1804 | .main_clk = "mcbsp1_fck", | ||
| 1805 | .prcm = { | ||
| 1806 | .omap2 = { | ||
| 1807 | .prcm_reg_id = 1, | ||
| 1808 | .module_bit = OMAP3430_EN_MCBSP1_SHIFT, | ||
| 1809 | .module_offs = CORE_MOD, | ||
| 1810 | .idlest_reg_id = 1, | ||
| 1811 | .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT, | ||
| 1812 | }, | ||
| 1813 | }, | ||
| 1814 | .slaves = omap3xxx_mcbsp1_slaves, | ||
| 1815 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves), | ||
| 1816 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 1817 | }; | ||
| 1818 | |||
| 1819 | /* mcbsp2 */ | ||
| 1820 | static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { | ||
| 1821 | { .name = "irq", .irq = 17 }, | ||
| 1822 | { .name = "tx", .irq = 62 }, | ||
| 1823 | { .name = "rx", .irq = 63 }, | ||
| 1824 | }; | ||
| 1825 | |||
| 1826 | static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = { | ||
| 1827 | { .name = "rx", .dma_req = 34 }, | ||
| 1828 | { .name = "tx", .dma_req = 33 }, | ||
| 1829 | }; | ||
| 1830 | |||
| 1831 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = { | ||
| 1832 | { | ||
| 1833 | .name = "mpu", | ||
| 1834 | .pa_start = 0x49022000, | ||
| 1835 | .pa_end = 0x490220ff, | ||
| 1836 | .flags = ADDR_TYPE_RT | ||
| 1837 | }, | ||
| 1838 | }; | ||
| 1839 | |||
| 1840 | /* l4_per -> mcbsp2 */ | ||
| 1841 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = { | ||
| 1842 | .master = &omap3xxx_l4_per_hwmod, | ||
| 1843 | .slave = &omap3xxx_mcbsp2_hwmod, | ||
| 1844 | .clk = "mcbsp2_ick", | ||
| 1845 | .addr = omap3xxx_mcbsp2_addrs, | ||
| 1846 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_addrs), | ||
| 1847 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1848 | }; | ||
| 1849 | |||
| 1850 | /* mcbsp2 slave ports */ | ||
| 1851 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = { | ||
| 1852 | &omap3xxx_l4_per__mcbsp2, | ||
| 1853 | }; | ||
| 1854 | |||
| 1855 | static struct omap_hwmod omap3xxx_mcbsp2_hwmod = { | ||
| 1856 | .name = "mcbsp2", | ||
| 1857 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 1858 | .mpu_irqs = omap3xxx_mcbsp2_irqs, | ||
| 1859 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_irqs), | ||
| 1860 | .sdma_reqs = omap3xxx_mcbsp2_sdma_chs, | ||
| 1861 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sdma_chs), | ||
| 1862 | .main_clk = "mcbsp2_fck", | ||
| 1863 | .prcm = { | ||
| 1864 | .omap2 = { | ||
| 1865 | .prcm_reg_id = 1, | ||
| 1866 | .module_bit = OMAP3430_EN_MCBSP2_SHIFT, | ||
| 1867 | .module_offs = OMAP3430_PER_MOD, | ||
| 1868 | .idlest_reg_id = 1, | ||
| 1869 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, | ||
| 1870 | }, | ||
| 1871 | }, | ||
| 1872 | .slaves = omap3xxx_mcbsp2_slaves, | ||
| 1873 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves), | ||
| 1874 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 1875 | }; | ||
| 1876 | |||
| 1877 | /* mcbsp3 */ | ||
| 1878 | static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { | ||
| 1879 | { .name = "irq", .irq = 22 }, | ||
| 1880 | { .name = "tx", .irq = 89 }, | ||
| 1881 | { .name = "rx", .irq = 90 }, | ||
| 1882 | }; | ||
| 1883 | |||
| 1884 | static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = { | ||
| 1885 | { .name = "rx", .dma_req = 18 }, | ||
| 1886 | { .name = "tx", .dma_req = 17 }, | ||
| 1887 | }; | ||
| 1888 | |||
| 1889 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = { | ||
| 1890 | { | ||
| 1891 | .name = "mpu", | ||
| 1892 | .pa_start = 0x49024000, | ||
| 1893 | .pa_end = 0x490240ff, | ||
| 1894 | .flags = ADDR_TYPE_RT | ||
| 1895 | }, | ||
| 1896 | }; | ||
| 1897 | |||
| 1898 | /* l4_per -> mcbsp3 */ | ||
| 1899 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = { | ||
| 1900 | .master = &omap3xxx_l4_per_hwmod, | ||
| 1901 | .slave = &omap3xxx_mcbsp3_hwmod, | ||
| 1902 | .clk = "mcbsp3_ick", | ||
| 1903 | .addr = omap3xxx_mcbsp3_addrs, | ||
| 1904 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_addrs), | ||
| 1905 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1906 | }; | ||
| 1907 | |||
| 1908 | /* mcbsp3 slave ports */ | ||
| 1909 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = { | ||
| 1910 | &omap3xxx_l4_per__mcbsp3, | ||
| 1911 | }; | ||
| 1912 | |||
| 1913 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { | ||
| 1914 | .name = "mcbsp3", | ||
| 1915 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 1916 | .mpu_irqs = omap3xxx_mcbsp3_irqs, | ||
| 1917 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_irqs), | ||
| 1918 | .sdma_reqs = omap3xxx_mcbsp3_sdma_chs, | ||
| 1919 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sdma_chs), | ||
| 1920 | .main_clk = "mcbsp3_fck", | ||
| 1921 | .prcm = { | ||
| 1922 | .omap2 = { | ||
| 1923 | .prcm_reg_id = 1, | ||
| 1924 | .module_bit = OMAP3430_EN_MCBSP3_SHIFT, | ||
| 1925 | .module_offs = OMAP3430_PER_MOD, | ||
| 1926 | .idlest_reg_id = 1, | ||
| 1927 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, | ||
| 1928 | }, | ||
| 1929 | }, | ||
| 1930 | .slaves = omap3xxx_mcbsp3_slaves, | ||
| 1931 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves), | ||
| 1932 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 1933 | }; | ||
| 1934 | |||
| 1935 | /* mcbsp4 */ | ||
| 1936 | static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = { | ||
| 1937 | { .name = "irq", .irq = 23 }, | ||
| 1938 | { .name = "tx", .irq = 54 }, | ||
| 1939 | { .name = "rx", .irq = 55 }, | ||
| 1940 | }; | ||
| 1941 | |||
| 1942 | static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { | ||
| 1943 | { .name = "rx", .dma_req = 20 }, | ||
| 1944 | { .name = "tx", .dma_req = 19 }, | ||
| 1945 | }; | ||
| 1946 | |||
| 1947 | static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = { | ||
| 1948 | { | ||
| 1949 | .name = "mpu", | ||
| 1950 | .pa_start = 0x49026000, | ||
| 1951 | .pa_end = 0x490260ff, | ||
| 1952 | .flags = ADDR_TYPE_RT | ||
| 1953 | }, | ||
| 1954 | }; | ||
| 1955 | |||
| 1956 | /* l4_per -> mcbsp4 */ | ||
| 1957 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = { | ||
| 1958 | .master = &omap3xxx_l4_per_hwmod, | ||
| 1959 | .slave = &omap3xxx_mcbsp4_hwmod, | ||
| 1960 | .clk = "mcbsp4_ick", | ||
| 1961 | .addr = omap3xxx_mcbsp4_addrs, | ||
| 1962 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_addrs), | ||
| 1963 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1964 | }; | ||
| 1965 | |||
| 1966 | /* mcbsp4 slave ports */ | ||
| 1967 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = { | ||
| 1968 | &omap3xxx_l4_per__mcbsp4, | ||
| 1969 | }; | ||
| 1970 | |||
| 1971 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { | ||
| 1972 | .name = "mcbsp4", | ||
| 1973 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 1974 | .mpu_irqs = omap3xxx_mcbsp4_irqs, | ||
| 1975 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_irqs), | ||
| 1976 | .sdma_reqs = omap3xxx_mcbsp4_sdma_chs, | ||
| 1977 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_sdma_chs), | ||
| 1978 | .main_clk = "mcbsp4_fck", | ||
| 1979 | .prcm = { | ||
| 1980 | .omap2 = { | ||
| 1981 | .prcm_reg_id = 1, | ||
| 1982 | .module_bit = OMAP3430_EN_MCBSP4_SHIFT, | ||
| 1983 | .module_offs = OMAP3430_PER_MOD, | ||
| 1984 | .idlest_reg_id = 1, | ||
| 1985 | .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT, | ||
| 1986 | }, | ||
| 1987 | }, | ||
| 1988 | .slaves = omap3xxx_mcbsp4_slaves, | ||
| 1989 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves), | ||
| 1990 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 1991 | }; | ||
| 1992 | |||
| 1993 | /* mcbsp5 */ | ||
| 1994 | static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = { | ||
| 1995 | { .name = "irq", .irq = 27 }, | ||
| 1996 | { .name = "tx", .irq = 81 }, | ||
| 1997 | { .name = "rx", .irq = 82 }, | ||
| 1998 | }; | ||
| 1999 | |||
| 2000 | static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { | ||
| 2001 | { .name = "rx", .dma_req = 22 }, | ||
| 2002 | { .name = "tx", .dma_req = 21 }, | ||
| 2003 | }; | ||
| 2004 | |||
| 2005 | static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = { | ||
| 2006 | { | ||
| 2007 | .name = "mpu", | ||
| 2008 | .pa_start = 0x48096000, | ||
| 2009 | .pa_end = 0x480960ff, | ||
| 2010 | .flags = ADDR_TYPE_RT | ||
| 2011 | }, | ||
| 2012 | }; | ||
| 2013 | |||
| 2014 | /* l4_core -> mcbsp5 */ | ||
| 2015 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = { | ||
| 2016 | .master = &omap3xxx_l4_core_hwmod, | ||
| 2017 | .slave = &omap3xxx_mcbsp5_hwmod, | ||
| 2018 | .clk = "mcbsp5_ick", | ||
| 2019 | .addr = omap3xxx_mcbsp5_addrs, | ||
| 2020 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_addrs), | ||
| 2021 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2022 | }; | ||
| 2023 | |||
| 2024 | /* mcbsp5 slave ports */ | ||
| 2025 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = { | ||
| 2026 | &omap3xxx_l4_core__mcbsp5, | ||
| 2027 | }; | ||
| 2028 | |||
| 2029 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { | ||
| 2030 | .name = "mcbsp5", | ||
| 2031 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 2032 | .mpu_irqs = omap3xxx_mcbsp5_irqs, | ||
| 2033 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_irqs), | ||
| 2034 | .sdma_reqs = omap3xxx_mcbsp5_sdma_chs, | ||
| 2035 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_sdma_chs), | ||
| 2036 | .main_clk = "mcbsp5_fck", | ||
| 2037 | .prcm = { | ||
| 2038 | .omap2 = { | ||
| 2039 | .prcm_reg_id = 1, | ||
| 2040 | .module_bit = OMAP3430_EN_MCBSP5_SHIFT, | ||
| 2041 | .module_offs = CORE_MOD, | ||
| 2042 | .idlest_reg_id = 1, | ||
| 2043 | .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT, | ||
| 2044 | }, | ||
| 2045 | }, | ||
| 2046 | .slaves = omap3xxx_mcbsp5_slaves, | ||
| 2047 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves), | ||
| 2048 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2049 | }; | ||
| 2050 | /* 'mcbsp sidetone' class */ | ||
| 2051 | |||
| 2052 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = { | ||
| 2053 | .sysc_offs = 0x0010, | ||
| 2054 | .sysc_flags = SYSC_HAS_AUTOIDLE, | ||
| 2055 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2056 | }; | ||
| 2057 | |||
| 2058 | static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = { | ||
| 2059 | .name = "mcbsp_sidetone", | ||
| 2060 | .sysc = &omap3xxx_mcbsp_sidetone_sysc, | ||
| 2061 | }; | ||
| 2062 | |||
| 2063 | /* mcbsp2_sidetone */ | ||
| 2064 | static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { | ||
| 2065 | { .name = "irq", .irq = 4 }, | ||
| 2066 | }; | ||
| 2067 | |||
| 2068 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = { | ||
| 2069 | { | ||
| 2070 | .name = "sidetone", | ||
| 2071 | .pa_start = 0x49028000, | ||
| 2072 | .pa_end = 0x490280ff, | ||
| 2073 | .flags = ADDR_TYPE_RT | ||
| 2074 | }, | ||
| 2075 | }; | ||
| 2076 | |||
| 2077 | /* l4_per -> mcbsp2_sidetone */ | ||
| 2078 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = { | ||
| 2079 | .master = &omap3xxx_l4_per_hwmod, | ||
| 2080 | .slave = &omap3xxx_mcbsp2_sidetone_hwmod, | ||
| 2081 | .clk = "mcbsp2_ick", | ||
| 2082 | .addr = omap3xxx_mcbsp2_sidetone_addrs, | ||
| 2083 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_addrs), | ||
| 2084 | .user = OCP_USER_MPU, | ||
| 2085 | }; | ||
| 2086 | |||
| 2087 | /* mcbsp2_sidetone slave ports */ | ||
| 2088 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = { | ||
| 2089 | &omap3xxx_l4_per__mcbsp2_sidetone, | ||
| 2090 | }; | ||
| 2091 | |||
| 2092 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { | ||
| 2093 | .name = "mcbsp2_sidetone", | ||
| 2094 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, | ||
| 2095 | .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs, | ||
| 2096 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_irqs), | ||
| 2097 | .main_clk = "mcbsp2_fck", | ||
| 2098 | .prcm = { | ||
| 2099 | .omap2 = { | ||
| 2100 | .prcm_reg_id = 1, | ||
| 2101 | .module_bit = OMAP3430_EN_MCBSP2_SHIFT, | ||
| 2102 | .module_offs = OMAP3430_PER_MOD, | ||
| 2103 | .idlest_reg_id = 1, | ||
| 2104 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, | ||
| 2105 | }, | ||
| 2106 | }, | ||
| 2107 | .slaves = omap3xxx_mcbsp2_sidetone_slaves, | ||
| 2108 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves), | ||
| 2109 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2110 | }; | ||
| 2111 | |||
| 2112 | /* mcbsp3_sidetone */ | ||
| 2113 | static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { | ||
| 2114 | { .name = "irq", .irq = 5 }, | ||
| 2115 | }; | ||
| 2116 | |||
| 2117 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = { | ||
| 2118 | { | ||
| 2119 | .name = "sidetone", | ||
| 2120 | .pa_start = 0x4902A000, | ||
| 2121 | .pa_end = 0x4902A0ff, | ||
| 2122 | .flags = ADDR_TYPE_RT | ||
| 2123 | }, | ||
| 2124 | }; | ||
| 2125 | |||
| 2126 | /* l4_per -> mcbsp3_sidetone */ | ||
| 2127 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = { | ||
| 2128 | .master = &omap3xxx_l4_per_hwmod, | ||
| 2129 | .slave = &omap3xxx_mcbsp3_sidetone_hwmod, | ||
| 2130 | .clk = "mcbsp3_ick", | ||
| 2131 | .addr = omap3xxx_mcbsp3_sidetone_addrs, | ||
| 2132 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_addrs), | ||
| 2133 | .user = OCP_USER_MPU, | ||
| 2134 | }; | ||
| 2135 | |||
| 2136 | /* mcbsp3_sidetone slave ports */ | ||
| 2137 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = { | ||
| 2138 | &omap3xxx_l4_per__mcbsp3_sidetone, | ||
| 2139 | }; | ||
| 2140 | |||
| 2141 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { | ||
| 2142 | .name = "mcbsp3_sidetone", | ||
| 2143 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, | ||
| 2144 | .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs, | ||
| 2145 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_irqs), | ||
| 2146 | .main_clk = "mcbsp3_fck", | ||
| 2147 | .prcm = { | ||
| 2148 | .omap2 = { | ||
| 2149 | .prcm_reg_id = 1, | ||
| 2150 | .module_bit = OMAP3430_EN_MCBSP3_SHIFT, | ||
| 2151 | .module_offs = OMAP3430_PER_MOD, | ||
| 2152 | .idlest_reg_id = 1, | ||
| 2153 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, | ||
| 2154 | }, | ||
| 2155 | }, | ||
| 2156 | .slaves = omap3xxx_mcbsp3_sidetone_slaves, | ||
| 2157 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves), | ||
| 2158 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2159 | }; | ||
| 2160 | |||
| 2161 | |||
| 1732 | /* SR common */ | 2162 | /* SR common */ |
| 1733 | static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { | 2163 | static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { |
| 1734 | .clkact_shift = 20, | 2164 | .clkact_shift = 20, |
| @@ -2321,6 +2751,15 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | |||
| 2321 | /* dma_system class*/ | 2751 | /* dma_system class*/ |
| 2322 | &omap3xxx_dma_system_hwmod, | 2752 | &omap3xxx_dma_system_hwmod, |
| 2323 | 2753 | ||
| 2754 | /* mcbsp class */ | ||
| 2755 | &omap3xxx_mcbsp1_hwmod, | ||
| 2756 | &omap3xxx_mcbsp2_hwmod, | ||
| 2757 | &omap3xxx_mcbsp3_hwmod, | ||
| 2758 | &omap3xxx_mcbsp4_hwmod, | ||
| 2759 | &omap3xxx_mcbsp5_hwmod, | ||
| 2760 | &omap3xxx_mcbsp2_sidetone_hwmod, | ||
| 2761 | &omap3xxx_mcbsp3_sidetone_hwmod, | ||
| 2762 | |||
| 2324 | /* mailbox class */ | 2763 | /* mailbox class */ |
| 2325 | &omap3xxx_mailbox_hwmod, | 2764 | &omap3xxx_mailbox_hwmod, |
| 2326 | 2765 | ||
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index 64491a5385e9..f084b6acfbf2 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
| @@ -38,6 +38,7 @@ static struct platform_device omap_mcbsp##port_nr = { \ | |||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | #define MCBSP_CONFIG_TYPE2 0x2 | 40 | #define MCBSP_CONFIG_TYPE2 0x2 |
| 41 | #define MCBSP_CONFIG_TYPE3 0x3 | ||
| 41 | 42 | ||
| 42 | #define OMAP7XX_MCBSP1_BASE 0xfffb1000 | 43 | #define OMAP7XX_MCBSP1_BASE 0xfffb1000 |
| 43 | #define OMAP7XX_MCBSP2_BASE 0xfffb1800 | 44 | #define OMAP7XX_MCBSP2_BASE 0xfffb1800 |
