diff --git a/README b/README
index c9fb284378e9e53acb7f02de8e4cbd1b32c170ec..b6bf451400e9e0f94497d9e08b02e4fd51174a8b 100644
--- a/README
+++ b/README
@@ -2572,7 +2572,7 @@ to save the current settings.
 
 Please note that the environment is read-only until the monitor
 has been relocated to RAM and a RAM copy of the environment has been
-created; also, when using EEPROM you will have to use getenv_r()
+created; also, when using EEPROM you will have to use getenv_f()
 until then to read environment variables.
 
 The environment is protected by a CRC32 checksum. Before the monitor
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index f5660a985b7a5eab87000bec9c24dc380aaa807e..54519b0e1d87fb0b3c4cebfac70c6f5a158b74ee 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -125,7 +125,7 @@ void blue_LED_off(void) __attribute__((weak, alias("__blue_LED_off")));
 static int init_baudrate (void)
 {
 	char tmp[64];	/* long enough for environment variables */
-	int i = getenv_r ("baudrate", tmp, sizeof (tmp));
+	int i = getenv_f("baudrate", tmp, sizeof (tmp));
 	gd->bd->bi_baudrate = gd->baudrate = (i > 0)
 			? (int) simple_strtoul (tmp, NULL, 10)
 			: CONFIG_BAUDRATE;
diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c
index 254aecff510eb035e780007a095b82786dd0f4a3..9e741d22e2cc0661852d45b54243c835519c3d6a 100644
--- a/arch/avr32/lib/board.c
+++ b/arch/avr32/lib/board.c
@@ -102,7 +102,7 @@ static int init_baudrate(void)
 	char tmp[64];
 	int i;
 
-	i = getenv_r("baudrate", tmp, sizeof(tmp));
+	i = getenv_f("baudrate", tmp, sizeof(tmp));
 	if (i > 0) {
 		gd->baudrate = simple_strtoul(tmp, NULL, 10);
 	} else {
diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index 4e9bb19226c25a36d60435b994fe4a82a18e9044..2d3230cd64b8a9ca94a845d52e2d417212272fb5 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -64,7 +64,7 @@ static int display_banner(void)
 static int init_baudrate(void)
 {
 	char baudrate[15];
-	int i = getenv_r("baudrate", baudrate, sizeof(baudrate));
+	int i = getenv_f("baudrate", baudrate, sizeof(baudrate));
 	gd->bd->bi_baudrate = gd->baudrate = (i > 0)
 	    ? simple_strtoul(baudrate, NULL, 10)
 	    : CONFIG_BAUDRATE;
diff --git a/arch/blackfin/lib/post.c b/arch/blackfin/lib/post.c
index faf6b96ba2745dd31c2755ed0842293edb943ea6..bd6aaf5d4d79af54fe40bb015e922a0cff1fec35 100644
--- a/arch/blackfin/lib/post.c
+++ b/arch/blackfin/lib/post.c
@@ -168,7 +168,7 @@ static void post_get_flags(int *test_flags)
 	}
 
 	for (i = 0; i < varnum; i++) {
-		if (getenv_r(var[i], list, sizeof(list)) <= 0)
+		if (getenv_f(var[i], list, sizeof(list)) <= 0)
 			continue;
 
 		for (j = 0; j < post_list_size; j++) {
diff --git a/arch/i386/lib/board.c b/arch/i386/lib/board.c
index 0adc66455a366ae7baa2d8cdd443c836de970143..684cdb84a3340e88dae75ad0064e41da7c6b6520 100644
--- a/arch/i386/lib/board.c
+++ b/arch/i386/lib/board.c
@@ -69,7 +69,7 @@ const char version_string[] =
 static int init_baudrate (void)
 {
 	char tmp[64];	/* long enough for environment variables */
-	int i = getenv_r("baudrate", tmp, 64);
+	int i = getenv_f("baudrate", tmp, 64);
 
 	gd->baudrate = (i != 0)
 			? (int) simple_strtoul (tmp, NULL, 10)
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
index 732023d67c008466c519bbf07840e8c495af1845..b254079ae711d27b87ae9c35c210020e167e1457 100644
--- a/arch/m68k/lib/board.c
+++ b/arch/m68k/lib/board.c
@@ -134,7 +134,7 @@ typedef int (init_fnc_t) (void);
 static int init_baudrate (void)
 {
 	char tmp[64];	/* long enough for environment variables */
-	int i = getenv_r ("baudrate", tmp, sizeof (tmp));
+	int i = getenv_f("baudrate", tmp, sizeof (tmp));
 
 	gd->baudrate = (i > 0)
 			? (int) simple_strtoul (tmp, NULL, 10)
@@ -278,7 +278,7 @@ board_init_f (ulong bootflag)
 	/*
 	 * reserve protected RAM
 	 */
-	i = getenv_r ("pram", tmp, sizeof (tmp));
+	i = getenv_f("pram", tmp, sizeof (tmp));
 	reg = (i > 0) ? simple_strtoul (tmp, NULL, 10) : CONFIG_PRAM;
 	addr -= (reg << 10);		/* size is in kB */
 	debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr);
@@ -549,7 +549,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	 * Fill in missing fields of bd_info.
 	 * We do this here, where we have "normal" access to the
 	 * environment; we used to do this still running from ROM,
-	 * where had to use getenv_r(), which can be pretty slow when
+	 * where had to use getenv_f(), which can be pretty slow when
 	 * the environment is in EEPROM.
 	 */
 	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
diff --git a/arch/mips/cpu/incaip_clock.c b/arch/mips/cpu/incaip_clock.c
index fc2c62180b3e7a8f79b3fc553ac92efbe097a617..b65dfe0e1a0c35d5560d457ae5044fd520cf75ef 100644
--- a/arch/mips/cpu/incaip_clock.c
+++ b/arch/mips/cpu/incaip_clock.c
@@ -105,7 +105,7 @@ int incaip_set_cpuclk (void)
 	char tmp[64];
 	ulong cpuclk;
 
-	if (getenv_r ("cpuclk", tmp, sizeof (tmp)) > 0) {
+	if (getenv_f("cpuclk", tmp, sizeof (tmp)) > 0) {
 		cpuclk = simple_strtoul (tmp, NULL, 10) * 1000000;
 		cgu_init (cpuclk);
 		ebu_init (cpuclk);
diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
index b2d113e870acb85dacbbe089f753f334c1ab2988..ab4a17c9432a847a7a74cd454ae3eaa2722468c7 100644
--- a/arch/mips/lib/board.c
+++ b/arch/mips/lib/board.c
@@ -114,7 +114,7 @@ static void display_flash_config(ulong size)
 static int init_baudrate (void)
 {
 	char tmp[64];	/* long enough for environment variables */
-	int i = getenv_r ("baudrate", tmp, sizeof (tmp));
+	int i = getenv_f("baudrate", tmp, sizeof (tmp));
 
 	gd->baudrate = (i > 0)
 			? (int) simple_strtoul (tmp, NULL, 10)
diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index f309f29c0493422c2c09b73c319b1f2b2efe7729..6e13e5de028b800a4bb2721938aba056cc5b97ee 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -266,7 +266,7 @@ int get_clocks_866 (void)
 	long		  cpuclk = 0;
 	long		  sccr_reg;
 
-	if (getenv_r ("cpuclk", tmp, sizeof (tmp)) > 0)
+	if (getenv_f("cpuclk", tmp, sizeof (tmp)) > 0)
 		cpuclk = simple_strtoul (tmp, NULL, 10) * 1000000;
 
 	if ((CONFIG_SYS_8xx_CPUCLK_MIN > cpuclk) || (CONFIG_SYS_8xx_CPUCLK_MAX < cpuclk))
diff --git a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
index 2fee9956905af1cb4efd60a5f79ab7ccd1d22516..2cfc37f752dde014ebc67ff74de69571222d8249 100644
--- a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
+++ b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
@@ -985,7 +985,7 @@ u32 DQS_autocalibration(void)
 	puts(str);
 
 #if defined(DEBUG_PPC4xx_DDR_AUTOCALIBRATION)
-	i = getenv_r("autocalib", tmp, sizeof(tmp));
+	i = getenv_f("autocalib", tmp, sizeof(tmp));
 	if (i < 0)
 		strcpy(tmp, CONFIG_AUTOCALIB);
 
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index 7b09fb51e25d18a8bd865c0ddf2cd4d5298a2b42..0e00d8619ebfb130dfd08d31f74d47f3f3a12c2f 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -169,7 +169,7 @@ typedef int (init_fnc_t) (void);
 static int init_baudrate (void)
 {
 	char tmp[64];	/* long enough for environment variables */
-	int i = getenv_r ("baudrate", tmp, sizeof (tmp));
+	int i = getenv_f("baudrate", tmp, sizeof (tmp));
 
 	gd->baudrate = (i > 0)
 			? (int) simple_strtoul (tmp, NULL, 10)
@@ -442,7 +442,7 @@ void board_init_f (ulong bootflag)
 	/*
 	 * reserve protected RAM
 	 */
-	i = getenv_r ("pram", (char *)tmp, sizeof (tmp));
+	i = getenv_f("pram", (char *)tmp, sizeof (tmp));
 	reg = (i > 0) ? simple_strtoul ((const char *)tmp, NULL, 10) : CONFIG_PRAM;
 	addr -= (reg << 10);		/* size is in kB */
 	debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr);
@@ -790,7 +790,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	 * Fill in missing fields of bd_info.
 	 * We do this here, where we have "normal" access to the
 	 * environment; we used to do this still running from ROM,
-	 * where had to use getenv_r(), which can be pretty slow when
+	 * where had to use getenv_f(), which can be pretty slow when
 	 * the environment is in EEPROM.
 	 */
 
diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c
index b776c21d603443c3438dbc09c3f8fabc3a22ffd8..4f6970965b0e2529cfacda4a9b7aa585c4bdd0c8 100644
--- a/arch/sparc/lib/board.c
+++ b/arch/sparc/lib/board.c
@@ -88,7 +88,7 @@ ulong monitor_flash_len;
 static int init_baudrate(void)
 {
 	char tmp[64];		/* long enough for environment variables */
-	int i = getenv_r("baudrate", tmp, sizeof(tmp));
+	int i = getenv_f("baudrate", tmp, sizeof(tmp));
 
 	gd->baudrate = (i > 0)
 	    ? (int)simple_strtoul(tmp, NULL, 10)
diff --git a/board/Marvell/db64360/mv_eth.c b/board/Marvell/db64360/mv_eth.c
index d1ac0c5c588818a5136e1b506af8c606dad80302..30304b03248bfebaf3f44066655aadf21ac14b64 100644
--- a/board/Marvell/db64360/mv_eth.c
+++ b/board/Marvell/db64360/mv_eth.c
@@ -248,7 +248,7 @@ void mv6436x_eth_initialize (bd_t * bis)
 			return;
 		}
 
-		temp = getenv_r (s, buf, sizeof (buf));
+		temp = getenv_f(s, buf, sizeof (buf));
 		s = (temp > 0) ? buf : NULL;
 
 #ifdef DEBUG
@@ -351,7 +351,7 @@ void mv6436x_eth_initialize (bd_t * bis)
 			return;
 		}
 
-		temp = getenv_r (s, buf, sizeof (buf));
+		temp = getenv_f(s, buf, sizeof (buf));
 		s = (temp > 0) ? buf : NULL;
 
 #ifdef DEBUG
diff --git a/board/Marvell/db64460/mv_eth.c b/board/Marvell/db64460/mv_eth.c
index 58b63a314b1504d1db38d09770982913438b2296..cd9d5a47f7f29486efde4f08fef472593de904db 100644
--- a/board/Marvell/db64460/mv_eth.c
+++ b/board/Marvell/db64460/mv_eth.c
@@ -248,7 +248,7 @@ void mv6446x_eth_initialize (bd_t * bis)
 			return;
 		}
 
-		temp = getenv_r (s, buf, sizeof (buf));
+		temp = getenv_f(s, buf, sizeof (buf));
 		s = (temp > 0) ? buf : NULL;
 
 #ifdef DEBUG
@@ -350,7 +350,7 @@ void mv6446x_eth_initialize (bd_t * bis)
 			return;
 		}
 
-		temp = getenv_r (s, buf, sizeof (buf));
+		temp = getenv_f(s, buf, sizeof (buf));
 		s = (temp > 0) ? buf : NULL;
 
 #ifdef DEBUG
diff --git a/board/avnet/fx12mm/fx12mm.c b/board/avnet/fx12mm/fx12mm.c
index 48586459188b116dcc7ac9d2af27f6eb8f163641..e671a7bed12ff5fe6dfb7c04f3e68d0941ba13ae 100644
--- a/board/avnet/fx12mm/fx12mm.c
+++ b/board/avnet/fx12mm/fx12mm.c
@@ -34,7 +34,7 @@ int checkboard(void)
 {
 	char tmp[64];
 	char *s, *e;
-	int i = getenv_r("serial", tmp, sizeof(tmp));
+	int i = getenv_f("serial", tmp, sizeof(tmp));
 
 	if (i < 0) {
 		printf("Avnet Virtex4 FX12 with no serial #");
diff --git a/board/cray/L1/L1.c b/board/cray/L1/L1.c
index 1656e8ac03cab826eaea4e1b9083b2227e5141e9..33f2089c80720ff3384a10869f24c6585c20d985 100644
--- a/board/cray/L1/L1.c
+++ b/board/cray/L1/L1.c
@@ -245,7 +245,7 @@ int testdram (void)
 	uint *pend = (uint *) L1_MEMSIZE;
 	uint *p;
 
-	if (getenv_r("booted",NULL,0) <= 0)
+	if (getenv_f("booted",NULL,0) <= 0)
 	{
 		printf ("testdram..");
 	/*AA*/
diff --git a/board/dave/PPChameleonEVB/PPChameleonEVB.c b/board/dave/PPChameleonEVB/PPChameleonEVB.c
index 6bc70ef9a41f77be2982eded37873c63c7b820d9..8e26996bae1bd05b3ae1144bbc7d9eeea0003ae7 100644
--- a/board/dave/PPChameleonEVB/PPChameleonEVB.c
+++ b/board/dave/PPChameleonEVB/PPChameleonEVB.c
@@ -183,7 +183,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/adciop/adciop.c b/board/esd/adciop/adciop.c
index 63aaf2c7a9c3c1df1e4e0d0d488c2c603fe58873..8e007856be0485d2ddbf264d93f6709f95c0c4b5 100644
--- a/board/esd/adciop/adciop.c
+++ b/board/esd/adciop/adciop.c
@@ -62,7 +62,7 @@ int board_early_init_f (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof (str));
+	int i = getenv_f("serial#", str, sizeof (str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/apc405/apc405.c b/board/esd/apc405/apc405.c
index b58c1ebfad650e7af47269f7dee71aec3a7ac3d5..564ee00445c777f244504c52bb170afa8bb03a31 100644
--- a/board/esd/apc405/apc405.c
+++ b/board/esd/apc405/apc405.c
@@ -404,7 +404,7 @@ int misc_init_r(void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/ar405/ar405.c b/board/esd/ar405/ar405.c
index 21b2432c47e6628ae7adb30054e6c2d5b7c2d205..8879faf50f58dc618fd2e633bc8e27f78ca38bf4 100644
--- a/board/esd/ar405/ar405.c
+++ b/board/esd/ar405/ar405.c
@@ -151,7 +151,7 @@ int checkboard (void)
 	int index;
 	int len;
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof (str));
+	int i = getenv_f("serial#", str, sizeof (str));
 	const unsigned char *fpga;
 
 	puts ("Board: ");
diff --git a/board/esd/ash405/ash405.c b/board/esd/ash405/ash405.c
index 03c409829cae2d5f1f9c7d2ed70531ac65a78d82..ea280903044e795eed42477601db698e163bb893 100644
--- a/board/esd/ash405/ash405.c
+++ b/board/esd/ash405/ash405.c
@@ -173,7 +173,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/canbt/canbt.c b/board/esd/canbt/canbt.c
index bfec5489d656b7944edde463fafcd3344111b153..0d2d7f1499ecf87f61ff7df4b4711a7430a8519d 100644
--- a/board/esd/canbt/canbt.c
+++ b/board/esd/canbt/canbt.c
@@ -157,7 +157,7 @@ int checkboard (void)
 	int index;
 	int len;
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof (str));
+	int i = getenv_f("serial#", str, sizeof (str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/cms700/cms700.c b/board/esd/cms700/cms700.c
index 20346e15ac222ea69297e43729fd6506df8c88ac..dcd49d4faaa30b5cfef727065998f88fadd48017 100644
--- a/board/esd/cms700/cms700.c
+++ b/board/esd/cms700/cms700.c
@@ -96,7 +96,7 @@ int checkboard (void)
 
 	puts ("Board: ");
 
-	if (getenv_r("serial#", str, sizeof(str))  == -1) {
+	if (getenv_f("serial#", str, sizeof(str))  == -1) {
 		puts ("### No HW ID - assuming CMS700");
 	} else {
 		puts(str);
diff --git a/board/esd/cpci2dp/cpci2dp.c b/board/esd/cpci2dp/cpci2dp.c
index 00456a7003db9d646234a4b797a815cdac27ce90..ecfcf5923cece04d54f0f4f6a81f19de8ea67f32 100644
--- a/board/esd/cpci2dp/cpci2dp.c
+++ b/board/esd/cpci2dp/cpci2dp.c
@@ -94,7 +94,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c
index 51d3355816f76c3957086946f17f2523629181b4..51e10fdc922f0b51d83ad49b409ca225a74ee084 100644
--- a/board/esd/cpci405/cpci405.c
+++ b/board/esd/cpci405/cpci405.c
@@ -416,7 +416,7 @@ int checkboard(void)
 	int len;
 #endif
 	char str[64];
-	int i = getenv_r("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 	unsigned short ver;
 
 	puts("Board: ");
diff --git a/board/esd/cpci750/mv_eth.c b/board/esd/cpci750/mv_eth.c
index dedf73455d8f33ecfaa2b55e19839c4bacbf0452..781ad2318e4661704ee758a578767430b14ad007 100644
--- a/board/esd/cpci750/mv_eth.c
+++ b/board/esd/cpci750/mv_eth.c
@@ -248,7 +248,7 @@ void mv6436x_eth_initialize (bd_t * bis)
 			return;
 		}
 
-		temp = getenv_r (s, buf, sizeof (buf));
+		temp = getenv_f(s, buf, sizeof (buf));
 		s = (temp > 0) ? buf : NULL;
 
 #ifdef DEBUG
@@ -352,7 +352,7 @@ void mv6436x_eth_initialize (bd_t * bis)
 			return;
 		}
 
-		temp = getenv_r (s, buf, sizeof (buf));
+		temp = getenv_f(s, buf, sizeof (buf));
 		s = (temp > 0) ? buf : NULL;
 
 #ifdef DEBUG
diff --git a/board/esd/cpciiser4/cpciiser4.c b/board/esd/cpciiser4/cpciiser4.c
index dcea50ee8d8cc9d1b1e2b0ec120ce974666993ca..10a40be25db0453a5172ee137a59f23a62a9bad9 100644
--- a/board/esd/cpciiser4/cpciiser4.c
+++ b/board/esd/cpciiser4/cpciiser4.c
@@ -153,7 +153,7 @@ int checkboard (void)
 	int index;
 	int len;
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof (str));
+	int i = getenv_f("serial#", str, sizeof (str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/dasa_sim/dasa_sim.c b/board/esd/dasa_sim/dasa_sim.c
index 127374bff42240cd94a4da3f197d97bd87b21f70..e7f754cd6be72ae0e649cbf164affb32d3e47397 100644
--- a/board/esd/dasa_sim/dasa_sim.c
+++ b/board/esd/dasa_sim/dasa_sim.c
@@ -168,7 +168,7 @@ int checkboard (void)
 	int index;
 	int len;
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof (str));
+	int i = getenv_f("serial#", str, sizeof (str));
 	int fpga;
 	unsigned short val;
 
diff --git a/board/esd/dp405/dp405.c b/board/esd/dp405/dp405.c
index 228a57057a930691caa22ff2be7abd0aec7cdecb..587809226fbcd6873588b577920b0b7668e46daa 100644
--- a/board/esd/dp405/dp405.c
+++ b/board/esd/dp405/dp405.c
@@ -86,7 +86,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 	unsigned char trans[16] = {0x0,0x8,0x4,0xc,0x2,0xa,0x6,0xe,
 				   0x1,0x9,0x5,0xd,0x3,0xb,0x7,0xf};
 	unsigned char id1, id2, rev;
diff --git a/board/esd/du405/du405.c b/board/esd/du405/du405.c
index aa7ee92a5f13536300b04118ae6cd6a6583ad6ab..e0faa77cabd9f4bcb5d2862efcea0b64b84d49ec 100644
--- a/board/esd/du405/du405.c
+++ b/board/esd/du405/du405.c
@@ -163,7 +163,7 @@ int checkboard (void)
 	int index;
 	int len;
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof (str));
+	int i = getenv_f("serial#", str, sizeof (str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/du440/du440.c b/board/esd/du440/du440.c
index ba3c97c1449c524bd123cb874775fe56b07a102d..ad255f91ab80d646dab1612395562c69ed5997ec 100644
--- a/board/esd/du440/du440.c
+++ b/board/esd/du440/du440.c
@@ -350,7 +350,7 @@ int checkboard(void)
 
 	puts("Board: DU440");
 
-	if (getenv_r("serial#", serno, sizeof(serno)) > 0) {
+	if (getenv_f("serial#", serno, sizeof(serno)) > 0) {
 		puts(", serial# ");
 		puts(serno);
 	}
diff --git a/board/esd/hh405/hh405.c b/board/esd/hh405/hh405.c
index ca7868cbd84ce0f532410f4a40675ed1f968637f..c5e9514bee495e9ce7339ea2247eed4216b0cd33 100644
--- a/board/esd/hh405/hh405.c
+++ b/board/esd/hh405/hh405.c
@@ -650,7 +650,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
@@ -660,7 +660,7 @@ int checkboard (void)
 		puts(str);
 	}
 
-	if (getenv_r("bd_type", str, sizeof(str)) != -1) {
+	if (getenv_f("bd_type", str, sizeof(str)) != -1) {
 		printf(" (%s", str);
 	} else {
 		puts(" (Missing bd_type!");
@@ -780,7 +780,7 @@ void video_get_info_str (int line_number, char *info)
 {
 	char str[64];
 	char str2[64];
-	int i = getenv_r("serial#", str2, sizeof(str));
+	int i = getenv_f("serial#", str2, sizeof(str));
 
 	if (line_number == 1) {
 		sprintf(str, " Board: ");
@@ -791,7 +791,7 @@ void video_get_info_str (int line_number, char *info)
 			strcat(str, str2);
 		}
 
-		if (getenv_r("bd_type", str2, sizeof(str2)) != -1) {
+		if (getenv_f("bd_type", str2, sizeof(str2)) != -1) {
 			strcat(str, " (");
 			strcat(str, str2);
 		} else {
diff --git a/board/esd/hub405/hub405.c b/board/esd/hub405/hub405.c
index 2a2c4343c0d26b5080a0b414d50cd78559a43878..d17c4150369d23a2ba80779137c70b53e8376965 100644
--- a/board/esd/hub405/hub405.c
+++ b/board/esd/hub405/hub405.c
@@ -196,7 +196,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
@@ -206,7 +206,7 @@ int checkboard (void)
 		puts(str);
 	}
 
-	if (getenv_r("bd_type", str, sizeof(str)) != -1) {
+	if (getenv_f("bd_type", str, sizeof(str)) != -1) {
 		printf(" (%s", str);
 	} else {
 		puts(" (Missing bd_type!");
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index a1b66cbc40fa64ae93fc2acae3c3ae5d0fac3f36..694bd743588fa320aad3e5a25adf6044e07a186d 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -184,7 +184,7 @@ int checkboard(void)
 		puts("Board: EtherCAN/2 Gateway");
 		break;
 	}
-	if (getenv_r("serial#", str, sizeof(str)) > 0) {
+	if (getenv_f("serial#", str, sizeof(str)) > 0) {
 		puts(", serial# ");
 		puts(str);
 	}
diff --git a/board/esd/ocrtc/ocrtc.c b/board/esd/ocrtc/ocrtc.c
index ab909e503046acad8263d172f9f494df959852e9..24c92e35a5d911571a28b0ae94af526757eb9701 100644
--- a/board/esd/ocrtc/ocrtc.c
+++ b/board/esd/ocrtc/ocrtc.c
@@ -68,7 +68,7 @@ int board_early_init_f (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof (str));
+	int i = getenv_f("serial#", str, sizeof (str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/otc570/otc570.c b/board/esd/otc570/otc570.c
index 07d9c62977354d1f1050bc8b5c533b29f5987f9f..410d8b48a14f841d4d2b665bb851854eb11d49e2 100644
--- a/board/esd/otc570/otc570.c
+++ b/board/esd/otc570/otc570.c
@@ -258,7 +258,7 @@ int checkboard(void)
 	char str[32];
 
 	puts("Board: esd ARM9 HMI Panel - OTC570");
-	if (getenv_r("serial#", str, sizeof(str)) > 0) {
+	if (getenv_f("serial#", str, sizeof(str)) > 0) {
 		puts(", serial# ");
 		puts(str);
 	}
@@ -308,7 +308,7 @@ int misc_init_r(void)
 
 	printf("USART0: ");
 
-	if (getenv_r("usart0", str, sizeof(str)) == -1) {
+	if (getenv_f("usart0", str, sizeof(str)) == -1) {
 		printf("No entry - assuming 1-wire\n");
 		/* CTS pin, works as mode select pin (0 = 1-wire; 1 = RS485) */
 		at91_set_pio_output(AT91_PIO_PORTA, 29, 0);
diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c
index b0d7663b23cc36aa2827a2bdac02350b84256fa8..dd97c7a462997da3c0950d916a8eaae1acac5315 100644
--- a/board/esd/pci405/pci405.c
+++ b/board/esd/pci405/pci405.c
@@ -298,7 +298,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/plu405/plu405.c b/board/esd/plu405/plu405.c
index 3a8a4cff34799cbe0bf212353e211bdeb58b38f0..b68ffaf77100d12ae630dae8fb590e71fa357e1b 100644
--- a/board/esd/plu405/plu405.c
+++ b/board/esd/plu405/plu405.c
@@ -240,7 +240,7 @@ int misc_init_r(void)
 int checkboard(void)
 {
 	char str[64];
-	int i = getenv_r("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts("Board: ");
 
diff --git a/board/esd/pmc405/pmc405.c b/board/esd/pmc405/pmc405.c
index e7415e44cb0bc7e368ed8861b39b286700587498..03143fe487b83bf8bf5e8ce011749f477cefa4f9 100644
--- a/board/esd/pmc405/pmc405.c
+++ b/board/esd/pmc405/pmc405.c
@@ -123,7 +123,7 @@ int checkboard (void)
 {
 	ulong val;
 	char str[64];
-	int i = getenv_r("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/board/esd/voh405/voh405.c b/board/esd/voh405/voh405.c
index 6ed493ea66243c5a75dca6007e3de559d0903983..da25212f4c43bbb57cacd29d99b244f35e10a66b 100644
--- a/board/esd/voh405/voh405.c
+++ b/board/esd/voh405/voh405.c
@@ -271,7 +271,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
@@ -281,7 +281,7 @@ int checkboard (void)
 		puts(str);
 	}
 
-	if (getenv_r("bd_type", str, sizeof(str)) != -1) {
+	if (getenv_f("bd_type", str, sizeof(str)) != -1) {
 		printf(" (%s)", str);
 	} else {
 		puts(" (Missing bd_type!)");
diff --git a/board/esd/vom405/vom405.c b/board/esd/vom405/vom405.c
index de350369c1011ef5dc5bd0bae11fa23a6da933d5..f665a3ec41e1371495111cb20c57139343902787 100644
--- a/board/esd/vom405/vom405.c
+++ b/board/esd/vom405/vom405.c
@@ -121,7 +121,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 	int flashcnt;
 	int delay;
 	u8 *led_reg = (u8 *)(CAN_BA + 0x1000);
diff --git a/board/esd/wuh405/wuh405.c b/board/esd/wuh405/wuh405.c
index 704cd02702585eeca96b51c7bbe33a719f305589..5a65133d7137b16a9a07eedab8e9e36d638b964a 100644
--- a/board/esd/wuh405/wuh405.c
+++ b/board/esd/wuh405/wuh405.c
@@ -173,7 +173,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c
index ca8bab52d96613c9d416a9d0f6ac36d9596629e1..8d1b606213ab1d7c7f26fd47830d0146759d7792 100644
--- a/board/evb64260/eth.c
+++ b/board/evb64260/eth.c
@@ -708,7 +708,7 @@ gt6426x_eth_initialize(bd_t *bis)
 				return;
 		}
 
-		temp = getenv_r (s, buf, sizeof(buf));
+		temp = getenv_f(s, buf, sizeof(buf));
 		s = (temp > 0) ? buf : NULL;
 
 #ifdef DEBUG
diff --git a/board/g2000/g2000.c b/board/g2000/g2000.c
index 8b15e51f1d157b5daf8eb49a5d53ba817ac69e20..713b6995a614c9002b30f3bca94f5d52297777ff 100644
--- a/board/g2000/g2000.c
+++ b/board/g2000/g2000.c
@@ -91,7 +91,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/board/gen860t/gen860t.c b/board/gen860t/gen860t.c
index b37a0f24d493458b8da346f4d7a6da9760d96d93..d175858d42f2a5204fea07d4118202126288229a 100644
--- a/board/gen860t/gen860t.c
+++ b/board/gen860t/gen860t.c
@@ -132,7 +132,7 @@ int checkboard (void)
 	char buf[64];
 	int i;
 
-	i = getenv_r ("board_id", buf, sizeof (buf));
+	i = getenv_f("board_id", buf, sizeof (buf));
 	s = (i > 0) ? buf : NULL;
 
 	if (s) {
@@ -141,7 +141,7 @@ int checkboard (void)
 		printf ("<unknown> ");
 	}
 
-	i = getenv_r ("serial#", buf, sizeof (buf));
+	i = getenv_f("serial#", buf, sizeof (buf));
 	s = (i > 0) ? buf : NULL;
 
 	if (s) {
@@ -276,7 +276,7 @@ int last_stage_init (void)
 	/*
 	 * Read the environment to see what to do with the beeper
 	 */
-	i = getenv_r ("beeper", buf, sizeof (buf));
+	i = getenv_f("beeper", buf, sizeof (buf));
 	if (i > 0) {
 		do_beeper (buf);
 	}
diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index 27b79ec7f48a88189818c21caf1b72561ce746b7..fc498d69ea12a465ce90459cb4472717a6b5a904 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -187,7 +187,7 @@ int misc_init_f (void)
 	char tmp[10];
 	int i, br;
 
-	i = getenv_r("brightness", tmp, sizeof(tmp));
+	i = getenv_f("brightness", tmp, sizeof(tmp));
 	br = (i > 0)
 		? (int) simple_strtoul (tmp, NULL, 10)
 		: CONFIG_SYS_BRIGHTNESS;
diff --git a/board/ip860/ip860.c b/board/ip860/ip860.c
index e2a185146537ce54c5fb709f0635af5e3fe3bb94..adff2b22f734ceb93a5d1e99616571e06baa7ec3 100644
--- a/board/ip860/ip860.c
+++ b/board/ip860/ip860.c
@@ -114,7 +114,7 @@ int checkboard (void)
 
 	puts ("Board: ");
 
-	i = getenv_r ("serial#", (char *)buf, sizeof (buf));
+	i = getenv_f("serial#", (char *)buf, sizeof (buf));
 	s = (i > 0) ? buf : NULL;
 
 	if (!s || strncmp ((char *)s, "IP860", 5)) {
diff --git a/board/kup/kup4k/kup4k.c b/board/kup/kup4k/kup4k.c
index 98f5f5a30a5142df6a4718f6b742056e4c968176..607fd7903e83cc83bbe59d6b15d38bc825d462e5 100644
--- a/board/kup/kup4k/kup4k.c
+++ b/board/kup/kup4k/kup4k.c
@@ -314,7 +314,7 @@ void lcd_logo (bd_t * bd)
 	}
 
 
-	n = getenv_r ("lcd", tmp, sizeof (tmp));
+	n = getenv_f("lcd", tmp, sizeof (tmp));
 	if (n > 0) {
 		if (!strcmp ("tft", tmp))
 			tft = 1;
@@ -342,7 +342,7 @@ void lcd_logo (bd_t * bd)
 			((S1D_VALUE *) fb_info.RegAddr)[s1dReg / sizeof(S1D_VALUE)] =
 				s1dValue;
 		}
-		n = getenv_r ("contrast", tmp, sizeof (tmp));
+		n = getenv_f("contrast", tmp, sizeof (tmp));
 		((S1D_VALUE *) fb_info.RegAddr)[0xB3] =
 			(n > 0) ? (uchar) simple_strtoul (tmp, NULL, 10) * 255 / 100 : 0xA0;
 		switch (bd->bi_busfreq) {
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index b4343d81dedea6d44ae9847751d478f339dd68ec..624c7088ac511c89ced4f8d7edc55fb1110a1836 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -284,13 +284,13 @@ void set_backup_values(int overwrite)
 		}
 	}
 	memcpy(back.signature,"MPL\0",4);
-	i = getenv_r("serial#",back.serial_name,16);
+	i = getenv_f("serial#",back.serial_name,16);
 	if(i < 0) {
 		puts("Not possible to write Backup\n");
 		return;
 	}
 	back.serial_name[16]=0;
-	i = getenv_r("ethaddr",back.eth_addr,20);
+	i = getenv_f("ethaddr",back.eth_addr,20);
 	if(i < 0) {
 		puts("Not possible to write Backup\n");
 		return;
diff --git a/board/mpl/common/memtst.c b/board/mpl/common/memtst.c
index 92c33bac1698e3b3946008f73879791738d3fcc9..68973f9cbb2f0a71c9a1446d40e55b56977b4743 100644
--- a/board/mpl/common/memtst.c
+++ b/board/mpl/common/memtst.c
@@ -29,7 +29,7 @@ int testdram (void)
 	unsigned char s[32];
 	int i;
 
-	i = getenv_r ("testmem", s, 32);
+	i = getenv_f("testmem", s, 32);
 	if (i != 0) {
 		i = (int) simple_strtoul (s, NULL, 10);
 		if ((i > 0) && (i < 0xf)) {
diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c
index af3a98a42fb4255fd518b6fbd950d19ec2b0c2c0..7400ca6731777bff32aac75ce1feed6c21db020e 100644
--- a/board/mpl/mip405/mip405.c
+++ b/board/mpl/mip405/mip405.c
@@ -589,7 +589,7 @@ int checkboard (void)
 
 	puts ("Board: ");
 	get_pcbrev_var(&bc,&var);
-	i = getenv_r ("serial#", (char *)s, 32);
+	i = getenv_f("serial#", (char *)s, 32);
 	if ((i == 0) || strncmp ((char *)s, BOARD_NAME,sizeof(BOARD_NAME))) {
 		get_backup_values (b);
 		if (strncmp (b->signature, "MPL\0", 4) != 0) {
diff --git a/board/mpl/pati/pati.c b/board/mpl/pati/pati.c
index e12bc423f4ff150f0fe9ea5abc92fad7ca1c900c..7f1164a5c7acdced9b3c2b790eefea0d09ae8dab 100644
--- a/board/mpl/pati/pati.c
+++ b/board/mpl/pati/pati.c
@@ -353,7 +353,7 @@ int checkboard (void)
 	puts ("\nBoard: ");
 	reg=in32(PLD_CONFIG_BASE+PLD_BOARD_TIMING);
 	rev=(char)(SYSCNTR_BREV(reg)+'A');
-	i = getenv_r ("serial#", s, 32);
+	i = getenv_f("serial#", s, 32);
 	if ((i == -1)) {
 		puts ("### No HW ID - assuming " BOARD_NAME);
 		printf(" Rev. %c\n",rev);
diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index 792eccc15450e755cff63f1683527c360acb9926..7b48c0617ca2b92ef09b729147c4654a5d7b95f2 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -579,7 +579,7 @@ int checkboard (void)
 
 	puts ("Board: ");
 
-	i = getenv_r ("serial#", (char *)s, 32);
+	i = getenv_f("serial#", (char *)s, 32);
 	if ((i == 0) || strncmp ((char *)s, "PIP405", 6)) {
 		get_backup_values (b);
 		if (strncmp (b->signature, "MPL\0", 4) != 0) {
diff --git a/board/mpl/vcma9/vcma9.c b/board/mpl/vcma9/vcma9.c
index 1835677a88575d981bb24b275a9384f59691c557..eaeec828d70b0407c7cd27b529a73be3b2ef413e 100644
--- a/board/mpl/vcma9/vcma9.c
+++ b/board/mpl/vcma9/vcma9.c
@@ -295,7 +295,7 @@ int checkboard(void)
 	int i;
 	backup_t *b = (backup_t *) s;
 
-	i = getenv_r("serial#", s, 32);
+	i = getenv_f("serial#", s, 32);
 	if ((i < 0) || strncmp (s, "VCMA9", 5)) {
 		get_backup_values (b);
 		if (strncmp (b->signature, "MPL\0", 4) != 0) {
@@ -340,7 +340,7 @@ void print_vcma9_info(void)
 	char s[50];
 	int i;
 
-	if ((i = getenv_r("serial#", s, 32)) < 0) {
+	if ((i = getenv_f("serial#", s, 32)) < 0) {
 		puts ("### No HW ID - assuming VCMA9");
 		printf("i %d", i*24);
 	} else {
diff --git a/board/ppmc8260/ppmc8260.c b/board/ppmc8260/ppmc8260.c
index 1808abdcb067c1da133318a6f395f4bc1b4fa2d6..bf0188c7e0c3baa8c6a9e27a099ab912ebd376e2 100644
--- a/board/ppmc8260/ppmc8260.c
+++ b/board/ppmc8260/ppmc8260.c
@@ -285,7 +285,7 @@ int misc_init_r (void)
 	int res;
 
 	if ((ds != 0) && (ds != 0xff)) {
-		res = getenv_r ("ethaddr", (char *)tmp, sizeof (tmp));
+		res = getenv_f("ethaddr", (char *)tmp, sizeof (tmp));
 		if (res > 0) {
 			ss = ((ds >> 4) & 0x0f);
 			ss += ss < 0x0a ? '0' : ('a' - 10);
diff --git a/board/prodrive/p3mx/mv_eth.c b/board/prodrive/p3mx/mv_eth.c
index 8fcc1551e533d850487ec48effaf07e5f53221d1..e67596bd1a3e45deb37bae2047c5015f557798dd 100644
--- a/board/prodrive/p3mx/mv_eth.c
+++ b/board/prodrive/p3mx/mv_eth.c
@@ -298,7 +298,7 @@ void mv6446x_eth_initialize (bd_t * bis)
 			return;
 		}
 
-		temp = getenv_r (s, buf, sizeof (buf));
+		temp = getenv_f(s, buf, sizeof (buf));
 		s = (temp > 0) ? buf : NULL;
 
 #ifdef DEBUG
@@ -397,7 +397,7 @@ void mv6446x_eth_initialize (bd_t * bis)
 			return;
 		}
 
-		temp = getenv_r (s, buf, sizeof (buf));
+		temp = getenv_f(s, buf, sizeof (buf));
 		s = (temp > 0) ? buf : NULL;
 
 #ifdef DEBUG
diff --git a/board/sbc405/sbc405.c b/board/sbc405/sbc405.c
index 74e6204db9e94eb51daed075bba639c40334243d..33b4d11058a7cca9780da8efda9e082723fc39a0 100644
--- a/board/sbc405/sbc405.c
+++ b/board/sbc405/sbc405.c
@@ -79,7 +79,7 @@ int misc_init_r (void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/board/sbc8260/sbc8260.c b/board/sbc8260/sbc8260.c
index f5f23be2799d0d8e20b376be48b0310ae4048bb0..33ce1a4ee34de01e67ef4e0f11040d150acdaea0 100644
--- a/board/sbc8260/sbc8260.c
+++ b/board/sbc8260/sbc8260.c
@@ -267,7 +267,7 @@ int misc_init_r (void)
 	int res;
 
 	if ((ds != 0) && (ds != 0xff)) {
-		res = getenv_r ("ethaddr", tmp, sizeof (tmp));
+		res = getenv_f("ethaddr", tmp, sizeof (tmp));
 		if (res > 0) {
 			ss = ((ds >> 4) & 0x0f);
 			ss += ss < 0x0a ? '0' : ('a' - 10);
diff --git a/board/siemens/CCM/ccm.c b/board/siemens/CCM/ccm.c
index 8053da481acaf236633f2815f020c65981328880..e91ceb079adb904401599abf26e5f923795ce57a 100644
--- a/board/siemens/CCM/ccm.c
+++ b/board/siemens/CCM/ccm.c
@@ -102,7 +102,7 @@ int checkboard (void)
     unsigned char *s;
     unsigned char buf[64];
 
-    s = (getenv_r ("serial#", (char *)&buf, sizeof(buf)) > 0) ? buf : NULL;
+    s = (getenv_f("serial#", (char *)&buf, sizeof(buf)) > 0) ? buf : NULL;
 
     puts ("Board: Siemens CCM");
 
diff --git a/board/siemens/SCM/scm.c b/board/siemens/SCM/scm.c
index e0611fe370d5817148d422be84b171a8ff35e5e1..926e491271b8d8006213666a0aa447c3a8a40d0b 100644
--- a/board/siemens/SCM/scm.c
+++ b/board/siemens/SCM/scm.c
@@ -209,7 +209,7 @@ const iop_conf_t iop_conf_tab[4][32] = {
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof (str));
+	int i = getenv_f("serial#", str, sizeof (str));
 
 	puts ("Board: ");
 
diff --git a/board/snmc/qs850/qs850.c b/board/snmc/qs850/qs850.c
index cc8eaad88c414cf3db7d075660d9fb543eff9b92..43f7495e46f570c6f7ad1af1caa36f17609e41a6 100644
--- a/board/snmc/qs850/qs850.c
+++ b/board/snmc/qs850/qs850.c
@@ -100,7 +100,7 @@ int checkboard (void)
 	char buf[64];
 	int i;
 
-	i = getenv_r("serial#", buf, sizeof(buf));
+	i = getenv_f("serial#", buf, sizeof(buf));
 	s = (i>0) ? buf : NULL;
 
 	if (!s || strncmp(s, BOARD_IDENTITY, 5)) {
diff --git a/board/snmc/qs860t/qs860t.c b/board/snmc/qs860t/qs860t.c
index b272d80d9ca44ad5cba509d9b67db39176343127..fa887074db6119e2346d8f9fd39e34b212a2d15f 100644
--- a/board/snmc/qs860t/qs860t.c
+++ b/board/snmc/qs860t/qs860t.c
@@ -93,7 +93,7 @@ int checkboard (void)
 	char buf[64];
 	int i;
 
-	i = getenv_r("serial#", buf, sizeof(buf));
+	i = getenv_f("serial#", buf, sizeof(buf));
 	s = (i>0) ? buf : NULL;
 
 	if (!s || strncmp(s, "QS860T", 6)) {
diff --git a/board/tqc/tqm8260/tqm8260.c b/board/tqc/tqm8260/tqm8260.c
index 3039999f3ba89a4b98764c777c85c5b53e729aea..95073b8446d1ae84335caae301f3b0d562181045 100644
--- a/board/tqc/tqm8260/tqm8260.c
+++ b/board/tqc/tqm8260/tqm8260.c
@@ -196,7 +196,7 @@ const iop_conf_t iop_conf_tab[4][32] = {
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof (str));
+	int i = getenv_f("serial#", str, sizeof (str));
 
 	puts ("Board: ");
 
diff --git a/board/trab/trab.c b/board/trab/trab.c
index 12fe120eacf988245bbf44a6b0eced3efa4d11d5..828facd763e1db4b7aae667b333194c25a431300 100644
--- a/board/trab/trab.c
+++ b/board/trab/trab.c
@@ -414,7 +414,7 @@ static void tsc2000_set_brightness(void)
 	spi_init();
 	tsc2000_write(1, 2, 0x0); /* Power up DAC */
 
-	i = getenv_r("brightness", tmp, sizeof(tmp));
+	i = getenv_f("brightness", tmp, sizeof(tmp));
 	br = (i > 0)
 		? (int) simple_strtoul (tmp, NULL, 10)
 		: CONFIG_SYS_BRIGHTNESS;
diff --git a/board/uc100/uc100.c b/board/uc100/uc100.c
index 4dba2900dbcaaa31ee78e43dbac17a9d1208925d..bdee4de366e48fc44b84cbcca0b6eb2e64979cdf 100644
--- a/board/uc100/uc100.c
+++ b/board/uc100/uc100.c
@@ -150,7 +150,7 @@ int board_switch(void)
 int checkboard (void)
 {
 	char str[64];
-	int i = getenv_r ("serial#", str, sizeof(str));
+	int i = getenv_f("serial#", str, sizeof(str));
 
 	puts ("Board: ");
 
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 1198954bb503c17f59be74299466d7816b6970c5..16d5ff74d9e03d1225a1713f5fafa61e811d432e 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -543,7 +543,7 @@ char *getenv (char *name)
 	return (NULL);
 }
 
-int getenv_r (char *name, char *buf, unsigned len)
+int getenv_f(char *name, char *buf, unsigned len)
 {
 	int i, nxt;
 
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 3267c5de36d1b12a190f93f9a3048ded598f84aa..2d09caf73877998fc194bb6934adaa5de57a665b 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1993,7 +1993,7 @@ unsigned long flash_init (void)
 #ifdef CONFIG_SYS_FLASH_PROTECTION
 	/* read environment from EEPROM */
 	char s[64];
-	getenv_r ("unlock", s, sizeof(s));
+	getenv_f("unlock", s, sizeof(s));
 #endif
 
 #define BANK_BASE(i)	(((phys_addr_t [CFI_MAX_FLASH_BANKS])CONFIG_SYS_FLASH_BANKS_LIST)[i])
diff --git a/include/common.h b/include/common.h
index eddec22752a09dd7e6fd32d72ccb9fe90e10b535..6a79ec2aad44ffb883cb0e31a5fadc2e2fff8d56 100644
--- a/include/common.h
+++ b/include/common.h
@@ -256,7 +256,7 @@ int	env_init     (void);
 void	env_relocate (void);
 int	envmatch     (uchar *, int);
 char	*getenv	     (char *);
-int	getenv_r     (char *name, char *buf, unsigned len);
+int	getenv_f     (char *name, char *buf, unsigned len);
 int	saveenv	     (void);
 #ifdef CONFIG_PPC		/* ARM version to be fixed! */
 int inline setenv   (char *, char *);
diff --git a/post/post.c b/post/post.c
index 00e835325c55a6fef9c4f77def182b77c5d0d106..8a9fd0d2ec10d9a4a8c15067587d3e3d562cae2f 100644
--- a/post/post.c
+++ b/post/post.c
@@ -187,7 +187,7 @@ static void post_get_flags (int *test_flags)
 	}
 
 	for (i = 0; i < varnum; i++) {
-		if (getenv_r (var[i], list, sizeof (list)) <= 0)
+		if (getenv_f(var[i], list, sizeof (list)) <= 0)
 			continue;
 
 		for (j = 0; j < post_list_size; j++) {