* [PATCH v6] mmc: sdhci-esdhc-imx: remove redundant mx25 handling and consolidate soc data
@ 2026-03-19 17:38 Adrián García Casado
2026-03-23 19:04 ` Frank Li
0 siblings, 1 reply; 2+ messages in thread
From: Adrián García Casado @ 2026-03-19 17:38 UTC (permalink / raw)
To: Ulf Hansson
Cc: Haibo Chen, Frank Li, Sascha Hauer, linux-mmc, imx,
linux-arm-kernel, linux-kernel, Miguel Ojeda,
Adrián García Casado
Remove the is_imx25_esdhc check and redundant mx25-specific handling as it's no longer necessary since the new_soc initialization. Consolidate the drive data structs for imx25/35.
Signed-off-by: Adrián García Casado <adriangarciacasado42@gmail.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index a7a5df673b0f6..3dc43f1e517aa 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -256,11 +256,7 @@ struct esdhc_soc_data {
u32 quirks;
};
-static const struct esdhc_soc_data esdhc_imx25_data = {
- .flags = ESDHC_FLAG_ERR004536,
-};
-
-static const struct esdhc_soc_data esdhc_imx35_data = {
+static const struct esdhc_soc_data esdhc_imx25_35_data = {
.flags = ESDHC_FLAG_ERR004536,
};
@@ -391,8 +387,8 @@ struct pltfm_imx_data {
};
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, },
+ { .compatible = "fsl,imx25-esdhc", .data = &esdhc_imx25_35_data, },
+ { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx25_35_data, },
{ .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
{ .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
{ .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
@@ -412,10 +408,6 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, imx_esdhc_dt_ids);
-static inline int is_imx25_esdhc(struct pltfm_imx_data *data)
-{
- return data->socdata == &esdhc_imx25_data;
-}
static inline int is_imx53_esdhc(struct pltfm_imx_data *data)
{
@@ -873,11 +865,8 @@ static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg)
new_val = val & SDHCI_CTRL_LED;
/* ensure the endianness */
new_val |= ESDHC_HOST_CONTROL_LE;
- /* bits 8&9 are reserved on mx25 */
- if (!is_imx25_esdhc(imx_data)) {
- /* DMA mode bits are shifted */
- new_val |= (val & SDHCI_CTRL_DMA_MASK) << 5;
- }
+ /* DMA mode bits are shifted */
+ new_val |= (val & SDHCI_CTRL_DMA_MASK) << 5;
/*
* Do not touch buswidth bits here. This is done in
base-commit: f338e77383789c0cae23ca3d48adcc5e9e137e3c
prerequisite-patch-id: bf56dcdce62cb97741b7aa11b04c7a9648fb2d6a
prerequisite-patch-id: bb57e0fd9cad8c81bcf7a6389f3cb294bbe1eb52
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v6] mmc: sdhci-esdhc-imx: remove redundant mx25 handling and consolidate soc data
2026-03-19 17:38 [PATCH v6] mmc: sdhci-esdhc-imx: remove redundant mx25 handling and consolidate soc data Adrián García Casado
@ 2026-03-23 19:04 ` Frank Li
0 siblings, 0 replies; 2+ messages in thread
From: Frank Li @ 2026-03-23 19:04 UTC (permalink / raw)
To: Adrián García Casado
Cc: Ulf Hansson, Haibo Chen, Sascha Hauer, linux-mmc, imx,
linux-arm-kernel, linux-kernel, Miguel Ojeda
On Thu, Mar 19, 2026 at 06:38:32PM +0100, Adrián García Casado wrote:
> Remove the is_imx25_esdhc check and redundant mx25-specific handling as it's no longer necessary since the new_soc initialization. Consolidate the drive data structs for imx25/35.
wrap commit message at 75 column.
Frank
>
> Signed-off-by: Adrián García Casado <adriangarciacasado42@gmail.com>
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 21 +++++----------------
> 1 file changed, 5 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index a7a5df673b0f6..3dc43f1e517aa 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -256,11 +256,7 @@ struct esdhc_soc_data {
> u32 quirks;
> };
>
> -static const struct esdhc_soc_data esdhc_imx25_data = {
> - .flags = ESDHC_FLAG_ERR004536,
> -};
> -
> -static const struct esdhc_soc_data esdhc_imx35_data = {
> +static const struct esdhc_soc_data esdhc_imx25_35_data = {
> .flags = ESDHC_FLAG_ERR004536,
> };
>
> @@ -391,8 +387,8 @@ struct pltfm_imx_data {
> };
>
> 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, },
> + { .compatible = "fsl,imx25-esdhc", .data = &esdhc_imx25_35_data, },
> + { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx25_35_data, },
> { .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
> { .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
> { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
> @@ -412,10 +408,6 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
> };
> MODULE_DEVICE_TABLE(of, imx_esdhc_dt_ids);
>
> -static inline int is_imx25_esdhc(struct pltfm_imx_data *data)
> -{
> - return data->socdata == &esdhc_imx25_data;
> -}
>
> static inline int is_imx53_esdhc(struct pltfm_imx_data *data)
> {
> @@ -873,11 +865,8 @@ static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg)
> new_val = val & SDHCI_CTRL_LED;
> /* ensure the endianness */
> new_val |= ESDHC_HOST_CONTROL_LE;
> - /* bits 8&9 are reserved on mx25 */
> - if (!is_imx25_esdhc(imx_data)) {
> - /* DMA mode bits are shifted */
> - new_val |= (val & SDHCI_CTRL_DMA_MASK) << 5;
> - }
> + /* DMA mode bits are shifted */
> + new_val |= (val & SDHCI_CTRL_DMA_MASK) << 5;
>
> /*
> * Do not touch buswidth bits here. This is done in
>
> base-commit: f338e77383789c0cae23ca3d48adcc5e9e137e3c
> prerequisite-patch-id: bf56dcdce62cb97741b7aa11b04c7a9648fb2d6a
> prerequisite-patch-id: bb57e0fd9cad8c81bcf7a6389f3cb294bbe1eb52
> --
> 2.47.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-23 19:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 17:38 [PATCH v6] mmc: sdhci-esdhc-imx: remove redundant mx25 handling and consolidate soc data Adrián García Casado
2026-03-23 19:04 ` Frank Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox