mmc: Allow controlling DM_MMC for VPL builds

VPL may want to use driver model for MMC even if TPL does not. Update
the rule in this driver to support that.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass 2025-01-26 11:43:13 -07:00 committed by Tom Rini
parent 4acbd003d3
commit 00ae9b2ac3

View File

@ -724,7 +724,7 @@ static int dwmci_init(struct mmc *mmc)
return 0; return 0;
} }
#ifdef CONFIG_DM_MMC #if CONFIG_IS_ENABLED(DM_MMC)
int dwmci_probe(struct udevice *dev) int dwmci_probe(struct udevice *dev)
{ {
struct mmc *mmc = mmc_get_mmc_dev(dev); struct mmc *mmc = mmc_get_mmc_dev(dev);
@ -749,7 +749,7 @@ void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host,
u32 max_clk, u32 min_clk) u32 max_clk, u32 min_clk)
{ {
cfg->name = host->name; cfg->name = host->name;
#ifndef CONFIG_DM_MMC #if !CONFIG_IS_ENABLED(DM_MMC)
cfg->ops = &dwmci_ops; cfg->ops = &dwmci_ops;
#endif #endif
cfg->f_min = min_clk; cfg->f_min = min_clk;