i2c: Convert CONFIG_POWER_I2C et al to Kconfig
[platform/kernel/u-boot.git] / board / compulab / cl-som-imx7 / cl-som-imx7.c
index dfa81f5..3ee1335 100644 (file)
@@ -1,19 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * U-Boot board functions for CompuLab CL-SOM-iMX7 module
  *
  * (C) Copyright 2017 CompuLab, Ltd. http://www.compulab.com
  *
  * Author: Uri Mashiach <uri.mashiach@compulab.co.il>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
-#include <environment.h>
+#include <env.h>
+#include <init.h>
 #include <mmc.h>
+#include <net.h>
 #include <phy.h>
 #include <netdev.h>
-#include <fsl_esdhc.h>
+#include <fsl_esdhc_imx.h>
+#include <asm/global_data.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/pfuze3000_pmic.h>
 #include <asm/mach-imx/mxc_i2c.h>
@@ -69,7 +72,7 @@ int dram_init(void)
        return 0;
 }
 
-#ifdef CONFIG_FSL_ESDHC
+#ifdef CONFIG_FSL_ESDHC_IMX
 
 #define CL_SOM_IMX7_GPIO_USDHC3_PWR    IMX_GPIO_NR(6, 11)
 
@@ -78,7 +81,7 @@ static struct fsl_esdhc_cfg cl_som_imx7_usdhc_cfg[3] = {
        {USDHC3_BASE_ADDR},
 };
 
-int board_mmc_init(bd_t *bis)
+int board_mmc_init(struct bd_info *bis)
 {
        int i, ret;
        /*
@@ -117,7 +120,7 @@ int board_mmc_init(bd_t *bis)
 
        return 0;
 }
-#endif /* CONFIG_FSL_ESDHC */
+#endif /* CONFIG_FSL_ESDHC_IMX */
 
 #ifdef CONFIG_FEC_MXC
 
@@ -197,7 +200,7 @@ static int cl_som_imx7_handle_mac_address(char *env_var, uint eeprom_bus)
 
 #define CL_SOM_IMX7_FEC_DEV_ID_PRI 0
 
-int board_eth_init(bd_t *bis)
+int board_eth_init(struct bd_info *bis)
 {
        /* set Ethernet MAC address environment */
        cl_som_imx7_handle_mac_address("ethaddr", CONFIG_SYS_I2C_EEPROM_BUS);
@@ -264,7 +267,7 @@ int board_init(void)
        return 0;
 }
 
-#ifdef CONFIG_POWER
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
 #define I2C_PMIC       0
 int power_init_board(void)
 {
@@ -290,7 +293,7 @@ int power_init_board(void)
 
        return 0;
 }
-#endif /* CONFIG_POWER */
+#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
 
 /*
  * cl_som_imx7_setup_wdog() - watchdog configuration.