public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] tegra20: tamonten: Fix the early gpio init
@ 2015-02-24 17:50 Alban Bedel
  2015-02-24 18:01 ` Simon Glass
  2015-02-24 18:46 ` Stephen Warren
  0 siblings, 2 replies; 3+ messages in thread
From: Alban Bedel @ 2015-02-24 17:50 UTC (permalink / raw)
  To: u-boot

As the GPIO driver isn't ready when gpio_early_init() is called the
normal GPIO API can't be used. Fix this like on seaboard by using the
lower level function tegra_spl_gpio_direction_output().

Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
---
v2: Updated the log message to better describe the problem
---
 board/avionic-design/common/tamonten.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/avionic-design/common/tamonten.c b/board/avionic-design/common/tamonten.c
index 9c86779..ea2425a 100644
--- a/board/avionic-design/common/tamonten.c
+++ b/board/avionic-design/common/tamonten.c
@@ -23,8 +23,10 @@
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 void gpio_early_init(void)
 {
+#ifndef CONFIG_SPL_BUILD
 	gpio_request(GPIO_PI4, NULL);
-	gpio_direction_output(GPIO_PI4, 1);
+#endif
+	tegra_spl_gpio_direction_output(GPIO_PI4, 1);
 }
 #endif
 
-- 
2.3.0

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

end of thread, other threads:[~2015-02-24 18:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24 17:50 [U-Boot] [PATCH v2] tegra20: tamonten: Fix the early gpio init Alban Bedel
2015-02-24 18:01 ` Simon Glass
2015-02-24 18:46 ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox