]> git.sur5r.net Git - u-boot/blobdiff - board/keymile/common/common.c
env: Rename setenv() to env_set()
[u-boot] / board / keymile / common / common.c
index a42f3eca33b3f22b1721879da42116d03b9f7d99..56d304424108f4897a3da0705537ebd99f486021 100644 (file)
@@ -51,24 +51,24 @@ int set_km_env(void)
        pnvramaddr = gd->ram_size - CONFIG_KM_RESERVED_PRAM - CONFIG_KM_PHRAM
                        - CONFIG_KM_PNVRAM;
        sprintf((char *)buf, "0x%x", pnvramaddr);
-       setenv("pnvramaddr", (char *)buf);
+       env_set("pnvramaddr", (char *)buf);
 
-       /* try to read rootfssize (ram image) from envrionment */
+       /* try to read rootfssize (ram image) from environment */
        p = getenv("rootfssize");
        if (p != NULL)
                strict_strtoul(p, 16, &rootfssize);
        pram = (rootfssize + CONFIG_KM_RESERVED_PRAM + CONFIG_KM_PHRAM +
                CONFIG_KM_PNVRAM) / 0x400;
        sprintf((char *)buf, "0x%x", pram);
-       setenv("pram", (char *)buf);
+       env_set("pram", (char *)buf);
 
        varaddr = gd->ram_size - CONFIG_KM_RESERVED_PRAM - CONFIG_KM_PHRAM;
        sprintf((char *)buf, "0x%x", varaddr);
-       setenv("varaddr", (char *)buf);
+       env_set("varaddr", (char *)buf);
 
        kernelmem = gd->ram_size - 0x400 * pram;
        sprintf((char *)buf, "0x%x", kernelmem);
-       setenv("kernelmem", (char *)buf);
+       env_set("kernelmem", (char *)buf);
 
        return 0;
 }
@@ -169,7 +169,7 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc,
                return 1;
        }
        strcpy((char *)buf, p);
-       setenv("boardid", (char *)buf);
+       env_set("boardid", (char *)buf);
        printf("set boardid=%s\n", buf);
 
        p = get_local_var("IVM_HWKey");
@@ -178,7 +178,7 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc,
                return 1;
        }
        strcpy((char *)buf, p);
-       setenv("hwkey", (char *)buf);
+       env_set("hwkey", (char *)buf);
        printf("set hwkey=%s\n", buf);
        printf("Execute manually saveenv for persistent storage.\n");
 
@@ -311,9 +311,9 @@ static int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc,
                                        envbid   = bid;
                                        envhwkey = hwkey;
                                        sprintf(buf, "%lx", bid);
-                                       setenv("boardid", buf);
+                                       env_set("boardid", buf);
                                        sprintf(buf, "%lx", hwkey);
-                                       setenv("hwkey", buf);
+                                       env_set("hwkey", buf);
                                }
                        } /* end while( ! found ) */
                }
@@ -354,9 +354,6 @@ static int do_checktestboot(cmd_tbl_t *cmdtp, int flag, int argc,
 
 #if defined(CONFIG_POST)
        testpin = post_hotkeys_pressed();
-#endif
-#if defined(CONFIG_MGCOGE3NE)
-       testpin = get_testpin();
 #endif
        s = getenv("test_bank");
        /* when test_bank is not set, act as if testpin is not asserted */