From patchwork Sat Sep 11 22:39:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1526800 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=E/lzmGJu; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=ngTkoVxM; 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 ozlabs.org (Postfix) with ESMTPS id 4H6SPY1DZ4z9sW8 for ; Sun, 12 Sep 2021 08:40:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5C07A838AB; Sun, 12 Sep 2021 00:40:18 +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=1631400018; bh=hYoXL4jKKf3b3cJknidUNZ4Ggc+olH9Q+s1ev+pnJtI=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=E/lzmGJuEy99X3OezpmPkBu8+4e+MxfB+ORr6mhC4NALnhaUw0E+gxjpZLinWbiO6 HVWqGXmRVgnmNHR7iCiP29FPoF/l57P2r3FgN0pPocj0tfZ+jPBs0R6WKENn6XWQYU jvvrRa20QQlV/VP8PoxA8uoY7k2HH2/y71nABirjHUbYYcYR4a56H1dLr8OHueqpWC UMBbEw/p5qz1U1rsF+/ov5pypU06VmaRgxyXI+mrfSC+FnAYZDaSHriip/qu9I/yYx iFZZuK+tRdVJGnmo68LnkZLY+BVaGYhZpw+idI/xBBKQU5X77e8MzI89LT1xsUhvht bg1upeJaq1zng== Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 39B8F837E4; Sun, 12 Sep 2021 00:40:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1631400015; bh=hYoXL4jKKf3b3cJknidUNZ4Ggc+olH9Q+s1ev+pnJtI=; h=From:To:Cc:Subject:Date:From; b=ngTkoVxMYz7QwE2ENftFJcdQbVsnhWX4HRWoYNmTGpYJXiSrteXFAHVu2xqMIHlU5 EqTFlhrtnsUlxVb1XOn04N0qv9Ycl5rU+x10qAvOdtT1zY6ee5m0cDfURJpsixDHyT WaYi/W6COIh9RuQK3NRoTKwNzcQHdE9etZQ7rIy0PSIlKRKo40NfcXNN8z0Y1e5Sz0 x49PKQRSUKkOOsjdmovzW8hfm3OxEUpr0RyOggX16USyGn15wbcrOlMnfrRaSorlLh sYl72HSTM5nHPsU/9e25gpEkHx9vRk/Lx1bDTYm8Idd6kxAiVwSHX8+MwpkMu/e+Ma ZY1TtfRTorFAw== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Stefano Babic Subject: [PATCH 1/3] ARM: imx: mx5: Enable BMODE command on MX53 Menlo board Date: Sun, 12 Sep 2021 00:39:58 +0200 Message-Id: <20210911224000.98908-1-marex@denx.de> X-Mailer: git-send-email 2.33.0 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 The board can do primary/secondary boot switching, enable the bmode command. Signed-off-by: Marek Vasut Cc: Stefano Babic --- board/menlo/m53menlo/m53menlo.c | 5 +++++ configs/m53menlo_defconfig | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index 2b331b32df5..9545e633a3d 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -334,6 +335,10 @@ int splash_screen_prepare(void) int board_late_init(void) { +#ifdef CONFIG_CMD_BMODE + add_board_boot_modes(NULL); +#endif + #if defined(CONFIG_VIDEO_IPUV3) struct udevice *dev; int xpos, ypos, ret; diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig index 505dd078b0c..97605b2711b 100644 --- a/configs/m53menlo_defconfig +++ b/configs/m53menlo_defconfig @@ -18,7 +18,6 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0x53FA401C CONFIG_SPL=y CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y CONFIG_ENV_OFFSET_REDUND=0x180000 -# CONFIG_CMD_BMODE is not set CONFIG_FIT=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/menlo/m53menlo/imximage.cfg" From patchwork Sat Sep 11 22:39:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1526801 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=HO2KQz92; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=HfnDO1CY; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H6SPl0kpkz9sW5 for ; Sun, 12 Sep 2021 08:40:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 43F88838B6; Sun, 12 Sep 2021 00:40:23 +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=1631400023; bh=HpOww7WId/zvlo/jtmFsa8zsqY3mQ/MnFwdZpc9m0is=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HO2KQz92JlXRUPm24O1iXnVBSdmvTG12G8pLitYIQ94fvRb5MguY6zQexMfFSGQha ggnvRHonNYRY2RfRP1XOcBmUrh3DrWGxFqoWoyWLUitv0B4Gw14qtbDi2+nK4c3PBq AkErnVnTPC6oiNg2UZsj1AaODdXBS4pyiTCB6oxkwgEpOHr2BKkV5kzYnoxcBMJ65u nBp8AI3UMswgvuPVc1i4y6k0j3kV0k5Lxjy/ECdxB42ndoMxnFnO7b6nxTuw3sOA80 97pf8gWFdor+n8YU3oN7p0dN0H0V9KPv4nWMsgKgvXJTTej82t3xBPnZ/4JrWbhRBu DlpMiYg6DniFw== Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 735DE838AB; Sun, 12 Sep 2021 00:40:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1631400015; bh=HpOww7WId/zvlo/jtmFsa8zsqY3mQ/MnFwdZpc9m0is=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HfnDO1CY4B74HySSqmic/WiGCI1LFNChumcTml1bkNr8ehtvCdAhbw9VGKR7XnCRD 2DHT0CaGqrfeSDNzSNm+071/Sjdy0DBcEaA8qJsDtZ87Scklg63rO3+SGXoTi+4uYG x9wzPed/i5G7lRrRZ/sjLJNsPtwtdEyGtPcBdUcn/ye7U77KA/v7fho+or9aCVqncy mQ+PbgKC4DyzD0yrroJzZ3LRy9xtXToueuvqgMRBg9UVQFtj1UudCn8El3u17IB+56 UTfj9/ngEFZjOsnqnSksXUZv6DIWMGR7PvNcWoCpGOpW/LyT44x0jYKxdy6d+4GDkJ EjtGpd87LxJXg== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Stefano Babic Subject: [PATCH 2/3] ARM: imx: mx5: Enable Thumb2 build on MX53 Menlo board Date: Sun, 12 Sep 2021 00:39:59 +0200 Message-Id: <20210911224000.98908-2-marex@denx.de> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210911224000.98908-1-marex@denx.de> References: <20210911224000.98908-1-marex@denx.de> 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 Build U-Boot in Thumb2 mode for M53Menlo board, this makes better use of the CPU since the instruction density is higher. Signed-off-by: Marek Vasut Cc: Stefano Babic --- configs/m53menlo_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig index 97605b2711b..0656cd86816 100644 --- a/configs/m53menlo_defconfig +++ b/configs/m53menlo_defconfig @@ -1,4 +1,5 @@ CONFIG_ARM=y +CONFIG_SYS_THUMB_BUILD=y CONFIG_ARCH_MX5=y CONFIG_SYS_TEXT_BASE=0x71000000 CONFIG_SPL_GPIO=y From patchwork Sat Sep 11 22:40:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1526802 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=tRLFUxp0; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=CokM/GiU; 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 ozlabs.org (Postfix) with ESMTPS id 4H6SPv3Dtgz9sW5 for ; Sun, 12 Sep 2021 08:40:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 30458838BB; Sun, 12 Sep 2021 00:40:27 +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=1631400027; bh=OKiNpyMhIRA9qudMb5oCWdKYMhVXTAyGGYTKASTR1nw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tRLFUxp08RkjyJxFnfW4TmwmTz5vsjn+NuRoWwN1aqS5Q6UysdkO+GnarEjaJ4YFA Nu5u0aBXaENcUMuLGoatiEhQ16lwPqTP0rUEv5MbdMUmnBpOrNOQrMTTXkzCG2etuD 9aK9zLPJZ+uju0dWzTFqP1k7j5RItxOXOEViAKCZuTZXUN3FkbHYkGKA3QJ9k3s9vK qKWKxIRY2sNefbdAKIQb9sr7ycVLKXrsqybR85/GILU+LLwTKeRwoq1bC/bT/EnoYp hJ6WCkbD1Ahid12Yi5MBCNFWxNIcMSSn/C63L3hOldc2MEQx59NwV3s9GV+8kSotHH wCl/p45jKzJvQ== Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B8A3B838AC; Sun, 12 Sep 2021 00:40:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1631400016; bh=OKiNpyMhIRA9qudMb5oCWdKYMhVXTAyGGYTKASTR1nw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CokM/GiUjMOQD8RL15PrqDF0XIMJoWIxbBBYclMX9BzNqS3VjRwYyCq6BU8++h/sm BmO0cjjZG3D80NYj2WtL9Zf/h5ZjDlCND/W/0nLE2pEASEByPvpswdbJhThHeHrp8p z1BisJw1THzfktkfx0zlfd9CBLeH8VznXAy2L1/xtubBEl5Hc4fJsZCoTvlsLiSbHM whlPVmys78GMk9RoSAO3PszomACIym3OaGUrlxu6ylkeHDjdNwvSdSec5ZXC9JKKW5 gHwTwNwZJ0eMKPs4nUWQzdHm3Bjaj4CuOYQ3aVXPEuMsnSsTJ+v/JKRkUj+n5VQdX6 8AiapqU1ByxcQ== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Stefano Babic Subject: [PATCH 3/3] ARM: imx: mx5: Add altbootcmd and resets to M53Menlo Date: Sun, 12 Sep 2021 00:40:00 +0200 Message-Id: <20210911224000.98908-3-marex@denx.de> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210911224000.98908-1-marex@denx.de> References: <20210911224000.98908-1-marex@denx.de> 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 Bulletproof the default boot command with reset statements in case any command in the chain would fail. In case a failure were to happen, the board will reset, increment boot counter and retry the procedure. In case the failures persist and the boot counter reaches the bootlimit, U-Boot starts altbootcmd instead of the default bootcmd boot command. The altbootcmd swaps the default boot partition for the other boot partition, which is an identical copy or an older copy, and tries booting from that one instead. Signed-off-by: Marek Vasut Cc: Stefano Babic --- include/configs/m53menlo.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h index bd117daf063..9bec05bf0bd 100644 --- a/include/configs/m53menlo.h +++ b/include/configs/m53menlo.h @@ -184,6 +184,13 @@ "splashfile=boot/usplash.bmp.gz\0" \ "splashimage=0x88000000\0" \ "splashpos=m,m\0" \ + "altbootcmd=" \ + "if test ${mmcpart} -eq 1 ; then " \ + "setenv mmcpart 2 ; " \ + "else " \ + "setenv mmcpart 1 ; " \ + "fi ; " \ + "boot\0" \ "stdout=serial,vidconsole\0" \ "stderr=serial,vidconsole\0" \ "addcons=" \ @@ -198,14 +205,14 @@ "setenv bootargs ${bootargs} ${miscargs}\0" \ "addargs=run addcons addmisc addmtd\0" \ "mmcload=" \ - "mmc rescan ; load mmc ${mmcdev}:${mmcpart} " \ - "${kernel_addr_r} ${bootfile}\0" \ + "mmc rescan || reset ; load mmc ${mmcdev}:${mmcpart} " \ + "${kernel_addr_r} ${bootfile} || reset\0" \ "miscargs=nohlt panic=1\0" \ "mmcargs=setenv bootargs root=/dev/mmcblk0p${mmcpart} rw " \ "rootwait\0" \ "mmc_mmc=" \ - "run mmcload mmcargs addargs ; " \ - "bootm ${kernel_addr_r}\0" \ + "run mmcload mmcargs addargs || reset ; " \ + "bootm ${kernel_addr_r} ; reset\0" \ "netload=tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \ "net_nfs=" \ "run netload nfsargs addip addargs ; " \