summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorC A Subramaniam2009-11-22 19:11:18 +0100
committerTony Lindgren2009-11-22 19:24:33 +0100
commit454bf340c986b798cd4c2fd676caffa2c1e61482 (patch)
treec824168354f34bf26b26b3af22922cf98f788131 /arch/arm/mach-omap2/devices.c
parentomap: mailbox: Add build specific changes to support omap mailbox (diff)
downloadkernel-qcow2-linux-454bf340c986b798cd4c2fd676caffa2c1e61482.tar.gz
kernel-qcow2-linux-454bf340c986b798cd4c2fd676caffa2c1e61482.tar.xz
kernel-qcow2-linux-454bf340c986b798cd4c2fd676caffa2c1e61482.zip
omap: mailbox: Add resources and mailbox register base address for OMAP4 mailbox
This patch adds resource information of mailbox driver for OMAP4 mailbox module. Register base address also added Signed-off-by: C A Subramaniam <subramaniam.ca@ti.com> Signed-off-by: Ramesh Gupta G <grgupta@ti.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c36
1 files changed, 27 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 8b6cd8c82dd2..733d3dcff98b 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -136,9 +136,10 @@ static inline void omap_init_camera(void)
#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
-#define MBOX_REG_SIZE 0x120
+#define MBOX_REG_SIZE 0x120
-static struct resource omap2_mbox_resources[] = {
+#ifdef CONFIG_ARCH_OMAP2
+static struct resource omap_mbox_resources[] = {
{
.start = OMAP24XX_MAILBOX_BASE,
.end = OMAP24XX_MAILBOX_BASE + MBOX_REG_SIZE - 1,
@@ -153,8 +154,10 @@ static struct resource omap2_mbox_resources[] = {
.flags = IORESOURCE_IRQ,
},
};
+#endif
-static struct resource omap3_mbox_resources[] = {
+#ifdef CONFIG_ARCH_OMAP3
+static struct resource omap_mbox_resources[] = {
{
.start = OMAP34XX_MAILBOX_BASE,
.end = OMAP34XX_MAILBOX_BASE + MBOX_REG_SIZE - 1,
@@ -165,6 +168,24 @@ static struct resource omap3_mbox_resources[] = {
.flags = IORESOURCE_IRQ,
},
};
+#endif
+
+#ifdef CONFIG_ARCH_OMAP4
+
+#define OMAP4_MBOX_REG_SIZE 0x130
+static struct resource omap_mbox_resources[] = {
+ {
+ .start = OMAP44XX_MAILBOX_BASE,
+ .end = OMAP44XX_MAILBOX_BASE +
+ OMAP4_MBOX_REG_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = INT_44XX_MAIL_U0_MPU,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+#endif
static struct platform_device mbox_device = {
.name = "omap2-mailbox",
@@ -173,12 +194,9 @@ static struct platform_device mbox_device = {
static inline void omap_init_mbox(void)
{
- if (cpu_is_omap2420()) {
- mbox_device.num_resources = ARRAY_SIZE(omap2_mbox_resources);
- mbox_device.resource = omap2_mbox_resources;
- } else if (cpu_is_omap3430()) {
- mbox_device.num_resources = ARRAY_SIZE(omap3_mbox_resources);
- mbox_device.resource = omap3_mbox_resources;
+ if (cpu_is_omap2420() || cpu_is_omap3430() || cpu_is_omap44xx()) {
+ mbox_device.num_resources = ARRAY_SIZE(omap_mbox_resources);
+ mbox_device.resource = omap_mbox_resources;
} else {
pr_err("%s: platform not supported\n", __func__);
return;