]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/theobroma-systems/puma_rk3399/puma-rk3399.c
rockchip: rk3399: make spl_board_init board-specific
[people/ms/u-boot.git] / board / theobroma-systems / puma_rk3399 / puma-rk3399.c
index c6f8eed0c98821ab10941cfecc02ae994986bdae..e55a5c6657e97e6346f89e6a0a5c643b8bbd5cbe 100644 (file)
@@ -3,15 +3,16 @@
  *
  * SPDX-License-Identifier:     GPL-2.0+
  */
+
 #include <common.h>
 #include <dm.h>
 #include <misc.h>
-#include <ram.h>
 #include <dm/pinctrl.h>
 #include <dm/uclass-internal.h>
 #include <asm/setup.h>
 #include <asm/arch/periph.h>
 #include <power/regulator.h>
+#include <spl.h>
 #include <u-boot/sha256.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -59,6 +60,11 @@ out:
        return 0;
 }
 
+void spl_board_init(void)
+{
+       preloader_console_init();
+}
+
 static void setup_macaddr(void)
 {
 #if CONFIG_IS_ENABLED(CMD_NET)
@@ -91,8 +97,6 @@ static void setup_macaddr(void)
        mac_addr[0] |= 0x02;  /* set local assignment bit (IEEE802) */
        eth_env_set_enetaddr("ethaddr", mac_addr);
 #endif
-
-       return;
 }
 
 static void setup_serial(void)
@@ -107,7 +111,7 @@ static void setup_serial(void)
        u8 low[cpuid_length/2], high[cpuid_length/2];
        char cpuid_str[cpuid_length * 2 + 1];
        u64 serialno;
-       char serialno_str[16];
+       char serialno_str[17];
 
        /* retrieve the device */
        ret = uclass_get_device_by_driver(UCLASS_MISC,
@@ -147,8 +151,6 @@ static void setup_serial(void)
        env_set("cpuid#", cpuid_str);
        env_set("serial#", serialno_str);
 #endif
-
-       return;
 }
 
 int misc_init_r(void)