Skip to content

Commit 95b46ae

Browse files
committed
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
2 parents b2d5ad8 + afefc10 commit 95b46ae

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

drivers/mmc/core/mmc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ static int mmc_select_hs200(struct mmc_card *card)
12761276
* switch to HS200 mode if bus width is set successfully.
12771277
*/
12781278
err = mmc_select_bus_width(card);
1279-
if (!err) {
1279+
if (err >= 0) {
12801280
val = EXT_CSD_TIMING_HS200 |
12811281
card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
12821282
err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
@@ -1583,7 +1583,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
15831583
} else if (mmc_card_hs(card)) {
15841584
/* Select the desired bus width optionally */
15851585
err = mmc_select_bus_width(card);
1586-
if (!err) {
1586+
if (err >= 0) {
15871587
err = mmc_select_hs_ddr(card);
15881588
if (err)
15891589
goto free_card;

drivers/mmc/host/sunxi-mmc.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,8 @@ static const struct sunxi_mmc_clk_delay sun9i_mmc_clk_delays[] = {
970970
[SDXC_CLK_400K] = { .output = 180, .sample = 180 },
971971
[SDXC_CLK_25M] = { .output = 180, .sample = 75 },
972972
[SDXC_CLK_50M] = { .output = 150, .sample = 120 },
973-
[SDXC_CLK_50M_DDR] = { .output = 90, .sample = 120 },
974-
[SDXC_CLK_50M_DDR_8BIT] = { .output = 90, .sample = 120 },
973+
[SDXC_CLK_50M_DDR] = { .output = 54, .sample = 36 },
974+
[SDXC_CLK_50M_DDR_8BIT] = { .output = 72, .sample = 72 },
975975
};
976976

977977
static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
@@ -1129,11 +1129,6 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
11291129
MMC_CAP_1_8V_DDR |
11301130
MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ;
11311131

1132-
/* TODO MMC DDR is not working on A80 */
1133-
if (of_device_is_compatible(pdev->dev.of_node,
1134-
"allwinner,sun9i-a80-mmc"))
1135-
mmc->caps &= ~MMC_CAP_1_8V_DDR;
1136-
11371132
ret = mmc_of_parse(mmc);
11381133
if (ret)
11391134
goto error_free_dma;

0 commit comments

Comments
 (0)