diff options
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 36 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap44xx.h | 2 |
2 files changed, 29 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) | |||
136 | 136 | ||
137 | #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) | 137 | #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) |
138 | 138 | ||
139 | #define MBOX_REG_SIZE 0x120 | 139 | #define MBOX_REG_SIZE 0x120 |
140 | 140 | ||
141 | static struct resource omap2_mbox_resources[] = { | 141 | #ifdef CONFIG_ARCH_OMAP2 |
142 | static struct resource omap_mbox_resources[] = { | ||
142 | { | 143 | { |
143 | .start = OMAP24XX_MAILBOX_BASE, | 144 | .start = OMAP24XX_MAILBOX_BASE, |
144 | .end = OMAP24XX_MAILBOX_BASE + MBOX_REG_SIZE - 1, | 145 | .end = OMAP24XX_MAILBOX_BASE + MBOX_REG_SIZE - 1, |
@@ -153,8 +154,10 @@ static struct resource omap2_mbox_resources[] = { | |||
153 | .flags = IORESOURCE_IRQ, | 154 | .flags = IORESOURCE_IRQ, |
154 | }, | 155 | }, |
155 | }; | 156 | }; |
157 | #endif | ||
156 | 158 | ||
157 | static struct resource omap3_mbox_resources[] = { | 159 | #ifdef CONFIG_ARCH_OMAP3 |
160 | static struct resource omap_mbox_resources[] = { | ||
158 | { | 161 | { |
159 | .start = OMAP34XX_MAILBOX_BASE, | 162 | .start = OMAP34XX_MAILBOX_BASE, |
160 | .end = OMAP34XX_MAILBOX_BASE + MBOX_REG_SIZE - 1, | 163 | .end = OMAP34XX_MAILBOX_BASE + MBOX_REG_SIZE - 1, |
@@ -165,6 +168,24 @@ static struct resource omap3_mbox_resources[] = { | |||
165 | .flags = IORESOURCE_IRQ, | 168 | .flags = IORESOURCE_IRQ, |
166 | }, | 169 | }, |
167 | }; | 170 | }; |
171 | #endif | ||
172 | |||
173 | #ifdef CONFIG_ARCH_OMAP4 | ||
174 | |||
175 | #define OMAP4_MBOX_REG_SIZE 0x130 | ||
176 | static struct resource omap_mbox_resources[] = { | ||
177 | { | ||
178 | .start = OMAP44XX_MAILBOX_BASE, | ||
179 | .end = OMAP44XX_MAILBOX_BASE + | ||
180 | OMAP4_MBOX_REG_SIZE - 1, | ||
181 | .flags = IORESOURCE_MEM, | ||
182 | }, | ||
183 | { | ||
184 | .start = INT_44XX_MAIL_U0_MPU, | ||
185 | .flags = IORESOURCE_IRQ, | ||
186 | }, | ||
187 | }; | ||
188 | #endif | ||
168 | 189 | ||
169 | static struct platform_device mbox_device = { | 190 | static struct platform_device mbox_device = { |
170 | .name = "omap2-mailbox", | 191 | .name = "omap2-mailbox", |
@@ -173,12 +194,9 @@ static struct platform_device mbox_device = { | |||
173 | 194 | ||
174 | static inline void omap_init_mbox(void) | 195 | static inline void omap_init_mbox(void) |
175 | { | 196 | { |
176 | if (cpu_is_omap2420()) { | 197 | if (cpu_is_omap2420() || cpu_is_omap3430() || cpu_is_omap44xx()) { |
177 | mbox_device.num_resources = ARRAY_SIZE(omap2_mbox_resources); | 198 | mbox_device.num_resources = ARRAY_SIZE(omap_mbox_resources); |
178 | mbox_device.resource = omap2_mbox_resources; | 199 | mbox_device.resource = omap_mbox_resources; |
179 | } else if (cpu_is_omap3430()) { | ||
180 | mbox_device.num_resources = ARRAY_SIZE(omap3_mbox_resources); | ||
181 | mbox_device.resource = omap3_mbox_resources; | ||
182 | } else { | 200 | } else { |
183 | pr_err("%s: platform not supported\n", __func__); | 201 | pr_err("%s: platform not supported\n", __func__); |
184 | return; | 202 | return; |
diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h index 336189753671..e52902a15c1a 100644 --- a/arch/arm/plat-omap/include/plat/omap44xx.h +++ b/arch/arm/plat-omap/include/plat/omap44xx.h | |||
@@ -40,5 +40,7 @@ | |||
40 | #define OMAP44XX_LOCAL_TWD_BASE 0x48240600 | 40 | #define OMAP44XX_LOCAL_TWD_BASE 0x48240600 |
41 | #define OMAP44XX_WKUPGEN_BASE 0x48281000 | 41 | #define OMAP44XX_WKUPGEN_BASE 0x48281000 |
42 | 42 | ||
43 | #define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000) | ||
44 | |||
43 | #endif /* __ASM_ARCH_OMAP44XX_H */ | 45 | #endif /* __ASM_ARCH_OMAP44XX_H */ |
44 | 46 | ||