Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172806
b: refs/heads/master
c: 454bf34
h: refs/heads/master
v: v3
  • Loading branch information
C A Subramaniam authored and Tony Lindgren committed Nov 22, 2009
1 parent d7af847 commit 8762b78
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59fdc6ebda441a26ec055d61cf9d670a33eeca2d
refs/heads/master: 454bf340c986b798cd4c2fd676caffa2c1e61482
36 changes: 27 additions & 9 deletions trunk/arch/arm/mach-omap2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-omap/include/plat/omap44xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@
#define OMAP44XX_LOCAL_TWD_BASE 0x48240600
#define OMAP44XX_WKUPGEN_BASE 0x48281000

#define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000)

#endif /* __ASM_ARCH_OMAP44XX_H */

0 comments on commit 8762b78

Please sign in to comment.