env: Rename getenv/_f() to env_get()
[oweals/u-boot.git] / board / freescale / mx51evk / mx51evk.c
index d01465ecaef0d5b8244a3613bbc442b9354ba847..a88ff8fe132f7dd7f08635a4f44ea95dc40f88ec 100644 (file)
@@ -9,18 +9,18 @@
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-mx51.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
-#include <asm/imx-common/mx5_video.h>
+#include <asm/mach-imx/mx5_video.h>
 #include <i2c.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <power/pmic.h>
 #include <fsl_pmic.h>
 #include <mc13892.h>
-#include <usb/ehci-fsl.h>
+#include <usb/ehci-ci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -112,7 +112,7 @@ static void setup_iomux_spi(void)
 #ifdef CONFIG_USB_EHCI_MX5
 #define MX51EVK_USBH1_HUB_RST  IMX_GPIO_NR(1, 7)
 #define MX51EVK_USBH1_STP      IMX_GPIO_NR(1, 27)
-#define MX51EVK_USB_CLK_EN_B   IMX_GPIO_NR(2, 2)
+#define MX51EVK_USB_CLK_EN_B   IMX_GPIO_NR(2, 1)
 #define MX51EVK_USB_PHY_RESET  IMX_GPIO_NR(2, 5)
 
 static void setup_usb_h1(void)
@@ -174,7 +174,7 @@ static void power_init(void)
        struct pmic *p;
        int ret;
 
-       ret = pmic_init(I2C_PMIC);
+       ret = pmic_init(CONFIG_FSL_PMIC_BUS);
        if (ret)
                return;
 
@@ -320,7 +320,7 @@ int board_mmc_init(bd_t *bis)
        };
 
        u32 index;
-       s32 status = 0;
+       int ret;
 
        esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
        esdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
@@ -340,11 +340,13 @@ int board_mmc_init(bd_t *bis)
                        printf("Warning: you configured more ESDHC controller"
                                "(%d) as supported by the board(2)\n",
                                CONFIG_SYS_FSL_ESDHC_NUM);
-                       return status;
+                       return -EINVAL;
                }
-               status |= fsl_esdhc_initialize(bis, &esdhc_cfg[index]);
+               ret = fsl_esdhc_initialize(bis, &esdhc_cfg[index]);
+               if (ret)
+                       return ret;
        }
-       return status;
+       return 0;
 }
 #endif