ls102xa: dm: serial: Disable CONFIG_DM_STDIO for LCD/HDMI display
PATCH 1/1 ls102xa: dm: serial: Disable CONFIG_DM_STDIO for LCD/HDMI display
When LCD/HDMI is connected to LS1021ATWR or LS1021AQDS, the console output should be shown on the monitor.
If CONFIG_DM_SERIAL and CONFIG_DM_STDIO are both enabled, serial device is registered and added to the stdio list in serial-uclass.c. Then, vga device will be registered and added to the stdio list in cfb_console.c. So serial device is at the head of the stdio list and will be chosen as the input and output device in console_init_r(). It will cause the console output can't be shown on the monitor.
If CONFIG_DM_STDIO is disabled when using CONFIG_DM_SERIAL. First, vga device is registered and added to the stdio list in cfb_console.c. Then serial device will be registered and added to the stdio list in drv_system_init(). So vga device is at the head of the stdio list and will be chosen as the input and output device in console_init_r(). The console output will be shown on the monitor.
The patch is to disabled CONFIG_DM_STDIO for LCD/HDMI display.
--- include/configs/ls1021aqds.h | 4 ++++ include/configs/ls1021atwr.h | 4 ++++ 2 files changed, 8 insertions(+)
include/configs/ls1021aqds.h +4 -0
@@ -384,6 +384,10 @@ unsigned long get_board_ddr_clk(void);#define CONFIG_BAUDRATE 115200 +#ifdef CONFIG_DM_SERIAL +#undef CONFIG_DM_STDIO +#endif +/* * I2C */
include/configs/ls1021atwr.h +4 -0
@@ -280,6 +280,10 @@#define CONFIG_BAUDRATE 115200 +#ifdef CONFIG_DM_SERIAL +#undef CONFIG_DM_STDIO +#endif +/* * I2C */
Signature · 1 line
2.1.0.27.g96db324
PATCH 1/1 ls102xa: dm: serial: Disable CONFIG_DM_STDIO for LCD/HDMI display
Hi Alison,
Quoted 17 lines · Alison Wang
When LCD/HDMI is connected to LS1021ATWR or LS1021AQDS, the console output should be shown on the monitor.
If
CONFIG_DM_SERIALandCONFIG_DM_STDIOare both enabled, serial device is registered and added to the stdio list inserial-uclass.c. Then, vga device will be registered and added to the stdio list incfb_console.c. So serial device is at the head of the stdio list and will be chosen as the input and output device inconsole_init_r(). It will cause the console output can't be shown on the monitor.If
CONFIG_DM_STDIOis disabled when usingCONFIG_DM_SERIAL. First, vga device is registered and added to the stdio list incfb_console.c. Then serial device will be registered and added to the stdio list indrv_system_init(). So vga device is at the head of the stdio list and will be chosen as the input and output device inconsole_init_r(). The console output will be shown on the monitor.
Quoted 3 lines
The patch is to disabled
CONFIG_DM_STDIOfor LCD/HDMI display.Signed-off-by Alison Wang <[email protected]>
Have you tried enabling CONFIG_CONSOLE_MUX?
Quoted 5 lines
--- include/configs/ls1021aqds.h | 4 ++++ include/configs/ls1021atwr.h | 4 ++++ 2 files changed, 8 insertions(+)
[snip]
Regards,
Simon
PATCH 1/1 ls102xa: dm: serial: Disable CONFIG_DM_STDIO for LCD/HDMI display
Hi, Simon,
Quoted 19 lines · Alison Wang
Quoted 6 lines
When LCD/HDMI is connected to LS1021ATWR or LS1021AQDS, the console output should be shown on the monitor.
If
CONFIG_DM_SERIALandCONFIG_DM_STDIOare both enabled, serial device is registered and added to the stdio list inserial-uclass.c. Then, vga device will be registered and added to the stdio list in
cfb_console.c.Quoted 11 lines
So serial device is at the head of the stdio list and will be chosen as the input and output device in
console_init_r(). It will cause the console output can't be shown on the monitor.If
CONFIG_DM_STDIOis disabled when usingCONFIG_DM_SERIAL. First, vga device is registered and added to the stdio list incfb_console.c. Then serial device will be registered and added to the stdio list indrv_system_init(). So vga device is at the head of the stdio list and will be chosen as the input and output device inconsole_init_r(). The console output will be shown on the monitor.
Quoted 6 lines
Quoted 3 lines
The patch is to disabled
CONFIG_DM_STDIOfor LCD/HDMI display.Signed-off-by Alison Wang <[email protected]>Have you tried enabling
CONFIG_CONSOLE_MUX?
[Alison Wang] Thanks for your advice. I got your idea, and tried to enable CONFIG_CONSOLE_MUX and CONFIG_SYS_CONSOLE_IS_IN_ENV. Then after setting "stdout=serial,vga", the console output is both shown on monitor and serial terminal.
This patch is not a good way to fix the problem, please abandon it. Enabling CONFIG_SYS_CONSOLE_IS_IN_ENV is the best way to fix the problem, and Enabling CONFIG_CONSOLE_MUX could be used to shown the console output on multiple devices simultaneously.
Best Regards,
Alison Wang