]> git.sur5r.net Git - u-boot/blobdiff - board/compulab/cm_fx6/cm_fx6.c
env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()
[u-boot] / board / compulab / cm_fx6 / cm_fx6.c
index 566c19b4c99b9d7fd87acc50aeed5a88929121be..a1da2780aa444b5799d002dee8773ff76ccaffa1 100644 (file)
@@ -23,9 +23,9 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mxc_hdmi.h>
-#include <asm/imx-common/mxc_i2c.h>
-#include <asm/imx-common/sata.h>
-#include <asm/imx-common/video.h>
+#include <asm/mach-imx/mxc_i2c.h>
+#include <asm/mach-imx/sata.h>
+#include <asm/mach-imx/video.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <dm/platform_data/serial_mxc.h>
@@ -114,10 +114,10 @@ int board_video_skip(void)
 {
        int ret;
        struct display_info_t *preset;
-       char const *panel = getenv("displaytype");
+       char const *panel = env_get("displaytype");
 
        if (!panel) /* Also accept panel for backward compatibility */
-               panel = getenv("panel");
+               panel = env_get("panel");
 
        if (!panel)
                return -ENOENT;
@@ -470,7 +470,7 @@ static int handle_mac_address(char *env_var, uint eeprom_bus)
        unsigned char enetaddr[6];
        int rc;
 
-       rc = eth_getenv_enetaddr(env_var, enetaddr);
+       rc = eth_env_get_enetaddr(env_var, enetaddr);
        if (rc)
                return 0;
 
@@ -481,7 +481,7 @@ static int handle_mac_address(char *env_var, uint eeprom_bus)
        if (!is_valid_ethaddr(enetaddr))
                return -1;
 
-       return eth_setenv_enetaddr(env_var, enetaddr);
+       return eth_env_set_enetaddr(env_var, enetaddr);
 }
 
 #define SB_FX6_I2C_EEPROM_BUS  0
@@ -588,7 +588,7 @@ struct node_info nodes[] = {
        /*
         * Both entries target the same flash chip. The st,m25p compatible
         * is used in the vendor device trees, while upstream uses (the
-        * documented) jedec,spi-nor comptatible.
+        * documented) jedec,spi-nor compatible.
         */
        { "st,m25p",    MTD_DEV_TYPE_NOR,       },
        { "jedec,spi-nor",      MTD_DEV_TYPE_NOR,       },
@@ -602,20 +602,22 @@ int ft_board_setup(void *blob, bd_t *bd)
        char baseboard_name[16];
        int err;
 
-       fdt_shrink_to_minimum(blob); /* Make room for new properties */
+       fdt_shrink_to_minimum(blob, 0); /* Make room for new properties */
 
        /* MAC addr */
-       if (eth_getenv_enetaddr("ethaddr", enetaddr)) {
+       if (eth_env_get_enetaddr("ethaddr", enetaddr)) {
                fdt_find_and_setprop(blob,
                                     "/soc/aips-bus@02100000/ethernet@02188000",
                                     "local-mac-address", enetaddr, 6, 1);
        }
 
-       if (eth_getenv_enetaddr("eth1addr", enetaddr)) {
+       if (eth_env_get_enetaddr("eth1addr", enetaddr)) {
                fdt_find_and_setprop(blob, "/eth@pcie", "local-mac-address",
                                     enetaddr, 6, 1);
        }
 
+       fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+
        baseboard_rev = cl_eeprom_get_board_rev(0);
        err = cl_eeprom_get_product_name((uchar *)baseboard_name, 0);
        if (err || baseboard_rev == 0)
@@ -630,8 +632,6 @@ int ft_board_setup(void *blob, bd_t *bd)
                                     NULL, 0, 1);
        }
 
-       fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
-
        return 0;
 }
 #endif
@@ -688,7 +688,7 @@ int misc_init_r(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[1].start = PHYS_SDRAM_2;
@@ -720,6 +720,8 @@ void dram_init_banksize(void)
                gd->bd->bi_dram[1].size = 0x7FF00000;
                break;
        }
+
+       return 0;
 }
 
 int dram_init(void)