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 C81DCC7EE23 for ; Sun, 11 Jun 2023 22:43:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B91BD8469F; Mon, 12 Jun 2023 00:43:19 +0200 (CEST) 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="sFwjpTWw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 622968479D; Mon, 12 Jun 2023 00:43:17 +0200 (CEST) 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 977558468E for ; Mon, 12 Jun 2023 00:43:13 +0200 (CEST) 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 F3DA360EEA; Sun, 11 Jun 2023 22:43:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DA5BC433D2; Sun, 11 Jun 2023 22:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686523391; bh=e7ttLeJInzgTRtNkdriAUisO0UyniqN4bjeNQsyvfS8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sFwjpTWw8n8Pa26hGtnTFHuAdWyKUxXuhDcE/jBUZddDWTbFDmWXp8eeyqW0RaYoo W36wM0dQdq6+KljTF7vKjOCyL8GSVWhzLx2smzXgatY7SbyDVYC/szx0Lmh2rdnLwN yIbRWyHgQYCSN7vCHEbdeqKUX/D8Ylxu7zbYbu1wTM72XKmWRK3ZwkZ61o+fTdFWVF 16IAVfet8WGHUIYCV7e5QIsXoBkx61o/3o3MyA0b6oV43+UgRJZf5OBW0Oud3SxxcQ kmILy3TBWkpbE5yR+YBcU2VdmtuMiZFer4bq3DdqsxJ0/GjpW7gBTgGZp5TdDa3Qa2 AIu37FCyYuB6A== Received: by pali.im (Postfix) id 297577FD; Mon, 12 Jun 2023 00:43:08 +0200 (CEST) Date: Mon, 12 Jun 2023 00:43:08 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Stefan Roese , Peng Fan , Jaehoon Chung Cc: u-boot@lists.denx.de Subject: Re: [PATCH] mmc: Do not read eMMC partition access bits by default on OMAP2PLUS and BCM283X Message-ID: <20230611224308.ylttbptf3ppc43pf@pali> References: <20230516184943.7206-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230516184943.7206-1-pali@kernel.org> User-Agent: NeoMutt/20180716 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.8 at phobos.denx.de X-Virus-Status: Clean Ping, what to do with this patch? It is without any response too and is a is fix for this reported issue: https://lore.kernel.org/u-boot/20230503171456.GF1134230@bill-the-cat/ On Tuesday 16 May 2023 20:49:43 Pali Rohár wrote: > OMAP2PLUS and BCM283X mmc controllers do not work correctly with new emmc > code which reads partition access bits prior mmc controller reset. > > So introduce a new config option MMC_ENABLE_PART_ACCESS, which is by > default disabled for ARCH_OMAP2PLUS and ARCH_BCM283X; and selected for > 32-bit mvebu mmc booting (which requires it). > > Signed-off-by: Pali Rohár > --- > arch/arm/mach-mvebu/Kconfig | 1 + > drivers/mmc/Kconfig | 12 ++++++++++++ > drivers/mmc/mmc.c | 2 ++ > 3 files changed, 15 insertions(+) > > diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig > index ac484c73f62d..fe691cd435e7 100644 > --- a/arch/arm/mach-mvebu/Kconfig > +++ b/arch/arm/mach-mvebu/Kconfig > @@ -353,6 +353,7 @@ config MVEBU_SPL_BOOT_DEVICE_MMC > imply SPL_GPIO > imply SPL_LIBDISK_SUPPORT > imply SPL_MMC > + select MMC_ENABLE_PART_ACCESS if SPL_MMC > select SUPPORT_EMMC_BOOT if SPL_MMC > select SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if SPL_MMC > select SPL_BOOTROM_SUPPORT > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig > index de01b9687bad..ea50dfdb62c5 100644 > --- a/drivers/mmc/Kconfig > +++ b/drivers/mmc/Kconfig > @@ -107,6 +107,18 @@ config MMC_HW_PARTITIONING > This adds a command and an API to do hardware partitioning on eMMC > devices. > > +config MMC_ENABLE_PART_ACCESS > + bool "Support for MMC partition access bits" > + default n if ARCH_OMAP2PLUS || ARCH_BCM283X > + default y > + help > + Read partition access bits from partition config register before card reset command > + because these bits are reset to default value (User Data Area) during card reset. > + This allows us to preserve original value of partition access bits used by the code > + which loaded us (for example BootROM) and use it for board specific boot purposes. > + . > + This is required when U-Boot is using EXT_CSD_EXTRACT_PARTITION_ACCESS macro. > + > config SUPPORT_EMMC_RPMB > bool "Support eMMC replay protected memory block (RPMB)" > imply CMD_MMC_RPMB > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 9915610d82b1..fa3c4d1937c1 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -2864,6 +2864,7 @@ int mmc_get_op_cond(struct mmc *mmc, bool quiet) > retry: > mmc_set_initial_state(mmc); > > +#ifdef CONFIG_MMC_ENABLE_PART_ACCESS > /* > * Read partition access bits from partition config register before card reset command > * because these bits are reset to default value (User Data Area) during card reset. > @@ -2878,6 +2879,7 @@ retry: > ext_csd[EXT_CSD_BOOT_MULT])) > mmc->part_config = ext_csd[EXT_CSD_PART_CONF] & PART_ACCESS_MASK; > } > +#endif > > /* Reset the Card */ > err = mmc_go_idle(mmc); > -- > 2.20.1 >