diff mbox series

[v6,1/5] omap: mmc: Avoid using libfdt with of-platdata

Message ID 20210725161347.457937-2-sjg@chromium.org
State Deferred
Delegated to: Tom Rini
Headers show
Series of-platdata: Avoid building libfdt | expand

Commit Message

Simon Glass July 25, 2021, 4:13 p.m. UTC
At present this driver is enabled in SPL on omapl138_lcdk, which uses
of-platdata. The driver needs to be ported to use of-platdata properly.
For now, avoid a build error by returning an error.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 drivers/mmc/davinci_mmc.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index 05ca3612809..7016649524f 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -506,6 +506,12 @@  static int davinci_mmc_of_to_plat(struct udevice *dev)
 	struct davinci_mmc_plat *plat = dev_get_plat(dev);
 	struct mmc_config *cfg = &plat->cfg;
 
+	/* FIXME: Cannot read from device tree with of-platdata */
+	if (CONFIG_IS_ENABLED(OF_PLATDATA)) {
+		printf("Please fix this driver to use of-platdata");
+		return -ENOSYS;
+	}
+
 	plat->reg_base = (struct davinci_mmc_regs *)dev_read_addr(dev);
 	cfg->f_min = 200000;
 	cfg->f_max = 25000000;