The i2c_eeprom isn't always necessary when building for SPL,
add the condition on build i2c_eeprom.

Signed-off-by: Wenyou Yang <[email protected]>
---

 drivers/misc/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 10265c8fb4..ccc84c38fc 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -20,7 +20,13 @@ obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o
 endif
 obj-$(CONFIG_FSL_IIM) += fsl_iim.o
 obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o
+ifdef CONFIG_SPL_BUILD
+ifneq ($(CONFIG_SPL_I2C_SUPPORT),)
+obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o
+endif
+else
 obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o
+endif
 obj-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o
 obj-$(CONFIG_MXC_OCOTP) += mxc_ocotp.o
 obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.o
-- 
2.13.0

_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to