rockchip: rk3399: Migrate to use common board file
authorKever Yang <kever.yang@rock-chips.com>
Mon, 22 Jul 2019 12:02:19 +0000 (20:02 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Mon, 29 Jul 2019 02:27:48 +0000 (10:27 +0800)
Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/Kconfig
arch/arm/mach-rockchip/Makefile
arch/arm/mach-rockchip/rk3399-board.c [deleted file]
board/google/gru/gru.c
board/rockchip/evb_rk3399/evb-rk3399.c
board/theobroma-systems/puma_rk3399/puma-rk3399.c
board/vamrs/rock960_rk3399/rock960-rk3399.c

index 90916a382e6d9d7942743463bd23f81181041f63..4b211794c625bea602995817179af05a33cb6c50 100644 (file)
@@ -177,6 +177,7 @@ config ROCKCHIP_RK3399
        select DM_PMIC
        select DM_REGULATOR_FIXED
        select BOARD_LATE_INIT
+       imply ROCKCHIP_COMMON_BOARD
        imply SPL_ROCKCHIP_COMMON_BOARD
        imply TPL_SERIAL_SUPPORT
        imply TPL_LIBCOMMON_SUPPORT
index 210e80ece2d41489e355a8b19ddf48661dba00ab..ca633afcbb1f82e0d2d5cf83f1499e6a0741c3cf 100644 (file)
@@ -22,7 +22,6 @@ ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
 obj-y += boot_mode.o
 obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
 
-obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399-board.o
 obj-$(CONFIG_ROCKCHIP_RV1108) += rv1108-board.o
 endif
 
diff --git a/arch/arm/mach-rockchip/rk3399-board.c b/arch/arm/mach-rockchip/rk3399-board.c
deleted file mode 100644 (file)
index 443c87c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (c) 2017 Rockchip Electronics Co., Ltd
- */
-
-#include <common.h>
-#include <asm/arch-rockchip/boot_mode.h>
-
-int board_late_init(void)
-{
-       setup_boot_mode();
-       return 0;
-}
index c2895e1267e5c86f20772307b3fc60c10542ebff..b6b4f19d84d29250a2068d493c6ad9fca40af610 100644 (file)
@@ -5,11 +5,6 @@
 
 #include <common.h>
 
-int board_init(void)
-{
-       return 0;
-}
-
 #ifdef CONFIG_SPL_BUILD
 /* provided to defeat compiler optimisation in board_init_f() */
 void gru_dummy_function(int i)
index c7e93a358db8e75237f2c407a6f07d244d3af84a..b9049abcc7e05bdf7925e460662b67de9dfbbda4 100644 (file)
@@ -5,7 +5,6 @@
 
 #include <common.h>
 #include <dm.h>
-#include <dm/pinctrl.h>
 #include <asm/arch-rockchip/periph.h>
 #include <power/regulator.h>
 
@@ -28,16 +27,4 @@ int board_early_init_f(void)
 out:
        return 0;
 }
-
-int board_init(void)
-{
-       struct udevice *regulator;
-       int ret;
-
-       ret = regulators_enable_boot_on(false);
-       if (ret)
-               debug("%s: Cannot enable boot on regulator\n", __func__);
-
-       return 0;
-}
 #endif
index 251cd2d5667376340f772327a341b8f12487473a..a7e7f022ba4467c60498e94b0f2ab5a488ab0622 100644 (file)
 #include <power/regulator.h>
 #include <u-boot/sha256.h>
 
-int board_init(void)
-{
-       int ret;
-
-       /*
-        * We need to call into regulators_enable_boot_on() again, as the call
-        * during SPL may have not included all regulators.
-        */
-       ret = regulators_enable_boot_on(false);
-       if (ret)
-               debug("%s: Cannot enable boot on regulator\n", __func__);
-
-       return 0;
-}
-
 static void setup_macaddr(void)
 {
 #if CONFIG_IS_ENABLED(CMD_NET)
index 2eb7120e84b9aa00fa907407fe8723f367039937..68a127b9ac1a2b67d220b1acb8b671e03c9dd46e 100644 (file)
@@ -2,18 +2,3 @@
 /*
  * Copyright (C) 2018 Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
  */
-
-#include <common.h>
-#include <dm.h>
-#include <power/regulator.h>
-
-int board_init(void)
-{
-       int ret;
-
-       ret = regulators_enable_boot_on(false);
-       if (ret)
-               debug("%s: Cannot enable boot on regulator\n", __func__);
-
-       return 0;
-}