All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kamal Dasu <kdasu.kdev@gmail.com>,
	Al Cooper <alcooperx@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Jisheng Zhang <jszhang@kernel.org>, Marek Vasut <marex@denx.de>,
	linux-mmc@vger.kernel.org
Subject: [PATCH 2/6] mmc: sdhci-brcmstb: Replace SDHCI_QUIRK_MISSING_CAPS
Date: Fri, 13 Jan 2023 13:00:07 +0200	[thread overview]
Message-ID: <20230113110011.129835-3-adrian.hunter@intel.com> (raw)
In-Reply-To: <20230113110011.129835-1-adrian.hunter@intel.com>

SDHCI_QUIRK_MISSING_CAPS is not needed because sdhci_read_caps() can be
called instead.

In preparation to get rid of SDHCI_QUIRK_MISSING_CAPS, replace
SDHCI_QUIRK_MISSING_CAPS with sdhci_read_caps().

__sdhci_read_caps() is also called from sdhci_setup_host() via
sdhci_read_caps(), however only the first call to __sdhci_read_caps() does
anything because after that host->read_caps has been set to true.

Note, __sdhci_read_caps() does more than just set host->caps, such as do a
reset, so calling __sdhci_read_caps() earlier could have unforeseen
side-effects. However the code flow has been reviewed with that in mind.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci-brcmstb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index f2cf3d70db79..0a19b7af1d41 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -324,13 +324,11 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	 * will allow these modes to be specified by device tree
 	 * properties through mmc_of_parse().
 	 */
-	host->caps = sdhci_readl(host, SDHCI_CAPABILITIES);
+	sdhci_read_caps(host);
 	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_NO_64BIT)
 		host->caps &= ~SDHCI_CAN_64BIT;
-	host->caps1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
 	host->caps1 &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_SDR104 |
 			 SDHCI_SUPPORT_DDR50);
-	host->quirks |= SDHCI_QUIRK_MISSING_CAPS;
 
 	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT)
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
-- 
2.34.1


  parent reply	other threads:[~2023-01-13 11:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 11:00 [PATCH 0/6] mmc: sdhci: Remove SDHCI_QUIRK_MISSING_CAPS Adrian Hunter
2023-01-13 11:00 ` [PATCH 1/6] mmc: sdhci-pci: Replace SDHCI_QUIRK_MISSING_CAPS for Ricoh controller Adrian Hunter
2023-01-13 11:00 ` Adrian Hunter [this message]
2023-01-13 18:35   ` [PATCH 2/6] mmc: sdhci-brcmstb: Replace SDHCI_QUIRK_MISSING_CAPS Florian Fainelli
2023-01-13 11:00 ` [PATCH 3/6] mmc: sdhci-sprd: " Adrian Hunter
2023-01-16  1:48   ` Chunyan Zhang
2023-01-13 11:00 ` [PATCH 4/6] mmc: sdhci-pxav3: " Adrian Hunter
2023-01-15 13:03   ` Jisheng Zhang
2023-01-13 11:00 ` [PATCH 5/6] mmc: sdhci-iproc: " Adrian Hunter
2023-01-13 17:34   ` Scott Branden
2023-01-13 11:00 ` [PATCH 6/6] mmc: sdhci: Remove SDHCI_QUIRK_MISSING_CAPS Adrian Hunter
2023-01-16 12:16 ` [PATCH 0/6] " Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230113110011.129835-3-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=alcooperx@gmail.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=f.fainelli@gmail.com \
    --cc=jszhang@kernel.org \
    --cc=kdasu.kdev@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=orsonzhai@gmail.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=ulf.hansson@linaro.org \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.