freescale: ls1043aqds: drop ifdef CONFIG_SYS_I2C
authorBiwen Li <biwen.li@nxp.com>
Thu, 2 Jul 2020 03:13:04 +0000 (11:13 +0800)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 27 Jul 2020 08:46:29 +0000 (14:16 +0530)
- 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@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
board/freescale/ls1043aqds/ls1043aqds.c

index 8c0d0db..ef0f2e6 100644 (file)
@@ -50,6 +50,10 @@ enum {
 #define CFG_UART_MUX_SHIFT     1
 #define CFG_LPUART_EN          0x1
 
+#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] = {
        {
@@ -467,11 +471,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