* [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
* [U-Boot] [PATCH v2] tegra20: tamonten: Fix the early gpio init
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
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2015-02-24 18:01 UTC (permalink / raw)
To: u-boot
+Tom Rini
Hi,
On 24 February 2015 at 10:50, Alban Bedel <alban.bedel@avionic-design.de> wrote:
> 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
>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] tegra20: tamonten: Fix the early gpio init
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
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2015-02-24 18:46 UTC (permalink / raw)
To: u-boot
On 02/24/2015 10:50 AM, Alban Bedel wrote:
> 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().
Acked-by: Stephen Warren <swarren@nvidia.com>
This seems to match what Seaboard does, so it seems like a fine fix for now.
^ permalink raw reply [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