]> git.sur5r.net Git - u-boot/blobdiff - board/freescale/mx53loco/mx53loco.c
env: Rename setenv() to env_set()
[u-boot] / board / freescale / mx53loco / mx53loco.c
index b32a97ff1a58f17fac30dfd51f3a616b083bad93..ea3660368603bbc0cf1be49a4564db8ab00a8bc3 100644 (file)
@@ -13,8 +13,8 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux-mx53.h>
 #include <asm/arch/clock.h>
-#include <asm/errno.h>
-#include <asm/imx-common/mx5_video.h>
+#include <linux/errno.h>
+#include <asm/mach-imx/mx5_video.h>
 #include <netdev.h>
 #include <i2c.h>
 #include <mmc.h>
@@ -58,13 +58,15 @@ int dram_init(void)
        return 0;
 }
 
-void dram_init_banksize(void)
+int dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = mx53_dram_size[0];
 
        gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
        gd->bd->bi_dram[1].size = mx53_dram_size[1];
+
+       return 0;
 }
 
 u32 get_board_rev(void)
@@ -186,7 +188,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_ESDHC3_CLK);
@@ -205,12 +207,14 @@ 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
 
@@ -242,6 +246,8 @@ static int power_init(void)
                if (!p)
                        return -ENODEV;
 
+               env_set("fdt_file", "imx53-qsb.dtb");
+
                /* Set VDDA to 1.25V */
                val = DA9052_BUCKCORE_BCOREEN | DA_BUCKCORE_VBCORE_1_250V;
                ret = pmic_reg_write(p, DA9053_BUCKCORE_REG, val);
@@ -283,6 +289,8 @@ static int power_init(void)
                if (!p)
                        return -ENODEV;
 
+               env_set("fdt_file", "imx53-qsrb.dtb");
+
                /* Set VDDGP to 1.25V for 1GHz on SW1 */
                pmic_reg_read(p, REG_SW_0, &val);
                val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_250V_MC34708;
@@ -360,22 +368,6 @@ int board_early_init_f(void)
        return 0;
 }
 
-#if defined(CONFIG_DISPLAY_CPUINFO)
-int print_cpuinfo(void)
-{
-       u32 cpurev;
-
-       cpurev = get_cpu_rev();
-       printf("CPU:   Freescale i.MX%x family rev%d.%d at %d MHz\n",
-               (cpurev & 0xFF000) >> 12,
-               (cpurev & 0x000F0) >> 4,
-               (cpurev & 0x0000F) >> 0,
-               mxc_get_clock(MXC_ARM_CLK) / 1000000);
-       printf("Reset cause: %s\n", get_reset_cause());
-       return 0;
-}
-#endif
-
 /*
  * Do not overwrite the console
  * Use always serial for U-Boot console
@@ -399,7 +391,6 @@ int board_late_init(void)
 {
        if (!power_init())
                clock_1GHz();
-       print_cpuinfo();
 
        return 0;
 }