public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] tegra: clean up board include hell
Date: Fri, 28 Sep 2012 00:42:02 +0200	[thread overview]
Message-ID: <1348785722.1432.33.camel@tellur> (raw)
In-Reply-To: <5064D414.106@wwwdotorg.org>

Am Donnerstag, den 27.09.2012, 16:32 -0600 schrieb Stephen Warren:
> On 09/27/2012 03:52 PM, Lucas Stach wrote:
> > The prototypes used in board files were all scattered out, which lead to
> > code duplication between SPL and normal U-Boot and some prototypes not actually
> > being used. Consolidate this in a common board header.
> 
> > This will allow to push down the calling of the pinmux functions into the
> > respective drivers and this way cut down on complexity from the common board
> > code.
> 
> I don't think that (calling pinmux from drivers) would be a good idea.
> The entire pinmux should be set up globally when the system boots in
> order to avoid conflicts part-way through a change, and to avoid
> duplicating pinmux calls into every single driver. Unless a particular
> driver actively needs to switch between different pinmux configurations
> at run-time (e.g. an I2C bus mux that uses pinmux to do the muxing).
> 
Ok, this means Patch 2/2 is the wrong approach. I will wait if there are
other comments before respinning.

> That said, this change to simplify all the #includes is probably
> reasonable. One comment below.
> 
> > diff --git a/arch/arm/include/asm/arch-tegra/board.h b/arch/arm/include/asm/arch-tegra/board.h
> 
> > -/* Setup UARTs for the board according to the selected config */
> > +/* Set up pinmux to make UART usable */
> > +void gpio_config_uart(void);      /* CONFIG_SPI_UART_SWITCH */
> > +void gpio_early_init_uart(void);  /*!CONFIG_SPI_UART_SWITCH */
> > +
> > +/* Set up early UART output */
> >  void board_init_uart_f(void);
> >  
> > +/* Set up any early GPIOs the board might need for proper operation */
> > +void gpio_early_init(void);  /* overrideable GPIO config        */
> 
> I think we should just rip out all the CONFIG_SPI_UART_SWITCH stuff.
> It's only there to support one board with a completely broken HW design.
> Still, that could happen in a separate patch after this though.
> 
Yeah, if everyone is fine with this, i'll do this. Tom, Simon?

Now that Colibri support is mostly finished I plan on doing some janitor
tasks like moving the USB driver to the right location in the tree and
moving over MMC to device tree (wrong sport to call pinmux will go away
then). Might as well kill UART_SWITCH along the way.

Lucas

  reply	other threads:[~2012-09-27 22:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 21:52 [U-Boot] [PATCH 1/2] tegra: clean up board include hell Lucas Stach
2012-09-27 21:52 ` [U-Boot] [PATCH 2/2] tegra: nand: add board pinmux Lucas Stach
2012-09-27 22:38   ` Stephen Warren
2012-09-27 23:08     ` Simon Glass
2012-09-27 22:32 ` [U-Boot] [PATCH 1/2] tegra: clean up board include hell Stephen Warren
2012-09-27 22:42   ` Lucas Stach [this message]
2012-09-27 22:59   ` Simon Glass
2012-09-27 23:25     ` Stephen Warren
2012-09-27 23:40       ` Simon Glass

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=1348785722.1432.33.camel@tellur \
    --to=dev@lynxeye.de \
    --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