All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] tegra: convert gpio_config_uart to weak symbol
Date: Tue, 07 Aug 2012 11:09:48 -0600	[thread overview]
Message-ID: <50214BDC.40604@wwwdotorg.org> (raw)
In-Reply-To: <1344302320-17238-2-git-send-email-dev@lynxeye.de>

On 08/06/2012 07:18 PM, Lucas Stach wrote:
> Most boards don't need this fixup hook. To avoid a lot of empty
> implementations in board files convert it to a weak symbol.

This seems OK on the surface, but I think there may be more opportunity
for cleanup here.

In board/nvidia/common/board.c, I see both of the following:

board_init:

#ifdef CONFIG_SPI_UART_SWITCH
        gpio_config_uart();
#endif


board_early_init_f:

        /* Initialize periph GPIOs */
        gpio_early_init();
#ifdef CONFIG_SPI_UART_SWITCH
        gpio_early_init_uart();
#else
        gpio_config_uart();
#endif

and in arch/arm/cpu/arm720t/tegra20/spl.c:

board_init_f:

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

It sure seems like we don't need to call those two init function all
those times. Perhaps we can clarify which of the functions are actually
needed at all, and when they should be called.

  reply	other threads:[~2012-08-07 17:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07  1:18 [U-Boot] [PATCH 1/2] tegra: init MMC from common board init Lucas Stach
2012-08-07  1:18 ` [U-Boot] [PATCH 2/2] tegra: convert gpio_config_uart to weak symbol Lucas Stach
2012-08-07 17:09   ` Stephen Warren [this message]
2012-08-19 16:56     ` Lucas Stach
2012-08-07 17:04 ` [U-Boot] [PATCH 1/2] tegra: init MMC from common board init Stephen Warren
2012-08-07 17:35   ` Lucas Stach

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=50214BDC.40604@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 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.