From 920b01388e27798977929d6cd316e3fc8cdad5cc Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Mon, 22 Jul 2019 20:02:19 +0800 Subject: [PATCH] rockchip: rk3399: Migrate to use common board file Use common board file for board_init() and board_late_init(), for Rockchip SoCs have very similar process. Signed-off-by: Kever Yang --- arch/arm/mach-rockchip/Kconfig | 1 + arch/arm/mach-rockchip/Makefile | 1 - arch/arm/mach-rockchip/rk3399-board.c | 13 ------------- board/google/gru/gru.c | 5 ----- board/rockchip/evb_rk3399/evb-rk3399.c | 13 ------------- board/theobroma-systems/puma_rk3399/puma-rk3399.c | 15 --------------- board/vamrs/rock960_rk3399/rock960-rk3399.c | 15 --------------- 7 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 arch/arm/mach-rockchip/rk3399-board.c diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 90916a382e..4b211794c6 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -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 diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index 210e80ece2..ca633afcbb 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -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 index 443c87cccc..0000000000 --- a/arch/arm/mach-rockchip/rk3399-board.c +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (c) 2017 Rockchip Electronics Co., Ltd - */ - -#include -#include - -int board_late_init(void) -{ - setup_boot_mode(); - return 0; -} diff --git a/board/google/gru/gru.c b/board/google/gru/gru.c index c2895e1267..b6b4f19d84 100644 --- a/board/google/gru/gru.c +++ b/board/google/gru/gru.c @@ -5,11 +5,6 @@ #include -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) diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c index c7e93a358d..b9049abcc7 100644 --- a/board/rockchip/evb_rk3399/evb-rk3399.c +++ b/board/rockchip/evb_rk3399/evb-rk3399.c @@ -5,7 +5,6 @@ #include #include -#include #include #include @@ -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 diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 251cd2d566..a7e7f022ba 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -21,21 +21,6 @@ #include #include -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) diff --git a/board/vamrs/rock960_rk3399/rock960-rk3399.c b/board/vamrs/rock960_rk3399/rock960-rk3399.c index 2eb7120e84..68a127b9ac 100644 --- a/board/vamrs/rock960_rk3399/rock960-rk3399.c +++ b/board/vamrs/rock960_rk3399/rock960-rk3399.c @@ -2,18 +2,3 @@ /* * Copyright (C) 2018 Manivannan Sadhasivam */ - -#include -#include -#include - -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; -} -- 2.25.1