MMC core:

- Fix/restore behaviour when selecting bus width for (e)MMC
 
 MMC host:
  - sunxi: Fix eMMC HS-DDR modes on Allwinner A80
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXUTJjAAoJEP4mhCVzWIwpggoQAJQQlp0nrI9HUIFE+A6K/+Vo
 ID/7ss1x3QiJ0reMiMA6ndDVSdneHMET2wDxfAu0qrRzBaUMUhzpCmWtc6mAsY52
 Fm5xj/KQD106ExexO3YHTFBZ6qfkq4YiO2tyUiXLDT6W55Y128JD9oFPk0Qy8YfJ
 DLXHrkQiHsyjiQ1lcE7xN4wAUyHQZ0S4cHpx3kqaOOYfHwkE2qQTAzriJTQiO1u+
 Z4W50LETOI2TbbP/RSaWa/xwH+nEySi4tawfENTpwnE4BDG+2sTX57ZcVEVbkumB
 UmRPuIgNuy/J3DNxdeq8ekB4aiWL2hy9xDgiqT52UvbY4GmzckIA+eIZLyHIGlP5
 1BFnoUPimgXZpJBrrR/xcghukR21ZSug6ck9qkh/qQGlbUgDOkSuMAzZ30JYYtpO
 k9/qUzup264aXqZbWCoLAzT6Cjotvy5H4qzb+xINNrrpWl2IBUhkqNb4tb59mMCf
 k3NrJ8QjmAvUrL917y7kszPkffPSTs2nO72s0SHymgKWPyTXYcS0xAQ0oCmmUD7W
 ZcexdQRW8xN3KhEilF5v/tDnrXMAtgMt+PdkLHrpfXqatk1kRDi0QrpI7OTFUAwf
 R1nM2wM/PsBZh+i+eWPNSF+B7CSS99L+1jFXfE2rIpwB8y6ZHoJfC0W8Pk+fCxze
 CUxR84sk8270DaO5eOVf
 =e7+p
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v4.7-rc1-2' of git://git.linaro.org/people/ulf.hansson/mmc

Pull MMC fixes from Ulf Hansson:
 "MMC core:
   - Fix/restore behaviour when selecting bus width for (e)MMC

  MMC host:
   - sunxi: Fix eMMC HS-DDR modes on Allwinner A80"

* tag 'mmc-v4.7-rc1-2' of git://git.linaro.org/people/ulf.hansson/mmc:
  mmc: sunxi: Re-enable eMMC HS-DDR modes on Allwinner A80
  mmc: sunxi: Fix DDR MMC timings for A80
  mmc: fix mmc mode selection for HS-DDR and higher
This commit is contained in:
Linus Torvalds 2016-06-04 12:20:26 -07:00
commit 95b46aeb05
2 changed files with 4 additions and 9 deletions

View File

@ -1276,7 +1276,7 @@ static int mmc_select_hs200(struct mmc_card *card)
* switch to HS200 mode if bus width is set successfully.
*/
err = mmc_select_bus_width(card);
if (!err) {
if (err >= 0) {
val = EXT_CSD_TIMING_HS200 |
card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
@ -1583,7 +1583,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
} else if (mmc_card_hs(card)) {
/* Select the desired bus width optionally */
err = mmc_select_bus_width(card);
if (!err) {
if (err >= 0) {
err = mmc_select_hs_ddr(card);
if (err)
goto free_card;

View File

@ -970,8 +970,8 @@ static const struct sunxi_mmc_clk_delay sun9i_mmc_clk_delays[] = {
[SDXC_CLK_400K] = { .output = 180, .sample = 180 },
[SDXC_CLK_25M] = { .output = 180, .sample = 75 },
[SDXC_CLK_50M] = { .output = 150, .sample = 120 },
[SDXC_CLK_50M_DDR] = { .output = 90, .sample = 120 },
[SDXC_CLK_50M_DDR_8BIT] = { .output = 90, .sample = 120 },
[SDXC_CLK_50M_DDR] = { .output = 54, .sample = 36 },
[SDXC_CLK_50M_DDR_8BIT] = { .output = 72, .sample = 72 },
};
static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
@ -1129,11 +1129,6 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
MMC_CAP_1_8V_DDR |
MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ;
/* TODO MMC DDR is not working on A80 */
if (of_device_is_compatible(pdev->dev.of_node,
"allwinner,sun9i-a80-mmc"))
mmc->caps &= ~MMC_CAP_1_8V_DDR;
ret = mmc_of_parse(mmc);
if (ret)
goto error_free_dma;