]> git.sur5r.net Git - u-boot/blobdiff - board/ti/am335x/board.c
env: Rename setenv() to env_set()
[u-boot] / board / ti / am335x / board.c
index 517965c0f03cf522846fe7c823a1ca41f8f2aee9..5751b814ca263f5649ad718634e7cb40c2ee8210 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
+#include <asm/omap_common.h>
 #include <asm/omap_sec_common.h>
 #include <asm/omap_mmc.h>
 #include <i2c.h>
@@ -248,7 +249,7 @@ int spl_start_uboot(void)
 
 #ifdef CONFIG_SPL_ENV_SUPPORT
        env_init();
-       env_relocate_spec();
+       env_load();
        if (getenv_yesno("boot_os") != 1)
                return 1;
 #endif
@@ -343,14 +344,6 @@ static void scale_vcores_bone(int freq)
        if (board_is_bone_lt())
                freq = MPUPLL_M_1000;
 
-       if (freq == MPUPLL_M_1000) {
-               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
-               mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
-       } else {
-               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
-               mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
-       }
-
        switch (freq) {
        case MPUPLL_M_1000:
                mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
@@ -358,15 +351,16 @@ static void scale_vcores_bone(int freq)
                break;
        case MPUPLL_M_800:
                mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
-               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
+               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
                break;
        case MPUPLL_M_720:
                mpu_vdd = TPS65217_DCDC_VOLT_SEL_1200MV;
-               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
+               usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
                break;
        case MPUPLL_M_600:
        case MPUPLL_M_500:
        case MPUPLL_M_300:
+       default:
                mpu_vdd = TPS65217_DCDC_VOLT_SEL_1100MV;
                usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
                break;
@@ -469,7 +463,7 @@ void scale_vcores(void)
        gpi2c_init();
        freq = am335x_get_efuse_mpu_max_freq(cdev);
 
-       if (board_is_bone())
+       if (board_is_beaglebonex())
                scale_vcores_bone(freq);
        else
                scale_vcores_generic(freq);
@@ -737,7 +731,7 @@ int board_late_init(void)
         * on HS devices.
         */
        if (get_device_type() == HS_DEVICE)
-               setenv("boot_fit", "1");
+               env_set("boot_fit", "1");
 #endif
 
 #if !defined(CONFIG_SPL_BUILD)