Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1617716
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.10 42/81] mmc: sdhci-of-at91: fix MMC_DDR_52 timing selection |
| Date | 2017-04-06 11:10 +0200 |
| Message-ID | <ttbAw-6xa-77@gated-at.bofh.it> (permalink) |
| References | <ttbh8-6aP-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ludovic Desroches <ludovic.desroches@microchip.com>
commit d0918764c17b94c30bbb2619929b1719ff52707a upstream.
The controller has different timings for MMC_TIMING_UHS_DDR50 and
MMC_TIMING_MMC_DDR52. Configuring the controller with SDHCI_CTRL_UHS_DDR50,
when MMC_TIMING_MMC_DDR52 timings are requested, is not correct and can
lead to unexpected behavior.
Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Fixes: bb5f8ea4d514 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/mmc/host/sdhci-of-at91.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--- a/drivers/mmc/host/sdhci-of-at91.c
+++ b/drivers/mmc/host/sdhci-of-at91.c
@@ -29,6 +29,8 @@
#include "sdhci-pltfm.h"
+#define SDMMC_MC1R 0x204
+#define SDMMC_MC1R_DDR BIT(3)
#define SDMMC_CACR 0x230
#define SDMMC_CACR_CAPWREN BIT(0)
#define SDMMC_CACR_KEY (0x46 << 8)
@@ -103,11 +105,18 @@ static void sdhci_at91_set_power(struct
sdhci_set_power_noreg(host, mode, vdd);
}
+void sdhci_at91_set_uhs_signaling(struct sdhci_host *host, unsigned int timing)
+{
+ if (timing == MMC_TIMING_MMC_DDR52)
+ sdhci_writeb(host, SDMMC_MC1R_DDR, SDMMC_MC1R);
+ sdhci_set_uhs_signaling(host, timing);
+}
+
static const struct sdhci_ops sdhci_at91_sama5d2_ops = {
.set_clock = sdhci_at91_set_clock,
.set_bus_width = sdhci_set_bus_width,
.reset = sdhci_reset,
- .set_uhs_signaling = sdhci_set_uhs_signaling,
+ .set_uhs_signaling = sdhci_at91_set_uhs_signaling,
.set_power = sdhci_at91_set_power,
};
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.10 00/81] 4.10.9-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:10 +0200
[PATCH 4.10 06/81] xfs: fix toctou race when locking an inode to access the data map Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:10 +0200
[PATCH 4.10 02/81] KVM: nVMX: fix nested EPT detection Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:10 +0200
[PATCH 4.10 42/81] mmc: sdhci-of-at91: fix MMC_DDR_52 timing selection Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:10 +0200
[PATCH 4.10 11/81] xfs: allow unwritten extents in the CoW fork Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:20 +0200
[PATCH 4.10 18/81] xfs: handle indlen shortage on delalloc extent merge Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:20 +0200
[PATCH 4.10 16/81] xfs: correct null checks and error processing in xfs_initialize_perag Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:20 +0200
[PATCH 4.10 10/81] xfs: verify free block header fields Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:20 +0200
[PATCH 4.10 13/81] xfs: reset b_first_retry_time when clear the retry status of xfs_buf_t Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:20 +0200
[PATCH 4.10 15/81] xfs: update ctime and mtime on clone destinatation inodes Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 11:20 +0200
Re: [PATCH 4.10 00/81] 4.10.9-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-04-06 20:00 +0200
Re: [PATCH 4.10 00/81] 4.10.9-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-06 20:10 +0200
Re: [PATCH 4.10 00/81] 4.10.9-stable review Guenter Roeck <linux@roeck-us.net> - 2017-04-07 00:00 +0200
Re: [PATCH 4.10 00/81] 4.10.9-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-07 10:20 +0200
csiph-web