lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1453213055-35563-3-git-send-email-lakshmis@xilinx.com>
Date:	Tue, 19 Jan 2016 19:47:33 +0530
From:	P L Sai Krishna <lakshmi.sai.krishna.potthuri@...inx.com>
To:	Michal Simek <michal.simek@...inx.com>,
	Soren Brinkmann <soren.brinkmann@...inx.com>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Kevin Hao <haokexin@...il.com>,
	Emil Lenchak <emill@...inx.com>,
	Tobias Klauser <tklauser@...tanz.ch>,
	Sudeep Holla <Sudeep.Holla@....com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Jisheng Zhang <jszhang@...vell.com>,
	"Ivan T. Ivanov" <ivan.ivanov@...aro.org>,
	Scott Branden <sbranden@...adcom.com>,
	Vincent Yang <vincent.yang.fujitsu@...il.com>,
	Haibo Chen <haibo.chen@...escale.com>,
	Marek Vasut <marex@...x.de>,
	"ludovic.desroches@...el.com" <ludovic.desroches@...el.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	"Kumar Gala" <galak@...eaurora.org>,
	Suman Tripathi <stripathi@....com>,
	Shawn Lin <shawn.lin@...k-chips.com>
CC:	<linux-arm-kernel@...ts.infradead.org>,
	<linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<devicetree@...r.kernel.org>, Harini Katakam <harinik@...inx.com>,
	Punnaiah Choudary Kalluri <punnaia@...inx.com>,
	Anirudha Sarangi <anirudh@...inx.com>,
	P L Sai Krishna <lakshmis@...inx.com>
Subject: [LINUX PATCH 3/5] mmc: host: Added DT support to use SDIO in standard speed.

If the controller is used in High Speed Mode (Zynq-7000 data output on
rising edge of the clock) the hold time requirement for the
JEDEC/MMC 4.41 Specification is NOT met.
In Standard Speed Mode (Zynq-7000 data output on falling edge of the clock)
an extra half clock period is added to the clock to out delay meeting the
hold time requirement.
This patch adds device tree property 'broken-mmc-highspeed' to sdhci node
to force the controller to use in standard speed as a workaround.

Signed-off-by: Emil Lenchak <emill@...inx.com>
Signed-off-by: P L Sai Krishna <lakshmis@...inx.com>
---
 drivers/mmc/host/sdhci-pltfm.c | 3 +++
 drivers/mmc/host/sdhci.c       | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 223c5eb..37df5cb 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -102,6 +102,9 @@ void sdhci_get_of_property(struct platform_device *pdev)
 	    of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 
+	if (of_get_property(np, "broken-mmc-highspeed", NULL))
+		host->quirks |= SDHCI_QUIRK_NO_HISPD_BIT;
+
 	of_property_read_u32(np, "clock-frequency", &pltfm_host->clock);
 
 	if (of_find_property(np, "keep-power-in-suspend", NULL))
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 8b064cd..5cc07d6 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3114,7 +3114,8 @@ int sdhci_add_host(struct sdhci_host *host)
 	if (host->quirks2 & SDHCI_QUIRK2_HOST_NO_CMD23)
 		mmc->caps &= ~MMC_CAP_CMD23;
 
-	if (caps[0] & SDHCI_CAN_DO_HISPD)
+	if ((caps[0] & SDHCI_CAN_DO_HISPD) &&
+		!(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT))
 		mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
 	if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
-- 
2.1.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ