@@ -97,7 +97,10 @@
* I2C
*/
#define CONFIG_CMD_I2C
+
+#ifndef CONFIG_DM_I2C
#define CONFIG_SYS_I2C
+#endif
#define CONFIG_SYS_I2C_MXC
#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
@@ -331,7 +331,9 @@ unsigned long get_board_ddr_clk(void);
/*
* I2C
*/
+#ifndef CONFIG_DM_I2C
#define CONFIG_SYS_I2C
+#endif
#define CONFIG_SYS_I2C_MXC
#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
@@ -107,7 +107,9 @@
#define CONFIG_BAUDRATE 115200
/* I2C */
+#ifndef CONFIG_DM_I2C
#define CONFIG_SYS_I2C
+#endif
#define CONFIG_SYS_I2C_MXC
#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
@@ -209,7 +209,9 @@
/*
* I2C
*/
+#ifndef CONFIG_DM_I2C
#define CONFIG_SYS_I2C
+#endif
#define CONFIG_SYS_I2C_MXC
#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
This fixes compilation error as follows: - In file included from include/config.h:9:0, from ./include/common.h:23: include/config_fallbacks.h:51:4: error: #error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used" # error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used" ^~~~~ In file included from include/config.h:9:0, from ./include/common.h:23: include/config_fallbacks.h:51:4: error: #error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used" # error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used" ^~~~~ scripts/Makefile.autoconf:48: recipe for target include/autoconf.mk.dep failed make[1]: *** [include/autoconf.mk.dep] Error 1 make[1]: *** Waiting for unfinished jobs.... scripts/Makefile.autoconf:77: recipe for target u-boot.cfg failed make[1]: *** [u-boot.cfg] Error 1 make: *** No rule to make target include/config/auto.conf, needed by include/config/uboot.release. Stop. Signed-off-by: Biwen Li <biwen.li@nxp.com> --- include/configs/ls1021aiot.h | 3 +++ include/configs/ls1021aqds.h | 2 ++ include/configs/ls1021atsn.h | 2 ++ include/configs/ls1021atwr.h | 2 ++ 4 files changed, 9 insertions(+)