From: Greg Kroah-Hartman Date: Mon, 14 Nov 2022 12:38:34 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v5.10.155~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2015434da5bdf64eaeafa3e1533df3e39b9e87e3;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: mmc-sdhci-esdhc-imx-convert-the-driver-to-dt-only.patch --- diff --git a/queue-5.10/mmc-sdhci-esdhc-imx-convert-the-driver-to-dt-only.patch b/queue-5.10/mmc-sdhci-esdhc-imx-convert-the-driver-to-dt-only.patch new file mode 100644 index 00000000000..b6dee419e14 --- /dev/null +++ b/queue-5.10/mmc-sdhci-esdhc-imx-convert-the-driver-to-dt-only.patch @@ -0,0 +1,137 @@ +From 854a22997ad5d6c9860a2d695c40cd4004151d5b Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Tue, 17 Nov 2020 08:37:50 -0300 +Subject: mmc: sdhci-esdhc-imx: Convert the driver to DT-only + +From: Fabio Estevam + +commit 854a22997ad5d6c9860a2d695c40cd4004151d5b upstream. + +Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code +by removing the unused non-DT support. + +Signed-off-by: Fabio Estevam +Reviewed-by: Haibo Chen +Link: https://lore.kernel.org/r/20201117113750.25053-1-festevam@gmail.com +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/sdhci-esdhc-imx.c | 86 ------------------------------------- + 1 file changed, 1 insertion(+), 85 deletions(-) + +--- a/drivers/mmc/host/sdhci-esdhc-imx.c ++++ b/drivers/mmc/host/sdhci-esdhc-imx.c +@@ -295,22 +295,6 @@ struct pltfm_imx_data { + struct pm_qos_request pm_qos_req; + }; + +-static const struct platform_device_id imx_esdhc_devtype[] = { +- { +- .name = "sdhci-esdhc-imx25", +- .driver_data = (kernel_ulong_t) &esdhc_imx25_data, +- }, { +- .name = "sdhci-esdhc-imx35", +- .driver_data = (kernel_ulong_t) &esdhc_imx35_data, +- }, { +- .name = "sdhci-esdhc-imx51", +- .driver_data = (kernel_ulong_t) &esdhc_imx51_data, +- }, { +- /* sentinel */ +- } +-}; +-MODULE_DEVICE_TABLE(platform, imx_esdhc_devtype); +- + static const struct of_device_id imx_esdhc_dt_ids[] = { + { .compatible = "fsl,imx25-esdhc", .data = &esdhc_imx25_data, }, + { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, }, +@@ -1546,72 +1530,6 @@ sdhci_esdhc_imx_probe_dt(struct platform + } + #endif + +-static int sdhci_esdhc_imx_probe_nondt(struct platform_device *pdev, +- struct sdhci_host *host, +- struct pltfm_imx_data *imx_data) +-{ +- struct esdhc_platform_data *boarddata = &imx_data->boarddata; +- int err; +- +- if (!host->mmc->parent->platform_data) { +- dev_err(mmc_dev(host->mmc), "no board data!\n"); +- return -EINVAL; +- } +- +- imx_data->boarddata = *((struct esdhc_platform_data *) +- host->mmc->parent->platform_data); +- /* write_protect */ +- if (boarddata->wp_type == ESDHC_WP_GPIO) { +- host->mmc->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH; +- +- err = mmc_gpiod_request_ro(host->mmc, "wp", 0, 0); +- if (err) { +- dev_err(mmc_dev(host->mmc), +- "failed to request write-protect gpio!\n"); +- return err; +- } +- } +- +- /* card_detect */ +- switch (boarddata->cd_type) { +- case ESDHC_CD_GPIO: +- err = mmc_gpiod_request_cd(host->mmc, "cd", 0, false, 0); +- if (err) { +- dev_err(mmc_dev(host->mmc), +- "failed to request card-detect gpio!\n"); +- return err; +- } +- fallthrough; +- +- case ESDHC_CD_CONTROLLER: +- /* we have a working card_detect back */ +- host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION; +- break; +- +- case ESDHC_CD_PERMANENT: +- host->mmc->caps |= MMC_CAP_NONREMOVABLE; +- break; +- +- case ESDHC_CD_NONE: +- break; +- } +- +- switch (boarddata->max_bus_width) { +- case 8: +- host->mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA; +- break; +- case 4: +- host->mmc->caps |= MMC_CAP_4_BIT_DATA; +- break; +- case 1: +- default: +- host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA; +- break; +- } +- +- return 0; +-} +- + static int sdhci_esdhc_imx_probe(struct platform_device *pdev) + { + const struct of_device_id *of_id = +@@ -1631,8 +1549,7 @@ static int sdhci_esdhc_imx_probe(struct + + imx_data = sdhci_pltfm_priv(pltfm_host); + +- imx_data->socdata = of_id ? of_id->data : (struct esdhc_soc_data *) +- pdev->id_entry->driver_data; ++ imx_data->socdata = of_id->data; + + if (imx_data->socdata->flags & ESDHC_FLAG_PMQOS) + cpu_latency_qos_add_request(&imx_data->pm_qos_req, 0); +@@ -1944,7 +1861,6 @@ static struct platform_driver sdhci_esdh + .of_match_table = imx_esdhc_dt_ids, + .pm = &sdhci_esdhc_pmops, + }, +- .id_table = imx_esdhc_devtype, + .probe = sdhci_esdhc_imx_probe, + .remove = sdhci_esdhc_imx_remove, + }; diff --git a/queue-5.10/series b/queue-5.10/series index f5d52fe5242..a67b043fa4a 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -92,3 +92,4 @@ dmaengine-at_hdmac-don-t-allow-cpu-to-reorder-channel-enable.patch dmaengine-at_hdmac-fix-impossible-condition.patch dmaengine-at_hdmac-check-return-code-of-dma_async_device_register.patch net-tun-call-napi_schedule_prep-to-ensure-we-own-a-napi.patch +mmc-sdhci-esdhc-imx-convert-the-driver-to-dt-only.patch