Revert "sandbox: Disable I2C emulators in SPL"
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 04:25:31 +0000 (17:25 +1300)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Mar 2021 04:03:08 +0000 (17:03 +1300)
With recent changes this can be supported again. Add it back.

This reverts commit d85f2c4f2970d0ec2f5f075de734afd11200d153.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/dts/sandbox.dtsi
configs/sandbox_spl_defconfig
drivers/i2c/Makefile
test/dm/of_platdata.c

index 5bf84451c9943cc7e6d0f96a07769cbf9fb20e64..69d7d3019ee4281802476c5171573f94cd39b954 100644 (file)
                stringarray = "pre-proper";
        };
 
-       test-bus {
-               compatible = "simple-bus";
+       spl-test7 {
                u-boot,dm-spl;
-               spl-test7 {
-                       u-boot,dm-spl;
-                       compatible = "sandbox,spl-test";
-                       stringarray = "spl";
-               };
+               compatible = "sandbox,spl-test";
+               stringarray = "spl";
        };
 
        square {
index 4c020528fda233d1159ebcdeba29ae6796db880c..1ac7e025b6057278071b2821db8b2e0a96f340ca 100644 (file)
@@ -103,6 +103,7 @@ CONFIG_SYSCON=y
 CONFIG_SPL_SYSCON=y
 CONFIG_DEVRES=y
 CONFIG_DEBUG_DEVRES=y
+# CONFIG_SPL_SIMPLE_BUS is not set
 CONFIG_ADC=y
 CONFIG_ADC_SANDBOX=y
 CONFIG_AXI=y
index acd27ac29d218ec8aa922fa25f26fc653e213b38..8c9f1fcd8b9c45ed53d4d87ae26ed42159f3839a 100644 (file)
@@ -39,9 +39,7 @@ obj-$(CONFIG_SYS_I2C_RCAR_I2C) += rcar_i2c.o
 obj-$(CONFIG_SYS_I2C_RCAR_IIC) += rcar_iic.o
 obj-$(CONFIG_SYS_I2C_ROCKCHIP) += rk_i2c.o
 obj-$(CONFIG_SYS_I2C_S3C24X0) += s3c24x0_i2c.o exynos_hs_i2c.o
-ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_SYS_I2C_SANDBOX) += sandbox_i2c.o i2c-emul-uclass.o
-endif
 obj-$(CONFIG_SYS_I2C_SH) += sh_i2c.o
 obj-$(CONFIG_SYS_I2C_SOFT) += soft_i2c.o
 obj-$(CONFIG_SYS_I2C_STM32F7) += stm32f7_i2c.o
index e5f32a0f1c476e16c79ef50ec4d2462bd4315466..7cbb1161ed28fc96c1c3e0f528d151cd570b021f 100644 (file)
@@ -207,11 +207,11 @@ DM_TEST(dm_test_of_plat_phandle, UT_TESTF_SCAN_PDATA);
 /* Test that device parents are correctly set up */
 static int dm_test_of_plat_parent(struct unit_test_state *uts)
 {
-       struct udevice *dev, *bus;
+       struct udevice *rtc, *i2c;
 
-       ut_assertok(uclass_first_device_err(UCLASS_SIMPLE_BUS, &bus));
-       ut_assertok(device_first_child_err(bus, &dev));
-       ut_asserteq_ptr(bus, dev_get_parent(dev));
+       ut_assertok(uclass_first_device_err(UCLASS_RTC, &rtc));
+       ut_assertok(uclass_first_device_err(UCLASS_I2C, &i2c));
+       ut_asserteq_ptr(i2c, dev_get_parent(rtc));
 
        return 0;
 }