Skip to content

Commit

Permalink
MIPS: AR7: Initialize GPIO earlier
Browse files Browse the repository at this point in the history
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: Florian Fainelli <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/1562/
Signed-off-by: Ralf Baechle <[email protected]>

---
  • Loading branch information
ffainelli authored and ralfbaechle committed Oct 29, 2010
1 parent 340fbb8 commit 3bc6968
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions arch/mips/ar7/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ int ar7_gpio_disable(unsigned gpio)
}
EXPORT_SYMBOL(ar7_gpio_disable);

static int __init ar7_gpio_init(void)
int __init ar7_gpio_init(void)
{
int ret;

Expand All @@ -128,4 +128,3 @@ static int __init ar7_gpio_init(void)
ar7_gpio_chip.chip.ngpio);
return ret;
}
arch_initcall(ar7_gpio_init);
2 changes: 2 additions & 0 deletions arch/mips/ar7/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ void __init prom_init(void)
ar7_init_cmdline(fw_arg0, (char **)fw_arg1);
ar7_init_env((struct env_var *)fw_arg2);
console_config();

ar7_gpio_init();
}

#define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4)))
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/include/asm/mach-ar7/ar7.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,6 @@ static inline void ar7_device_off(u32 bit)
msleep(20);
}

int __init ar7_gpio_init(void);

#endif /* __AR7_H__ */

0 comments on commit 3bc6968

Please sign in to comment.