1
From aa6cbaeb91cbc23678fb4633a6a0c657f06d9e5c Mon Sep 17 00:00:00 2001
2
From: Kishon Vijay Abraham I <kishon@ti.com>
3
Date: Thu, 24 Feb 2011 15:16:50 +0530
4
Subject: [PATCH 106/258] OMAP4: hwmod: Naming of address space
6
Added a name to address space belonging to SDMA and MPU facilitating
7
the driver to get the address space info by name. Added a revision
8
member inorder to facilitate the driver to differentiate between
9
mcbsp in different omap.
10
Also added a platform_get_irq in probe to get irq number by index since
11
from OMAP4, there will be a single irq line.
13
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
14
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
15
Signed-off-by: Tony Lindgren <tony@atomide.com>
17
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 8 ++++++++
18
arch/arm/plat-omap/include/plat/mcbsp.h | 1 +
19
arch/arm/plat-omap/mcbsp.c | 4 ++++
20
3 files changed, 13 insertions(+), 0 deletions(-)
22
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
23
index 79a8601..673b011 100644
24
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
25
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
27
#include <plat/gpio.h>
29
#include <plat/mcspi.h>
30
+#include <plat/mcbsp.h>
32
#include "omap_hwmod_common_data.h"
34
@@ -2737,6 +2738,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
35
static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
37
.sysc = &omap44xx_mcbsp_sysc,
38
+ .rev = MCBSP_CONFIG_TYPE4,
42
@@ -2752,6 +2754,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
44
static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
47
.pa_start = 0x40122000,
50
@@ -2770,6 +2773,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
52
static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
55
.pa_start = 0x49022000,
58
@@ -2823,6 +2827,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
60
static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
63
.pa_start = 0x40124000,
66
@@ -2841,6 +2846,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
68
static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
71
.pa_start = 0x49024000,
74
@@ -2894,6 +2900,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
76
static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
79
.pa_start = 0x40126000,
82
@@ -2912,6 +2919,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
84
static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
87
.pa_start = 0x49026000,
90
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h
91
index f084b6a..afcbb7b 100644
92
--- a/arch/arm/plat-omap/include/plat/mcbsp.h
93
+++ b/arch/arm/plat-omap/include/plat/mcbsp.h
94
@@ -39,6 +39,7 @@ static struct platform_device omap_mcbsp##port_nr = { \
96
#define MCBSP_CONFIG_TYPE2 0x2
97
#define MCBSP_CONFIG_TYPE3 0x3
98
+#define MCBSP_CONFIG_TYPE4 0x4
100
#define OMAP7XX_MCBSP1_BASE 0xfffb1000
101
#define OMAP7XX_MCBSP2_BASE 0xfffb1800
102
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
103
index 5f25ae5..62bd073 100644
104
--- a/arch/arm/plat-omap/mcbsp.c
105
+++ b/arch/arm/plat-omap/mcbsp.c
106
@@ -1812,6 +1812,10 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
107
mcbsp->tx_irq = platform_get_irq_byname(pdev, "tx");
108
mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx");
110
+ /* From OMAP4 there will be a single irq line */
111
+ if (mcbsp->tx_irq == -ENXIO)
112
+ mcbsp->tx_irq = platform_get_irq(pdev, 0);
114
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
116
dev_err(&pdev->dev, "%s:mcbsp%d has invalid rx DMA channel\n",