[U-Boot] Changing serial port and sending arbitrary data over serial interface

Matthias Weisser Matthias.Weisser at graf-syteco.de
Mon Aug 3 09:34:34 CEST 2009


Hi

I am currently in the process of reworking my patches to bring my
u-boot port into the official git.
All my work is based on latest head.

Now I came to a point where I don't know how to do it and also didn't
find any board doing the same thing.

My system has six NS16550 serial ports where u-boot only needs to deal
with three of them. So I defined:

#define CONFIG_SYS_NS16550
#define CONFIG_SYS_NS16550_SERIAL
#define CONFIG_SYS_NS16550_REG_SIZE		(-4)
#define CONFIG_SYS_NS16550_CLK			CONFIG_JADE_IOCLK
#define
CONFIG_SYS_NS16550_COM1			0xfffe1000	/*
UART 0 */
#define
CONFIG_SYS_NS16550_COM2			0xfffe2000	/*
UART 1 */
#define
CONFIG_SYS_NS16550_COM3			0xfff50000	/*
UART 2 (SP) */

#define CONFIG_CONS_INDEX	1

The default is that u-boot uses COM1. Under some circumstances COM2 has
to be used.
So the question is: How to switch (dynamically) between the console
input/output?

I also have to send some arbitrary data to COM3 depending on some
environment variables. These are
commands to a small processor on the same board which will then
switches some devices on which I need
for further booting.


Matthias Weißer

------------------------------------ 
Amtsgericht Freiburg HRA 602707
Ust. ID-Nr.: DE232464428

Geschäftsführer: 
Dipl. Ing. (FH) Martin Graf 
Dipl. Ing. (FH) David Graf 
Dipl. Inf. Fabian Graf
 
Komplementärin:
GRAF-SYTECO Verwaltungs-GmbH
Amtsgericht Freiburg HRB 602868 
------------------------------------


More information about the U-Boot mailing list