diff options
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-voiceblue.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap1/devices.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/entry-macro.S | 27 | ||||
-rw-r--r-- | arch/arm/mach-omap1/io.c | 39 | ||||
-rw-r--r-- | arch/arm/mach-omap1/irq.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/lcd_dma.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/leds.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/mcbsp.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/pm_bus.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/serial.c | 3 |
12 files changed, 88 insertions, 13 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index ce4d69ca15fe..e1439506eba9 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -338,6 +338,9 @@ static int __init ams_delta_modem_init(void) | |||
338 | { | 338 | { |
339 | int err; | 339 | int err; |
340 | 340 | ||
341 | if (!machine_is_ams_delta()) | ||
342 | return -ENODEV; | ||
343 | |||
341 | omap_cfg_reg(M14_1510_GPIO2); | 344 | omap_cfg_reg(M14_1510_GPIO2); |
342 | ams_delta_modem_ports[0].irq = | 345 | ams_delta_modem_ports[0].irq = |
343 | gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ); | 346 | gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ); |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 789f5bac7359..815a69ce821d 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -83,6 +83,9 @@ static struct platform_device serial_device = { | |||
83 | 83 | ||
84 | static int __init ext_uart_init(void) | 84 | static int __init ext_uart_init(void) |
85 | { | 85 | { |
86 | if (!machine_is_voiceblue()) | ||
87 | return -ENODEV; | ||
88 | |||
86 | return platform_device_register(&serial_device); | 89 | return platform_device_register(&serial_device); |
87 | } | 90 | } |
88 | arch_initcall(ext_uart_init); | 91 | arch_initcall(ext_uart_init); |
@@ -235,6 +238,9 @@ static struct notifier_block panic_block = { | |||
235 | 238 | ||
236 | static int __init voiceblue_setup(void) | 239 | static int __init voiceblue_setup(void) |
237 | { | 240 | { |
241 | if (!machine_is_voiceblue()) | ||
242 | return -ENODEV; | ||
243 | |||
238 | /* Setup panic notifier */ | 244 | /* Setup panic notifier */ |
239 | atomic_notifier_chain_register(&panic_notifier_list, &panic_block); | 245 | atomic_notifier_chain_register(&panic_notifier_list, &panic_block); |
240 | 246 | ||
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 86ad38a20c3e..b0f4c231595f 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -288,6 +288,9 @@ static inline void omap_init_audio(void) {} | |||
288 | */ | 288 | */ |
289 | static int __init omap1_init_devices(void) | 289 | static int __init omap1_init_devices(void) |
290 | { | 290 | { |
291 | if (!cpu_class_is_omap1()) | ||
292 | return -ENODEV; | ||
293 | |||
291 | /* please keep these calls, and their implementations above, | 294 | /* please keep these calls, and their implementations above, |
292 | * in alphabetical order so they're easier to sort through. | 295 | * in alphabetical order so they're easier to sort through. |
293 | */ | 296 | */ |
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S index df9060edda28..c9be6d4d83e2 100644 --- a/arch/arm/mach-omap1/include/mach/entry-macro.S +++ b/arch/arm/mach-omap1/include/mach/entry-macro.S | |||
@@ -14,18 +14,17 @@ | |||
14 | #include <mach/irqs.h> | 14 | #include <mach/irqs.h> |
15 | #include <asm/hardware/gic.h> | 15 | #include <asm/hardware/gic.h> |
16 | 16 | ||
17 | #if (defined(CONFIG_ARCH_OMAP730)||defined(CONFIG_ARCH_OMAP850)) && \ | 17 | /* |
18 | (defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)) | 18 | * We use __glue to avoid errors with multiple definitions of |
19 | #error "FIXME: OMAP7XX doesn't support multiple-OMAP" | 19 | * .globl omap_irq_flags as it's included from entry-armv.S but not |
20 | #elif defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | 20 | * from entry-common.S. |
21 | #define INT_IH2_IRQ INT_7XX_IH2_IRQ | 21 | */ |
22 | #elif defined(CONFIG_ARCH_OMAP15XX) | 22 | #ifdef __glue |
23 | #define INT_IH2_IRQ INT_1510_IH2_IRQ | 23 | .pushsection .data |
24 | #elif defined(CONFIG_ARCH_OMAP16XX) | 24 | .globl omap_irq_flags |
25 | #define INT_IH2_IRQ INT_1610_IH2_IRQ | 25 | omap_irq_flags: |
26 | #else | 26 | .word 0 |
27 | #warning "IH2 IRQ defaulted" | 27 | .popsection |
28 | #define INT_IH2_IRQ INT_1510_IH2_IRQ | ||
29 | #endif | 28 | #endif |
30 | 29 | ||
31 | .macro disable_fiq | 30 | .macro disable_fiq |
@@ -47,9 +46,11 @@ | |||
47 | beq 1510f | 46 | beq 1510f |
48 | 47 | ||
49 | ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET] | 48 | ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET] |
49 | ldr \tmp, =omap_irq_flags @ irq flags address | ||
50 | ldr \tmp, [\tmp, #0] @ irq flags value | ||
50 | cmp \irqnr, #0 | 51 | cmp \irqnr, #0 |
51 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | 52 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] |
52 | cmpeq \irqnr, #INT_IH2_IRQ | 53 | cmpeq \irqnr, \tmp |
53 | ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE) | 54 | ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE) |
54 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | 55 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] |
55 | addeqs \irqnr, \irqnr, #32 | 56 | addeqs \irqnr, \irqnr, #32 |
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index 0ce3fec2d257..870886a29594 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -142,3 +142,42 @@ void __init omap1_init_common_hw(void) | |||
142 | omap1_mux_init(); | 142 | omap1_mux_init(); |
143 | } | 143 | } |
144 | 144 | ||
145 | /* | ||
146 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
147 | */ | ||
148 | |||
149 | u8 omap_readb(u32 pa) | ||
150 | { | ||
151 | return __raw_readb(OMAP1_IO_ADDRESS(pa)); | ||
152 | } | ||
153 | EXPORT_SYMBOL(omap_readb); | ||
154 | |||
155 | u16 omap_readw(u32 pa) | ||
156 | { | ||
157 | return __raw_readw(OMAP1_IO_ADDRESS(pa)); | ||
158 | } | ||
159 | EXPORT_SYMBOL(omap_readw); | ||
160 | |||
161 | u32 omap_readl(u32 pa) | ||
162 | { | ||
163 | return __raw_readl(OMAP1_IO_ADDRESS(pa)); | ||
164 | } | ||
165 | EXPORT_SYMBOL(omap_readl); | ||
166 | |||
167 | void omap_writeb(u8 v, u32 pa) | ||
168 | { | ||
169 | __raw_writeb(v, OMAP1_IO_ADDRESS(pa)); | ||
170 | } | ||
171 | EXPORT_SYMBOL(omap_writeb); | ||
172 | |||
173 | void omap_writew(u16 v, u32 pa) | ||
174 | { | ||
175 | __raw_writew(v, OMAP1_IO_ADDRESS(pa)); | ||
176 | } | ||
177 | EXPORT_SYMBOL(omap_writew); | ||
178 | |||
179 | void omap_writel(u32 v, u32 pa) | ||
180 | { | ||
181 | __raw_writel(v, OMAP1_IO_ADDRESS(pa)); | ||
182 | } | ||
183 | EXPORT_SYMBOL(omap_writel); | ||
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index db913c34d1fe..6bddbc869f4c 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -176,26 +176,31 @@ static struct irq_chip omap_irq_chip = { | |||
176 | 176 | ||
177 | void __init omap_init_irq(void) | 177 | void __init omap_init_irq(void) |
178 | { | 178 | { |
179 | extern unsigned int omap_irq_flags; | ||
179 | int i, j; | 180 | int i, j; |
180 | 181 | ||
181 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | 182 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) |
182 | if (cpu_is_omap7xx()) { | 183 | if (cpu_is_omap7xx()) { |
184 | omap_irq_flags = INT_7XX_IH2_IRQ; | ||
183 | irq_banks = omap7xx_irq_banks; | 185 | irq_banks = omap7xx_irq_banks; |
184 | irq_bank_count = ARRAY_SIZE(omap7xx_irq_banks); | 186 | irq_bank_count = ARRAY_SIZE(omap7xx_irq_banks); |
185 | } | 187 | } |
186 | #endif | 188 | #endif |
187 | #ifdef CONFIG_ARCH_OMAP15XX | 189 | #ifdef CONFIG_ARCH_OMAP15XX |
188 | if (cpu_is_omap1510()) { | 190 | if (cpu_is_omap1510()) { |
191 | omap_irq_flags = INT_1510_IH2_IRQ; | ||
189 | irq_banks = omap1510_irq_banks; | 192 | irq_banks = omap1510_irq_banks; |
190 | irq_bank_count = ARRAY_SIZE(omap1510_irq_banks); | 193 | irq_bank_count = ARRAY_SIZE(omap1510_irq_banks); |
191 | } | 194 | } |
192 | if (cpu_is_omap310()) { | 195 | if (cpu_is_omap310()) { |
196 | omap_irq_flags = INT_1510_IH2_IRQ; | ||
193 | irq_banks = omap310_irq_banks; | 197 | irq_banks = omap310_irq_banks; |
194 | irq_bank_count = ARRAY_SIZE(omap310_irq_banks); | 198 | irq_bank_count = ARRAY_SIZE(omap310_irq_banks); |
195 | } | 199 | } |
196 | #endif | 200 | #endif |
197 | #if defined(CONFIG_ARCH_OMAP16XX) | 201 | #if defined(CONFIG_ARCH_OMAP16XX) |
198 | if (cpu_is_omap16xx()) { | 202 | if (cpu_is_omap16xx()) { |
203 | omap_irq_flags = INT_1510_IH2_IRQ; | ||
199 | irq_banks = omap1610_irq_banks; | 204 | irq_banks = omap1610_irq_banks; |
200 | irq_bank_count = ARRAY_SIZE(omap1610_irq_banks); | 205 | irq_bank_count = ARRAY_SIZE(omap1610_irq_banks); |
201 | } | 206 | } |
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c index 3be11af687bb..c9088d85da04 100644 --- a/arch/arm/mach-omap1/lcd_dma.c +++ b/arch/arm/mach-omap1/lcd_dma.c | |||
@@ -424,6 +424,9 @@ static int __init omap_init_lcd_dma(void) | |||
424 | { | 424 | { |
425 | int r; | 425 | int r; |
426 | 426 | ||
427 | if (!cpu_class_is_omap1()) | ||
428 | return -ENODEV; | ||
429 | |||
427 | if (cpu_is_omap16xx()) { | 430 | if (cpu_is_omap16xx()) { |
428 | u16 w; | 431 | u16 w; |
429 | 432 | ||
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c index 277f356d4cd0..22eb11dde9e7 100644 --- a/arch/arm/mach-omap1/leds.c +++ b/arch/arm/mach-omap1/leds.c | |||
@@ -17,6 +17,9 @@ | |||
17 | static int __init | 17 | static int __init |
18 | omap_leds_init(void) | 18 | omap_leds_init(void) |
19 | { | 19 | { |
20 | if (!cpu_class_is_omap1()) | ||
21 | return -ENODEV; | ||
22 | |||
20 | if (machine_is_omap_innovator()) | 23 | if (machine_is_omap_innovator()) |
21 | leds_event = innovator_leds_event; | 24 | leds_event = innovator_leds_event; |
22 | 25 | ||
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index 372ea711faee..820973666f34 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c | |||
@@ -176,6 +176,9 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { | |||
176 | 176 | ||
177 | static int __init omap1_mcbsp_init(void) | 177 | static int __init omap1_mcbsp_init(void) |
178 | { | 178 | { |
179 | if (!cpu_class_is_omap1()) | ||
180 | return -ENODEV; | ||
181 | |||
179 | if (cpu_is_omap7xx()) { | 182 | if (cpu_is_omap7xx()) { |
180 | omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ; | 183 | omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ; |
181 | omap_mcbsp_cache_size = OMAP7XX_MCBSP_REG_NUM * sizeof(u16); | 184 | omap_mcbsp_cache_size = OMAP7XX_MCBSP_REG_NUM * sizeof(u16); |
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index b1d3f9fade23..0cca23a85175 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -661,6 +661,9 @@ static int __init omap_pm_init(void) | |||
661 | int error; | 661 | int error; |
662 | #endif | 662 | #endif |
663 | 663 | ||
664 | if (!cpu_class_is_omap1()) | ||
665 | return -ENODEV; | ||
666 | |||
664 | printk("Power Management for TI OMAP.\n"); | 667 | printk("Power Management for TI OMAP.\n"); |
665 | 668 | ||
666 | /* | 669 | /* |
diff --git a/arch/arm/mach-omap1/pm_bus.c b/arch/arm/mach-omap1/pm_bus.c index 8b66392be745..326644770ea8 100644 --- a/arch/arm/mach-omap1/pm_bus.c +++ b/arch/arm/mach-omap1/pm_bus.c | |||
@@ -73,6 +73,9 @@ static int __init omap1_pm_runtime_init(void) | |||
73 | const struct dev_pm_ops *pm; | 73 | const struct dev_pm_ops *pm; |
74 | struct dev_pm_ops *omap_pm; | 74 | struct dev_pm_ops *omap_pm; |
75 | 75 | ||
76 | if (!cpu_class_is_omap1()) | ||
77 | return -ENODEV; | ||
78 | |||
76 | pm = platform_bus_get_pm_ops(); | 79 | pm = platform_bus_get_pm_ops(); |
77 | if (!pm) { | 80 | if (!pm) { |
78 | pr_err("%s: unable to get dev_pm_ops from platform_bus\n", | 81 | pr_err("%s: unable to get dev_pm_ops from platform_bus\n", |
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 9e1c4d442d3e..550ca9d9991d 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c | |||
@@ -258,6 +258,9 @@ late_initcall(omap_serial_wakeup_init); | |||
258 | 258 | ||
259 | static int __init omap_init(void) | 259 | static int __init omap_init(void) |
260 | { | 260 | { |
261 | if (!cpu_class_is_omap1()) | ||
262 | return -ENODEV; | ||
263 | |||
261 | return platform_device_register(&serial_device); | 264 | return platform_device_register(&serial_device); |
262 | } | 265 | } |
263 | arch_initcall(omap_init); | 266 | arch_initcall(omap_init); |