On 10/03/2012 03:56 PM, Tom Warren wrote: > Stephen, > > On Wed, Oct 3, 2012 at 1:38 PM, Stephen Warren <swar...@wwwdotorg.org> wrote: >> On 10/02/2012 04:45 PM, Tom Warren wrote: >>> This patch adds basic Tegra30 (T30) build support - no specific >>> board is targeted. >>> >> >>> diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c >> >>> +#ifdef CONFIG_USB_EHCI_TEGRA >>> +#include <asm/arch/usb.h> >>> +#endif >> >> That seems unrelated. > > It's related because I don't have a usb.h file for Tegra30 yet (not > used/needed), and this is a common file, so I have to #ifdef the > inclusion or Cardhu won't build. I could put an empty usb.h file in > arch-tegra30, but I don't like that approach and there's a need for > this if someone turns off USB support in a Tegra20 build. The code > further down in the file uses the same #ifdef.
Ah right, that makes sense. >>> +#ifdef CONFIG_TEGRA30 >>> +#include <asm/arch/pinmux-config-common.h> >>> +#endif >> ... >>> /* >>> + * Routine: pinmux_init >>> + * Description: Do individual peripheral pinmux configs >>> + */ >>> +static void pinmux_init(void) >>> +{ >>> +#if defined(CONFIG_TEGRA30) >>> + pinmux_config_table(tegra3_pinmux_common, >>> + ARRAY_SIZE(tegra3_pinmux_common)); >>> + >>> + pinmux_config_table(unused_pins_lowpower, >>> + ARRAY_SIZE(unused_pins_lowpower)); >>> +#endif >>> +} >> >> I think that should be done by the Cardhu board file, since the data is >> Cardhu-specific. > > If I move pinmux_init to cardhu.c, I'll need matching (empty) funcs in > all the other board files, since it's called in board_early_init_f > later in board.c. Or it could be made a weak function that's only > overridden in cardhu files. But all this is more that I wanted to > change in this first pass of T30/Cardhu support - I didn't want to > touch any of the Tegra20 builds that I didn't have to. A weak function certainly seems the way to go; all (or at least most of) the other per-device pinmux/GPIO setup functions are all implemented this way now. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot