]> git.baikalelectronics.ru Git - uboot.git/commitdiff
arm: pdu001: Setup pinmux for console UART as early as possible
authorFelix Brack <fb@ltec.ch>
Mon, 21 Feb 2022 13:26:05 +0000 (14:26 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 28 Feb 2022 15:33:11 +0000 (10:33 -0500)
To make sure we get a working console as soon as possible in the SPL the
UART pins require to be configured earlier. This is especially
true for the pins of UART3, since the PDU001 board uses this UART for
the console by default.

Signed-off-by: Felix Brack <fb@ltec.ch>
board/eets/pdu001/board.c

index 8612c09d40221816315c934fb44919901183a95d..2b483dab8e122547266d8e89247a1d50cd7a9cd0 100644 (file)
@@ -216,6 +216,36 @@ const struct dpll_params *get_dpll_ddr_params(void)
        return &dpll_ddr;
 }
 
+void set_uart_mux_conf(void)
+{
+       switch (CONFIG_CONS_INDEX) {
+               case 1: {
+                       enable_uart0_pin_mux();
+                       break;
+               }
+               case 2: {
+                       enable_uart1_pin_mux();
+                       break;
+               }
+               case 3: {
+                       enable_uart2_pin_mux();
+                       break;
+               }
+               case 4: {
+                       enable_uart3_pin_mux();
+                       break;
+               }
+               case 5: {
+                       enable_uart4_pin_mux();
+                       break;
+               }
+               case 6: {
+                       enable_uart5_pin_mux();
+                       break;
+               }
+       }
+}
+
 void set_mux_conf_regs(void)
 {
        /* done first by the ROM and afterwards by the pin controller driver */