[U-Boot] [PATCH 8/9] Tegra30: Add common pinmux config in board_early_init_f

Simon Glass sjg at chromium.org
Tue Sep 18 21:53:23 CEST 2012


Hi,

On Thu, Sep 13, 2012 at 3:37 PM, Stephen Warren <swarren at wwwdotorg.org> wrote:
> On 09/12/2012 04:10 PM, Tom Warren wrote:
>> Signed-off-by: Tom Warren <twarren at nvidia.com>
>> ---
>>  board/nvidia/common/board.c |   27 ++++++++++++++++++++++++++-
>>  1 files changed, 26 insertions(+), 1 deletions(-)
>
> Common code:-) :-) But ...
>
>> diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
>
>> +#ifdef CONFIG_TEGRA30
>> +#include "../cardhu/pinmux-config-common.h"
>> +#endif
>
> Not all Tegra30 will be Cardhu...
>
> Given this is really board-specific, shouldn't the following be an empty
> weak definition:
>
>> +/*
>> + * 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
>> +}
>
> ... and the function be overridden in board files as needed?
>
> If we are moving to a model of a single function that sets up the entire
> pin mux at boot (which seems fine to me, and could eventually be driven
> by DT if it happened late enough), then it seems like we wouldn't need
> e.g. pin_mux_mmc() or pin_mux_usb() any more.

While the fdt may eventually remove this discussion, I don't think
forcing a one-time pinmux init is the best idea. Some peripherals will
not be needed on every boot (e.g. normally boot from eMMC unless USB
is available). Some peripherals may want to change their config based
on run-time settings (although this is unlikely I suppose,
particularly if we have the fdt).

Regards,
Simon

> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list