]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: Fix up building for of-platdata
authorSimon Glass <sjg@chromium.org>
Sat, 3 Oct 2020 17:31:34 +0000 (11:31 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Oct 2020 20:42:18 +0000 (14:42 -0600)
There is no devicetree with of-platdata. Update a few uclasses to allow
them to be built for sandbox_spl. Also drop the i2c-gpio from SPL to avoid
build errors, since it does not support of-platdata.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/i2c/Makefile
drivers/i2c/i2c-emul-uclass.c
drivers/rtc/rtc-uclass.c

index bd248cbf52b1843d7103824f52892838e7fc94c4..b37198036c082a46cd0c17338083cf1f3c5ad76e 100644 (file)
@@ -6,7 +6,7 @@ obj-$(CONFIG_DM_I2C) += i2c-uclass.o
 ifdef CONFIG_ACPIGEN
 obj-$(CONFIG_DM_I2C) += acpi_i2c.o
 endif
-obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o
+obj-$(CONFIG_$(SPL_)DM_I2C_GPIO) += i2c-gpio.o
 obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o
 obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o
 
index 1b70e140545dd938fff9540543a652bbab94ce3d..84b6a219d19e5b06343fd2da778abf7a711513d4 100644 (file)
@@ -76,7 +76,9 @@ UCLASS_DRIVER(i2c_emul) = {
 UCLASS_DRIVER(i2c_emul_parent) = {
        .id             = UCLASS_I2C_EMUL_PARENT,
        .name           = "i2c_emul_parent",
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
        .post_bind      = dm_scan_fdt_dev,
+#endif
 };
 
 static const struct udevice_id i2c_emul_parent_ids[] = {
index 8035f7fe9ccc5c3868cdf3c088a779359e56cb63..b406bab32d1725091111e64bdb3078dc137a376f 100644 (file)
@@ -174,5 +174,7 @@ int rtc_write32(struct udevice *dev, unsigned int reg, u32 value)
 UCLASS_DRIVER(rtc) = {
        .name           = "rtc",
        .id             = UCLASS_RTC,
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
        .post_bind      = dm_scan_fdt_dev,
+#endif
 };