mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-01 00:23:29 +08:00
sandbox: Disable I2C emulators in SPL
These cannot work with of-platdata since they currently need the devicetree at runtime. Disable the emulators and the sandbox I2C driver that needs them. We can enable these later, if needed for testing. Switch the of_plat_parent test over to use a simple bus instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
dfb5bfbc20
commit
d85f2c4f29
@ -260,11 +260,15 @@
|
|||||||
stringarray = "pre-proper";
|
stringarray = "pre-proper";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test-bus {
|
||||||
|
compatible = "simple-bus";
|
||||||
|
u-boot,dm-spl;
|
||||||
spl-test7 {
|
spl-test7 {
|
||||||
u-boot,dm-spl;
|
u-boot,dm-spl;
|
||||||
compatible = "sandbox,spl-test";
|
compatible = "sandbox,spl-test";
|
||||||
stringarray = "spl";
|
stringarray = "spl";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
square {
|
square {
|
||||||
compatible = "demo-shape";
|
compatible = "demo-shape";
|
||||||
|
@ -101,7 +101,6 @@ CONFIG_SYSCON=y
|
|||||||
CONFIG_SPL_SYSCON=y
|
CONFIG_SPL_SYSCON=y
|
||||||
CONFIG_DEVRES=y
|
CONFIG_DEVRES=y
|
||||||
CONFIG_DEBUG_DEVRES=y
|
CONFIG_DEBUG_DEVRES=y
|
||||||
# CONFIG_SPL_SIMPLE_BUS is not set
|
|
||||||
CONFIG_ADC=y
|
CONFIG_ADC=y
|
||||||
CONFIG_ADC_SANDBOX=y
|
CONFIG_ADC_SANDBOX=y
|
||||||
CONFIG_AXI=y
|
CONFIG_AXI=y
|
||||||
|
@ -39,7 +39,9 @@ obj-$(CONFIG_SYS_I2C_RCAR_I2C) += rcar_i2c.o
|
|||||||
obj-$(CONFIG_SYS_I2C_RCAR_IIC) += rcar_iic.o
|
obj-$(CONFIG_SYS_I2C_RCAR_IIC) += rcar_iic.o
|
||||||
obj-$(CONFIG_SYS_I2C_ROCKCHIP) += rk_i2c.o
|
obj-$(CONFIG_SYS_I2C_ROCKCHIP) += rk_i2c.o
|
||||||
obj-$(CONFIG_SYS_I2C_S3C24X0) += s3c24x0_i2c.o exynos_hs_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
|
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_SH) += sh_i2c.o
|
||||||
obj-$(CONFIG_SYS_I2C_SOFT) += soft_i2c.o
|
obj-$(CONFIG_SYS_I2C_SOFT) += soft_i2c.o
|
||||||
obj-$(CONFIG_SYS_I2C_STM32F7) += stm32f7_i2c.o
|
obj-$(CONFIG_SYS_I2C_STM32F7) += stm32f7_i2c.o
|
||||||
|
@ -210,11 +210,11 @@ DM_TEST(dm_test_of_plat_phandle, UT_TESTF_SCAN_PDATA);
|
|||||||
/* Test that device parents are correctly set up */
|
/* Test that device parents are correctly set up */
|
||||||
static int dm_test_of_plat_parent(struct unit_test_state *uts)
|
static int dm_test_of_plat_parent(struct unit_test_state *uts)
|
||||||
{
|
{
|
||||||
struct udevice *rtc, *i2c;
|
struct udevice *dev, *bus;
|
||||||
|
|
||||||
ut_assertok(uclass_first_device_err(UCLASS_RTC, &rtc));
|
ut_assertok(uclass_first_device_err(UCLASS_SIMPLE_BUS, &bus));
|
||||||
ut_assertok(uclass_first_device_err(UCLASS_I2C, &i2c));
|
ut_assertok(device_first_child_err(bus, &dev));
|
||||||
ut_asserteq_ptr(i2c, dev_get_parent(rtc));
|
ut_asserteq_ptr(bus, dev_get_parent(dev));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user