[U-Boot] OMAP 4 Duovero change console UART port

Hi!
I'm new to u-boot and i'm trying to figure out how to compile a version which uses UART 4 on the omap4 instead of UART 3. I've been digging through the mailing list archive without finding anything to help me.
From what i understand the pins are muxed correctly by default in "board/duovero/duovero_mux_data.h"
{UART4_RX, (PTU | IEN | M0)}, /* uart4_rx */ {UART4_TX, (M0)}, /* uart4_tx */
I changed "include/configs/omap4_common.h"
#define CONFIG_SYS_NS16550_COM3 UART3_BASE
to read
#define CONFIG_SYS_NS16550_COM3 UART4_BASE
and added the UART4_BASE definition to "arch/arm/include/asm/arch-omap4/omap.h":
#define UART4_BASE (OMAP44XX_L4_PER_BASE + 0x6e000)
this should be the correct base address for uart4 from what i understand.
However, it doesn't work. I also tried UART2 which doesn't work either. Only one that works is UART3.
I'm probably missing something critical so I figured i would ask here if anyone can give me a hint on how it's supposed to be done?
Regards Daniel Malmquist

Hi!
Look in drivers/serial/serial_ns16550.c
Changing ..COM3 to UART_BASE4 seems a bit unorthodox, Try changing to:
#define CONFIG_SYS_NS16550_COM4 UART4_BASE << COM4!!! #define CONFIG_CONS_INDEX 4
BR // Mats

Hi!
Thanks for the quick reply :)
However, I did try this as well with no luck.
Daniel ________________________________________ Från: Mats Kärrman [Mats.Karrman@tritech.se] Skickat: den 22 augusti 2013 09:14 Till: Daniel Malmquist; u-boot@lists.denx.de Ämne: RE: OMAP 4 Duovero change console UART port
Hi!
Look in drivers/serial/serial_ns16550.c
Changing ..COM3 to UART_BASE4 seems a bit unorthodox, Try changing to:
#define CONFIG_SYS_NS16550_COM4 UART4_BASE << COM4!!! #define CONFIG_CONS_INDEX 4
BR // Mats

Hi again!
I managed to solve the issue. There is actually a bug in the "arch/arm/cpu/armv7/omap-common/clocks-common.c" code.
Under setup_clocks_for_console(void) it initializes UART 3 twice but it skips UART 4.
clrsetbits_le32(&prcm->cm_l4per_uart3_clkctrl, MODULE_CLKCTRL_MODULEMODE_MASK, MODULE_CLKCTRL_MODULEMODE_SW_EXPLICIT_EN << MODULE_CLKCTRL_MODULEMODE_SHIFT);
clrsetbits_le32(&prcm->cm_l4per_uart3_clkctrl, MODULE_CLKCTRL_MODULEMODE_MASK, MODULE_CLKCTRL_MODULEMODE_SW_EXPLICIT_EN << MODULE_CLKCTRL_MODULEMODE_SHIFT);
should be
clrsetbits_le32(&prcm->cm_l4per_uart3_clkctrl, MODULE_CLKCTRL_MODULEMODE_MASK, MODULE_CLKCTRL_MODULEMODE_SW_EXPLICIT_EN << MODULE_CLKCTRL_MODULEMODE_SHIFT);
clrsetbits_le32(&prcm->cm_l4per_uart4_clkctrl, MODULE_CLKCTRL_MODULEMODE_MASK, MODULE_CLKCTRL_MODULEMODE_SW_EXPLICIT_EN << MODULE_CLKCTRL_MODULEMODE_SHIFT);
Also, like stated before, UART4_BASE was missing from "arch/arm/include/asm/arch-omap4/omap.h":
#define UART4_BASE (OMAP44XX_L4_PER_BASE + 0x6e000)
Regards Daniel Malmquist
22 aug 2013 kl. 09:16 skrev Daniel Malmquist malmqui@kth.se :
Hi!
Thanks for the quick reply :)
However, I did try this as well with no luck.
Daniel ________________________________________ Från: Mats Kärrman [Mats.Karrman@tritech.se] Skickat: den 22 augusti 2013 09:14 Till: Daniel Malmquist; u-boot@lists.denx.de Ämne: RE: OMAP 4 Duovero change console UART port
Hi!
Look in drivers/serial/serial_ns16550.c
Changing ..COM3 to UART_BASE4 seems a bit unorthodox, Try changing to:
#define CONFIG_SYS_NS16550_COM4 UART4_BASE << COM4!!! #define CONFIG_CONS_INDEX 4
BR // Mats _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
participants (2)
-
Daniel Malmquist
-
Mats Kärrman