{"id":1745960,"url":"http://patchwork.ozlabs.org/api/patches/1745960/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20230221201925.9644-12-pali@kernel.org/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20230221201925.9644-12-pali@kernel.org>","list_archive_url":null,"date":"2023-02-21T20:18:37","name":"[RFC,u-boot-mvebu,11/59] spl: mmc: Allow to disable SYS_MMCSD_FS_BOOT_PARTITION","commit_ref":"718d1c749fb2c2c941861afec92b9bd852e824c7","pull_url":null,"state":"accepted","archived":false,"hash":"bbf29a402eab82774f1a3af5d6e9748a1a1bc35a","submitter":{"id":78810,"url":"http://patchwork.ozlabs.org/api/people/78810/?format=json","name":"Pali Rohár","email":"pali@kernel.org"},"delegate":{"id":1696,"url":"http://patchwork.ozlabs.org/api/users/1696/?format=json","username":"stroese","first_name":"Stefan","last_name":"Roese","email":"sr@denx.de"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20230221201925.9644-12-pali@kernel.org/mbox/","series":[{"id":343058,"url":"http://patchwork.ozlabs.org/api/series/343058/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=343058","date":"2023-02-21T20:18:27","name":"arm: mvebu: Various fixes","version":1,"mbox":"http://patchwork.ozlabs.org/series/343058/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/1745960/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/1745960/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)","legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=kO6Z95Z3;\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"kO6Z95Z3\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org","phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (P-384))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4PLvYy737mz240n\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Feb 2023 09:47:34 +1100 (AEDT)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id EE05C859CD;\n\tTue, 21 Feb 2023 23:47:31 +0100 (CET)","by phobos.denx.de (Postfix, from userid 109)\n id 950CA85A53; Tue, 21 Feb 2023 23:47:30 +0100 (CET)","from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 5BDD685917\n for <u-boot@lists.denx.de>; Tue, 21 Feb 2023 23:47:28 +0100 (CET)","from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by ams.source.kernel.org (Postfix) with ESMTPS id 111C7B80F01\n for <u-boot@lists.denx.de>; Tue, 21 Feb 2023 22:47:28 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 9F8C4C433EF\n for <u-boot@lists.denx.de>; Tue, 21 Feb 2023 22:47:26 +0000 (UTC)","by pali.im (Postfix)\n id 607E770C; Tue, 21 Feb 2023 23:47:24 +0100 (CET)","by pali.im (Postfix)\n id 3627B2619; Tue, 21 Feb 2023 21:22:29 +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,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS autolearn=ham autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1677019646;\n bh=j4i6QR4E3KimjSDIttqY5vJkK5x4dVuRjI6iv1w1shk=;\n h=Resent-From:Resent-Date:Resent-To:From:To:Cc:Subject:Date:\n In-Reply-To:References:From;\n b=kO6Z95Z3pSMVOY29dekTGnkRQ5Euhmlg62vFP/f/OP1BuwLQ7fbWrtsrYdm6Mn+AF\n dDKsdrhxuAXhZQte9zDprYMavePggRfStPj78t600BDQRBiRPP/AkVyIP89avpOpjO\n NbpUPJtkjwOn3Zl7UocOxoKuZxY++P6REzJlc4dTNeHRSijmLE6gjfI00++ZdlZy9M\n Y+7uSUbOSNpxSe67lwzMG0Gq0YwHIi6EhFi3fvI7xUWLUaNZlGYJugkeheZmvBKdIw\n Psj31k6WMCYJuQl4O6WXuVKtZ4oWILd2TPNa0mTzOmXXgEjtuWgq8vd+lt9fKNoca4\n hsyqxyhnJNe9g==","Resent-From":"Pali =?utf-8?b?Um9ow6Fy?= <pali@kernel.org>","Resent-Date":"Tue, 21 Feb 2023 23:47:24 +0100","Resent-Message-ID":"<20230221224724.s6zhje5w34hzufev@pali>","Resent-To":"u-boot@lists.denx.de","From":"=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>","To":"u-boot@lists.denx.de","Cc":"Stefan Roese <sr@denx.de>, Tony Dinh <mibodhi@gmail.com>,\n Josua Mayer <josua@solid-run.com>","Subject":"[PATCH RFC u-boot-mvebu 11/59] spl: mmc: Allow to disable\n 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 <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.6 at phobos.denx.de","X-Virus-Status":"Clean"},"content":"On some platforms is SYS_MMCSD_FS_BOOT_PARTITION unsupported. So allow to\ncompletely disable MMC FS Boot support via new option SYS_MMCSD_FS_BOOT.\n\nBy default MMC FS Boot support is enabled (like it was before) except for\nARCH_MVEBU where MMC FS Boot supported is unsupported due to Marvell\nBootROM limitations.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\n common/spl/Kconfig   |  9 +++++++++\n common/spl/spl_mmc.c | 12 +++---------\n 2 files changed, 12 insertions(+), 9 deletions(-)","diff":"diff --git a/common/spl/Kconfig b/common/spl/Kconfig\nindex d774c930a80b..fdee0bd06936 100644\n--- a/common/spl/Kconfig\n+++ b/common/spl/Kconfig\n@@ -815,8 +815,17 @@ config SPL_MMC\n \t  this option to build the drivers in drivers/mmc as part of an SPL\n \t  build.\n \n+config SYS_MMCSD_FS_BOOT\n+\tbool \"MMC FS Boot mode\"\n+\tdepends on SPL_MMC\n+\tdefault y if !ARCH_MVEBU\n+\thelp\n+\t  Enable MMC FS Boot mode. Partition is selected by option\n+\t  SYS_MMCSD_FS_BOOT_PARTITION.\n+\n config SYS_MMCSD_FS_BOOT_PARTITION\n \tint \"MMC Boot Partition\"\n+\tdepends on SYS_MMCSD_FS_BOOT\n \tdefault 1\n \thelp\n \t  Partition on the MMC to load U-Boot from when the MMC is being\ndiff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c\nindex e4135b204875..bd5e6adf1ea6 100644\n--- a/common/spl/spl_mmc.c\n+++ b/common/spl/spl_mmc.c\n@@ -272,7 +272,7 @@ int spl_start_uboot(void)\n }\n #endif\n \n-#ifdef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION\n+#ifdef CONFIG_SYS_MMCSD_FS_BOOT\n static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image,\n \t\t\t      struct spl_boot_device *bootdev,\n \t\t\t      struct mmc *mmc,\n@@ -341,14 +341,6 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image,\n \n \treturn err;\n }\n-#else\n-static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image,\n-\t\t\t      struct spl_boot_device *bootdev,\n-\t\t\t      struct mmc *mmc,\n-\t\t\t      const char *filename)\n-{\n-\treturn -ENOSYS;\n-}\n #endif\n \n u32 __weak spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)\n@@ -481,6 +473,7 @@ int spl_mmc_load(struct spl_image_info *spl_image,\n \t\t\treturn err;\n #endif\n \t\t/* If RAW mode fails, try FS mode. */\n+#ifdef CONFIG_SYS_MMCSD_FS_BOOT\n \tcase MMCSD_MODE_FS:\n \t\tdebug(\"spl: mmc boot mode: fs\\n\");\n \n@@ -489,6 +482,7 @@ int spl_mmc_load(struct spl_image_info *spl_image,\n \t\t\treturn err;\n \n \t\tbreak;\n+#endif\n #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT\n \tdefault:\n \t\tputs(\"spl: mmc: wrong boot mode\\n\");\n","prefixes":["RFC","u-boot-mvebu","11/59"]}