Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BB33C433EF for ; Mon, 25 Oct 2021 09:12:11 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 51DDF60E75 for ; Mon, 25 Oct 2021 09:12:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 51DDF60E75 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9BFDA82DA1; Mon, 25 Oct 2021 11:12:07 +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=1635153127; bh=LNExZGoxBHvmnJfIcodj7CkS2iXiF0R7wm21bGVViEM=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=CFc9nrGIgNW7lqkHK5VwUGCZh+86mckqMEbAHnNLK7KwHggeQmnDxgjn1MUMldxf7 ZgbfbFcmI8FV8epAdUDXGXL+ScRcWJBynq6jKyPkp+RDx1JUBJWI+dziKxTIuxdTP6 qxLelE/UqeMdiMgRtKaxQtqY8lxRq6WGLLnsABMJL1pmMVcfrOW4H+Lq2lhKSr6dYk NfSXw+P9ydz9J7yLEVqH78NrwIbIkfRuDA5wrJCJlntnCJ0Tj/pydogHw7/3cIDOuI 09EHIHiE0AvzsyCcHTlX0HKb4GXJap80cUSrC7maprftSjvEWjii+6RPs6Wlb9OzaY kMlRixP9gKF7A== 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 F106880F1A; Mon, 25 Oct 2021 11:12:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1635153125; bh=LNExZGoxBHvmnJfIcodj7CkS2iXiF0R7wm21bGVViEM=; h=From:To:Cc:Subject:Date:From; b=NxK2LLGwNslTwDXtkqVlzqfewKUgYRxhpnjWfVRF0XvfmVe9QHOzhg0G6eqMdQg2V jy7eUkkEfXY0CEuypiaV2D+u197QTlTf3jp8g7kndUIhpgO/X5BbzEbygVfY14KIcU AjxAnQ4ligPo3hed4OThFt2RLnGzz5v86WBJQybGtxf6Ovj0JuJv0aEmxRKh1RSOaq gkBHSXJyWUURAScWWiM9EdboafUGX5e2doot6XCOhs75sDqD78/rBPr1OHNWeBSgO7 dvVSyJIMojJ/6pu8OsqC4+O26g48Zo+6eDQe+ldo19uPkynpodv3450OlrW/QfLB+p vcBYCnHzyhicw== 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 v2] arm: xea: Modify board code to generate single binary u-boot Date: Mon, 25 Oct 2021 11:11:46 +0200 Message-Id: <20211025091146.25689-1-lukma@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: # CONFIG_SPL_BLK is not set # CONFIG_SPL_FRAMEWORK is not set 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 --- Changes in v2: - Use CONFIG_IS_ENABLED(FRAMEWORK) instead of #ifdef CONFIG_SPL_FRAMEWORK (previous version used CONFIG_IS_ENABLED(SPL_FRAMEWORK), which was wrong). - Restructure spl_xea.c code to be more readable board/liebherr/xea/spl_xea.c | 8 ++++++++ board/liebherr/xea/xea.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/board/liebherr/xea/spl_xea.c b/board/liebherr/xea/spl_xea.c index 192f68fca5f..5ee561b8b78 100644 --- a/board/liebherr/xea/spl_xea.c +++ b/board/liebherr/xea/spl_xea.c @@ -290,6 +290,13 @@ u32 mxs_dram_vals[] = { 0x00000000, 0xffffffff }; +/* #ifndef CONFIG_SPL_FRAMEWORK */ +#if !CONFIG_IS_ENABLED(FRAMEWORK) +void board_init_ll(const u32 arg, const uint32_t *resptr) +{ + mxs_common_spl_init(arg, resptr, iomux_setup, ARRAY_SIZE(iomux_setup)); +} +#else void lowlevel_init(void) { struct mxs_pinctrl_regs *pinctrl_regs = @@ -301,3 +308,4 @@ void lowlevel_init(void) mxs_common_spl_init(0, NULL, iomux_setup, ARRAY_SIZE(iomux_setup)); } +#endif diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c index cd11b0ada77..685e2e26a18 100644 --- a/board/liebherr/xea/xea.c +++ b/board/liebherr/xea/xea.c @@ -58,7 +58,8 @@ static void init_clocks(void) mxs_set_sspclk(MXC_SSPCLK3, 96000, 0); } -#ifdef CONFIG_SPL_BUILD +/* #if CONFIG_SPL_BUILD && CONFIG_SPL_FRAMEWORK */ +#if CONFIG_IS_ENABLED(BUILD) && CONFIG_IS_ENABLED(FRAMEWORK) void board_init_f(ulong arg) { init_clocks(); -- 2.20.1