From: Adrian Hunter <adrian.hunter@intel.com>
To: Zach Brown <zach.brown@ni.com>, ulf.hansson@linaro.org
Cc: robh+dt@kernel.org, mark.rutland@arm.com,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC v2 2/2] sdhci: Prevent SD from doing high-speed timing when broken-highspeed property is set
Date: Mon, 17 Oct 2016 09:56:19 +0300 [thread overview]
Message-ID: <58380ee1-15d0-9eb6-fe89-f1bb9ec24af2@intel.com> (raw)
In-Reply-To: <1476297656-7019-3-git-send-email-zach.brown@ni.com>
On 12/10/16 21:40, Zach Brown wrote:
> When the broken-highspeed property is set the sdhci driver will not
> go into highspeed mode even if the controller and card appear to
> otherwise support highspeed mode.
>
> This is useful in cases where the controller and card support highspeed,
> but the board configuration or some other issue make highspeed
> impossible. For example, we send the SDIO lines through a fpga so we
> need the data to change on the falling edge of the clock or there will
> be issues with hold time.
>
> Signed-off-by: Zach Brown <zach.brown@ni.com>
Assuming the DT property is accepted:
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 4805566..17e6c50 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -22,6 +22,7 @@
> #include <linux/scatterlist.h>
> #include <linux/regulator/consumer.h>
> #include <linux/pm_runtime.h>
> +#include <linux/of.h>
>
> #include <linux/leds.h>
>
> @@ -3274,7 +3275,8 @@ int sdhci_setup_host(struct sdhci_host *host)
> if (host->quirks2 & SDHCI_QUIRK2_HOST_NO_CMD23)
> mmc->caps &= ~MMC_CAP_CMD23;
>
> - if (host->caps & SDHCI_CAN_DO_HISPD)
> + if ((host->caps & SDHCI_CAN_DO_HISPD) &&
> + !(of_property_read_bool(mmc_dev(mmc)->of_node, "broken-highspeed")))
> mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
>
> if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
>
prev parent reply other threads:[~2016-10-17 7:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 18:40 [RFC v2 0/2] Add device tree property and driver behavior for supporting sdhci configurations with broken highspeed Zach Brown
[not found] ` <1476297656-7019-1-git-send-email-zach.brown-acOepvfBmUk@public.gmane.org>
2016-10-12 18:40 ` [RFC v2 1/2] sdhci: Add device tree property broken-highspeed Zach Brown
2016-10-13 2:27 ` Jaehoon Chung
[not found] ` <1476297656-7019-2-git-send-email-zach.brown-acOepvfBmUk@public.gmane.org>
2016-10-18 13:17 ` Rob Herring
2016-10-12 18:40 ` [RFC v2 2/2] sdhci: Prevent SD from doing high-speed timing when broken-highspeed property is set Zach Brown
2016-10-17 6:56 ` Adrian Hunter [this message]
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=58380ee1-15d0-9eb6-fe89-f1bb9ec24af2@intel.com \
--to=adrian.hunter@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=zach.brown@ni.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox