[PATCH 2/6] mmc: dw_mmc: Do not export dwmci_send_cmd() and dwmci_set_ios()

Anand Moon linux.amoon at gmail.com
Thu Oct 30 06:01:17 CET 2025


Hi Sam,

On Sun, 26 Oct 2025 at 06:37, Sam Protsenko <semen.protsenko at linaro.org> wrote:
>
> Do not over-expose the private dw_mmc API. The glue layer drivers at
> this point shouldn't be aware and shouldn't use the generic
> dwmci_send_cmd() and dwmci_set_ios() functions. Making those functions
> public causes a "leaky abstraction" issue. It clutters the public
> interface of generic dw_mmc driver and possibly leads to improper usage
> of those functions, so it's a bad design.
>
> If struct dm_dwmci_ops has to be extended, do so by copying it first
> (like it's done for example in snps_dw_mmc driver). That also makes sure
> the future changes to struct dm_dwmci_ops in dw_mmc driver will be
> automatically reflected in all extended copies, and avoid code
> duplication.
>
> This effectively reverts commit ef3b16bb8e73 ("mmc: dw_mmc: export
> dwmci_send_cmd() and dwmci_set_ios()").
>
> No functional change.
>
> Fixes: ef3b16bb8e73 ("mmc: dw_mmc: export dwmci_send_cmd() and dwmci_set_ios()")
> Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
> ---
Reviewed-by: Anand Moon <linux.amoon at gmail.com>

Thanks
-Anand


More information about the U-Boot mailing list