tegra20: tamonten: Fix the early gpio init
PATCH v2 1/1 tegra20: tamonten: Fix the early gpio init
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().
---
v2: Updated the log message to better describe the problem
--- board/avionic-design/common/tamonten.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
board/avionic-design/common/tamonten.c +3 -1
@@ -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
Signature · 1 line
2.3.0
PATCH v2 1/1 tegra20: tamonten: Fix the early gpio init
+Tom Rini
Hi,
Quoted 28 lines · Alban Bedel
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 functiontegra_spl_gpio_direction_output().Signed-off-by Alban Bedel <[email protected]>---
v2: Updated the log message to better describe the problem--- board/avionic-design/common/tamonten.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)board/avionic-design/common/tamonten.c +3
-2@@ -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 --
Quoted 2 lines
2.3.0
From here:
http://lists.denx.de/pipermail/u-boot/2014-October/190492.html
Believe it or not we have still not pulled in the SPL series, but you can test with it (u-boot-dm/spl-working).
I am waiting for Masahiro's kconfig change to go in and then I think I can go ahead.
Regards,
Simon
PATCH v2 1/1 tegra20: tamonten: Fix the early gpio init
In reply to Alban BedelQuoted 3 lines · Alban Bedel
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 functiontegra_spl_gpio_direction_output().
This seems to match what Seaboard does, so it seems like a fine fix for now.