提交 ea261fde 编写于 作者: S Samuel Holland 提交者: Andre Przywara

sunxi: Only initialize legacy I2C when enabled

CONFIG_SPL_I2C is the wrong symbol to use here. It is the top-level
Kconfig symbol (not specific to either legacy or DM I2C), whereas the
i2c_init() function is specific to legacy I2C. This change fixes a
build failure when enabling SPL_I2C but not SPL_SYS_I2C_LEGACY.
Signed-off-by: NSamuel Holland <samuel@sholland.org>
Reviewed-by: NAndre Przywara <andre.przywara@arm.com>
Signed-by: NAndre Przywara <andre.przywara@arm.com>
上级 526c4f2e
......@@ -338,7 +338,7 @@ void board_init_f(ulong dummy)
spl_init();
preloader_console_init();
#ifdef CONFIG_SPL_I2C
#if CONFIG_IS_ENABLED(I2C) && CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
/* Needed early by sunxi_board_init if PMU is enabled */
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册