Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp145627lqs; Thu, 13 Jun 2024 06:30:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6glvM1c+f9Q3RRDGakaE0Pp9+MSgRCgj6B2N9vZUT4BNdzTDZqBQfF6CE//hQBe87D1TUz84dsXwB+APVXvrHAhhdPaQtgty92ocTKQ== X-Google-Smtp-Source: AGHT+IE6Rz65oY+3VkTQ/MW/0pzxBhdydnn7q1yl+ajGUxcF1qZ07JjM0GQRYmWcmWn46ArmoHGT X-Received: by 2002:ac8:5754:0:b0:441:5483:5c6e with SMTP id d75a77b69052e-4415ac590a6mr51646821cf.46.1718285401116; Thu, 13 Jun 2024 06:30:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718285401; cv=pass; d=google.com; s=arc-20160816; b=FtRLy3d20Ue/uXur5z87aBqr0NGMYxzHllKiwrjZBxq5TyuZLV0hvRvV65zTpZdgn0 +MIid1qIt8JXZ0uN2kBoLbOn1HZ0QZIbMNikkcQVPxVtjD+ytZkBdNHQbKZMjtfLaXY4 GuS7hBUKT7L3nD9HXlOkMepUWPn2IDAnpXzXPSp2/PHkiqdRn2k6phcEQH/koyxknbRZ 1WjE0UHTa+sn/8/v/EThSjxZNn/k4fWaMSlV5oXQPYGzeKDywa14FswBEG98Z1pUG7sk ovBRN0rc3IinklyYe121qNUPiiUn3MA3h3zoggZUTTewcZAIm4VP0sMeb28RizjdjZza yEvw== 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=qbJr6Xbsa4/XV5I/Jy4nnuPHq8quysWybqOz7ISy3pQ=; fh=fEOdCJiiFaXgY8M9UX9c0QZiU39mC+BX+OVFkL52xOg=; b=pSo7Ps2ByNx9LajnnbFYAEqob7bIuQTCj+YX5jbzhjBkaj13dlecrwHAkNQoxVZlrL Lvt6/nW4rV2f9a1QmsTcxffn3hJ7PnZ4wDmvMLH0hhAxWGa6bhVHOWlNfN4JQUxKxiAo ykNt2Qa0t+MmW29qRQRCU1WuFSVqiP02dAh/k8/v528o6S8s3mifoPIMlDwpCh2xpnIb Fzp8sgOvZmAEGMbrh6M/SKKSX9cJS+lSswBamcisRVyLwli/rK8s3F8ehgac/5G7Wzbr lUOuRjYX+8/U+suQ9U/GsEYJczKuWaweB/SWfH43NFhYZ64bmtbjMzMAvhG145BcYswu Y6/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZhM6QfgH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213321-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213321-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 d75a77b69052e-441f2fbba46si13803381cf.404.2024.06.13.06.30.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:30:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213321-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=ZhM6QfgH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213321-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213321-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 5BE9F1C229C4 for ; Thu, 13 Jun 2024 13:29:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AD391448CD; Thu, 13 Jun 2024 13:29:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZhM6QfgH" 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 B1089143C67; Thu, 13 Jun 2024 13:29:38 +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=1718285378; cv=none; b=J60+33ur3AddKnut2nBptaMLHY97ObqpMxPgEv8uNtnXh9dXyOaYJeV0Es/Yl67/yPIfJMq/5m9X/jo6ZH+TMdFjnMp/zq3xmYnQaki+r+WA8UQYTS2pjRZzlpxgOuJv9/9LnZ1bAqTyDLTth5ysrjsvOOLpo/DSG34L8vykLbM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718285378; c=relaxed/simple; bh=Smrfkl4omv8EWaCxAKTIU7F5mdrGTLS/0iCWoIy2Z/U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z5ECDVl3y/D8YAOBSTAKRF4L2nokk7D5BqfBy8ade80vN0JpMDr4mqDSPpuZ24IBJC+r7KQE+PVC7W78behPLAoqhIWZDw4P2S7IhToet+ty16ggnmXWV30pXWWUbWGw86N+RkBHv1IestzUkIjtek27StDbozqO6vzo/iJ1LaY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZhM6QfgH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8ECAC2BBFC; Thu, 13 Jun 2024 13:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718285378; bh=Smrfkl4omv8EWaCxAKTIU7F5mdrGTLS/0iCWoIy2Z/U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZhM6QfgHF2vbPhF8Y/my+EWnMq7v4Km2+YqAqAQtZCPPAnIXGziY8eVImAanMt0Si YVXeoDfIj1O+uHnOdctu4rE6NP7knrdcXl8nRpU+cXjx9xJHal7UxEhOj8MZDGZcm/ 6eSkQWB/URV8uCCr4cWsHWeX9ebeuNLN0Mxoz13rcydsRd1yo4sqV9KPZ9LmNnqpzb Ee9wV/RCryGa/sfokyMw4zHP5ZnuUilFXXP0KebmD4LvvVh6nfLzVKP9a6klEBLfBy SlgApLhoj6Z/EeT/k7vTso/ocCeQKh5DSBxJx8upO07u0UMk1YzbItRRUBjCo7JO56 Dk90a4X1ZGrUA== Date: Thu, 13 Jun 2024 21:15:41 +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 Thu, Jun 13, 2024 at 09:03:24PM +0800, Jisheng Zhang wrote: > 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. wp-inverted > > > > 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 > >