Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1160380pxu; Fri, 27 Nov 2020 00:50:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0r1hZbPcFBzV93h2iIHnBxPTJStlwt21cBeceG5lq86944QaaQmOI/CpOE9o4pHYXGDNM X-Received: by 2002:a05:6402:d09:: with SMTP id eb9mr6415698edb.71.1606467007623; Fri, 27 Nov 2020 00:50:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606467007; cv=none; d=google.com; s=arc-20160816; b=H+xN38kST5x2Frg0LMyPOm56cLGrI7HE9jkfRL4u+0c2MIpC67TGZ91tyxRqifS3Ph 3A7qmbQBKp6OST/4x8m7l3Bxz20mHCpB2EIo/2vlIEYoro0sSXClswG8GcF6TVb1NZ3q CDrsYlELnn6r+fT5FycwV7kUr5qz2IMe2qvfD0yIRMrpoSkjPx35Lyrndx0qAfbfD8RY qqeraZMmAbZtN3OmFFjYnUAFAat7waG9x1otIeOGq82p7ESMtyW6LDtbA0wluiIZXF30 I0QBF6GjW/CKLbZJGaGgKw8e42M2t9Ypvues3vP1o2FH/41GBJIuivE5SS5332uypfRS BiFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=V12gVY4EnSoirHEUWUG0PCV6II7gCzKW0A/odsigAKo=; b=vKmtEMHELe2B8yYnnNmWeA7tVMZ7AnQLpQ5E+phLdLO9JT4BcmKcAqVMyJsPnET+yC ifj7OnXadGTBXfDMZX1z4Pri248yT6YhxLfXk7p013azjh94f3uJVdM3w69DmUdfWigC Gpml7BYJP+357bug79PL8oe0YETxJIYyd3ZiX4t7h/fi2jtc1+TSsln7ki3UoV1ozmPO f3Vhn23q8LucwrRycCKckwZMqNQs85eR4EodVPfZ8eEdJwi08AEAUHx9ABAVlI89WIKP 7njlcdEa4LHdLOXFKZbmfMX8jxpxrHtN/d5+1K4uZywuJjsAzVuU+t536ZkZq2GRhI7K tQ6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si4723171eds.193.2020.11.27.00.49.44; Fri, 27 Nov 2020 00:50:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392465AbgK0Ekr (ORCPT + 99 others); Thu, 26 Nov 2020 23:40:47 -0500 Received: from server-x.ipv4.hkg02.ds.network ([27.111.83.178]:51372 "EHLO mail.gtsys.com.hk" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S2392452AbgK0Ekr (ORCPT ); Thu, 26 Nov 2020 23:40:47 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.gtsys.com.hk (Postfix) with ESMTP id E8B0C200E247; Fri, 27 Nov 2020 12:40:44 +0800 (HKT) X-Virus-Scanned: Debian amavisd-new at gtsys.com.hk Received: from mail.gtsys.com.hk ([127.0.0.1]) by localhost (mail.gtsys.com.hk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CcO9jNNoayne; Fri, 27 Nov 2020 12:40:44 +0800 (HKT) Received: from s01.gtsys.com.hk (unknown [10.128.4.2]) by mail.gtsys.com.hk (Postfix) with ESMTP id C8967200E245; Fri, 27 Nov 2020 12:40:44 +0800 (HKT) Received: from armhf2.gtsys.com.hk (unknown [10.128.4.15]) by s01.gtsys.com.hk (Postfix) with ESMTP id B86B8C01F81; Fri, 27 Nov 2020 12:40:44 +0800 (HKT) Received: by armhf2.gtsys.com.hk (Postfix, from userid 1000) id 8F5BB200756; Fri, 27 Nov 2020 12:40:44 +0800 (HKT) From: Chris Ruehl Cc: Chris Ruehl , Ulf Hansson , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , "Gustavo A. R. Silva" , Yoshihiro Shimoda , Veerabhadrarao Badiganti , Matthias Schiffer , Chris Ball , Seungwon Jeon , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: core: MMC_CAP2_HS200_1_8V_SDR with mmc-hs400-1_8v Date: Fri, 27 Nov 2020 12:40:38 +0800 Message-Id: <20201127044044.1127-1-chris.ruehl@gtsys.com.hk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch remove the MMC_CAP2_HS200_1_8V_SDR capacity from host->cap2 when the dt property mmc-hs400-1v8 set. It cause error and occasionally hang on boot and reboot. Board with this issue: rk3399 with SanDisk DG4008 eMMC. This patch did not change the mmc-hs400-1_2v host->cap2 added the MMC_CAP2_HS200_1_2V_SDR. Log shows a boot process with a HS400 5.1 capable SanDisk 8G with mmc-hs400-1_8v dt property and the MMC_CAP2_HS200_1_8V_SDR append to the host->cap2. [ 1.775721] mmc1: CQHCI version 5.10 [ 1.802342] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci] using ADMA [ 2.007581] mmc1: mmc_select_hs200 failed, error -110 [ 2.007589] mmc1: error -110 whilst initialising MMC card [ 2.413559] mmc1: mmc_select_hs200 failed, error -110 [ 2.413562] mmc1: error -110 whilst initialising MMC card [ 3.183343] mmc1: Command Queue Engine enabled [ 3.183355] mmc1: new HS400 MMC card at address 0001 [ 3.197163] mmcblk1: mmc1:0001 DG4008 7.28 GiB [ 3.197256] mmcblk1boot0: mmc1:0001 DG4008 partition 1 4.00 MiB [ 3.197360] mmcblk1boot1: mmc1:0001 DG4008 partition 2 4.00 MiB [ 3.197479] mmcblk1rpmb: mmc1:0001 DG4008 partition 3 4.00 MiB, chardev (242:0) after patch applied [ 1.746691] mmc1: CQHCI version 5.10 [ 1.773316] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci] using ADMA [ 1.858410] mmc1: Command Queue Engine enabled [ 1.858418] mmc1: new HS400 MMC card at address 0001 [ 1.858897] mmcblk1: mmc1:0001 DG4008 7.28 GiB [ 1.859002] mmcblk1boot0: mmc1:0001 DG4008 partition 1 4.00 MiB [ 1.859097] mmcblk1boot1: mmc1:0001 DG4008 partition 2 4.00 MiB [ 1.859182] mmcblk1rpmb: mmc1:0001 DG4008 partition 3 4.00 MiB, chardev (242:0) Fixes: c373eb489b27b mmc: core: add DT bindings for eMMC HS400 1.8/1.2V Signed-off-by: Chris Ruehl --- drivers/mmc/core/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 96b2ca1f1b06..f55113e24c68 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -295,7 +295,7 @@ int mmc_of_parse(struct mmc_host *host) if (device_property_read_bool(dev, "mmc-hs200-1_2v")) host->caps2 |= MMC_CAP2_HS200_1_2V_SDR; if (device_property_read_bool(dev, "mmc-hs400-1_8v")) - host->caps2 |= MMC_CAP2_HS400_1_8V | MMC_CAP2_HS200_1_8V_SDR; + host->caps2 |= MMC_CAP2_HS400_1_8V; if (device_property_read_bool(dev, "mmc-hs400-1_2v")) host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR; if (device_property_read_bool(dev, "mmc-hs400-enhanced-strobe")) -- 2.20.1