From mboxrd@z Thu Jan 1 00:00:00 1970 From: sunil at amarulasolutions.com Date: Fri, 22 May 2020 23:33:24 +0530 Subject: [PATCH 1/5] rockchip: spl: Move board_early_init_f after cpu timer In-Reply-To: <1590170608-12229-1-git-send-email-sunil@amarulasolutions.com> References: <1590170608-12229-1-git-send-email-sunil@amarulasolutions.com> Message-ID: <1590170608-12229-2-git-send-email-sunil@amarulasolutions.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Jagan Teki Custom board_early_init_f not only deal with simple gpio configuration but also have a possibility to access clocks to process any clock related operations like checking reset cause state and etc. So, call it once the rockchip timer initialization done instead of calling first place of board_init_f which doesn't have any rockchip init code before. This specific concern was tested with checking reset reason via board_early_init_f, which indeed require a clk probe. Signed-off-by: Jagan Teki Tested-by: Suniel Mahesh --- arch/arm/mach-rockchip/spl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index ec2f66d..82586fe 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -124,8 +124,6 @@ void board_init_f(ulong dummy) debug("\nspl:debug uart enabled in %s\n", __func__); #endif - board_early_init_f(); - ret = spl_early_init(); if (ret) { printf("spl_early_init() failed: %d\n", ret); @@ -139,6 +137,9 @@ void board_init_f(ulong dummy) /* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */ timer_init(); #endif + + board_early_init_f(); + #if !defined(CONFIG_TPL) || defined(CONFIG_SPL_OS_BOOT) debug("\nspl:init dram\n"); ret = uclass_get_device(UCLASS_RAM, 0, &dev); -- 2.7.4