Commit f806d7ba authored by Subramaniam C.A's avatar Subramaniam C.A Committed by Hari Kanigeri

OMAP4 - 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: default avatarC A Subramaniam <subramaniam.ca@ti.com>
Signed-off-by: default avatarRamesh Gupta G <grgupta@ti.com>
parent 0dd2c73d
...@@ -136,8 +136,11 @@ static inline void omap_init_camera(void) ...@@ -136,8 +136,11 @@ static inline void omap_init_camera(void)
#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
#ifdef CONFIG_ARCH_OMAP4
#define MBOX_REG_SIZE 0x130
#else
#define MBOX_REG_SIZE 0x120 #define MBOX_REG_SIZE 0x120
#endif
static struct resource omap2_mbox_resources[] = { static struct resource omap2_mbox_resources[] = {
{ {
.start = OMAP24XX_MAILBOX_BASE, .start = OMAP24XX_MAILBOX_BASE,
...@@ -166,6 +169,18 @@ static struct resource omap3_mbox_resources[] = { ...@@ -166,6 +169,18 @@ static struct resource omap3_mbox_resources[] = {
}, },
}; };
static struct resource omap4_mbox_resources[] = {
{
.start = OMAP44xx_MAILBOX_BASE,
.end = OMAP44xx_MAILBOX_BASE + MBOX_REG_SIZE - 1,
.flags = IORESOURCE_MEM,
},
{
.start = INT_44XX_MAIL_U0_MPU,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device mbox_device = { static struct platform_device mbox_device = {
.name = "omap2-mailbox", .name = "omap2-mailbox",
.id = -1, .id = -1,
...@@ -179,6 +194,9 @@ static inline void omap_init_mbox(void) ...@@ -179,6 +194,9 @@ static inline void omap_init_mbox(void)
} else if (cpu_is_omap3430()) { } else if (cpu_is_omap3430()) {
mbox_device.num_resources = ARRAY_SIZE(omap3_mbox_resources); mbox_device.num_resources = ARRAY_SIZE(omap3_mbox_resources);
mbox_device.resource = omap3_mbox_resources; mbox_device.resource = omap3_mbox_resources;
} else if (cpu_is_omap44xx()) {
mbox_device.num_resources = ARRAY_SIZE(omap4_mbox_resources);
mbox_device.resource = omap4_mbox_resources;
} else { } else {
pr_err("%s: platform not supported\n", __func__); pr_err("%s: platform not supported\n", __func__);
return; return;
......
...@@ -44,5 +44,7 @@ ...@@ -44,5 +44,7 @@
#define OMAP44XX_WKUPGEN_BASE 0x48281000 #define OMAP44XX_WKUPGEN_BASE 0x48281000
#define OMAP44XX_VA_WKUPGEN_BASE IO_ADDRESS(OMAP44XX_WKUPGEN_BASE) #define OMAP44XX_VA_WKUPGEN_BASE IO_ADDRESS(OMAP44XX_WKUPGEN_BASE)
#define OMAP44xx_MAILBOX_BASE (L4_44XX_BASE + 0xF4000)
#endif /* __ASM_ARCH_OMAP44XX_H */ #endif /* __ASM_ARCH_OMAP44XX_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment