public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/7] tegra: Allow boards to perform early GPIO setup
Date: Fri, 25 May 2012 10:24:50 -0600	[thread overview]
Message-ID: <4FBFB252.9000301@wwwdotorg.org> (raw)
In-Reply-To: <1337953588-20696-4-git-send-email-thierry.reding@avionic-design.de>

On 05/25/2012 07:46 AM, Thierry Reding wrote:
> The new gpio_early_init() function, which does nothing by default, can
> be overridden by boards to configure GPIOs at an early stage.

> diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c

>  int board_early_init_f(void)
>  {
>  	board_init_uart_f();
>  
>  	/* Initialize periph GPIOs */
> +	gpio_early_init();
>  #ifdef CONFIG_SPI_UART_SWITCH
>  	gpio_early_init_uart();
>  #else

I assert that all early GPIO initialization should be reworked to use
this new gpio_early_init(). In other words, now that there's a single
generic gpio_early_init(), we should remove the following code right
after it:

#ifdef CONFIG_SPI_UART_SWITCH
        gpio_early_init_uart();
#else
        gpio_config_uart();
#endif

and any boards that need to do any of that (which is just Seaboard I
think) should do that from an implementation of the new generic
gpio_early_init() in their board file. That way, common code won't have
to know about crap like the SPI/UART muxing on Seaboard.

That said, this need not be part of this patch or even this series, so I
don't mean to nak this patch with these comments.

And actually, I'd be all for ripping out all the SPI support on Seaboard
and all related code anyway...

  reply	other threads:[~2012-05-25 16:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 13:46 [U-Boot] [PATCH v2 1/7] tegra: Rework Tamonten support Thierry Reding
2012-05-25 13:46 ` [U-Boot] [PATCH v2 2/7] tegra: medcom: Add device tree support Thierry Reding
2012-05-25 13:46 ` [U-Boot] [PATCH v2 3/7] tegra: plutux: " Thierry Reding
2012-05-25 13:46 ` [U-Boot] [PATCH v2 4/7] tegra: Allow boards to perform early GPIO setup Thierry Reding
2012-05-25 16:24   ` Stephen Warren [this message]
2012-05-25 17:31     ` Thierry Reding
2012-05-25 17:59       ` Thierry Reding
2012-05-31 20:35         ` Tom Warren
2012-06-04  6:09           ` Thierry Reding
2012-06-04 16:47             ` Tom Warren
2012-05-25 13:46 ` [U-Boot] [PATCH v2 5/7] tegra: Implement gpio_early_init() on Tamonten Thierry Reding
2012-05-25 16:27   ` Stephen Warren
2012-05-25 17:40     ` Thierry Reding
2012-05-25 18:56       ` Kai Poggensee
2012-05-29 14:57         ` Thierry Reding
2012-05-29 16:06           ` Stephen Warren
2012-05-25 13:46 ` [U-Boot] [PATCH v2 6/7] tegra: Use SD write-protect GPIO " Thierry Reding
2012-05-25 13:46 ` [U-Boot] [PATCH v2 7/7] tegra: Add Tamonten Evaluation Carrier support Thierry Reding
2012-05-25 16:31   ` Stephen Warren
2012-06-08 20:01 ` [U-Boot] [PATCH v2 1/7] tegra: Rework Tamonten support Allen Martin
2012-06-08 21:07   ` Stephen Warren
2012-06-08 21:27     ` Allen Martin
2012-06-09  5:28       ` Stephen Warren
2012-06-09  6:25         ` Allen Martin
2012-06-09 16:18           ` Stephen Warren
2012-06-11  9:29             ` Thierry Reding
2012-06-11 17:59               ` Allen Martin
2012-06-11 18:07                 ` Thierry Reding
2012-06-11 18:03               ` Allen Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FBFB252.9000301@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox