[U-Boot] [PATCH 4/6] console & omap-common/spl: Enable use of eserial

Marek Vasut marex at denx.de
Thu Sep 27 18:34:18 CEST 2012


Dear Andrew Bradford,

> Enable use of eserial devices for common and omap-common/spl.
> 
> This probably isn't the right way to do this as the changes aren't
> needed for 'common' configurations, just for one case.
> 
> Signed-off-by: Andrew Bradford <andrew at bradfordembedded.com>
> ---
>  arch/arm/cpu/armv7/omap-common/spl.c |    7 ++++++-
>  common/console.c                     |   24 ++++++++++++++++++++----
>  include/common.h                     |    5 +++++
>  3 files changed, 31 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/omap-common/spl.c
> b/arch/arm/cpu/armv7/omap-common/spl.c index 4d1ac85..6258c0e 100644
> --- a/arch/arm/cpu/armv7/omap-common/spl.c
> +++ b/arch/arm/cpu/armv7/omap-common/spl.c
> @@ -210,7 +210,12 @@ void preloader_console_init(void)
>  	gd->flags |= GD_FLG_RELOC;
>  	gd->baudrate = CONFIG_BAUDRATE;
> 
> -	serial_init();		/* serial communications setup */
> +	/* serial communications setup */
> +#ifdef CONFIG_SERIAL_MULTI
> +	ESERIAL_FUNC(CONFIG_CONS_INDEX, init)();

Uh, if you implement default_serial_console properly(), you won't need this. 
Actually, I'm in the process of rolling out V2 of my serial patchset, which will 
make your life much more easier. Can you rebase the patchset on my series? I'll 
poke you about it.

> +#else
> +	serial_init();
> +#endif /* CONFIG_SERIAL_MULTI */
> 
>  	gd->have_console = 1;
> 
> diff --git a/common/console.c b/common/console.c
> index 1177f7d..5670ce1 100644
> --- a/common/console.c
> +++ b/common/console.c
> @@ -302,12 +302,16 @@ int getc(void)
>  		return 0;
> 
>  	if (gd->flags & GD_FLG_DEVINIT) {
> -		/* Get from the standard input */
> -		return fgetc(stdin);
> +	/* Get from the standard input */
> +	return fgetc(stdin);

NAK for this formating issue

[...]

Best regards,
Marek Vasut


More information about the U-Boot mailing list