Commit 3bc6968a authored by Florian Fainelli's avatar Florian Fainelli Committed by Ralf Baechle

MIPS: AR7: Initialize GPIO earlier

In order to detect the Titan variant, we must initialize GPIOs earlier since
detection relies on some GPIO values to be set.
Signed-off-by: default avatarFlorian Fainelli <florian@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/1562/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>

---
parent 340fbb8b
...@@ -107,7 +107,7 @@ int ar7_gpio_disable(unsigned gpio) ...@@ -107,7 +107,7 @@ int ar7_gpio_disable(unsigned gpio)
} }
EXPORT_SYMBOL(ar7_gpio_disable); EXPORT_SYMBOL(ar7_gpio_disable);
static int __init ar7_gpio_init(void) int __init ar7_gpio_init(void)
{ {
int ret; int ret;
...@@ -128,4 +128,3 @@ static int __init ar7_gpio_init(void) ...@@ -128,4 +128,3 @@ static int __init ar7_gpio_init(void)
ar7_gpio_chip.chip.ngpio); ar7_gpio_chip.chip.ngpio);
return ret; return ret;
} }
arch_initcall(ar7_gpio_init);
...@@ -246,6 +246,8 @@ void __init prom_init(void) ...@@ -246,6 +246,8 @@ void __init prom_init(void)
ar7_init_cmdline(fw_arg0, (char **)fw_arg1); ar7_init_cmdline(fw_arg0, (char **)fw_arg1);
ar7_init_env((struct env_var *)fw_arg2); ar7_init_env((struct env_var *)fw_arg2);
console_config(); console_config();
ar7_gpio_init();
} }
#define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4))) #define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4)))
......
...@@ -161,4 +161,6 @@ static inline void ar7_device_off(u32 bit) ...@@ -161,4 +161,6 @@ static inline void ar7_device_off(u32 bit)
msleep(20); msleep(20);
} }
int __init ar7_gpio_init(void);
#endif /* __AR7_H__ */ #endif /* __AR7_H__ */
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