aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-12-17 21:37:08 -0500
committerTony Lindgren <tony@atomide.com>2010-12-20 21:48:16 -0500
commit65dd4c1626b396af839881708fdf3bc726a16f73 (patch)
tree4cd2c12349eb69b4d9797518d20fbd56ba2377f8 /arch/arm
parentda07c0cff295d887427ad2519e452ee3c27e47ff (diff)
omap1: Fix innovator FPGA init for multi-omap
No need to call this early from init_irq. Also recent changes initialize GPIO now later, so calling gpio_request from init_irq will make it fail. While at it, also remove the unnecessary EXPORT_SYMBOL. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap1/board-innovator.c7
-rw-r--r--arch/arm/mach-omap1/fpga.c10
-rw-r--r--arch/arm/plat-omap/include/plat/fpga.h4
3 files changed, 8 insertions, 13 deletions
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index a051acdc526a..8d59b078fc2c 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -290,11 +290,6 @@ static void __init innovator_init_irq(void)
290{ 290{
291 omap1_init_common_hw(); 291 omap1_init_common_hw();
292 omap_init_irq(); 292 omap_init_irq();
293#ifdef CONFIG_ARCH_OMAP15XX
294 if (cpu_is_omap1510()) {
295 omap1510_fpga_init_irq();
296 }
297#endif
298} 293}
299 294
300#ifdef CONFIG_ARCH_OMAP15XX 295#ifdef CONFIG_ARCH_OMAP15XX
@@ -385,6 +380,8 @@ static struct omap_board_config_kernel innovator_config[] = {
385 380
386static void __init innovator_init(void) 381static void __init innovator_init(void)
387{ 382{
383 if (cpu_is_omap1510())
384 omap1510_fpga_init_irq();
388 innovator_init_smc91x(); 385 innovator_init_smc91x();
389 386
390#ifdef CONFIG_ARCH_OMAP15XX 387#ifdef CONFIG_ARCH_OMAP15XX
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index 5cfce1636da0..8780e75cdc3d 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -143,7 +143,7 @@ static struct irq_chip omap_fpga_irq = {
143 */ 143 */
144void omap1510_fpga_init_irq(void) 144void omap1510_fpga_init_irq(void)
145{ 145{
146 int i; 146 int i, res;
147 147
148 __raw_writeb(0, OMAP1510_FPGA_IMR_LO); 148 __raw_writeb(0, OMAP1510_FPGA_IMR_LO);
149 __raw_writeb(0, OMAP1510_FPGA_IMR_HI); 149 __raw_writeb(0, OMAP1510_FPGA_IMR_HI);
@@ -177,10 +177,12 @@ void omap1510_fpga_init_irq(void)
177 * NOTE: For general GPIO/MPUIO access and interrupts, please see 177 * NOTE: For general GPIO/MPUIO access and interrupts, please see
178 * gpio.[ch] 178 * gpio.[ch]
179 */ 179 */
180 gpio_request(13, "FPGA irq"); 180 res = gpio_request(13, "FPGA irq");
181 if (res) {
182 pr_err("%s failed to get gpio\n", __func__);
183 return;
184 }
181 gpio_direction_input(13); 185 gpio_direction_input(13);
182 set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); 186 set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
183 set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux); 187 set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux);
184} 188}
185
186EXPORT_SYMBOL(omap1510_fpga_init_irq);
diff --git a/arch/arm/plat-omap/include/plat/fpga.h b/arch/arm/plat-omap/include/plat/fpga.h
index f1864a652f7a..ae39bcb3f5ba 100644
--- a/arch/arm/plat-omap/include/plat/fpga.h
+++ b/arch/arm/plat-omap/include/plat/fpga.h
@@ -19,11 +19,7 @@
19#ifndef __ASM_ARCH_OMAP_FPGA_H 19#ifndef __ASM_ARCH_OMAP_FPGA_H
20#define __ASM_ARCH_OMAP_FPGA_H 20#define __ASM_ARCH_OMAP_FPGA_H
21 21
22#if defined(CONFIG_MACH_OMAP_INNOVATOR) && defined(CONFIG_ARCH_OMAP15XX)
23extern void omap1510_fpga_init_irq(void); 22extern void omap1510_fpga_init_irq(void);
24#else
25#define omap1510_fpga_init_irq() (0)
26#endif
27 23
28#define fpga_read(reg) __raw_readb(reg) 24#define fpga_read(reg) __raw_readb(reg)
29#define fpga_write(val, reg) __raw_writeb(val, reg) 25#define fpga_write(val, reg) __raw_writeb(val, reg)