]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/env_nvram.c
x86: Support adding coreboot timestanps to bootstage
[karo-tx-uboot.git] / common / env_nvram.c
index 726eaac55efd3ceb1ee341d6f1efbbe9dcd41540..eab0e7be0ecb90bc11f842dbe521e3df3c60f9dc 100644 (file)
@@ -59,18 +59,16 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
 
 char *env_name_spec = "NVRAM";
 
+#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
 uchar env_get_char_spec(int index)
 {
-#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
        uchar c;
 
        nvram_read(&c, CONFIG_ENV_ADDR + index, 1);
 
        return c;
-#else
-       return *((uchar *)(gd->env_addr + index));
-#endif
 }
+#endif
 
 void env_relocate_spec(void)
 {
@@ -92,7 +90,7 @@ int saveenv(void)
        int     rcode = 0;
 
        res = (char *)&env_new.data;
-       len = hexport_r(&env_htab, '\0', &res, ENV_SIZE, 0, NULL);
+       len = hexport_r(&env_htab, '\0', 0, &res, ENV_SIZE, 0, NULL);
        if (len < 0) {
                error("Cannot export environment: errno = %d\n", errno);
                return 1;