Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95b46aeb authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents b2d5ad82 afefc102
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
+2 −7
Original line number Diff line number Diff line
@@ -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;