* [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub
@ 2021-03-14 23:08 Fabio Estevam
2021-03-14 23:08 ` [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Use device_get_match_data() Fabio Estevam
2021-03-19 14:12 ` [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub Ulf Hansson
0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2021-03-14 23:08 UTC (permalink / raw)
To: ulf.hansson; +Cc: shawnguo, linux-imx, linux-mmc, Fabio Estevam
i.MX has been converted to a devicetree only platform, so remove
the non-DT stub for sdhci_esdhc_imx_probe_dt().
Also, make the driver depend on OF now.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- Fix typo in Subject: immc --> mmc
drivers/mmc/host/Kconfig | 1 +
drivers/mmc/host/sdhci-esdhc-imx.c | 10 ----------
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index b236dfe2e879..e911eb570fbc 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -278,6 +278,7 @@ config MMC_SDHCI_ESDHC_IMX
tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller"
depends on ARCH_MXC || COMPILE_TEST
depends on MMC_SDHCI_PLTFM
+ depends on OF
select MMC_SDHCI_IO_ACCESSORS
select MMC_CQHCI
help
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 94327988da91..2a1fb1cd4433 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1453,7 +1453,6 @@ static const struct cqhci_host_ops esdhc_cqhci_ops = {
.dumpregs = esdhc_sdhci_dumpregs,
};
-#ifdef CONFIG_OF
static int
sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
struct sdhci_host *host,
@@ -1505,15 +1504,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
return 0;
}
-#else
-static inline int
-sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
- struct sdhci_host *host,
- struct pltfm_imx_data *imx_data)
-{
- return -ENODEV;
-}
-#endif
static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Use device_get_match_data()
2021-03-14 23:08 [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub Fabio Estevam
@ 2021-03-14 23:08 ` Fabio Estevam
2021-03-19 14:12 ` Ulf Hansson
2021-03-19 14:12 ` [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub Ulf Hansson
1 sibling, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2021-03-14 23:08 UTC (permalink / raw)
To: ulf.hansson; +Cc: shawnguo, linux-imx, linux-mmc, Fabio Estevam
The retrieval of driver data can be a bit simplified by using
device_get_match_data(), so switch to it.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- None
drivers/mmc/host/sdhci-esdhc-imx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 2a1fb1cd4433..d309cc620fdc 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1507,8 +1507,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
{
- const struct of_device_id *of_id =
- of_match_device(imx_esdhc_dt_ids, &pdev->dev);
struct sdhci_pltfm_host *pltfm_host;
struct sdhci_host *host;
struct cqhci_host *cq_host;
@@ -1524,7 +1522,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
imx_data = sdhci_pltfm_priv(pltfm_host);
- imx_data->socdata = of_id->data;
+ imx_data->socdata = device_get_match_data(&pdev->dev);
if (imx_data->socdata->flags & ESDHC_FLAG_PMQOS)
cpu_latency_qos_add_request(&imx_data->pm_qos_req, 0);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub
2021-03-14 23:08 [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub Fabio Estevam
2021-03-14 23:08 ` [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Use device_get_match_data() Fabio Estevam
@ 2021-03-19 14:12 ` Ulf Hansson
1 sibling, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2021-03-19 14:12 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Shawn Guo, dl-linux-imx, linux-mmc
On Mon, 15 Mar 2021 at 00:08, Fabio Estevam <festevam@gmail.com> wrote:
>
> i.MX has been converted to a devicetree only platform, so remove
> the non-DT stub for sdhci_esdhc_imx_probe_dt().
>
> Also, make the driver depend on OF now.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> Changes since v1:
> - Fix typo in Subject: immc --> mmc
>
> drivers/mmc/host/Kconfig | 1 +
> drivers/mmc/host/sdhci-esdhc-imx.c | 10 ----------
> 2 files changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index b236dfe2e879..e911eb570fbc 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -278,6 +278,7 @@ config MMC_SDHCI_ESDHC_IMX
> tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller"
> depends on ARCH_MXC || COMPILE_TEST
> depends on MMC_SDHCI_PLTFM
> + depends on OF
> select MMC_SDHCI_IO_ACCESSORS
> select MMC_CQHCI
> help
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 94327988da91..2a1fb1cd4433 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1453,7 +1453,6 @@ static const struct cqhci_host_ops esdhc_cqhci_ops = {
> .dumpregs = esdhc_sdhci_dumpregs,
> };
>
> -#ifdef CONFIG_OF
> static int
> sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
> struct sdhci_host *host,
> @@ -1505,15 +1504,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>
> return 0;
> }
> -#else
> -static inline int
> -sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
> - struct sdhci_host *host,
> - struct pltfm_imx_data *imx_data)
> -{
> - return -ENODEV;
> -}
> -#endif
>
> static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
> {
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Use device_get_match_data()
2021-03-14 23:08 ` [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Use device_get_match_data() Fabio Estevam
@ 2021-03-19 14:12 ` Ulf Hansson
0 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2021-03-19 14:12 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Shawn Guo, dl-linux-imx, linux-mmc
On Mon, 15 Mar 2021 at 00:09, Fabio Estevam <festevam@gmail.com> wrote:
>
> The retrieval of driver data can be a bit simplified by using
> device_get_match_data(), so switch to it.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> Changes since v1:
> - None
>
> drivers/mmc/host/sdhci-esdhc-imx.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 2a1fb1cd4433..d309cc620fdc 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1507,8 +1507,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>
> static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
> {
> - const struct of_device_id *of_id =
> - of_match_device(imx_esdhc_dt_ids, &pdev->dev);
> struct sdhci_pltfm_host *pltfm_host;
> struct sdhci_host *host;
> struct cqhci_host *cq_host;
> @@ -1524,7 +1522,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
>
> imx_data = sdhci_pltfm_priv(pltfm_host);
>
> - imx_data->socdata = of_id->data;
> + imx_data->socdata = device_get_match_data(&pdev->dev);
>
> if (imx_data->socdata->flags & ESDHC_FLAG_PMQOS)
> cpu_latency_qos_add_request(&imx_data->pm_qos_req, 0);
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-19 14:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14 23:08 [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub Fabio Estevam
2021-03-14 23:08 ` [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Use device_get_match_data() Fabio Estevam
2021-03-19 14:12 ` Ulf Hansson
2021-03-19 14:12 ` [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.