diff options
Diffstat (limited to 'arch/arm/mach-omap1/devices.c')
| -rw-r--r-- | arch/arm/mach-omap1/devices.c | 71 |
1 files changed, 41 insertions, 30 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 6dcd10ab4496..da8a3ac47e13 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
| @@ -24,35 +24,6 @@ | |||
| 24 | #include <asm/arch/mux.h> | 24 | #include <asm/arch/mux.h> |
| 25 | #include <asm/arch/gpio.h> | 25 | #include <asm/arch/gpio.h> |
| 26 | 26 | ||
| 27 | #if defined(CONFIG_OMAP1610_IR) || defined(CONFIG_OMAP161O_IR_MODULE) | ||
| 28 | |||
| 29 | static u64 irda_dmamask = 0xffffffff; | ||
| 30 | |||
| 31 | static struct platform_device omap1610ir_device = { | ||
| 32 | .name = "omap1610-ir", | ||
| 33 | .id = -1, | ||
| 34 | .dev = { | ||
| 35 | .dma_mask = &irda_dmamask, | ||
| 36 | }, | ||
| 37 | }; | ||
| 38 | |||
| 39 | static void omap_init_irda(void) | ||
| 40 | { | ||
| 41 | /* FIXME define and use a boot tag, members something like: | ||
| 42 | * u8 uart; // uart1, or uart3 | ||
| 43 | * ... but driver only handles uart3 for now | ||
| 44 | * s16 fir_sel; // gpio for SIR vs FIR | ||
| 45 | * ... may prefer a callback for SIR/MIR/FIR mode select; | ||
| 46 | * while h2 uses a GPIO, H3 uses a gpio expander | ||
| 47 | */ | ||
| 48 | if (machine_is_omap_h2() | ||
| 49 | || machine_is_omap_h3()) | ||
| 50 | (void) platform_device_register(&omap1610ir_device); | ||
| 51 | } | ||
| 52 | #else | ||
| 53 | static inline void omap_init_irda(void) {} | ||
| 54 | #endif | ||
| 55 | |||
| 56 | /*-------------------------------------------------------------------------*/ | 27 | /*-------------------------------------------------------------------------*/ |
| 57 | 28 | ||
| 58 | #if defined(CONFIG_RTC_DRV_OMAP) || defined(CONFIG_RTC_DRV_OMAP_MODULE) | 29 | #if defined(CONFIG_RTC_DRV_OMAP) || defined(CONFIG_RTC_DRV_OMAP_MODULE) |
| @@ -90,6 +61,45 @@ static void omap_init_rtc(void) | |||
| 90 | static inline void omap_init_rtc(void) {} | 61 | static inline void omap_init_rtc(void) {} |
| 91 | #endif | 62 | #endif |
| 92 | 63 | ||
| 64 | #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE) | ||
| 65 | |||
| 66 | #if defined(CONFIG_ARCH_OMAP15XX) | ||
| 67 | # define OMAP1_MBOX_SIZE 0x23 | ||
| 68 | # define INT_DSP_MAILBOX1 INT_1510_DSP_MAILBOX1 | ||
| 69 | #elif defined(CONFIG_ARCH_OMAP16XX) | ||
| 70 | # define OMAP1_MBOX_SIZE 0x2f | ||
| 71 | # define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1 | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #define OMAP1_MBOX_BASE IO_ADDRESS(OMAP16XX_MAILBOX_BASE) | ||
| 75 | |||
| 76 | static struct resource mbox_resources[] = { | ||
| 77 | { | ||
| 78 | .start = OMAP1_MBOX_BASE, | ||
| 79 | .end = OMAP1_MBOX_BASE + OMAP1_MBOX_SIZE, | ||
| 80 | .flags = IORESOURCE_MEM, | ||
| 81 | }, | ||
| 82 | { | ||
| 83 | .start = INT_DSP_MAILBOX1, | ||
| 84 | .flags = IORESOURCE_IRQ, | ||
| 85 | }, | ||
| 86 | }; | ||
| 87 | |||
| 88 | static struct platform_device mbox_device = { | ||
| 89 | .name = "mailbox", | ||
| 90 | .id = -1, | ||
| 91 | .num_resources = ARRAY_SIZE(mbox_resources), | ||
| 92 | .resource = mbox_resources, | ||
| 93 | }; | ||
| 94 | |||
| 95 | static inline void omap_init_mbox(void) | ||
| 96 | { | ||
| 97 | platform_device_register(&mbox_device); | ||
| 98 | } | ||
| 99 | #else | ||
| 100 | static inline void omap_init_mbox(void) { } | ||
| 101 | #endif | ||
| 102 | |||
| 93 | #if defined(CONFIG_OMAP_STI) | 103 | #if defined(CONFIG_OMAP_STI) |
| 94 | 104 | ||
| 95 | #define OMAP1_STI_BASE IO_ADDRESS(0xfffea000) | 105 | #define OMAP1_STI_BASE IO_ADDRESS(0xfffea000) |
| @@ -154,7 +164,8 @@ static int __init omap1_init_devices(void) | |||
| 154 | /* please keep these calls, and their implementations above, | 164 | /* please keep these calls, and their implementations above, |
| 155 | * in alphabetical order so they're easier to sort through. | 165 | * in alphabetical order so they're easier to sort through. |
| 156 | */ | 166 | */ |
| 157 | omap_init_irda(); | 167 | |
| 168 | omap_init_mbox(); | ||
| 158 | omap_init_rtc(); | 169 | omap_init_rtc(); |
| 159 | omap_init_sti(); | 170 | omap_init_sti(); |
| 160 | 171 | ||
