diff options
| author | Kishon Vijay Abraham I <kishon@ti.com> | 2011-02-24 04:46:50 -0500 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2011-02-24 16:02:13 -0500 |
| commit | cb7e9ded3240d717d1d24812d33b3ef2c98c084e (patch) | |
| tree | d0712c16098649b059882954b9fa7e93fbdb45a8 | |
| parent | dc48e5fc782f8d447aae2e82ba7453ddcf32c617 (diff) | |
OMAP4: hwmod: Naming of address space
Added a name to address space belonging to SDMA and MPU facilitating
the driver to get the address space info by name. Added a revision
member inorder to facilitate the driver to differentiate between
mcbsp in different omap.
Also added a platform_get_irq in probe to get irq number by index since
from OMAP4, there will be a single irq line.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 8 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/mcbsp.h | 1 | ||||
| -rw-r--r-- | arch/arm/plat-omap/mcbsp.c | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 79a860178913..673b011403cb 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <plat/gpio.h> | 25 | #include <plat/gpio.h> |
| 26 | #include <plat/dma.h> | 26 | #include <plat/dma.h> |
| 27 | #include <plat/mcspi.h> | 27 | #include <plat/mcspi.h> |
| 28 | #include <plat/mcbsp.h> | ||
| 28 | 29 | ||
| 29 | #include "omap_hwmod_common_data.h" | 30 | #include "omap_hwmod_common_data.h" |
| 30 | 31 | ||
| @@ -2737,6 +2738,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = { | |||
| 2737 | static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = { | 2738 | static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = { |
| 2738 | .name = "mcbsp", | 2739 | .name = "mcbsp", |
| 2739 | .sysc = &omap44xx_mcbsp_sysc, | 2740 | .sysc = &omap44xx_mcbsp_sysc, |
| 2741 | .rev = MCBSP_CONFIG_TYPE4, | ||
| 2740 | }; | 2742 | }; |
| 2741 | 2743 | ||
| 2742 | /* mcbsp1 */ | 2744 | /* mcbsp1 */ |
| @@ -2752,6 +2754,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = { | |||
| 2752 | 2754 | ||
| 2753 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { | 2755 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { |
| 2754 | { | 2756 | { |
| 2757 | .name = "mpu", | ||
| 2755 | .pa_start = 0x40122000, | 2758 | .pa_start = 0x40122000, |
| 2756 | .pa_end = 0x401220ff, | 2759 | .pa_end = 0x401220ff, |
| 2757 | .flags = ADDR_TYPE_RT | 2760 | .flags = ADDR_TYPE_RT |
| @@ -2770,6 +2773,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = { | |||
| 2770 | 2773 | ||
| 2771 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = { | 2774 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = { |
| 2772 | { | 2775 | { |
| 2776 | .name = "dma", | ||
| 2773 | .pa_start = 0x49022000, | 2777 | .pa_start = 0x49022000, |
| 2774 | .pa_end = 0x490220ff, | 2778 | .pa_end = 0x490220ff, |
| 2775 | .flags = ADDR_TYPE_RT | 2779 | .flags = ADDR_TYPE_RT |
| @@ -2823,6 +2827,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = { | |||
| 2823 | 2827 | ||
| 2824 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { | 2828 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { |
| 2825 | { | 2829 | { |
| 2830 | .name = "mpu", | ||
| 2826 | .pa_start = 0x40124000, | 2831 | .pa_start = 0x40124000, |
| 2827 | .pa_end = 0x401240ff, | 2832 | .pa_end = 0x401240ff, |
| 2828 | .flags = ADDR_TYPE_RT | 2833 | .flags = ADDR_TYPE_RT |
| @@ -2841,6 +2846,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = { | |||
| 2841 | 2846 | ||
| 2842 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = { | 2847 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = { |
| 2843 | { | 2848 | { |
| 2849 | .name = "dma", | ||
| 2844 | .pa_start = 0x49024000, | 2850 | .pa_start = 0x49024000, |
| 2845 | .pa_end = 0x490240ff, | 2851 | .pa_end = 0x490240ff, |
| 2846 | .flags = ADDR_TYPE_RT | 2852 | .flags = ADDR_TYPE_RT |
| @@ -2894,6 +2900,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = { | |||
| 2894 | 2900 | ||
| 2895 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { | 2901 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { |
| 2896 | { | 2902 | { |
| 2903 | .name = "mpu", | ||
| 2897 | .pa_start = 0x40126000, | 2904 | .pa_start = 0x40126000, |
| 2898 | .pa_end = 0x401260ff, | 2905 | .pa_end = 0x401260ff, |
| 2899 | .flags = ADDR_TYPE_RT | 2906 | .flags = ADDR_TYPE_RT |
| @@ -2912,6 +2919,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = { | |||
| 2912 | 2919 | ||
| 2913 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = { | 2920 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = { |
| 2914 | { | 2921 | { |
| 2922 | .name = "dma", | ||
| 2915 | .pa_start = 0x49026000, | 2923 | .pa_start = 0x49026000, |
| 2916 | .pa_end = 0x490260ff, | 2924 | .pa_end = 0x490260ff, |
| 2917 | .flags = ADDR_TYPE_RT | 2925 | .flags = ADDR_TYPE_RT |
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index f084b6acfbf2..afcbb7bb0165 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
| @@ -39,6 +39,7 @@ static struct platform_device omap_mcbsp##port_nr = { \ | |||
| 39 | 39 | ||
| 40 | #define MCBSP_CONFIG_TYPE2 0x2 | 40 | #define MCBSP_CONFIG_TYPE2 0x2 |
| 41 | #define MCBSP_CONFIG_TYPE3 0x3 | 41 | #define MCBSP_CONFIG_TYPE3 0x3 |
| 42 | #define MCBSP_CONFIG_TYPE4 0x4 | ||
| 42 | 43 | ||
| 43 | #define OMAP7XX_MCBSP1_BASE 0xfffb1000 | 44 | #define OMAP7XX_MCBSP1_BASE 0xfffb1000 |
| 44 | #define OMAP7XX_MCBSP2_BASE 0xfffb1800 | 45 | #define OMAP7XX_MCBSP2_BASE 0xfffb1800 |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 5f25ae5f9c1d..62bd073b0f8f 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
| @@ -1812,6 +1812,10 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev) | |||
| 1812 | mcbsp->tx_irq = platform_get_irq_byname(pdev, "tx"); | 1812 | mcbsp->tx_irq = platform_get_irq_byname(pdev, "tx"); |
| 1813 | mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx"); | 1813 | mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx"); |
| 1814 | 1814 | ||
| 1815 | /* From OMAP4 there will be a single irq line */ | ||
| 1816 | if (mcbsp->tx_irq == -ENXIO) | ||
| 1817 | mcbsp->tx_irq = platform_get_irq(pdev, 0); | ||
| 1818 | |||
| 1815 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); | 1819 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); |
| 1816 | if (!res) { | 1820 | if (!res) { |
| 1817 | dev_err(&pdev->dev, "%s:mcbsp%d has invalid rx DMA channel\n", | 1821 | dev_err(&pdev->dev, "%s:mcbsp%d has invalid rx DMA channel\n", |
