aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2021-10-08 00:17:17 -0500
committerAndre Przywara <andre.przywara@arm.com>2021-10-12 09:49:09 +0100
commitea261fdeb23d54ee17a5e5a95cf35f97180deb76 (patch)
tree44d15efbbbf0e06537bcf09fd9063859f40e5086
parent526c4f2e43bb61b849817ed069607dd2c475a17c (diff)
downloadu-boot-ea261fdeb23d54ee17a5e5a95cf35f97180deb76.zip
u-boot-ea261fdeb23d54ee17a5e5a95cf35f97180deb76.tar.gz
u-boot-ea261fdeb23d54ee17a5e5a95cf35f97180deb76.tar.bz2
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: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-by: Andre Przywara <andre.przywara@arm.com>
-rw-r--r--arch/arm/mach-sunxi/board.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 373cb56..b4ba2a7 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -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