[U-Boot] [PATCH 3/3] sunxi: Do not add a stdout-path alias to dts on boards without a serial port

Ian Campbell ijc+uboot at hellion.org.uk
Sun Aug 2 18:28:54 CEST 2015


On Sat, 2015-08-01 at 14:50 +0200, Hans de Goede wrote:
> Do not add a bogus (pointing to a non existing serial port) stdout-path
> alias to dts on boards without a serial port.
> 
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  include/configs/sunxi-common.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi
> -common.h
> index 71b2368..a2cbcf5 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -262,6 +262,7 @@ extern int soft_i2c_gpio_scl;
>  #define CONFIG_CONS_INDEX              1       /* UART0 */
>  #endif

Should this defaulting of CONFIG_CONS_INDEX not be gated as well (or
even instead)? Perhaps incorporate an ifndef CONFIG_CONS_INDEX into the
chain of #elseif below  (making the #error only hit for defined-but
-unknown values) to achieve what this patch wants to do?
 
> +#ifdef CONFIG_REQUIRE_SERIAL_CONSOLE
>  #if CONFIG_CONS_INDEX == 1
>  #ifdef CONFIG_MACH_SUN9I
>  #define OF_STDOUT_PATH		"/soc/serial at 07000000:115200"
> @@ -277,6 +278,7 @@ extern int soft_i2c_gpio_scl;
>  #else
>  #error Unsupported console port nr. Please fix stdout-path in sunxi
> -common.h.
>  #endif
> +#endif /* ifdef CONFIG_REQUIRE_SERIAL_CONSOLE */
>  
>  /* GPIO */
>  #define CONFIG_SUNXI_GPIO


More information about the U-Boot mailing list