[U-Boot] [PATCH 2/5]P2020RDB Second UART port added for MPC85xx, MPC83xx, MPC86xx processors

harsh poshtiwala hiharsh at gmail.com
Fri Apr 9 16:20:05 CEST 2010


Hi Poonam,

I am working on MPC8379 based board. I would like to enable the
support for the multiple serial port.

I would like to do it without changing the environment variable from
the console.

i.e I don't want to type setenv stdin and setenv stdout

I want to use two serial ports independently.

i.e whenever I type some of my custom command it should go to serial
port 2 and all the other command should go to console.

How do I achieve this?

Regards

On Thu, Jul 2, 2009 at 6:45 AM, Poonam Aggrwal
<poonam.aggrwal at freescale.com> wrote:
>  Defining the next two configs allows to switch the serial port from the console using the setenv stdin and stdout
>  1. #define CONFIG_SERIAL_MULTI 1 /* Enable both serial ports */
>  2. #define CONFIG_SYS_CONSOLE_IS_IN_ENV       /* determine from environment */
>
> Signed-off-by: Poonam Aggrwal <poonam.aggrwal at freescale.com>
> Signed-off-by: Ed Swarthout <Ed.Swarthout at freescale.com>
> ---
>  common/serial.c  |    3 ++-
>  include/serial.h |    3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/common/serial.c b/common/serial.c
> index dd80e7c..5d0a73c 100644
> --- a/common/serial.c
> +++ b/common/serial.c
> @@ -40,7 +40,8 @@ struct serial_device *__default_serial_console (void)
>        return &serial_scc_device;
>  #elif defined(CONFIG_405GP) || defined(CONFIG_405CR) || defined(CONFIG_440) \
>    || defined(CONFIG_405EP) || defined(CONFIG_405EZ) || defined(CONFIG_405EX) \
> -   || defined(CONFIG_MPC5xxx)
> +   || defined(CONFIG_MPC5xxx) || defined(CONFIG_MPC83xx) \
> +   || defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
>  #if defined(CONFIG_CONS_INDEX) && defined(CONFIG_SYS_NS16550_SERIAL)
>  #if (CONFIG_CONS_INDEX==1)
>        return &eserial1_device;
> diff --git a/include/serial.h b/include/serial.h
> index aca5221..5722337 100644
> --- a/include/serial.h
> +++ b/include/serial.h
> @@ -24,7 +24,8 @@ extern struct serial_device * default_serial_console (void);
>
>  #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || defined(CONFIG_440) || \
>     defined(CONFIG_405EP) || defined(CONFIG_405EZ) || defined(CONFIG_405EX) || \
> -    defined(CONFIG_MPC5xxx)
> +    defined(CONFIG_MPC5xxx) || defined(CONFIG_MPC83xx) || \
> +    defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
>  extern struct serial_device serial0_device;
>  extern struct serial_device serial1_device;
>  #if defined(CONFIG_SYS_NS16550_SERIAL)
> --
> 1.5.6.3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>



-- 
Thanks & Regards
Harsh


More information about the U-Boot mailing list