diff mbox series

[3/5] freescale: ls1046aqds: drop ifdef CONFIG_SYS_I2C

Message ID 20200701094330.27091-3-biwen.li@oss.nxp.com
State Superseded
Headers show
Series [1/5] i2c: mxc: move i2c_early_init_f to common function | expand

Commit Message

Biwen Li (OSS) July 1, 2020, 9:43 a.m. UTC
From: Biwen Li <biwen.li at nxp.com>

- Drop ifdef CONFIG_SYS_I2C to initialize
  baudrate of i2c

- Drop warning of i2c_early_init_f as follows,
  warning: implicit declaration of function 'i2c_early_init_f'; did you
  mean 'arch_early_init_r'? [-Wimplicit-function-declaration]

Signed-off-by: Biwen Li <biwen.li at nxp.com>
---
 board/freescale/ls1046aqds/ls1046aqds.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/board/freescale/ls1046aqds/ls1046aqds.c b/board/freescale/ls1046aqds/ls1046aqds.c
index c6f79c9..fbe0511 100644
--- a/board/freescale/ls1046aqds/ls1046aqds.c
+++ b/board/freescale/ls1046aqds/ls1046aqds.c
@@ -34,6 +34,10 @@ 
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_SYS_I2C_EARLY_INIT
+void i2c_early_init_f(void);
+#endif
+
 #ifdef CONFIG_TFABOOT
 struct ifc_regs ifc_cfg_nor_boot[CONFIG_SYS_FSL_IFC_BANK_COUNT] = {
 	{
@@ -336,11 +340,9 @@  int board_early_init_f(void)
 	 */
 	out_le32(cntcr, 0x1);
 
-#ifdef CONFIG_SYS_I2C
 #ifdef CONFIG_SYS_I2C_EARLY_INIT
 	i2c_early_init_f();
 #endif
-#endif
 	fsl_lsch2_early_init_f();
 
 #ifdef CONFIG_HAS_FSL_XHCI_USB