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 8908DC636D7 for ; Tue, 21 Feb 2023 22:47:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EE05C859CD; Tue, 21 Feb 2023 23:47:31 +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="kO6Z95Z3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 950CA85A53; Tue, 21 Feb 2023 23:47:30 +0100 (CET) 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 5BDD685917 for ; Tue, 21 Feb 2023 23:47:28 +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 111C7B80F01 for ; Tue, 21 Feb 2023 22:47:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F8C4C433EF for ; Tue, 21 Feb 2023 22:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677019646; bh=j4i6QR4E3KimjSDIttqY5vJkK5x4dVuRjI6iv1w1shk=; h=Resent-From:Resent-Date:Resent-To:From:To:Cc:Subject:Date: In-Reply-To:References:From; b=kO6Z95Z3pSMVOY29dekTGnkRQ5Euhmlg62vFP/f/OP1BuwLQ7fbWrtsrYdm6Mn+AF dDKsdrhxuAXhZQte9zDprYMavePggRfStPj78t600BDQRBiRPP/AkVyIP89avpOpjO NbpUPJtkjwOn3Zl7UocOxoKuZxY++P6REzJlc4dTNeHRSijmLE6gjfI00++ZdlZy9M Y+7uSUbOSNpxSe67lwzMG0Gq0YwHIi6EhFi3fvI7xUWLUaNZlGYJugkeheZmvBKdIw Psj31k6WMCYJuQl4O6WXuVKtZ4oWILd2TPNa0mTzOmXXgEjtuWgq8vd+lt9fKNoca4 hsyqxyhnJNe9g== Received: by pali.im (Postfix) id 607E770C; Tue, 21 Feb 2023 23:47:24 +0100 (CET) Resent-From: Pali =?utf-8?B?Um9ow6Fy?= Resent-Date: Tue, 21 Feb 2023 23:47:24 +0100 Resent-Message-ID: <20230221224724.s6zhje5w34hzufev@pali> Resent-To: u-boot@lists.denx.de Received: by pali.im (Postfix) id 3627B2619; Tue, 21 Feb 2023 21:22:29 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de Cc: Stefan Roese , Tony Dinh , Josua Mayer Subject: [PATCH RFC u-boot-mvebu 11/59] spl: mmc: Allow to disable SYS_MMCSD_FS_BOOT_PARTITION Date: Tue, 21 Feb 2023 21:18:37 +0100 Message-Id: <20230221201925.9644-12-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230221201925.9644-1-pali@kernel.org> References: <20230221201925.9644-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 On some platforms is SYS_MMCSD_FS_BOOT_PARTITION unsupported. So allow to completely disable MMC FS Boot support via new option SYS_MMCSD_FS_BOOT. By default MMC FS Boot support is enabled (like it was before) except for ARCH_MVEBU where MMC FS Boot supported is unsupported due to Marvell BootROM limitations. Signed-off-by: Pali Rohár --- common/spl/Kconfig | 9 +++++++++ common/spl/spl_mmc.c | 12 +++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index d774c930a80b..fdee0bd06936 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -815,8 +815,17 @@ config SPL_MMC this option to build the drivers in drivers/mmc as part of an SPL build. +config SYS_MMCSD_FS_BOOT + bool "MMC FS Boot mode" + depends on SPL_MMC + default y if !ARCH_MVEBU + help + Enable MMC FS Boot mode. Partition is selected by option + SYS_MMCSD_FS_BOOT_PARTITION. + config SYS_MMCSD_FS_BOOT_PARTITION int "MMC Boot Partition" + depends on SYS_MMCSD_FS_BOOT default 1 help Partition on the MMC to load U-Boot from when the MMC is being diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index e4135b204875..bd5e6adf1ea6 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -272,7 +272,7 @@ int spl_start_uboot(void) } #endif -#ifdef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION +#ifdef CONFIG_SYS_MMCSD_FS_BOOT static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, struct spl_boot_device *bootdev, struct mmc *mmc, @@ -341,14 +341,6 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, return err; } -#else -static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, - struct spl_boot_device *bootdev, - struct mmc *mmc, - const char *filename) -{ - return -ENOSYS; -} #endif u32 __weak spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device) @@ -481,6 +473,7 @@ int spl_mmc_load(struct spl_image_info *spl_image, return err; #endif /* If RAW mode fails, try FS mode. */ +#ifdef CONFIG_SYS_MMCSD_FS_BOOT case MMCSD_MODE_FS: debug("spl: mmc boot mode: fs\n"); @@ -489,6 +482,7 @@ int spl_mmc_load(struct spl_image_info *spl_image, return err; break; +#endif #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT default: puts("spl: mmc: wrong boot mode\n"); -- 2.20.1