All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] AR7: initialize GPIO earlier
@ 2010-08-29 15:08 Florian Fainelli
  2010-10-18  9:17 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2010-08-29 15:08 UTC (permalink / raw)
  To: linux-mips, ralf

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 <florian@openwrt.org>
---
diff --git a/arch/mips/ar7/gpio.c b/arch/mips/ar7/gpio.c
index c32fbb5..f848342 100644
--- a/arch/mips/ar7/gpio.c
+++ b/arch/mips/ar7/gpio.c
@@ -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;
 
@@ -128,4 +128,3 @@ static int __init ar7_gpio_init(void)
 				ar7_gpio_chip.chip.ngpio);
 	return ret;
 }
-arch_initcall(ar7_gpio_init);
diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c
index 5238579..23818d2 100644
--- a/arch/mips/ar7/prom.c
+++ b/arch/mips/ar7/prom.c
@@ -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)))
diff --git a/arch/mips/include/asm/mach-ar7/ar7.h b/arch/mips/include/asm/mach-
ar7/ar7.h
index 483ffea..ddb413e 100644
--- a/arch/mips/include/asm/mach-ar7/ar7.h
+++ b/arch/mips/include/asm/mach-ar7/ar7.h
@@ -161,4 +161,6 @@ static inline void ar7_device_off(u32 bit)
 	msleep(20);
 }
 
+int __init ar7_gpio_init(void);
+
 #endif /* __AR7_H__ */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] AR7: initialize GPIO earlier
  2010-08-29 15:08 [PATCH 1/2] AR7: initialize GPIO earlier Florian Fainelli
@ 2010-10-18  9:17 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2010-10-18  9:17 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: linux-mips

Thanks, queued for 2.6.37.

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-18  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-29 15:08 [PATCH 1/2] AR7: initialize GPIO earlier Florian Fainelli
2010-10-18  9:17 ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.