Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mmc-v6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:

- sunxi-mmc: Fix clock refcount imbalance during unbind

- sdhci-esdhc-imx: Fix some tuning settings

* tag 'mmc-v6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: sunxi-mmc: Fix clock refcount imbalance during unbind
mmc: sdhci-esdhc-imx: correct the tuning start tap and step setting

+20 -10
+15 -7
drivers/mmc/host/sdhci-esdhc-imx.c
··· 107 107 #define ESDHC_TUNING_START_TAP_DEFAULT 0x1 108 108 #define ESDHC_TUNING_START_TAP_MASK 0x7f 109 109 #define ESDHC_TUNING_CMD_CRC_CHECK_DISABLE (1 << 7) 110 + #define ESDHC_TUNING_STEP_DEFAULT 0x1 110 111 #define ESDHC_TUNING_STEP_MASK 0x00070000 111 112 #define ESDHC_TUNING_STEP_SHIFT 16 112 113 ··· 1369 1368 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); 1370 1369 struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host); 1371 1370 struct cqhci_host *cq_host = host->mmc->cqe_private; 1372 - int tmp; 1371 + u32 tmp; 1373 1372 1374 1373 if (esdhc_is_usdhc(imx_data)) { 1375 1374 /* ··· 1424 1423 1425 1424 if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING) { 1426 1425 tmp = readl(host->ioaddr + ESDHC_TUNING_CTRL); 1427 - tmp |= ESDHC_STD_TUNING_EN | 1428 - ESDHC_TUNING_START_TAP_DEFAULT; 1429 - if (imx_data->boarddata.tuning_start_tap) { 1430 - tmp &= ~ESDHC_TUNING_START_TAP_MASK; 1426 + tmp |= ESDHC_STD_TUNING_EN; 1427 + 1428 + /* 1429 + * ROM code or bootloader may config the start tap 1430 + * and step, unmask them first. 1431 + */ 1432 + tmp &= ~(ESDHC_TUNING_START_TAP_MASK | ESDHC_TUNING_STEP_MASK); 1433 + if (imx_data->boarddata.tuning_start_tap) 1431 1434 tmp |= imx_data->boarddata.tuning_start_tap; 1432 - } 1435 + else 1436 + tmp |= ESDHC_TUNING_START_TAP_DEFAULT; 1433 1437 1434 1438 if (imx_data->boarddata.tuning_step) { 1435 - tmp &= ~ESDHC_TUNING_STEP_MASK; 1436 1439 tmp |= imx_data->boarddata.tuning_step 1440 + << ESDHC_TUNING_STEP_SHIFT; 1441 + } else { 1442 + tmp |= ESDHC_TUNING_STEP_DEFAULT 1437 1443 << ESDHC_TUNING_STEP_SHIFT; 1438 1444 } 1439 1445
+5 -3
drivers/mmc/host/sunxi-mmc.c
··· 1492 1492 struct sunxi_mmc_host *host = mmc_priv(mmc); 1493 1493 1494 1494 mmc_remove_host(mmc); 1495 - pm_runtime_force_suspend(&pdev->dev); 1496 - disable_irq(host->irq); 1497 - sunxi_mmc_disable(host); 1495 + pm_runtime_disable(&pdev->dev); 1496 + if (!pm_runtime_status_suspended(&pdev->dev)) { 1497 + disable_irq(host->irq); 1498 + sunxi_mmc_disable(host); 1499 + } 1498 1500 dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); 1499 1501 mmc_free_host(mmc); 1500 1502