exynos4-dt: fix build error caused by rebase 55/140655/4
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 26 Jul 2017 01:53:06 +0000 (10:53 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 27 Jul 2017 03:15:36 +0000 (12:15 +0900)
There are build errors, caused by rebase, with not defiend macro and
not matched function definition with specific config options.
Replace with proper macro and add proper build macro check for pmic
fuinctions to fix the build errors.

Change-Id: Id5e2cf5b87681af22cc362c67262545457130280
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
board/samsung/common/exynos4-dt.c

index 84f7fa8219dd440aa9d193c743f54f94f4e704af..bb4cdd76a5070a5178a9a8dfc5923a194efbe14f 100644 (file)
@@ -875,11 +875,12 @@ struct dwc2_plat_otg_data s5pc210_otg_data = {
 int board_usb_init(int index, enum usb_init_type init)
 {
 #ifdef CONFIG_CMD_USB
+#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
        struct pmic *p_pmic;
 
        /* Set Ref freq 0 => 24MHz, 1 => 26MHz*/
        /* Odroid Us have it at 24MHz, Odroid Xs at 26MHz */
-       if (gd->board_type == ODROID_TYPE_U3)
+       if (gd->board_type == BOARD_TYPE_ODROID_U3)
                gpio_direction_output(EXYNOS4X12_GPIO_X30, 0);
        else
                gpio_direction_output(EXYNOS4X12_GPIO_X30, 1);
@@ -898,7 +899,7 @@ int board_usb_init(int index, enum usb_init_type init)
                max77686_set_buck_voltage(p_pmic, 8, 750000);
                max77686_set_buck_voltage(p_pmic, 8, 3300000);
        }
-
+#endif /* !CONFIG_DM_I2C */
 #endif
 
        debug("USB_udc_probe\n");