From patchwork Sat Mar 4 10:50:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1751736 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=aHJoPo/z; dkim-atps=neutral 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PTM9217QYz2467 for ; Sat, 4 Mar 2023 21:51:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 20D5B85A4A; Sat, 4 Mar 2023 11:51:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="aHJoPo/z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7CE3585A66; Sat, 4 Mar 2023 11:51:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CD7D4859AC for ; Sat, 4 Mar 2023 11:51:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 47E3CB81A00; Sat, 4 Mar 2023 10:51:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2F0CC433D2; Sat, 4 Mar 2023 10:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677927097; bh=KUgTwlLHixTUdYNugvJUof/WZhvjDOr+WPyHylTDPNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aHJoPo/zDrHoEwnMm3tmGIP1L3ESDN5PO326sfRqXOdJ4NDk/sYDt60kn0Kkk5I+S fpETSJywVut0WfksopH4hqRlZHBWjoxPwT4rE8IjwHCpP36bXx2qQ32duyFmhcIGA2 w6Vk9LeSrWgGNGY2alWblnRGk9/LDxQ/Mmc/dl3KRv3eIecAEB5sf35cFwLK+LdwHb IN7zm+MSKgSbNMvDtz5Tup6rbM6a00PeuMR8WmmfLOaK34hjcwMcxiwlT+4WSs2Zev 6VadrB4jgXyQie/ZyMe5Vb9gwtp+9qZyrDQi8O5Kk497os+YTo0Cw4zyO9em2TNkvm N+Vlfe4PopmQA== Received: by pali.im (Postfix) id 9F27BE2D; Sat, 4 Mar 2023 11:51:34 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Martin Rowe , Tony Dinh , Stefan Roese , Chris Packham , Baruch Siach Cc: u-boot@lists.denx.de Subject: [PATCH RFC u-boot-mvebu 1/6] arm: mvebu: Remove A38x BOOT_FROM_UART_ALT 0x3f constant Date: Sat, 4 Mar 2023 11:50:31 +0100 Message-Id: <20230304105036.19189-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230304105036.19189-1-pali@kernel.org> References: <20230304105036.19189-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean A385 BootROM treats strapping configuration 0x3f as invalid. When booting fails (e.g. because of invalid configuration) then BootROM fallbacks to UART booting. Detecting BootROM fallback to UART booting is implemented in U-Boot since commit 2fd4284051e3 ("ARM: mach-mvebu: handle fall-back to UART boot"). So there is no need to define BOOT_FROM_UART_ALT constant and special handling for it anymore, remove it. This change effectively revers commit f3a88e2ca17a ("arm: mvebu: fix boot from UART on ClearFog Base"). Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/cpu.c | 3 --- arch/arm/mach-mvebu/include/mach/soc.h | 1 - 2 files changed, 4 deletions(-) diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index 018a3614d4dd..c187bbede722 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -109,9 +109,6 @@ u32 get_boot_device(void) return BOOT_DEVICE_MMC1; #endif case BOOT_FROM_UART: -#ifdef BOOT_FROM_UART_ALT - case BOOT_FROM_UART_ALT: -#endif return BOOT_DEVICE_UART; #ifdef BOOT_FROM_SATA case BOOT_FROM_SATA: diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h index 3b9618852c6d..e559d9f9791e 100644 --- a/arch/arm/mach-mvebu/include/mach/soc.h +++ b/arch/arm/mach-mvebu/include/mach/soc.h @@ -164,7 +164,6 @@ #define BOOT_FROM_SATA 0x22 #define BOOT_FROM_UART 0x28 #define BOOT_FROM_SATA_ALT 0x2A -#define BOOT_FROM_UART_ALT 0x3f #define BOOT_FROM_SPI 0x32 #define BOOT_FROM_MMC 0x30 #define BOOT_FROM_MMC_ALT 0x31 From patchwork Sat Mar 4 10:50:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1751738 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=qz76hK3E; dkim-atps=neutral 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PTM9T5qb0z2467 for ; Sat, 4 Mar 2023 21:52:13 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 17D6A859F2; Sat, 4 Mar 2023 11:51:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="qz76hK3E"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C0A9E859BA; Sat, 4 Mar 2023 11:51:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 06649859F2 for ; Sat, 4 Mar 2023 11:51:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C7B2760AEF; Sat, 4 Mar 2023 10:51:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 107C0C433EF; Sat, 4 Mar 2023 10:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677927097; bh=x/VnmjiPOeio2kcK9xHUnNZGPtUBIUvAj406Za06tkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qz76hK3EK0snwcs5++liPMO/Ze4mtL96Pg6VuhsnXO114c1dtvvPwwqziDOGn+4/i Shb/yBsY3mCRKn0mf6p6kUOKSy0WBKWueEZsAyo48OdwFAQ02m+nHnMAYFjnxIsElY ZV0Ahg5p0u1jduHCL6mNqr7/tMZ47yfCO77coN+s7jb9GUc4+9BP3kMDaKQ9yZJ8sp 5h2pzkP2k1aiLF+X9j8xhmSbnYLb9XGV8SIn78+aMgUFZxajpD5LQ01Ge98FWdbbt2 kfJ8yAwB2qnshVBZoGKBeCan5CqiM59sWPm/aarWKcn0o5WBE47gowLeMSaZ5pvMOJ NqRMAUOg4TV8A== Received: by pali.im (Postfix) id C1D70E37; Sat, 4 Mar 2023 11:51:34 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Martin Rowe , Tony Dinh , Stefan Roese , Chris Packham , Baruch Siach Cc: u-boot@lists.denx.de Subject: [PATCH RFC u-boot-mvebu 2/6] arm: mvebu: Remove A38x BOOT_FROM_SATA 0x22 constant Date: Sat, 4 Mar 2023 11:50:32 +0100 Message-Id: <20230304105036.19189-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230304105036.19189-1-pali@kernel.org> References: <20230304105036.19189-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean A385 BootROM treats strapping configuration 0x22 as SPI-NAND. So remove incorrect definition 0x22 as SATA. SATA on A385 has configuration 0x2A. Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/cpu.c | 1 - arch/arm/mach-mvebu/include/mach/soc.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index c187bbede722..daa84c03fcdc 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -112,7 +112,6 @@ u32 get_boot_device(void) return BOOT_DEVICE_UART; #ifdef BOOT_FROM_SATA case BOOT_FROM_SATA: - case BOOT_FROM_SATA_ALT: return BOOT_DEVICE_SATA; #endif case BOOT_FROM_SPI: diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h index e559d9f9791e..5fdce8fe4e7e 100644 --- a/arch/arm/mach-mvebu/include/mach/soc.h +++ b/arch/arm/mach-mvebu/include/mach/soc.h @@ -161,9 +161,8 @@ #define BOOT_DEV_SEL_MASK (0x3f << BOOT_DEV_SEL_OFFS) #define BOOT_FROM_NAND 0x0A -#define BOOT_FROM_SATA 0x22 +#define BOOT_FROM_SATA 0x2A #define BOOT_FROM_UART 0x28 -#define BOOT_FROM_SATA_ALT 0x2A #define BOOT_FROM_SPI 0x32 #define BOOT_FROM_MMC 0x30 #define BOOT_FROM_MMC_ALT 0x31 From patchwork Sat Mar 4 10:50:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1751739 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=c65Ds4oB; dkim-atps=neutral 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PTM9j41vBz2467 for ; Sat, 4 Mar 2023 21:52:25 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AC10885C64; Sat, 4 Mar 2023 11:51:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="c65Ds4oB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F1D7285A66; Sat, 4 Mar 2023 11:51:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2529385A4A for ; Sat, 4 Mar 2023 11:51:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B7DF4B816A0; Sat, 4 Mar 2023 10:51:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29230C4339B; Sat, 4 Mar 2023 10:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677927097; bh=O6kHJClmn8huTwyi4fVX0RB4B1/ZaaRhbGvbic1OHbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c65Ds4oBZvdtYtR64ubepGgp+LIAkVePd9IJ3a7k70GGsraz81Cvtysy4vi0d7Gow 6zXt40bFnSZYCWdl7t94FIeFwdHM1WA+hNBPAx9dtqkCh5lmj+EtbteKTjGdjYzSHW lHEuyItEYdKNiLne5jJgxEwyppvYm2ixgDnxjL0/ARfp3mP67TNar0ytnPcd38t+Bw JFoq8dBhQ0Hc1MGAMNx9FslHODivzfxOLiENXRbu6tKHtXMUKZaaKUnm132SVof/h7 CMcgZGgc8DJUqDfLBjmZqnT3tD1XAlNnfYKVIL0H9VUg1WJcj51c4By2sBTuuqVJQe 0txgPWnESYHJQ== Received: by pali.im (Postfix) id E337CECE; Sat, 4 Mar 2023 11:51:34 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Martin Rowe , Tony Dinh , Stefan Roese , Chris Packham , Baruch Siach Cc: u-boot@lists.denx.de Subject: [PATCH RFC u-boot-mvebu 3/6] arm: mvebu: Convert BOOT_FROM_* constants to function macros Date: Sat, 4 Mar 2023 11:50:33 +0100 Message-Id: <20230304105036.19189-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230304105036.19189-1-pali@kernel.org> References: <20230304105036.19189-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean This allows to merge BOOT_FROM_MMC and BOOT_FROM_MMC_ALT constants to one macro. And also allows to extend other BOOT_FROM_* macros for other variants. Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/cpu.c | 16 +++++++++------- arch/arm/mach-mvebu/include/mach/soc.h | 25 ++++++++++++------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index daa84c03fcdc..cb3f3afad269 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -98,24 +98,26 @@ u32 get_boot_device(void) val = readl(CONFIG_SAR_REG); /* SAR - Sample At Reset */ boot_device = (val & BOOT_DEV_SEL_MASK) >> BOOT_DEV_SEL_OFFS; debug("SAR_REG=0x%08x boot_device=0x%x\n", val, boot_device); - switch (boot_device) { #ifdef BOOT_FROM_NAND - case BOOT_FROM_NAND: + if (BOOT_FROM_NAND(boot_device)) return BOOT_DEVICE_NAND; #endif #ifdef BOOT_FROM_MMC - case BOOT_FROM_MMC: - case BOOT_FROM_MMC_ALT: + if (BOOT_FROM_MMC(boot_device)) return BOOT_DEVICE_MMC1; #endif - case BOOT_FROM_UART: +#ifdef BOOT_FROM_UART + if (BOOT_FROM_UART(boot_device)) return BOOT_DEVICE_UART; +#endif #ifdef BOOT_FROM_SATA - case BOOT_FROM_SATA: + if (BOOT_FROM_SATA(boot_device)) return BOOT_DEVICE_SATA; #endif - case BOOT_FROM_SPI: +#ifdef BOOT_FROM_SPI + if (BOOT_FROM_SPI(boot_device)) return BOOT_DEVICE_SPI; +#endif default: return BOOT_DEVICE_BOOTROM; }; diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h index 5fdce8fe4e7e..aa42db36a1ee 100644 --- a/arch/arm/mach-mvebu/include/mach/soc.h +++ b/arch/arm/mach-mvebu/include/mach/soc.h @@ -143,8 +143,8 @@ #define BOOT_DEV_SEL_OFFS 3 #define BOOT_DEV_SEL_MASK (0x3f << BOOT_DEV_SEL_OFFS) -#define BOOT_FROM_UART 0x30 -#define BOOT_FROM_SPI 0x38 +#define BOOT_FROM_UART(x) (x == 0x30) +#define BOOT_FROM_SPI(x) (x == 0x38) #define CONFIG_SYS_TCLK ((readl(CONFIG_SAR_REG) & BIT(20)) ? \ 200000000 : 166000000) @@ -160,12 +160,11 @@ #define BOOT_DEV_SEL_OFFS 4 #define BOOT_DEV_SEL_MASK (0x3f << BOOT_DEV_SEL_OFFS) -#define BOOT_FROM_NAND 0x0A -#define BOOT_FROM_SATA 0x2A -#define BOOT_FROM_UART 0x28 -#define BOOT_FROM_SPI 0x32 -#define BOOT_FROM_MMC 0x30 -#define BOOT_FROM_MMC_ALT 0x31 +#define BOOT_FROM_NAND(x) (x == 0x0A) +#define BOOT_FROM_SATA(x) (x == 0x2A) +#define BOOT_FROM_UART(x) (x == 0x28) +#define BOOT_FROM_SPI(x) (x == 0x32) +#define BOOT_FROM_MMC(x) (x == 0x30 || x == 0x31) #define CONFIG_SYS_TCLK ((readl(CONFIG_SAR_REG) & BIT(15)) ? \ 200000000 : 250000000) @@ -182,9 +181,9 @@ #define BOOT_DEV_SEL_OFFS 11 #define BOOT_DEV_SEL_MASK (0x7 << BOOT_DEV_SEL_OFFS) -#define BOOT_FROM_NAND 0x1 -#define BOOT_FROM_UART 0x2 -#define BOOT_FROM_SPI 0x3 +#define BOOT_FROM_NAND(x) (x == 0x1) +#define BOOT_FROM_UART(x) (x == 0x2) +#define BOOT_FROM_SPI(x) (x == 0x3) #define CONFIG_SYS_TCLK 200000000 /* 200MHz */ #elif defined(CONFIG_ARMADA_XP) @@ -204,8 +203,8 @@ #define BOOT_DEV_SEL_OFFS 5 #define BOOT_DEV_SEL_MASK (0xf << BOOT_DEV_SEL_OFFS) -#define BOOT_FROM_UART 0x2 -#define BOOT_FROM_SPI 0x3 +#define BOOT_FROM_UART(x) (x == 0x2) +#define BOOT_FROM_SPI(x) (x == 0x3) #define CONFIG_SYS_TCLK 250000000 /* 250MHz */ #endif From patchwork Sat Mar 4 10:50:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1751741 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=B8UwkIps; dkim-atps=neutral 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PTMBB28fpz2467 for ; Sat, 4 Mar 2023 21:52:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A386C85DA2; Sat, 4 Mar 2023 11:51:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="B8UwkIps"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EC781859D7; Sat, 4 Mar 2023 11:51:47 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4FAC585D6B for ; Sat, 4 Mar 2023 11:51:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DD6C760B21; Sat, 4 Mar 2023 10:51:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DE6CC433A0; Sat, 4 Mar 2023 10:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677927097; bh=GgEx+I0cTnJ+GjYKc8l/JOCou8FGrUoTTEKtJollXWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B8UwkIpsO0w6Hq2GkbN98ya43FlXGvwYUFw3MCPmOt2xsc5s2/gseb4Fk2+cLvLVm aPVo4Vuo2B/Rc6B+CidlgydI5IXYIDRiUuTYxX1+bv90PuPJM9M0sXrLF5Y+wXjZ7I FlShPZ3t71Z8SPTNJtFYWYvvTdoIYL8g1Sg1TG7mGerQX1y/lWQvrgZBYSfaQrS+YM cNqse2HcRJnDJxXIqPLrPfX5VGR+R3vyowI7ohnMxnP/LxUSY4XmzoFooEqL9YQPg7 2p0wyw+OX8TSZeDkDZfbieVYapA9ZjKB+tLIBqfryv65Cj4K/C2sX04POO/F3jrbTe fpzjKQBNXd89Q== Received: by pali.im (Postfix) id 129A81262; Sat, 4 Mar 2023 11:51:35 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Martin Rowe , Tony Dinh , Stefan Roese , Chris Packham , Baruch Siach Cc: u-boot@lists.denx.de Subject: [PATCH RFC u-boot-mvebu 4/6] arm: mvebu: Define all options for A38x BOOT_FROM_* macros Date: Sat, 4 Mar 2023 11:50:34 +0100 Message-Id: <20230304105036.19189-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230304105036.19189-1-pali@kernel.org> References: <20230304105036.19189-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean Disassembling A385 BootROM binary reveal how BootROM interprets strapping pins for Boot Device Mode. All possible options are: 0x00..0x07 -> Parallel NOR 0x08..0x15 -> Parallel NAND 0x16..0x17 -> Parallel NOR 0x18..0x25 -> Parallel NAND 0x26..0x27 -> SPI NAND 0x28..0x29 -> UART xmodem 0x2a..0x2b -> SATA 0x2c..0x2d -> PCI Express 0x2e..0x2f -> Parallel NOR 0x30..0x31 -> SD / eMMC 0x32..0x39 -> SPI NOR 0x3a..0x3c -> Parallel NOR 0x3d..0x3e -> UART debug console 0x3f -> Invalid Note that Boot Device Mode Options in A38x Hardware Specifications is incomplete. Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/include/mach/soc.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h index aa42db36a1ee..698b70339436 100644 --- a/arch/arm/mach-mvebu/include/mach/soc.h +++ b/arch/arm/mach-mvebu/include/mach/soc.h @@ -160,11 +160,14 @@ #define BOOT_DEV_SEL_OFFS 4 #define BOOT_DEV_SEL_MASK (0x3f << BOOT_DEV_SEL_OFFS) -#define BOOT_FROM_NAND(x) (x == 0x0A) -#define BOOT_FROM_SATA(x) (x == 0x2A) -#define BOOT_FROM_UART(x) (x == 0x28) -#define BOOT_FROM_SPI(x) (x == 0x32) +#define BOOT_FROM_NOR(x) ((x >= 0x00 && x <= 0x07) || x == 0x16 || x == 0x17 || x == 0x2E || x == 0x2F || (x >= 0x3A && x <= 0x3C)) +#define BOOT_FROM_NAND(x) ((x >= 0x08 && x <= 0x15) || (x >= 0x18 && x <= 0x25)) +#define BOOT_FROM_SPINAND(x) (x == 0x26 || x == 0x27) +#define BOOT_FROM_UART(x) (x == 0x28 || x == 0x29) +#define BOOT_FROM_SATA(x) (x == 0x2A || x == 0x2B) +#define BOOT_FROM_PEX(x) (x == 0x2C || x == 0x2D) #define BOOT_FROM_MMC(x) (x == 0x30 || x == 0x31) +#define BOOT_FROM_SPI(x) (x >= 0x32 && x <= 0x39) #define CONFIG_SYS_TCLK ((readl(CONFIG_SAR_REG) & BIT(15)) ? \ 200000000 : 250000000) From patchwork Sat Mar 4 10:50:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1751740 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=JjNRVKhh; dkim-atps=neutral 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PTM9x6NHjz2467 for ; Sat, 4 Mar 2023 21:52:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2825285D93; Sat, 4 Mar 2023 11:51:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="JjNRVKhh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 59DB485D4B; Sat, 4 Mar 2023 11:51:46 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 58EFB85D79 for ; Sat, 4 Mar 2023 11:51:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 081F5B81A31; Sat, 4 Mar 2023 10:51:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CC75C4339E; Sat, 4 Mar 2023 10:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677927097; bh=2bvG8twbxquiZfLEnb9JTYEcpDtMxfdl+6NkSXQIEqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JjNRVKhhTBjg6EaYMyWT70r0H/bOxZwpmgm/HXxp4R+qFAU0vzEa3oc1WYfcBeJ0F FXWRzzlM4HfnIhrajYWwhfVZ/0a79E1HsBcRCjJeSdfG6xR8yRrUruHdM9YQMkKikp W/Ae1AR86aKdq94gRj9VvacM7j0BkcjFqkWVXo6jEOACNRqHPI444QJWZU2lbNLYPn qIYR1tnDQKnQctZE+73rs6lTie7q44yd9kcAOxGy8q/SEYOzmIuCBYDMTI3XHOb0z0 lvd066MhcBVuja9ofNA7Uq4fjjMlu9GEDykodO1mpWvEBi+4Itfy/vJUALppmZyN47 ZE64sJkB7wYpg== Received: by pali.im (Postfix) id 443B112E4; Sat, 4 Mar 2023 11:51:35 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Martin Rowe , Tony Dinh , Stefan Roese , Chris Packham , Baruch Siach Cc: u-boot@lists.denx.de Subject: [PATCH RFC u-boot-mvebu 5/6] arm: mvebu: Define all BOOTROM_ERR_MODE_* macros Date: Sat, 4 Mar 2023 11:50:35 +0100 Message-Id: <20230304105036.19189-6-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230304105036.19189-1-pali@kernel.org> References: <20230304105036.19189-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean A385 BootROM fills into bits [31:28] of register 0x182d0 tracing value, which represents in which state BootROM currently is. BootROM fills one of the possible values: 0x2 (CPU initialization), 0x3 (UART detection), 0x6 (UART booting), 0x8 (PCI Express booting), 0x9 (parallel or SPI NOR booting), 0xA (parallel or SPI NAND booting), 0xB (SATA booting) and 0xE (SD / eMMC booting). Meaning of these values matches TRACE_* macros from Marvell soc_spec.h file: https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/blob/u-boot-2013.01-armada-18.06/tools/marvell/doimage_mv/soc_spec.h Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/include/mach/soc.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h index 698b70339436..75fe785932c2 100644 --- a/arch/arm/mach-mvebu/include/mach/soc.h +++ b/arch/arm/mach-mvebu/include/mach/soc.h @@ -128,7 +128,14 @@ #define BOOTROM_ERR_REG (MVEBU_REGISTER(0x182d0)) #define BOOTROM_ERR_MODE_OFFS 28 #define BOOTROM_ERR_MODE_MASK (0xf << BOOTROM_ERR_MODE_OFFS) +#define BOOTROM_ERR_MODE_MAIN 0x2 +#define BOOTROM_ERR_MODE_EXEC 0x3 #define BOOTROM_ERR_MODE_UART 0x6 +#define BOOTROM_ERR_MODE_PEX 0x8 +#define BOOTROM_ERR_MODE_NOR 0x9 +#define BOOTROM_ERR_MODE_NAND 0xA +#define BOOTROM_ERR_MODE_SATA 0xB +#define BOOTROM_ERR_MODE_MMC 0xE #define BOOTROM_ERR_CODE_OFFS 0 #define BOOTROM_ERR_CODE_MASK (0xf << BOOTROM_ERR_CODE_OFFS) From patchwork Sat Mar 4 10:50:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1751742 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=pR2whVz9; dkim-atps=neutral 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PTMBR3NC7z2467 for ; Sat, 4 Mar 2023 21:53:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35A3E85DAF; Sat, 4 Mar 2023 11:51:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="pR2whVz9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA046859D7; Sat, 4 Mar 2023 11:51:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3042385D99 for ; Sat, 4 Mar 2023 11:51:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D45A1B816A0; Sat, 4 Mar 2023 10:51:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 521E9C433EF; Sat, 4 Mar 2023 10:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677927099; bh=AUmK7O8/xEqRXez2hDfPkWaCMobEf4irKcnCAiX6TjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pR2whVz9B9eYLetJXdpa89D5uGRhXLA9QfvZUIq2UkMOU9JEGSKT3UWEv22fIZaGj 41DOSBQjFaSdsyXmkrupyqCIO5Ok92uHA34lS5oRPVtAbdeyowb5y5o6FFuxpTC+/I pdJitbxizq7CMPwz4bckgc3QSbZzQd6g7wNeDylF1G+oGNQCtUQzV+7ocykgC0PQWP dcuilG+/hSQGHDmom/DdhhD1u72AtZJCdktdKu2CMsROQ9gqV/7a1//GLXi2rbcA01 /2EWxrqiGjQpKJFHgt5hGmp62chC/hQmLyyd2onbkrXeMkFic6N1z2OUl2iJnBNumV 0xsyigqpfCMmA== Received: by pali.im (Postfix) id 726E61BDA; Sat, 4 Mar 2023 11:51:35 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Martin Rowe , Tony Dinh , Stefan Roese , Chris Packham , Baruch Siach Cc: u-boot@lists.denx.de Subject: [PATCH RFC u-boot-mvebu 6/6] arm: mvebu: Define all options for AXP BOOT_FROM_* macros Date: Sat, 4 Mar 2023 11:50:36 +0100 Message-Id: <20230304105036.19189-7-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230304105036.19189-1-pali@kernel.org> References: <20230304105036.19189-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean Definitions are according to the MV78460 Hardware Specifications. Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/include/mach/soc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h index 75fe785932c2..49b4c5c7b4d2 100644 --- a/arch/arm/mach-mvebu/include/mach/soc.h +++ b/arch/arm/mach-mvebu/include/mach/soc.h @@ -213,8 +213,12 @@ #define BOOT_DEV_SEL_OFFS 5 #define BOOT_DEV_SEL_MASK (0xf << BOOT_DEV_SEL_OFFS) +#define BOOT_FROM_NOR(x) (x == 0x0) +#define BOOT_FROM_NAND(x) (x == 0x1) #define BOOT_FROM_UART(x) (x == 0x2) #define BOOT_FROM_SPI(x) (x == 0x3) +#define BOOT_FROM_PEX(x) (x == 0x4) +#define BOOT_FROM_SATA(x) (x == 0x5) #define CONFIG_SYS_TCLK 250000000 /* 250MHz */ #endif