Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp137812lqs; Thu, 13 Jun 2024 06:17:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUtK/NMd4a+EY9Aym9L439r5ACJrkqWuuo6A5MKZ0zr6KRoohVQA8K5ItWwgHdPArIz/3LSA5g02qTDLxOE0po658TVL5C660dzaLNDXA== X-Google-Smtp-Source: AGHT+IHu7c702iK+tEg84MUc2Lx2zJg1kLdl4UktILG4c9ZgysGHbwVgiE50ZQpBScpLpjL7DUZt X-Received: by 2002:a05:620a:1a29:b0:795:5f39:e153 with SMTP id af79cd13be357-797f6043e70mr534799385a.32.1718284650053; Thu, 13 Jun 2024 06:17:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718284650; cv=pass; d=google.com; s=arc-20160816; b=CUn9Do9iAAPzEV7UCoLpANeiWxXTRp/kSTfREd4+M5fArExXo0y7wGafl9TAHuFcU/ p5AbtgWXjYNfoKItcccAhyod1JVYqyy9Po65fjcWLPvh0BbvzLdDjhdEMMCjWE1CILLI 0RxrihDn1jHeexliwDEClG93wvl5CKEL1RsKHYvRXx308onBIhdrPc8FhkJRgpsuLsNO nK29aNbTt3QReloO1SUzzBYvd67kFIe4lDvjYdv9Cc8KWIKcucDG43zNG6UQPVc2V81+ DZ4xWDhXUyNq5rcdVqoFw41rBMWL3Q27kh3KVz+4wt+QgVkvaHYQ4aEaBd+C5GmseyD2 t6SA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JkRYyRiRMoMa9KVlzswR1b3XdUGIn3MbQUAX+byIDgA=; fh=fEOdCJiiFaXgY8M9UX9c0QZiU39mC+BX+OVFkL52xOg=; b=zoQV5wYmGD2Ocm+zCYb5eXcWuFlk924oEdtGV/78VpgCR4x7p+xwQPcdHwVpx80NeL 0pHkrXILBHMEn72b9guMNONxn5V05edH66Pfc4HbyVj3hajyT5h5HLHEKkFSqKWBZb5j aDTsPQTRZUSUj/FV19vjXHIuLlKIa/w26BUQAmFlz7TKW5vo1BfgNPVZmnLEBDbrsAGz YxdQL9YgzaF9a6ukXX/21B8HWOZe0t2PJS6+9QhDo+c6KDPHNVKAm0vsVMCxUcjnIg22 hloo6hrygR8h1qr2g8eErkYmpc1odFYOF2ZpOt8/jZTnt8xsYANfzQesk3/FgvFSKAvx RXEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="FN/YXXTf"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213276-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213276-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-798ca958330si28137885a.64.2024.06.13.06.17.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:17:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213276-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="FN/YXXTf"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213276-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213276-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BD7531C215A3 for ; Thu, 13 Jun 2024 13:17:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81BFC14374F; Thu, 13 Jun 2024 13:17:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FN/YXXTf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A40DA9449; Thu, 13 Jun 2024 13:17:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284632; cv=none; b=GINDdsXRjBbeqmrmLM1qGVzBLWZORJCAlnH5i+Ym8FqfJjn+hBEV73Zz/7+UiiqCWb7TnoXrhpAFzn8FZ3wbBUdojydDF0jIyM7yO5YS1yhQZ3dRNbJTYHrpVbP4uCAGULEzMcnwOGwxIHUodVFp3aV52YDuN5Nn/AZMNOhmRws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284632; c=relaxed/simple; bh=JfrHfE5+wnDYBc2X9VtRgknSQ9saw1R3/iTpUCH9BvE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RZvMEJMAJEognwFOcCPO6IWiiyKQWivVdSvur9wKR0C+9V8IdPIcruxwyQXqHoY9+wAHGPN38f2VNNsQbixxAe32z4mAsTE5b2ujIlP5a1qgexjV1WL5dNVq7ErFwV4pTdbbbtrHH5eMJxFUiT5Kp9cotNQTG1uSoJiZsTrFGbA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FN/YXXTf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4AEEC2BBFC; Thu, 13 Jun 2024 13:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718284632; bh=JfrHfE5+wnDYBc2X9VtRgknSQ9saw1R3/iTpUCH9BvE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FN/YXXTfFlj5TBAZkWQYn5iGGeI1YxwT+7U2UH1v2gP0eiqakofHTI/1ITWPmE0/h e0hXtLxzPQhuQGHtC2TBz4TOVtIg1tbM/NxZ7TiV4WnfocY4rknXbE5OK+hWFeoKHp odyJol4pNo4rwKy9RX9KAc0Li2dLqE8fkUY0rbO22djo5QxhZUYiGh4gzJl6XkhwGm TjbwBiRIlV+UO/9OH/uRXNJsdiAzUjPQ3z3NijkbC9EEj/B8KlEvvY82XFw/bmGh0d oylavdJe4YlgsLLjapFSASlDcQc9R5eb95TjZNYO1IIbF8Ueytu+p9jziy/EUxHlp/ XRG4SnanyDiAA== Date: Thu, 13 Jun 2024 21:03:20 +0800 From: Jisheng Zhang To: Haylen Chu Cc: Adrian Hunter , Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mmc: sdhci-of-dwcmshc: Use inverted-wp quirk for CV18xx and SG200x SoCs Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Fri, May 31, 2024 at 02:13:47PM +0000, Haylen Chu wrote: > MMC controller integrated in Sophgo CV18xx and SG200x SoCs has an > inverted write-protect flag, causing SDCards misdetected as read-only. > So set SDHCI_QURIK_INVERTED_WRITE_PROTECT to make write protection work > correctly. No, I would rather set cd-inverted property in dts. > > Fixes: 017199c2849c ("mmc: sdhci-of-dwcmshc: Add support for Sophgo CV1800B and SG2002") > Signed-off-by: Haylen Chu > --- > drivers/mmc/host/sdhci-of-dwcmshc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c > index 39edf04fedcf..62b7f28de54f 100644 > --- a/drivers/mmc/host/sdhci-of-dwcmshc.c > +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c > @@ -962,7 +962,8 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_th1520_pdata = { > > static const struct sdhci_pltfm_data sdhci_dwcmshc_cv18xx_pdata = { > .ops = &sdhci_dwcmshc_cv18xx_ops, > - .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, > + .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | > + SDHCI_QUIRK_INVERTED_WRITE_PROTECT, > .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, > }; > > -- > 2.45.1 >