aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c88
1 files changed, 17 insertions, 71 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 03e6c9ed82a4..2dbb265bedd4 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -25,7 +25,6 @@
25#include <plat/control.h> 25#include <plat/control.h>
26#include <plat/tc.h> 26#include <plat/tc.h>
27#include <plat/board.h> 27#include <plat/board.h>
28#include <plat/mux.h>
29#include <mach/gpio.h> 28#include <mach/gpio.h>
30#include <plat/mmc.h> 29#include <plat/mmc.h>
31#include <plat/dma.h> 30#include <plat/dma.h>
@@ -153,10 +152,12 @@ static struct resource omap2_mbox_resources[] = {
153 { 152 {
154 .start = INT_24XX_MAIL_U0_MPU, 153 .start = INT_24XX_MAIL_U0_MPU,
155 .flags = IORESOURCE_IRQ, 154 .flags = IORESOURCE_IRQ,
155 .name = "dsp",
156 }, 156 },
157 { 157 {
158 .start = INT_24XX_MAIL_U3_MPU, 158 .start = INT_24XX_MAIL_U3_MPU,
159 .flags = IORESOURCE_IRQ, 159 .flags = IORESOURCE_IRQ,
160 .name = "iva",
160 }, 161 },
161}; 162};
162static int omap2_mbox_resources_sz = ARRAY_SIZE(omap2_mbox_resources); 163static int omap2_mbox_resources_sz = ARRAY_SIZE(omap2_mbox_resources);
@@ -175,6 +176,7 @@ static struct resource omap3_mbox_resources[] = {
175 { 176 {
176 .start = INT_24XX_MAIL_U0_MPU, 177 .start = INT_24XX_MAIL_U0_MPU,
177 .flags = IORESOURCE_IRQ, 178 .flags = IORESOURCE_IRQ,
179 .name = "dsp",
178 }, 180 },
179}; 181};
180static int omap3_mbox_resources_sz = ARRAY_SIZE(omap3_mbox_resources); 182static int omap3_mbox_resources_sz = ARRAY_SIZE(omap3_mbox_resources);
@@ -196,6 +198,7 @@ static struct resource omap4_mbox_resources[] = {
196 { 198 {
197 .start = OMAP44XX_IRQ_MAIL_U0, 199 .start = OMAP44XX_IRQ_MAIL_U0,
198 .flags = IORESOURCE_IRQ, 200 .flags = IORESOURCE_IRQ,
201 .name = "mbox",
199 }, 202 },
200}; 203};
201static int omap4_mbox_resources_sz = ARRAY_SIZE(omap4_mbox_resources); 204static int omap4_mbox_resources_sz = ARRAY_SIZE(omap4_mbox_resources);
@@ -205,7 +208,7 @@ static int omap4_mbox_resources_sz = ARRAY_SIZE(omap4_mbox_resources);
205#endif 208#endif
206 209
207static struct platform_device mbox_device = { 210static struct platform_device mbox_device = {
208 .name = "omap2-mailbox", 211 .name = "omap-mailbox",
209 .id = -1, 212 .id = -1,
210}; 213};
211 214
@@ -230,64 +233,7 @@ static inline void omap_init_mbox(void)
230static inline void omap_init_mbox(void) { } 233static inline void omap_init_mbox(void) { }
231#endif /* CONFIG_OMAP_MBOX_FWK */ 234#endif /* CONFIG_OMAP_MBOX_FWK */
232 235
233#if defined(CONFIG_OMAP_STI)
234
235#if defined(CONFIG_ARCH_OMAP2)
236
237#define OMAP2_STI_BASE 0x48068000
238#define OMAP2_STI_CHANNEL_BASE 0x54000000
239#define OMAP2_STI_IRQ 4
240
241static struct resource sti_resources[] = {
242 {
243 .start = OMAP2_STI_BASE,
244 .end = OMAP2_STI_BASE + 0x7ff,
245 .flags = IORESOURCE_MEM,
246 },
247 {
248 .start = OMAP2_STI_CHANNEL_BASE,
249 .end = OMAP2_STI_CHANNEL_BASE + SZ_64K - 1,
250 .flags = IORESOURCE_MEM,
251 },
252 {
253 .start = OMAP2_STI_IRQ,
254 .flags = IORESOURCE_IRQ,
255 }
256};
257#elif defined(CONFIG_ARCH_OMAP3)
258
259#define OMAP3_SDTI_BASE 0x54500000
260#define OMAP3_SDTI_CHANNEL_BASE 0x54600000
261
262static struct resource sti_resources[] = {
263 {
264 .start = OMAP3_SDTI_BASE,
265 .end = OMAP3_SDTI_BASE + 0xFFF,
266 .flags = IORESOURCE_MEM,
267 },
268 {
269 .start = OMAP3_SDTI_CHANNEL_BASE,
270 .end = OMAP3_SDTI_CHANNEL_BASE + SZ_1M - 1,
271 .flags = IORESOURCE_MEM,
272 }
273};
274
275#endif
276
277static struct platform_device sti_device = {
278 .name = "sti",
279 .id = -1,
280 .num_resources = ARRAY_SIZE(sti_resources),
281 .resource = sti_resources,
282};
283
284static inline void omap_init_sti(void)
285{
286 platform_device_register(&sti_device);
287}
288#else
289static inline void omap_init_sti(void) {} 236static inline void omap_init_sti(void) {}
290#endif
291 237
292#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) 238#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
293 239
@@ -672,19 +618,19 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
672 OMAP_PIN_INPUT_PULLUP); 618 OMAP_PIN_INPUT_PULLUP);
673 619
674 if (cpu_is_omap2420() && controller_nr == 0) { 620 if (cpu_is_omap2420() && controller_nr == 0) {
675 omap_cfg_reg(H18_24XX_MMC_CMD); 621 omap_mux_init_signal("sdmmc_cmd", 0);
676 omap_cfg_reg(H15_24XX_MMC_CLKI); 622 omap_mux_init_signal("sdmmc_clki", 0);
677 omap_cfg_reg(G19_24XX_MMC_CLKO); 623 omap_mux_init_signal("sdmmc_clko", 0);
678 omap_cfg_reg(F20_24XX_MMC_DAT0); 624 omap_mux_init_signal("sdmmc_dat0", 0);
679 omap_cfg_reg(F19_24XX_MMC_DAT_DIR0); 625 omap_mux_init_signal("sdmmc_dat_dir0", 0);
680 omap_cfg_reg(G18_24XX_MMC_CMD_DIR); 626 omap_mux_init_signal("sdmmc_cmd_dir", 0);
681 if (mmc_controller->slots[0].wires == 4) { 627 if (mmc_controller->slots[0].wires == 4) {
682 omap_cfg_reg(H14_24XX_MMC_DAT1); 628 omap_mux_init_signal("sdmmc_dat1", 0);
683 omap_cfg_reg(E19_24XX_MMC_DAT2); 629 omap_mux_init_signal("sdmmc_dat2", 0);
684 omap_cfg_reg(D19_24XX_MMC_DAT3); 630 omap_mux_init_signal("sdmmc_dat3", 0);
685 omap_cfg_reg(E20_24XX_MMC_DAT_DIR1); 631 omap_mux_init_signal("sdmmc_dat_dir1", 0);
686 omap_cfg_reg(F18_24XX_MMC_DAT_DIR2); 632 omap_mux_init_signal("sdmmc_dat_dir2", 0);
687 omap_cfg_reg(E18_24XX_MMC_DAT_DIR3); 633 omap_mux_init_signal("sdmmc_dat_dir3", 0);
688 } 634 }
689 635
690 /* 636 /*