From patchwork Sat Oct 23 15:03:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1545208 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=t1IZri/N; dkim=fail reason="signature verification failed" (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=AZsmFzZi; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hc4Hb0w0Zz9sR4 for ; Sun, 24 Oct 2021 02:04:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0DC1D83310; Sat, 23 Oct 2021 17:04:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1635001445; bh=7DULq/W9mcWB/LYITcm5BRpeE7NkMu/doezCCO/thtw=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=t1IZri/NDULj/3+pveFC1OhKchVB2bal75uDzwP0TOL/NK97ENZ3mhC+gbR2OH+8S qJ5ioNOvXguOv04AxWCv4UmZ4JntUFwiPRVZRZafuaNfhEjQGTQhh7FzVdCqxcHl1A SsTVjI7o7Rdw3UAA4Tqwswn4E29SL4eR9KRXZ+vwlTjlAn2xVbUBYg6GTfBMGxXhjt AgRXzFOmdpjUg14SrNYeRS2ri/ND1KO795gBhr7qNih0eAx5FMynSRxd1hh1xy38Bb tiLDvyA8Im/P7k5I8d2y0e7kt7CBT7kXul+2J2vxD6OH5/rBtESUS3MdOSj9rjvoOV poeKHOfKllUMw== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 4258A8320D; Sat, 23 Oct 2021 17:04:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1635001442; bh=7DULq/W9mcWB/LYITcm5BRpeE7NkMu/doezCCO/thtw=; h=From:To:Cc:Subject:Date:From; b=AZsmFzZiTFqHoYEdHG0ICcQjfZvhdNJS3IyhdjkUSujSHEH2fNkR7C8DG6CBpO04k Jnucon+UdGVK951aNI1Chn79gkJoX3EX2zWQaBMITQVYxz05Obn96hzjCl5VFjAarX hYWK++X18pgmgLA/oJoQKYdtxqaNYH94H+o7KAWAguMyt3gq8xuH82crJLOP4WRC0j qxkjGjtfHZ64hJqKfY6cphSEHkl6+tFrkDsV7icDjx84nLQm/MpBiiN/TVW8oRgr02 CScywFFKx4UUKPDpLzGyLnWhN180SspcowgxzDiiD12X1gh8rrd235+sHD/qgjaUIi DyHRwxOFKsekw== From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Cc: Lukasz Majewski , "WARNING:Unknown"@denx.de, setting@denx.de, ignore_warnings@denx.de, Simon Glass , Tom Rini Subject: [PATCH v1] arm: xea: Modify board code to generate single binary u-boot Date: Sat, 23 Oct 2021 17:03:43 +0200 Message-Id: <20211023150343.26260-1-lukma@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This change provides the possibility to build XEA (imx287 based) board U-Boot as a single binary (without support for CONFIG_SPL_FRAMEWORK). The generated u-boot.sb can be used in the factory environment to for example perform initial setup or HW testing. It can be used with 'uuu' utility (SDPS: boot -f /srv/tftp/xea/u-boot.sb) In the configs/imx28_xea_defconfig one needs to disable following configs: The board_init_ll() is used in arch/arm/cpu/arm926ejs/mxs/start.S, which is utilized when CONFIG_SPL_FRAMEWORK is disabled. However, when it is enabled the arch/arm/cpu/arm926ejs/start.S is used, which requires the lowlevel_init() function. Signed-off-by: Lukasz Majewski --- board/liebherr/xea/spl_xea.c | 7 +++++++ board/liebherr/xea/xea.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/board/liebherr/xea/spl_xea.c b/board/liebherr/xea/spl_xea.c index 192f68fca5f..92ba08248b4 100644 --- a/board/liebherr/xea/spl_xea.c +++ b/board/liebherr/xea/spl_xea.c @@ -290,6 +290,7 @@ u32 mxs_dram_vals[] = { 0x00000000, 0xffffffff }; +#if CONFIG_IS_ENABLED(SPL_FRAMEWORK) void lowlevel_init(void) { struct mxs_pinctrl_regs *pinctrl_regs = @@ -301,3 +302,9 @@ void lowlevel_init(void) mxs_common_spl_init(0, NULL, iomux_setup, ARRAY_SIZE(iomux_setup)); } +#else +void board_init_ll(const u32 arg, const uint32_t *resptr) +{ + mxs_common_spl_init(arg, resptr, iomux_setup, ARRAY_SIZE(iomux_setup)); +} +#endif diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c index cd11b0ada77..4437f9cb265 100644 --- a/board/liebherr/xea/xea.c +++ b/board/liebherr/xea/xea.c @@ -58,7 +58,7 @@ static void init_clocks(void) mxs_set_sspclk(MXC_SSPCLK3, 96000, 0); } -#ifdef CONFIG_SPL_BUILD +#if defined CONFIG_SPL_BUILD && defined CONFIG_SPL_FRAMEWORK void board_init_f(ulong arg) { init_clocks();