Commit 65dd4c16 authored by Tony Lindgren's avatar Tony Lindgren

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: default avatarTony Lindgren <tony@atomide.com>
parent da07c0cf
...@@ -290,11 +290,6 @@ static void __init innovator_init_irq(void) ...@@ -290,11 +290,6 @@ static void __init innovator_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap_init_irq();
#ifdef CONFIG_ARCH_OMAP15XX
if (cpu_is_omap1510()) {
omap1510_fpga_init_irq();
}
#endif
} }
#ifdef CONFIG_ARCH_OMAP15XX #ifdef CONFIG_ARCH_OMAP15XX
...@@ -385,6 +380,8 @@ static struct omap_board_config_kernel innovator_config[] = { ...@@ -385,6 +380,8 @@ static struct omap_board_config_kernel innovator_config[] = {
static void __init innovator_init(void) static void __init innovator_init(void)
{ {
if (cpu_is_omap1510())
omap1510_fpga_init_irq();
innovator_init_smc91x(); innovator_init_smc91x();
#ifdef CONFIG_ARCH_OMAP15XX #ifdef CONFIG_ARCH_OMAP15XX
......
...@@ -143,7 +143,7 @@ static struct irq_chip omap_fpga_irq = { ...@@ -143,7 +143,7 @@ static struct irq_chip omap_fpga_irq = {
*/ */
void omap1510_fpga_init_irq(void) void omap1510_fpga_init_irq(void)
{ {
int i; int i, res;
__raw_writeb(0, OMAP1510_FPGA_IMR_LO); __raw_writeb(0, OMAP1510_FPGA_IMR_LO);
__raw_writeb(0, OMAP1510_FPGA_IMR_HI); __raw_writeb(0, OMAP1510_FPGA_IMR_HI);
...@@ -177,10 +177,12 @@ void omap1510_fpga_init_irq(void) ...@@ -177,10 +177,12 @@ void omap1510_fpga_init_irq(void)
* NOTE: For general GPIO/MPUIO access and interrupts, please see * NOTE: For general GPIO/MPUIO access and interrupts, please see
* gpio.[ch] * gpio.[ch]
*/ */
gpio_request(13, "FPGA irq"); res = gpio_request(13, "FPGA irq");
if (res) {
pr_err("%s failed to get gpio\n", __func__);
return;
}
gpio_direction_input(13); gpio_direction_input(13);
set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux); set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux);
} }
EXPORT_SYMBOL(omap1510_fpga_init_irq);
...@@ -19,11 +19,7 @@ ...@@ -19,11 +19,7 @@
#ifndef __ASM_ARCH_OMAP_FPGA_H #ifndef __ASM_ARCH_OMAP_FPGA_H
#define __ASM_ARCH_OMAP_FPGA_H #define __ASM_ARCH_OMAP_FPGA_H
#if defined(CONFIG_MACH_OMAP_INNOVATOR) && defined(CONFIG_ARCH_OMAP15XX)
extern void omap1510_fpga_init_irq(void); extern void omap1510_fpga_init_irq(void);
#else
#define omap1510_fpga_init_irq() (0)
#endif
#define fpga_read(reg) __raw_readb(reg) #define fpga_read(reg) __raw_readb(reg)
#define fpga_write(val, reg) __raw_writeb(val, reg) #define fpga_write(val, reg) __raw_writeb(val, reg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment