]> git.sur5r.net Git - u-boot/commitdiff
ARM: legoev3: Move UART enable to early init
authorDavid Lechner <david@lechnology.com>
Sun, 20 May 2018 04:25:04 +0000 (23:25 -0500)
committerTom Rini <trini@konsulko.com>
Tue, 5 Jun 2018 14:33:57 +0000 (10:33 -0400)
This moves the UART init for LEGO MINDSTORMS EV3 to board_early_init_f().
Some console messages were not being printed because the UART was not
enabled until later in the init process.

Signed-off-by: David Lechner <david@lechnology.com>
board/lego/ev3/legoev3.c

index 5e70363588d75e591da971e2998255c819d1847f..69010055d3a97fd999eac2c1589360cbc4b6de8e 100644 (file)
@@ -132,6 +132,11 @@ void get_board_serial(struct tag_serialnr *serialnr)
 
 int board_early_init_f(void)
 {
+       /* enable the console UART */
+       writel((DAVINCI_UART_PWREMU_MGMT_FREE | DAVINCI_UART_PWREMU_MGMT_URRST |
+               DAVINCI_UART_PWREMU_MGMT_UTRST),
+              &davinci_uart1_ctrl_regs->pwremu_mgmt);
+
        /*
         * Power on required peripherals
         * ARM does not have access by default to PSC0 and PSC1
@@ -166,10 +171,5 @@ int board_init(void)
        if (davinci_configure_pin_mux_items(pinmuxes, ARRAY_SIZE(pinmuxes)))
                return 1;
 
-       /* enable the console UART */
-       writel((DAVINCI_UART_PWREMU_MGMT_FREE | DAVINCI_UART_PWREMU_MGMT_URRST |
-               DAVINCI_UART_PWREMU_MGMT_UTRST),
-              &davinci_uart1_ctrl_regs->pwremu_mgmt);
-
        return 0;
 }