aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBiwen Li <biwen.li@nxp.com>2019-12-31 15:33:38 +0800
committerPriyanka Jain <priyanka.jain@nxp.com>2020-02-04 16:20:25 +0530
commitbeadf4f28c567723eac337a5dfc7821e7c613d13 (patch)
treee28dafad33f78a51f4e1af455218035e09e1b723
parent42cd5cbce44e9651dd43231c5d367b8466910b92 (diff)
downloadu-boot-beadf4f28c567723eac337a5dfc7821e7c613d13.zip
u-boot-beadf4f28c567723eac337a5dfc7821e7c613d13.tar.gz
u-boot-beadf4f28c567723eac337a5dfc7821e7c613d13.tar.bz2
armv8: fsl-layerscape: spl: fix build error when DM_I2C is enabled
Fix below SPL build error when DM_I2C is enabled, - arch/arm/cpu/armv8/built-in.o: In function `board_init_f: arch/arm/cpu/armv8/fsl-layerscape/spl.c:74: undefined reference to `i2c_init_all' arch/arm/cpu/armv8/fsl-layerscape/spl.c:74:(.text.board_init_f+0x30): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `i2c_init_all' make[2]: *** [spl/u-boot-spl] Error 1 make[1]: *** [spl/u-boot-spl] Error 2 make: *** [sub-make] Error 2 arch/arm/cpu/armv8/fsl-layerscape/spl.c: In function 'board_init_f': arch/arm/cpu/armv8/fsl-layerscape/spl.c:74:2: warning: implicit declaration of function 'i2c_init_all'; did you mean 'misc_init_r'? [-Wimplicit-function-declaration]` Signed-off-by: Biwen Li <biwen.li@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/spl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 8a6eeca..accad6e 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -72,9 +72,11 @@ void board_init_f(ulong dummy)
preloader_console_init();
spl_set_bd();
+#ifdef CONFIG_SYS_I2C
#ifdef CONFIG_SPL_I2C_SUPPORT
i2c_init_all();
#endif
+#endif
#ifdef CONFIG_VID
init_func_vid();
#endif