board: rk3399: Drop explicit uart enablement in spl_board_init
authorJagan Teki <jagan@amarulasolutions.com>
Thu, 20 Jun 2019 18:54:59 +0000 (00:24 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 26 Jun 2019 13:11:27 +0000 (21:11 +0800)
preloader_console_init is used for printing SPL boot banner that
usually called from spl_board_init.

The current spl_board_init in evb and rock960 is enabling explicit
pinctrl, debug uart prior to calling preloader_console_init which
eventually not required since board_init_f is already enabled
debug uart.

So, drop those explicit enablement calls from  spl_board_init of
evb, rock960.

Tested this by enabling CONFIG_SPL_BOARD_INIT and adding
u-boot,dm-pre-reloc property for uart node.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
board/rockchip/evb_rk3399/evb-rk3399.c
board/vamrs/rock960_rk3399/rock960-rk3399.c

index bf2ad98c473d6f23650d6e39e61b7b6824eaadca..769b5d146f7f2d36e0f33b41d3867515f0527b4a 100644 (file)
@@ -6,7 +6,6 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
-#include <dm/uclass-internal.h>
 #include <asm/arch-rockchip/periph.h>
 #include <power/regulator.h>
 #include <spl.h>
@@ -68,27 +67,7 @@ out:
 
 void spl_board_init(void)
 {
-       struct udevice *pinctrl;
-       int ret;
-
-       ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl);
-       if (ret) {
-               debug("%s: Cannot find pinctrl device\n", __func__);
-               goto err;
-       }
-
-       /* Enable debug UART */
-       ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG);
-       if (ret) {
-               debug("%s: Failed to set up console UART\n", __func__);
-               goto err;
-       }
-
        preloader_console_init();
-       return;
-err:
-       printf("%s: Error %d\n", __func__, ret);
 
-       /* No way to report error here */
-       hang();
+       return;
 }
index 0f5ef3a09a434b290012530c9f639ed07d9e5f39..018e4b55b8f2a577c18d2c10a172bbf0ed573e65 100644 (file)
@@ -5,9 +5,6 @@
 
 #include <common.h>
 #include <dm.h>
-#include <dm/pinctrl.h>
-#include <dm/uclass-internal.h>
-#include <asm/arch-rockchip/periph.h>
 #include <power/regulator.h>
 #include <spl.h>
 
@@ -24,27 +21,7 @@ int board_init(void)
 
 void spl_board_init(void)
 {
-       struct udevice *pinctrl;
-       int ret;
-
-       ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl);
-       if (ret) {
-               debug("%s: Cannot find pinctrl device\n", __func__);
-               goto err;
-       }
-
-       /* Enable debug UART */
-       ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG);
-       if (ret) {
-               debug("%s: Failed to set up console UART\n", __func__);
-               goto err;
-       }
-
        preloader_console_init();
-       return;
-err:
-       printf("%s: Error %d\n", __func__, ret);
 
-       /* No way to report error here */
-       hang();
+       return;
 }