All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian Löhle" <CLoehle@hyperstone.com>
To: "Ulf Hansson" <ulf.hansson@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"andriy.shevchenko@linux.intel.com"
	<andriy.shevchenko@linux.intel.com>,
	"Christian Löhle" <CLoehle@hyperstone.com>
Cc: "adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"digetx@gmail.com" <digetx@gmail.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>
Subject: [PATCH 2/2] mmc: mmc_spi: enable Highspeed for above 25MHz
Date: Thu, 31 Mar 2022 07:29:37 +0000	[thread overview]
Message-ID: <5eaae8e215d84dd3a4f7e09782478a29@hyperstone.com> (raw)
In-Reply-To: <20c6efa9a4c7423bbfb9352705c4a53a@hyperstone.com>

Any setup supporting more than 25MHz is able to utilize
highspeed, so enable it even when not explicitly specified.

Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
---
 drivers/mmc/host/mmc_spi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index 106dd204b1a7..0a74c2f55542 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1378,6 +1378,9 @@ static int mmc_spi_probe(struct spi_device *spi)
 	mmc->f_min = 400000;
 	mmc->f_max = spi->max_speed_hz;
 
+	if (mmc->f_max > 25000000)
+		mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
+
 	host = mmc_priv(mmc);
 	host->mmc = mmc;
 	host->spi = spi;
-- 
2.34.1
Hyperstone GmbH | Reichenaustr. 39a  | 78467 Konstanz
Managing Director: Dr. Jan Peter Berns.
Commercial register of local courts: Freiburg HRB381782


  reply	other threads:[~2022-03-31  7:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31  7:28 [PATCH 1/2] mmc: mmc_spi: parse speed mode options Christian Löhle
2022-03-31  7:29 ` Christian Löhle [this message]
2022-03-31 14:07   ` [PATCH 2/2] mmc: mmc_spi: enable Highspeed for above 25MHz andriy.shevchenko
2022-04-05  9:20     ` Christian Löhle
2022-04-05 12:56       ` Ulf Hansson
2022-03-31 14:06 ` [PATCH 1/2] mmc: mmc_spi: parse speed mode options Andy Shevchenko
2022-04-06 14:55 ` 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=5eaae8e215d84dd3a4f7e09782478a29@hyperstone.com \
    --to=cloehle@hyperstone.com \
    --cc=adrian.hunter@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=avri.altman@wdc.com \
    --cc=digetx@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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.