public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 02/13 v3] arm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabled
Date: Tue,  2 Apr 2019 10:57:16 +0200	[thread overview]
Message-ID: <20190402085727.14552-2-sr@denx.de> (raw)
In-Reply-To: <20190402085727.14552-1-sr@denx.de>

This patch adds a call to spl_early_init() to board_init_f() which is
needed when CONFIG_SPL_OF_CONTROL is configured. This is necessary for
the early SPL setup including the DTB setup for later usage.

Please note that this call might also be needed for non SPL_OF_CONTROL
board, like the smartweb target. But smartweb fails to build with this
call because its binary grows too big. So I disabled it for these kind
of targets for now.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the taurus board:
Tested-by: Heiko Schocher <hs@denx.de>
---
v3:
- No change

v2:
- No change

 arch/arm/mach-at91/spl_at91.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
index 23ebaa99b1..1065f090e0 100644
--- a/arch/arm/mach-at91/spl_at91.c
+++ b/arch/arm/mach-at91/spl_at91.c
@@ -75,6 +75,16 @@ void __weak spl_board_init(void)
 
 void board_init_f(ulong dummy)
 {
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+	int ret;
+
+	ret = spl_early_init();
+	if (ret) {
+		debug("spl_early_init() failed: %d\n", ret);
+		hang();
+	}
+#endif
+
 	lowlevel_clock_init();
 #if !defined(CONFIG_WDT_AT91)
 	at91_disable_wdt();
-- 
2.21.0

  reply	other threads:[~2019-04-02  8:57 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02  8:57 [U-Boot] [PATCH 01/13 v3] arm: at91: Makefile: Compile lowlevel_init only when really necessary Stefan Roese
2019-04-02  8:57 ` Stefan Roese [this message]
2019-04-02  8:57 ` [U-Boot] [PATCH 03/13 v3] serial: atmel_usart: Use fixed clock value in SPL version with DM_SERIAL Stefan Roese
2019-04-02 10:12   ` Eugen.Hristev at microchip.com
2019-04-02 10:40     ` Stefan Roese
2019-04-02 10:45       ` Eugen.Hristev at microchip.com
2019-04-02 11:21       ` [U-Boot] [PATCH 3/13 v4] " Stefan Roese
2019-04-03 10:52         ` Eugen.Hristev at microchip.com
2019-04-03 10:58           ` Stefan Roese
2019-04-03 11:05             ` Eugen.Hristev at microchip.com
2019-04-03 11:11               ` Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 04/13 v3] watchdog: Handle SPL build with watchdog disabled Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 05/13 v3] watchdog: at91sam9_wdt: Fix WDT setup in at91_wdt_start() Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 06/13 v3] arm: at91: Remove CONFIG_AT91_HW_WDT_TIMEOUT Stefan Roese
2019-04-02 11:19   ` Eugen.Hristev at microchip.com
2019-04-03  5:37   ` [U-Boot] [PATCH 06/13 v4] " Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 07/13 v3] arm: at91: Enable watchdog support Stefan Roese
2019-04-02 11:26   ` Eugen.Hristev at microchip.com
2019-04-02 11:50     ` Stefan Roese
2019-04-03  5:40       ` Stefan Roese
2019-04-03  5:37   ` [U-Boot] [PATCH 07/13 v4] " Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 08/13 v3] arm: at91: arm926ejs/u-boot-spl.lds: Add _image_binary_end to SPL lds Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 09/13 v3] Makefile.spl: Move generated AT91SAM NAND image boot.bin to spl directory Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 10/13 v3] Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary Stefan Roese
2019-04-03 11:08   ` Eugen.Hristev at microchip.com
2019-04-03 11:11     ` Eugen.Hristev at microchip.com
2019-04-03 11:21       ` Stefan Roese
2019-04-03 12:22         ` Stefan Roese
2019-04-03 12:31           ` Eugen.Hristev at microchip.com
2019-04-03 12:38             ` Stefan Roese
2019-04-03 12:46               ` Eugen.Hristev at microchip.com
2019-04-03 11:19     ` Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 11/13 v3] arm: at91: siemens: Add support to generate combined SPL+U-Boot image Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 12/13 v3] arm: at91: at91sam9x5.dtsi: Add watchdog handle Stefan Roese
2019-04-02  8:57 ` [U-Boot] [PATCH 13/13 v3] arm: at91: Add gardena-gateway-at91sam support Stefan Roese

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=20190402085727.14552-2-sr@denx.de \
    --to=sr@denx.de \
    --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