public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [PATCH 5/5] rockchip: spl: Move board_early_init_f after cpu timer
Date: Wed, 18 Mar 2020 15:14:05 +0530	[thread overview]
Message-ID: <20200318094405.25511-5-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20200318094405.25511-1-jagan@amarulasolutions.com>

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 <jagan@amarulasolutions.com>
---
 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 48ab0e60c6..4b4e756247 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -120,8 +120,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);
@@ -135,6 +133,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.17.1

      parent reply	other threads:[~2020-03-18  9:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18  9:44 [PATCH 1/5] rockchip: Separate the reset cause from display cpuinfo Jagan Teki
2020-03-18  9:44 ` [PATCH 2/5] roc-rk3399-pc: Configure the leds only during POR Jagan Teki
2020-03-19  9:16   ` [2/5] " sunil at amarulasolutions.com
2020-03-18  9:44 ` [PATCH 3/5] rockchip: tpl: Move board_early_init_f after cpu timer Jagan Teki
2020-03-18  9:44 ` [PATCH 4/5] rockchip: tpl: Print TPL banner at end-of board_init_f Jagan Teki
2020-03-18  9:44 ` Jagan Teki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200318094405.25511-5-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox