From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BC83BC433F5 for ; Wed, 22 Dec 2021 12:49:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C4128303A; Wed, 22 Dec 2021 13:49:26 +0100 (CET) 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=1640177366; bh=aDqhJMmpWa9MWZJj54O5IqQdX5AzF2DwKBFi15W2MRE=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=eOuNTpNEuhAFAM7t42nJdRZBDKKwHZ0VTuhhRcPy5BkL8UdG9f+lMiSRgFxovH3iB Baf+K4EKoxc8Y9yapk+Fn1Y3zYcElmgUhfdbpKuTFWq6iIRuGYdgfYoCpF2bFzvTpD mTsWaZbIJTz04LfCQ5Ckg0A63fSl6P/6SZZZ/mI0hQt1W+AtXLEZmuly7x0tmpj5ES YJ/Z8egWn8oc9ff59PMU2+oMfAOjHWr64fVe/+Dj4L/XBIMAhYbIZ8DWt4hPORZSbE GvBj4SeibIhX2HHQv3QSSNMxmzpNjq9GTbfUcOg5IqhhbVaSZ7D3KgwTW7vammdd+j pLbwEnLAkGLSw== 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 7BF4382F91; Wed, 22 Dec 2021 13:49:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1640177363; bh=aDqhJMmpWa9MWZJj54O5IqQdX5AzF2DwKBFi15W2MRE=; h=From:To:Cc:Subject:Date:From; b=MJHLaJ3mEFdhGnhp86IvmsyJJLLH1kQmB/PR4S0ngw09e5RLw+ESL9g2SfzBnbtlY LG/pmW4AVt7E5V+KaH9RBQ1Dqiz5taCuJTUO5AvqgLkfdW0Iv1nDiK59T47n/vYXtk /00aaT004C9tfrTgjHzcLoXunkLdgnjJ11u56T0raCQDAarDtPrpu1AKY2xy9Gwhmg /RRxJFoQ8Ql1XScs//hPSR+LdzC+MNg6Ar/5v/lsOFmuXxADIB0Sr5RaBJn0/fe++9 TdtqgEtvXipQBfKWqDjL3TlQzYtQquZ1KnmUZI3NLOiiPGSdtQeS3CQMCYGDjQKheQ wQaT4AvZKZQAQ== From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic , Tom Rini Cc: Lukasz Majewski Subject: [PATCH v1 1/3] arm: xea: Modify board code to generate single binary u-boot Date: Wed, 22 Dec 2021 13:49:02 +0100 Message-Id: <20211222124904.2475-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.38 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) 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 | 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