public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
@ 2012-08-08 10:52 Marek Vasut
  2012-08-08 10:52 ` [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr() Marek Vasut
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Marek Vasut @ 2012-08-08 10:52 UTC (permalink / raw)
  To: u-boot

This function converts static number to string in preprocessor.
This is useful as it allows higher usage of puts() in favour of printf()

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
---
 include/common.h          |    1 +
 include/linux/stringify.h |   12 ++++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 include/linux/stringify.h

diff --git a/include/common.h b/include/common.h
index 39859d3..8f596ec 100644
--- a/include/common.h
+++ b/include/common.h
@@ -39,6 +39,7 @@ typedef volatile unsigned char	vu_char;
 #include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/string.h>
+#include <linux/stringify.h>
 #include <asm/ptrace.h>
 #include <stdarg.h>
 #if defined(CONFIG_PCI) && (defined(CONFIG_4xx) && !defined(CONFIG_AP1000))
diff --git a/include/linux/stringify.h b/include/linux/stringify.h
new file mode 100644
index 0000000..841cec8
--- /dev/null
+++ b/include/linux/stringify.h
@@ -0,0 +1,12 @@
+#ifndef __LINUX_STRINGIFY_H
+#define __LINUX_STRINGIFY_H
+
+/* Indirect stringification.  Doing two levels allows the parameter to be a
+ * macro itself.  For example, compile with -DFOO=bar, __stringify(FOO)
+ * converts to "bar".
+ */
+
+#define __stringify_1(x...)	#x
+#define __stringify(x...)	__stringify_1(x)
+
+#endif	/* !__LINUX_STRINGIFY_H */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr()
  2012-08-08 10:52 [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Marek Vasut
@ 2012-08-08 10:52 ` Marek Vasut
  2012-08-08 15:18   ` Mike Frysinger
  2012-08-10 20:22   ` Anatolij Gustschin
  2012-08-08 10:52 ` [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR() Marek Vasut
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 19+ messages in thread
From: Marek Vasut @ 2012-08-08 10:52 UTC (permalink / raw)
  To: u-boot

Kill multiple occurances and redeclaration of xstr in favor of __stringify().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
---
 include/configs/MPC8308RDB.h        |    9 +++------
 include/configs/amcc-common.h       |   25 +++++++++++-------------
 include/configs/at91sam9263ek.h     |    5 +----
 include/configs/cam_enc_4xx.h       |   36 +++++++++++++++++------------------
 include/configs/ea20.h              |   11 ++++-------
 include/configs/enbw_cmc.h          |   19 ++++++++----------
 include/configs/flea3.h             |   14 ++++++--------
 include/configs/ima3-mx53.h         |   10 ++++------
 include/configs/imx27lite-common.h  |   15 ++++++---------
 include/configs/km/keymile-common.h |   13 +++++--------
 include/configs/km/km-powerpc.h     |   12 ++++++------
 include/configs/km/km_arm.h         |   14 +++++++-------
 include/configs/manroland/common.h  |   21 +++++++++-----------
 include/configs/mpc8308_p1m.h       |    9 +++------
 include/configs/mx35pdk.h           |   14 ++++++--------
 include/configs/qong.h              |    9 +++------
 include/configs/tam3517-common.h    |   11 ++++-------
 include/configs/tx25.h              |    5 +----
 18 files changed, 104 insertions(+), 148 deletions(-)

diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h
index 7f2761c..a2716aa 100644
--- a/include/configs/MPC8308RDB.h
+++ b/include/configs/MPC8308RDB.h
@@ -525,9 +525,6 @@
 
 #define CONFIG_BOOTDELAY	5	/* -1 disables auto-boot */
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
 	"consoledev=ttyS0\0"						\
@@ -561,10 +558,10 @@
 		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\
 	"bootcmd=run flash_self\0"					\
 	"load=tftp ${loadaddr} ${u-boot}\0"				\
-	"update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)		\
-		" +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)	\
+	"update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)	\
+		" +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
 		" +${filesize};cp.b ${fileaddr} "			\
-		xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"		\
+		__stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"	\
 	"upd=run load update\0"						\
 
 #endif	/* __CONFIG_H */
diff --git a/include/configs/amcc-common.h b/include/configs/amcc-common.h
index 056a22a..9d0c80b 100644
--- a/include/configs/amcc-common.h
+++ b/include/configs/amcc-common.h
@@ -189,14 +189,11 @@
 #define CONFIG_ADDMISC	"addmisc=setenv bootargs ${bootargs}\0"
 #endif
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 /*
  * General common environment variables shared on all AMCC eval boards
  */
 #define CONFIG_AMCC_DEF_ENV						\
-	"netdev=" xstr(CONFIG_USE_NETDEV) "\0"				\
+	"netdev=" __stringify(CONFIG_USE_NETDEV) "\0"				\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
 		"nfsroot=${serverip}:${rootpath}\0"			\
 	"ramargs=setenv bootargs root=/dev/ram rw\0"			\
@@ -204,15 +201,15 @@
 		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
 		":${hostname}:${netdev}:off panic=1\0"			\
 	"addtty=setenv bootargs ${bootargs}"				\
-		" console=" xstr(CONFIG_USE_TTY) ",${baudrate}\0"	\
+		" console=" __stringify(CONFIG_USE_TTY) ",${baudrate}\0"	\
 	CONFIG_ADDMISC							\
 	"initrd_high=30000000\0"					\
 	"kernel_addr_r=1000000\0"					\
 	"fdt_addr_r=1800000\0"						\
 	"ramdisk_addr_r=1900000\0"					\
-	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\
-	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\
-	"ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0"		\
+	"hostname=" __stringify(CONFIG_HOSTNAME) "\0"				\
+	"bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"			\
+	"ramdisk_file=" __stringify(CONFIG_HOSTNAME) "/uRamdisk\0"		\
 	CONFIG_AMCC_DEF_ENV_ROOTPATH
 
 /*
@@ -234,7 +231,7 @@
 	"net_self=run net_self_load;"					\
 		"run ramargs addip addtty addmisc;"			\
 		"bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
-	"fdt_file=" xstr(CONFIG_HOSTNAME) "/" xstr(CONFIG_HOSTNAME) ".dtb\0"
+	"fdt_file=" __stringify(CONFIG_HOSTNAME) "/" __stringify(CONFIG_HOSTNAME) ".dtb\0"
 
 /*
  * Default environment for arch/ppc booting,
@@ -263,15 +260,15 @@
 		"bootm ${kernel_addr_r}\0"
 
 #define CONFIG_AMCC_DEF_ENV_NOR_UPD					\
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"			\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"		\
 	"load=tftp 200000 ${u-boot}\0"					\
-	"update=protect off " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"	\
-		"era " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"		\
-		"cp.b ${fileaddr} " xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0" \
+	"update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"	\
+		"era " __stringify(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"	\
+		"cp.b ${fileaddr} " __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0" \
 	"upd=run load update\0"						\
 
 #define CONFIG_AMCC_DEF_ENV_NAND_UPD					\
-	"u-boot-nand=" xstr(CONFIG_HOSTNAME) "/u-boot-nand.bin\0"	\
+	"u-boot-nand=" __stringify(CONFIG_HOSTNAME) "/u-boot-nand.bin\0"\
 	"nload=tftp 200000 ${u-boot-nand}\0"				\
 	"nupdate=nand erase 0 100000;nand write 200000 0 100000\0"	\
 	"nupd=run nload nupdate\0"
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 4309f71..34fa3e2 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -157,11 +157,8 @@
 /* Address and size of Primary Environment Sector */
 #define CONFIG_ENV_SIZE		0x10000
 
-#define xstr(s)   str(s)
-#define str(s)	#s
-
 #define CONFIG_EXTRA_ENV_SETTINGS	\
-	"monitor_base=" xstr(CONFIG_SYS_MONITOR_BASE) "\0" \
+	"monitor_base=" __stringify(CONFIG_SYS_MONITOR_BASE) "\0" \
 	"update=" \
 		"protect off ${monitor_base} +${filesize};" \
 		"erase ${monitor_base} +${filesize};" \
diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
index 771ac9c..30ca4c8 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -403,8 +403,6 @@
 /*
  * Default environment settings
  */
-#define xstr(s)	str(s)
-#define str(s)	#s
 
 #define DVN4XX_UBOOT_ADDR_R_RAM		0x80000000
 /* (DVN4XX_UBOOT_ADDR_R_RAM + CONFIG_SYS_NAND_PAGE_SIZE) */
@@ -416,22 +414,22 @@
 #define DVN4XX_UBOOT_ADDR_R_UBOOT	0x80003800
 
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
-	"u_boot_addr_r=" xstr(DVN4XX_UBOOT_ADDR_R_RAM) "\0"		\
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.ubl\0"			\
+	"u_boot_addr_r=" __stringify(DVN4XX_UBOOT_ADDR_R_RAM) "\0"	\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.ubl\0"		\
 	"load=tftp ${u_boot_addr_r} ${u-boot}\0"			\
-	"pagesz=" xstr(CONFIG_SYS_NAND_PAGE_SIZE) "\0"			\
+	"pagesz=" __stringify(CONFIG_SYS_NAND_PAGE_SIZE) "\0"		\
 	"writeheader=nandrbl rbl;nand erase 20000 ${pagesz};"		\
 		"nand write ${u_boot_addr_r} 20000 ${pagesz};"		\
 		"nandrbl uboot\0"					\
 	"writenand_spl=nandrbl rbl;nand erase 0 3000;"			\
-		"nand write " xstr(DVN4XX_UBOOT_ADDR_R_NAND_SPL)	\
+		"nand write " __stringify(DVN4XX_UBOOT_ADDR_R_NAND_SPL)	\
 		" 0 3000;nandrbl uboot\0"				\
 	"writeuboot=nandrbl uboot;"					\
-		"nand erase " xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " "	\
-		 xstr(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE)			\
-		";nand write " xstr(DVN4XX_UBOOT_ADDR_R_UBOOT)		\
-		" " xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " "		\
-		xstr(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0"			\
+		"nand erase " __stringify(CONFIG_SYS_NAND_U_BOOT_OFFS) " "\
+		 __stringify(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE)		\
+		";nand write " __stringify(DVN4XX_UBOOT_ADDR_R_UBOOT)	\
+		" " __stringify(CONFIG_SYS_NAND_U_BOOT_OFFS) " "	\
+		__stringify(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0"		\
 	"update=run load writenand_spl writeuboot\0"			\
 	"bootcmd=run net_nfs\0"						\
 	"rootpath=/opt/eldk-arm/arm\0"					\
@@ -448,14 +446,14 @@
 	"rootpath=/opt/eldk-arm/arm\0"					\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
 		"nfsroot=${serverip}:${rootpath}\0"			\
-	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage \0"			\
+	"bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage \0"		\
 	"kernel_addr_r=80600000\0"					\
 	"load_kernel=tftp ${kernel_addr_r} ${bootfile}\0"		\
 	"ubi_load_kernel=ubi part ubi 2048;ubifsmount ${img_volume};"	\
 		"ubifsload ${kernel_addr_r} boot/uImage\0"		\
-	"fit_addr_r=" xstr(CONFIG_BOARD_IMG_ADDR_R) "\0"		\
-	"img_addr_r=" xstr(CONFIG_BOARD_IMG_ADDR_R) "\0"		\
-	"img_file=" xstr(CONFIG_HOSTNAME) "/ait.itb\0"			\
+	"fit_addr_r=" __stringify(CONFIG_BOARD_IMG_ADDR_R) "\0"		\
+	"img_addr_r=" __stringify(CONFIG_BOARD_IMG_ADDR_R) "\0"		\
+	"img_file=" __stringify(CONFIG_HOSTNAME) "/ait.itb\0"		\
 	"header_addr=20000\0"						\
 	"img_writeheader=nandrbl rbl;"					\
 		"nand erase ${header_addr} ${pagesz};"			\
@@ -464,11 +462,11 @@
 	"img_writespl=nandrbl rbl;nand erase 0 3000;"			\
 		"nand write ${img_addr_r} 0 3000;nandrbl uboot\0"	\
 	"img_writeuboot=nandrbl uboot;"					\
-		"nand erase " xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " "	\
-		 xstr(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE)			\
+		"nand erase " __stringify(CONFIG_SYS_NAND_U_BOOT_OFFS) " "\
+		 __stringify(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE)		\
 		";nand write ${img_addr_r} "				\
-		xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " "			\
-		xstr(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0"			\
+		__stringify(CONFIG_SYS_NAND_U_BOOT_OFFS) " "		\
+		__stringify(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0"		\
 	"img_writedfenv=ubi part ubi 2048;"				\
 		"ubi write ${img_addr_r} default ${filesize}\0"		\
 	"img_volume=rootfs1\0"						\
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index a9caa81..6dec8b5 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -230,9 +230,6 @@
  * Default environment and default scripts
  * to update uboot and load kernel
  */
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 
 #define CONFIG_HOSTNAME ea20
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
@@ -263,9 +260,9 @@
 	"loadaddr=c0000014\0"						\
 	"memory=32M\0"							\
 	"kernel_addr_r=c0700000\0"					\
-	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\
-	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\
-	"ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0"		\
+	"hostname=" __stringify(CONFIG_HOSTNAME) "\0"			\
+	"bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"		\
+	"ramdisk_file=" __stringify(CONFIG_HOSTNAME) "/uRamdisk\0"	\
 	"flash_self=run ramargs addip addtty addmtd addmisc addmem;"	\
 		"bootm ${kernel_addr} ${ramdisk_addr}\0"		\
 	"flash_nfs=run nfsargs addip addtty addmtd addmisc addmem;"	\
@@ -282,7 +279,7 @@
 		"ubifsload ${kernel_addr_r} /boot/uImage;"              \
 		"ubifsumount; run nandargs addip addtty "               \
 		"addmtd addmisc addmem;bootm ${kernel_addr_r}\0"        \
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"			\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"		\
 	"load_magic=if sf probe 0;then sf "                             \
 		"read c0000000 0x10000 0x60000;fi\0"                    \
 	"load_nand=ubi part nand0,${as};ubifsmount rootfs;"             \
diff --git a/include/configs/enbw_cmc.h b/include/configs/enbw_cmc.h
index 3fc07e6..fb5f8ae 100644
--- a/include/configs/enbw_cmc.h
+++ b/include/configs/enbw_cmc.h
@@ -183,18 +183,15 @@
 #define CONFIG_DEFAULT_SETTINGS_ADDR	(CONFIG_ENV_ADDR_REDUND + \
 						CONFIG_ENV_SECT_SIZE)
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"u-boot_addr_r=c0000000\0"					\
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"			\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"		\
 	"load=tftp ${u-boot_addr_r} ${u-boot}\0"			\
-	"update=protect off " xstr(CONFIG_SYS_FLASH_BASE) " +${filesize};"\
-		"erase " xstr(CONFIG_SYS_FLASH_BASE) " +${filesize};"	\
-		"cp.b ${u-boot_addr_r} " xstr(CONFIG_SYS_FLASH_BASE)	\
+	"update=protect off " __stringify(CONFIG_SYS_FLASH_BASE) " +${filesize};"\
+		"erase " __stringify(CONFIG_SYS_FLASH_BASE) " +${filesize};"	\
+		"cp.b ${u-boot_addr_r} " __stringify(CONFIG_SYS_FLASH_BASE)	\
 		" ${filesize};"						\
-		"protect on " xstr(CONFIG_SYS_FLASH_BASE) " +${filesize}\0"\
+		"protect on " __stringify(CONFIG_SYS_FLASH_BASE) " +${filesize}\0"\
 	"netdev=eth0\0"							\
 	"rootpath=/opt/eldk-arm/arm\0"					\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
@@ -206,9 +203,9 @@
 	"kernel_addr_r=c0700000\0"					\
 	"fdt_addr_r=c0600000\0"						\
 	"ramdisk_addr_r=c0b00000\0"					\
-	"fdt_file=" xstr(CONFIG_HOSTNAME) "/"				\
-		xstr(CONFIG_HOSTNAME) ".dtb\0"				\
-	"kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0"		\
+	"fdt_file=" __stringify(CONFIG_HOSTNAME) "/"			\
+		__stringify(CONFIG_HOSTNAME) ".dtb\0"			\
+	"kernel_file=" __stringify(CONFIG_HOSTNAME) "/uImage \0"	\
 	"nand_ld_ramdsk=nand read ${ramdisk_addr_r} 320000 400000\0"	\
 	"nand_ld_kernel=nand read ${kernel_addr_r} 20000 300000\0"	\
 	"nand_ld_fdt=nand read ${fdt_addr_r} 0 2000\0"			\
diff --git a/include/configs/flea3.h b/include/configs/flea3.h
index e8e3c6a..110e509 100644
--- a/include/configs/flea3.h
+++ b/include/configs/flea3.h
@@ -233,8 +233,6 @@
  * Default environment and default scripts
  * to update uboot and load kernel
  */
-#define xstr(s)	str(s)
-#define str(s)	#s
 
 #define CONFIG_HOSTNAME flea3
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
@@ -247,16 +245,16 @@
 		":${hostname}:${netdev}:off panic=1\0"			\
 	"addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0"		\
 	"addip=if test -n ${ipdyn};then run addip_dyn;"			\
-		"else run addip_sta;fi\0"	\
+		"else run addip_sta;fi\0"				\
 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
 	"addtty=setenv bootargs ${bootargs}"				\
 		" console=ttymxc2,${baudrate}\0"			\
 	"addmisc=setenv bootargs ${bootargs} ${misc}\0"			\
 	"loadaddr=80800000\0"						\
 	"kernel_addr_r=80800000\0"					\
-	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\
-	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\
-	"ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0"		\
+	"hostname=" __stringify(CONFIG_HOSTNAME) "\0"			\
+	"bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"		\
+	"ramdisk_file=" __stringify(CONFIG_HOSTNAME) "/uRamdisk\0"	\
 	"flash_self=run ramargs addip addtty addmtd addmisc;"		\
 		"bootm ${kernel_addr} ${ramdisk_addr}\0"		\
 	"flash_nfs=run nfsargs addip addtty addmtd addmisc;"		\
@@ -270,9 +268,9 @@
 		"run ramargs addip addtty addmtd addmisc;"		\
 		"bootm ${kernel_addr_r} ${ramdisk_addr_r};"		\
 		"else echo Images not loades;fi\0"			\
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"			\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"		\
 	"load=tftp ${loadaddr} ${u-boot}\0"				\
-	"uboot_addr=" xstr(CONFIG_SYS_MONITOR_BASE) "\0"		\
+	"uboot_addr=" __stringify(CONFIG_SYS_MONITOR_BASE) "\0"		\
 	"update=protect off ${uboot_addr} +40000;"			\
 		"erase ${uboot_addr} +40000;"				\
 		"cp.b ${loadaddr} ${uboot_addr} ${filesize}\0"		\
diff --git a/include/configs/ima3-mx53.h b/include/configs/ima3-mx53.h
index 17fa4a1..d6182f5 100644
--- a/include/configs/ima3-mx53.h
+++ b/include/configs/ima3-mx53.h
@@ -184,8 +184,6 @@
  */
 
 #define HOSTNAME ima3-mx53
-#define xstr(s)	str(s)
-#define str(s)	#s
 
 #define CONFIG_HOSTNAME ima3-mx53
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
@@ -207,9 +205,9 @@
 	"loadaddr=70800000\0"						\
 	"kernel_addr_r=70800000\0"					\
 	"ramdisk_addr_r=71000000\0"					\
-	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\
-	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\
-	"ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0"		\
+	"hostname=" __stringify(CONFIG_HOSTNAME) "\0"			\
+	"bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"		\
+	"ramdisk_file=" __stringify(CONFIG_HOSTNAME) "/uRamdisk\0"	\
 	"mmcargs=setenv bootargs root=${mmcroot} "			\
 		"rootfstype=${mmcrootfstype}\0"				\
 	"mmcroot=/dev/mmcblk0p3 rw\0"					\
@@ -238,7 +236,7 @@
 		"run satargs addip addtty addmtd addmisc;"		\
 		"sata init;ext2load sata 0:1 ${kernel_addr_r} "		\
 		"${satafile};bootm\0"					\
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.imx\0"			\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.imx\0"		\
 	"uimage=uImage\0"						\
 	"load=tftp ${loadaddr} ${u-boot}\0"				\
 	"uboot_addr=0xf0001000\0"					\
diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h
index 7d2876b..6194147 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -200,9 +200,6 @@
 #define CONFIG_LOADADDR		0xa0800000	/* loadaddr env var */
 #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
@@ -215,19 +212,19 @@
 		" console=ttymxc0,${baudrate}\0"			\
 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
 	"addmisc=setenv bootargs ${bootargs}\0"				\
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"			\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"		\
 	"kernel_addr_r=a0800000\0"					\
-	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\
+	"bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"		\
 	"rootpath=/opt/eldk-4.2-arm/arm\0"				\
 	"net_nfs=tftp ${kernel_addr_r} ${bootfile};"			\
 		"run nfsargs addip addtty addmtd addmisc;"		\
 		"bootm\0"						\
-	"bootcmd=run net_nfs\0"					\
+	"bootcmd=run net_nfs\0"						\
 	"load=tftp ${loadaddr} ${u-boot}\0"				\
-	"update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)		\
-		" +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)	\
+	"update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)	\
+		" +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
 		" +${filesize};cp.b ${fileaddr} "			\
-		xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"		\
+		__stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"	\
 	"upd=run load update\0"						\
 	"mtdids=" MTDIDS_DEFAULT "\0"					\
 	"mtdparts=" MTDPARTS_DEFAULT "\0"				\
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index 7ed9958..2bfde98 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -149,9 +149,6 @@
 	"ubi part " CONFIG_KM_UBI_PARTITION_NAME_APP "; fi\0"
 #endif /* CONFIG_KM_UBI_PARTITION_NAME_APP */
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 /*
  * boottargets
  * - set 'subbootcmds'
@@ -188,7 +185,7 @@
 		":${hostname}:${netdev}:off3"				\
 		" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}"	\
 		" mem=${kernelmem} init=${init}"			\
-		" phram.phram=phvar,${varaddr}," xstr(CONFIG_KM_PHRAM)	\
+		" phram.phram=phvar,${varaddr}," __stringify(CONFIG_KM_PHRAM)\
 		" " CONFIG_KM_UBI_LINUX_MTD " "				\
 		CONFIG_KM_DEF_BOOT_ARGS_CPU				\
 		"\0"							\
@@ -213,9 +210,9 @@
  * - 'cramfsloadfdt': copy fdt from a cramfs to ram
  */
 #define CONFIG_KM_DEF_ENV_FLASH_BOOT					\
-	"cramfsaddr=" xstr(CONFIG_KM_CRAMFS_ADDR) "\0"			\
+	"cramfsaddr=" __stringify(CONFIG_KM_CRAMFS_ADDR) "\0"		\
 	"cramfsloadkernel=cramfsload ${load_addr_r} uImage\0"		\
-	"ubicopy=ubi read "xstr(CONFIG_KM_CRAMFS_ADDR)			\
+	"ubicopy=ubi read "__stringify(CONFIG_KM_CRAMFS_ADDR)		\
 			" bootfs${boot_bank}\0"				\
 	CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI
 
@@ -228,7 +225,7 @@
 #define CONFIG_KM_DEF_ENV_CONSTANTS					\
 	"backup_bank=0\0"						\
 	"release=run newenv; reset\0"					\
-	"pnvramsize=" xstr(CONFIG_KM_PNVRAM) "\0"			\
+	"pnvramsize=" __stringify(CONFIG_KM_PNVRAM) "\0"		\
 	"testbootcmd=setenv boot_bank ${test_bank}; "			\
 		"run ${subbootcmds}; reset\0"				\
 	""
@@ -253,7 +250,7 @@
 		"saveenv && saveenv && boot\0"				\
 	"bootlimit=3\0"							\
 	"init=/sbin/init-overlay.sh\0"					\
-	"load_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0"			\
+	"load_addr_r="__stringify(CONFIG_KM_KERNEL_ADDR) "\0"		\
 	"load=tftpboot ${load_addr_r} ${u-boot}\0"			\
 	"mtdids=" MTDIDS_DEFAULT "\0"					\
 	"mtdparts=" MTDPARTS_DEFAULT "\0"				\
diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h
index 506755b..bd5bdbc 100644
--- a/include/configs/km/km-powerpc.h
+++ b/include/configs/km/km-powerpc.h
@@ -80,14 +80,14 @@
 	"cramfsloadfdt="						\
 		"cramfsload ${fdt_addr_r} "				\
 		"fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb\0"		\
-	"fdt_addr_r=" xstr(CONFIG_KM_FDT_ADDR) "\0"			\
-	"u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"			\
+	"fdt_addr_r=" __stringify(CONFIG_KM_FDT_ADDR) "\0"		\
+	"u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"		\
 	"update="							\
-		"protect off " xstr(BOOTFLASH_START) " +${filesize} && "\
-		"erase " xstr(BOOTFLASH_START) "  +${filesize} && "	\
-		"cp.b ${load_addr_r} " xstr(BOOTFLASH_START)		\
+		"protect off " __stringify(BOOTFLASH_START) " +${filesize} && "\
+		"erase " __stringify(BOOTFLASH_START) "  +${filesize} && "\
+		"cp.b ${load_addr_r} " __stringify(BOOTFLASH_START)	\
 		"  ${filesize} && "					\
-		"protect on " xstr(BOOTFLASH_START) "  +${filesize}\0"  \
+		"protect on " __stringify(BOOTFLASH_START) "  +${filesize}\0"\
 	""
 
 #endif /* __CONFIG_KEYMILE_POWERPC_H */
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index 3aa5ca1..fd20a12 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -87,7 +87,7 @@
 #define CONFIG_KM_DEF_ENV_CPU						\
 	"boot=bootm ${load_addr_r} - -\0"				\
 	"cramfsloadfdt=true\0"						\
-	"u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.kwb\0"			\
+	"u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0"		\
 	CONFIG_KM_UPDATE_UBOOT						\
 	""
 
@@ -268,16 +268,16 @@ int get_scl(void);
 #if defined CONFIG_KM_ENV_IS_IN_SPI_NOR
 #define CONFIG_KM_NEW_ENV						\
 	"newenv=sf probe 0;"						\
-		"sf erase " xstr(CONFIG_ENV_OFFSET) " "			\
-		xstr(CONFIG_ENV_TOTAL_SIZE)"\0"
+		"sf erase " __stringify(CONFIG_ENV_OFFSET) " "		\
+		__stringify(CONFIG_ENV_TOTAL_SIZE)"\0"
 #else
 #define CONFIG_KM_NEW_ENV						\
 	"newenv=setenv addr 0x100000 && "				\
 		"i2c dev 1; mw.b ${addr} 0 4 && "			\
-		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
-		" ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "		\
-		"eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)	\
-		" ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"
+		"eeprom write " __stringify(CONFIG_SYS_DEF_EEPROM_ADDR)	\
+		" ${addr} " __stringify(CONFIG_ENV_OFFSET) " 4 && "	\
+		"eeprom write " __stringify(CONFIG_SYS_DEF_EEPROM_ADDR)	\
+		" ${addr} " __stringify(CONFIG_ENV_OFFSET_REDUND) " 4\0"
 #endif
 
 /*
diff --git a/include/configs/manroland/common.h b/include/configs/manroland/common.h
index 797378b..2e43403 100644
--- a/include/configs/manroland/common.h
+++ b/include/configs/manroland/common.h
@@ -70,9 +70,6 @@
 
 #undef	CONFIG_BOOTARGS
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
@@ -85,29 +82,29 @@
 		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
 		":${hostname}:${netdev}:off panic=1\0"			\
 	"kernel_addr=ff810000\0"					\
-	"fdt_addr="xstr(CONFIG_SYS_FLASH_BASE)"\0"			\
+	"fdt_addr="__stringify(CONFIG_SYS_FLASH_BASE)"\0"		\
 	"flash_nfs=run nfsargs addip addcon addwdt addlog;"		\
 		"bootm ${kernel_addr} - ${fdt_addr}\0"			\
 	"rootpath=/opt/eldk/ppc_82xx\0"					\
 	"kernel_addr_r=300000\0"					\
 	"fdt_addr_r=200000\0"						\
-	"fdt_file=" xstr(CONFIG_HOSTNAME) "/" 				\
-		xstr(CONFIG_HOSTNAME) ".dtb\0"				\
-	"kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" 		\
+	"fdt_file=" __stringify(CONFIG_HOSTNAME) "/" 			\
+		__stringify(CONFIG_HOSTNAME) ".dtb\0"			\
+	"kernel_file=" __stringify(CONFIG_HOSTNAME) "/uImage \0" 	\
 	"load_fdt=tftp ${fdt_addr_r} ${fdt_file};\0"			\
 	"load_kernel=tftp ${kernel_addr_r} ${kernel_file};\0" 		\
 	"addcon=setenv bootargs ${bootargs} console=ttyPSC0,${baudrate}\0"\
 	"net_nfs=run load_fdt load_kernel; "				\
 		"run nfsargs addip addcon addwdt addlog;"		\
 		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" 		\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin \0" 	\
 	"u-boot_addr_r=200000\0"					\
 	"load=tftp ${u-boot_addr_r} ${u-boot}\0"			\
-	"update=protect off " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize};"		\
-		"erase " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize};"		\
-		"cp.b ${u-boot_addr_r} " xstr(CONFIG_SYS_TEXT_BASE) 		\
+	"update=protect off " __stringify(CONFIG_SYS_TEXT_BASE) " +${filesize};"\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE) " +${filesize};"\
+		"cp.b ${u-boot_addr_r} " __stringify(CONFIG_SYS_TEXT_BASE) \
 		" ${filesize};"						\
-		"protect on " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize}\0"		\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE) " +${filesize}\0"\
 	""
 
 #define CONFIG_BOOTCOMMAND	"run net_nfs"
diff --git a/include/configs/mpc8308_p1m.h b/include/configs/mpc8308_p1m.h
index 806ed64..035a1b6 100644
--- a/include/configs/mpc8308_p1m.h
+++ b/include/configs/mpc8308_p1m.h
@@ -506,9 +506,6 @@
 
 #define CONFIG_BOOTDELAY	5	/* -1 disables auto-boot */
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
 	"consoledev=ttyS0\0"						\
@@ -542,10 +539,10 @@
 		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\
 	"bootcmd=run flash_self\0"					\
 	"load=tftp ${loadaddr} ${u-boot}\0"				\
-	"update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)		\
-		" +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)	\
+	"update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)	\
+		" +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
 		" +${filesize};cp.b ${fileaddr} "			\
-		xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"		\
+		__stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"	\
 	"upd=run load update\0"						\
 
 #endif	/* __CONFIG_H */
diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h
index f930ed0..ccccf2e 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -251,8 +251,6 @@
  * Default environment and default scripts
  * to update uboot and load kernel
  */
-#define xstr(s)	str(s)
-#define str(s)	#s
 
 #define CONFIG_HOSTNAME "mx35pdk"
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
@@ -266,16 +264,16 @@
 		":${hostname}:${netdev}:off panic=1\0"			\
 	"addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0"		\
 	"addip=if test -n ${ipdyn};then run addip_dyn;"			\
-		"else run addip_sta;fi\0"	\
+		"else run addip_sta;fi\0"				\
 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
 	"addtty=setenv bootargs ${bootargs}"				\
 		" console=ttymxc0,${baudrate}\0"			\
 	"addmisc=setenv bootargs ${bootargs} ${misc}\0"			\
 	"loadaddr=80800000\0"						\
 	"kernel_addr_r=80800000\0"					\
-	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\
-	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\
-	"ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0"		\
+	"hostname=" __stringify(CONFIG_HOSTNAME) "\0"			\
+	"bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"		\
+	"ramdisk_file=" __stringify(CONFIG_HOSTNAME) "/uRamdisk\0"	\
 	"flash_self=run ramargs addip addtty addmtd addmisc;"		\
 		"bootm ${kernel_addr} ${ramdisk_addr}\0"		\
 	"flash_nfs=run nfsargs addip addtty addmtd addmisc;"		\
@@ -285,9 +283,9 @@
 		"bootm ${kernel_addr_r}\0"				\
 	"net_self_load=tftp ${kernel_addr_r} ${bootfile};"		\
 		"tftp ${ramdisk_addr_r} ${ramdisk_file};\0"		\
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"			\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"		\
 	"load=tftp ${loadaddr} ${u-boot}\0"				\
-	"uboot_addr=" xstr(CONFIG_SYS_MONITOR_BASE) "\0"		\
+	"uboot_addr=" __stringify(CONFIG_SYS_MONITOR_BASE) "\0"		\
 	"update=protect off ${uboot_addr} +40000;"			\
 		"erase ${uboot_addr} +40000;"				\
 		"cp.b ${loadaddr} ${uboot_addr} ${filesize}\0"		\
diff --git a/include/configs/qong.h b/include/configs/qong.h
index e824e17..d5cb9f6 100644
--- a/include/configs/qong.h
+++ b/include/configs/qong.h
@@ -146,9 +146,6 @@
 
 #define CONFIG_LOADADDR		0x80800000	/* loadaddr env var */
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
@@ -178,10 +175,10 @@
 		"bootm\0"						\
 	"bootcmd=run flash_self\0"					\
 	"load=tftp ${loadaddr} ${u-boot}\0"				\
-	"update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)		\
-		" +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)	\
+	"update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)	\
+		" +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
 		" +${filesize};cp.b ${fileaddr} "			\
-		xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"		\
+		__stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"	\
 	"upd=run load update\0"						\
 	"videomode=video=ctfb:x:640,y:480,depth:16,mode:0,pclk:40000,"	\
 		"le:120,ri:40,up:35,lo:10,hs:30,vs:3,sync:100663296,"	\
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 24f6f7e..6a3aa3e 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -300,9 +300,6 @@
 				"1m(u-boot),256k(env1)," \
 				"256k(env2),6m(kernel),-(rootfs)"
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 #define	CONFIG_TAM3517_SETTINGS						\
 	"netdev=eth0\0"							\
 	"nandargs=setenv bootargs root=${nandroot} "			\
@@ -322,8 +319,8 @@
 	"addmisc=setenv bootargs ${bootargs} ${misc}\0"			\
 	"loadaddr=82000000\0"						\
 	"kernel_addr_r=82000000\0"					\
-	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\
-	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\
+	"hostname=" __stringify(CONFIG_HOSTNAME) "\0"			\
+	"bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0"		\
 	"flash_self=run ramargs addip addtty addmtd addmisc;"		\
 		"bootm ${kernel_addr} ${ramdisk_addr}\0"		\
 	"flash_nfs=run nfsargs addip addtty addmtd addmisc;"		\
@@ -338,10 +335,10 @@
 		"run ramargs addip addtty addmtd addmisc;"		\
 		"bootm ${kernel_addr_r} ${ramdisk_addr_r};"		\
 		"else echo Images not loades;fi\0"			\
-	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.img\0"			\
+	"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.img\0"		\
 	"load=tftp ${loadaddr} ${u-boot}\0"				\
 	"loadmlo=tftp ${loadaddr} ${mlo}\0"				\
-	"mlo=" xstr(CONFIG_HOSTNAME) "/MLO\0"				\
+	"mlo=" __stringify(CONFIG_HOSTNAME) "/MLO\0"			\
 	"uboot_addr=0x80000\0"						\
 	"update=nandecc sw;nand erase ${uboot_addr} 100000;"		\
 		"nand write ${loadaddr} ${uboot_addr} 80000\0"		\
diff --git a/include/configs/tx25.h b/include/configs/tx25.h
index 6821528..5fe2265 100644
--- a/include/configs/tx25.h
+++ b/include/configs/tx25.h
@@ -148,9 +148,6 @@
 #define CONFIG_LOADADDR		0x81000000	/* loadaddr env var */
 #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
 
-#define xstr(s)	str(s)
-#define str(s)	#s
-
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
@@ -164,7 +161,7 @@
 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
 	"addmisc=setenv bootargs ${bootargs}\0"				\
 	"u-boot=tx25/u-boot.bin\0"					\
-	"kernel_addr_r=" xstr(CONFIG_LOADADDR) "\0"			\
+	"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0"		\
 	"hostname=tx25\0"						\
 	"bootfile=tx25/uImage\0"					\
 	"rootpath=/opt/eldk/arm\0"					\
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR()
  2012-08-08 10:52 [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Marek Vasut
  2012-08-08 10:52 ` [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr() Marek Vasut
@ 2012-08-08 10:52 ` Marek Vasut
  2012-08-08 15:17   ` Mike Frysinger
                     ` (2 more replies)
  2012-08-08 15:16 ` [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Mike Frysinger
                   ` (3 subsequent siblings)
  5 siblings, 3 replies; 19+ messages in thread
From: Marek Vasut @ 2012-08-08 10:52 UTC (permalink / raw)
  To: u-boot

Kill multiple occurances and redeclaration of MK_STR
in favor of __stringify().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
---
 arch/blackfin/include/asm/config-pre.h |    2 -
 arch/blackfin/lib/board.c              |    2 +-
 board/w7o/w7o.c                        |    9 +---
 common/cmd_nvedit.c                    |    5 +-
 common/env_common.c                    |   34 ++++++------
 common/env_embedded.c                  |   39 ++++++--------
 include/configs/M52277EVB.h            |   18 +++----
 include/configs/M5253DEMO.h            |    2 +-
 include/configs/M5373EVB.h             |    2 +-
 include/configs/M54451EVB.h            |   10 ++--
 include/configs/M54455EVB.h            |   16 +++---
 include/configs/MERGERBOX.h            |   24 ++++-----
 include/configs/MPC8260ADS.h           |   22 ++++----
 include/configs/MPC8313ERDB.h          |   21 ++++----
 include/configs/MPC8323ERDB.h          |   21 ++++----
 include/configs/MPC8349ITX.h           |   33 ++++++------
 include/configs/MPC837XERDB.h          |   21 ++++----
 include/configs/MPC8536DS.h            |   35 ++++++------
 include/configs/MPC8544DS.h            |   33 +++++++-----
 include/configs/MPC8548CDS.h           |   17 +++---
 include/configs/MPC8572DS.h            |   35 ++++++------
 include/configs/MPC8610HPCD.h          |   93 +++++++++++++++++---------------
 include/configs/MPC8641HPCN.h          |   17 +++---
 include/configs/MVBC_P.h               |   38 ++++++-------
 include/configs/MVBLM7.h               |   26 ++++-----
 include/configs/MVSMR.h                |   30 +++++------
 include/configs/P1010RDB.h             |    4 +-
 include/configs/P1022DS.h              |    4 +-
 include/configs/P1_P2_RDB.h            |   19 ++++---
 include/configs/P2020DS.h              |   36 ++++++-------
 include/configs/P2041RDB.h             |    6 +--
 include/configs/SIMPC8313.h            |   21 ++++----
 include/configs/TQM85xx.h              |   12 +++--
 include/configs/bf537-minotaur.h       |    2 +-
 include/configs/bf537-srv1.h           |    2 +-
 include/configs/bfin_adi_common.h      |   13 ++---
 include/configs/blackstamp.h           |   10 ++--
 include/configs/blackvme.h             |    6 +--
 include/configs/corenet_ds.h           |    6 +--
 include/configs/linkstation.h          |    9 ++--
 include/configs/lsxl.h                 |    4 +-
 include/configs/mcc200.h               |    9 +---
 include/configs/p1_p2_rdb_pc.h         |   22 ++++----
 include/configs/sbc8548.h              |   26 ++++-----
 include/configs/ve8313.h               |   21 +++-----
 include/configs/xpedite1000.h          |    6 +--
 include/configs/xpedite517x.h          |   12 ++---
 include/configs/xpedite520x.h          |   12 ++---
 include/configs/xpedite537x.h          |   12 ++---
 include/configs/xpedite550x.h          |   12 ++---
 tools/env/fw_env.c                     |   37 ++++++-------
 51 files changed, 453 insertions(+), 475 deletions(-)

diff --git a/arch/blackfin/include/asm/config-pre.h b/arch/blackfin/include/asm/config-pre.h
index 4ce67d4..be5687c 100644
--- a/arch/blackfin/include/asm/config-pre.h
+++ b/arch/blackfin/include/asm/config-pre.h
@@ -10,8 +10,6 @@
 #define __ASM_BLACKFIN_CONFIG_PRE_H__
 
 /* Misc helper functions */
-#define XMK_STR(x) #x
-#define MK_STR(x) XMK_STR(x)
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
 /* Bootmode defines -- your config needs to select this via CONFIG_BFIN_BOOT_MODE.
diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index c380d27..6a9282c 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -209,7 +209,7 @@ static int global_board_data_init(void)
 	gd->bd = bd;
 
 	bd->bi_r_version = version_string;
-	bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
+	bd->bi_cpu = __stringify(CONFIG_BFIN_CPU);
 	bd->bi_board_name = BFIN_BOARD_NAME;
 	bd->bi_vco = get_vco();
 	bd->bi_cclk = get_cclk();
diff --git a/board/w7o/w7o.c b/board/w7o/w7o.c
index 5c84e65..4392779 100644
--- a/board/w7o/w7o.c
+++ b/board/w7o/w7o.c
@@ -33,13 +33,6 @@
 unsigned long get_dram_size (void);
 void sdram_init(void);
 
-/*
- * Macros to transform values
- * into environment strings.
- */
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 /* ------------------------------------------------------------------------- */
 
 int board_early_init_f (void)
@@ -228,7 +221,7 @@ static void w7o_env_init (VPD * vpd)
 		/* Set 'ethaddr' envvar if 'ethaddr' envvar is the default */
 		eth = (char *)(vpd->ethAddrs[0]);
 		if (ethaddr
-		    && (strcmp (ethaddr, MK_STR (CONFIG_ETHADDR)) == 0)) {
+		    && (strcmp(ethaddr, __stringify(CONFIG_ETHADDR)) == 0)) {
 			/* Now setup ethaddr */
 			sprintf (buf, "%02x:%02x:%02x:%02x:%02x:%02x",
 				 eth[0], eth[1], eth[2], eth[3], eth[4],
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index fd05e72..835c2a4 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -71,9 +71,6 @@ DECLARE_GLOBAL_DATA_PTR;
 SPI_FLASH|NVRAM|MMC|FAT|REMOTE} or CONFIG_ENV_IS_NOWHERE
 #endif
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 /*
  * Maximum expected input data size for import command
  */
@@ -263,7 +260,7 @@ int _do_env_set(int flag, int argc, char * const argv[])
 		if (strcmp(name, "serial#") == 0 ||
 		    (strcmp(name, "ethaddr") == 0
 #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
-		     && strcmp(ep->data, MK_STR(CONFIG_ETHADDR)) != 0
+		     && strcmp(ep->data, __stringify(CONFIG_ETHADDR)) != 0
 #endif	/* CONFIG_OVERWRITE_ETHADDR_ONCE && CONFIG_ETHADDR */
 			)) {
 			printf("Can't overwrite \"%s\"\n", name);
diff --git a/common/env_common.c b/common/env_common.c
index d9e990d..39e1792 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -37,8 +37,6 @@ DECLARE_GLOBAL_DATA_PTR;
 /************************************************************************
  * Default settings to be used when no valid environment is found
  */
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
 
 const uchar default_environment[] = {
 #ifdef	CONFIG_BOOTARGS
@@ -54,37 +52,37 @@ const uchar default_environment[] = {
 	"nfsboot="	CONFIG_NFSBOOTCOMMAND		"\0"
 #endif
 #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
-	"bootdelay="	MK_STR(CONFIG_BOOTDELAY)	"\0"
+	"bootdelay="	__stringify(CONFIG_BOOTDELAY)	"\0"
 #endif
 #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0)
-	"baudrate="	MK_STR(CONFIG_BAUDRATE)		"\0"
+	"baudrate="	__stringify(CONFIG_BAUDRATE)	"\0"
 #endif
 #ifdef	CONFIG_LOADS_ECHO
-	"loads_echo="	MK_STR(CONFIG_LOADS_ECHO)	"\0"
+	"loads_echo="	__stringify(CONFIG_LOADS_ECHO)	"\0"
 #endif
 #ifdef	CONFIG_ETHADDR
-	"ethaddr="	MK_STR(CONFIG_ETHADDR)		"\0"
+	"ethaddr="	__stringify(CONFIG_ETHADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH1ADDR
-	"eth1addr="	MK_STR(CONFIG_ETH1ADDR)		"\0"
+	"eth1addr="	__stringify(CONFIG_ETH1ADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH2ADDR
-	"eth2addr="	MK_STR(CONFIG_ETH2ADDR)		"\0"
+	"eth2addr="	__stringify(CONFIG_ETH2ADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH3ADDR
-	"eth3addr="	MK_STR(CONFIG_ETH3ADDR)		"\0"
+	"eth3addr="	__stringify(CONFIG_ETH3ADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH4ADDR
-	"eth4addr="	MK_STR(CONFIG_ETH4ADDR)		"\0"
+	"eth4addr="	__stringify(CONFIG_ETH4ADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH5ADDR
-	"eth5addr="	MK_STR(CONFIG_ETH5ADDR)		"\0"
+	"eth5addr="	__stringify(CONFIG_ETH5ADDR)	"\0"
 #endif
 #ifdef	CONFIG_IPADDR
-	"ipaddr="	MK_STR(CONFIG_IPADDR)		"\0"
+	"ipaddr="	__stringify(CONFIG_IPADDR)	"\0"
 #endif
 #ifdef	CONFIG_SERVERIP
-	"serverip="	MK_STR(CONFIG_SERVERIP)		"\0"
+	"serverip="	__stringify(CONFIG_SERVERIP)	"\0"
 #endif
 #ifdef	CONFIG_SYS_AUTOLOAD
 	"autoload="	CONFIG_SYS_AUTOLOAD		"\0"
@@ -96,25 +94,25 @@ const uchar default_environment[] = {
 	"rootpath="	CONFIG_ROOTPATH			"\0"
 #endif
 #ifdef	CONFIG_GATEWAYIP
-	"gatewayip="	MK_STR(CONFIG_GATEWAYIP)	"\0"
+	"gatewayip="	__stringify(CONFIG_GATEWAYIP)	"\0"
 #endif
 #ifdef	CONFIG_NETMASK
-	"netmask="	MK_STR(CONFIG_NETMASK)		"\0"
+	"netmask="	__stringify(CONFIG_NETMASK)	"\0"
 #endif
 #ifdef	CONFIG_HOSTNAME
-	"hostname="	MK_STR(CONFIG_HOSTNAME)		"\0"
+	"hostname="	__stringify(CONFIG_HOSTNAME)	"\0"
 #endif
 #ifdef	CONFIG_BOOTFILE
 	"bootfile="	CONFIG_BOOTFILE			"\0"
 #endif
 #ifdef	CONFIG_LOADADDR
-	"loadaddr="	MK_STR(CONFIG_LOADADDR)		"\0"
+	"loadaddr="	__stringify(CONFIG_LOADADDR)	"\0"
 #endif
 #ifdef	CONFIG_CLOCKS_IN_MHZ
 	"clocks_in_mhz=1\0"
 #endif
 #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
-	"pcidelay="	MK_STR(CONFIG_PCI_BOOTDELAY)	"\0"
+	"pcidelay="	__stringify(CONFIG_PCI_BOOTDELAY)"\0"
 #endif
 #ifdef	CONFIG_ENV_VARS_UBOOT_CONFIG
 	"arch="		CONFIG_SYS_ARCH			"\0"
diff --git a/common/env_embedded.c b/common/env_embedded.c
index 3872878..e7c2132 100644
--- a/common/env_embedded.c
+++ b/common/env_embedded.c
@@ -81,13 +81,6 @@
 	GEN_SET_VALUE(name, value)
 
 /*
- * Macros to transform values
- * into environment strings.
- */
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
-/*
  * Check to see if we are building with a
  * computed CRC.  Otherwise define it as ~0.
  */
@@ -114,40 +107,40 @@ env_t environment __PPCENV__ = {
 	"nfsboot="	CONFIG_NFSBOOTCOMMAND		"\0"
 #endif
 #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
-	"bootdelay="	MK_STR(CONFIG_BOOTDELAY)	"\0"
+	"bootdelay="	__stringify(CONFIG_BOOTDELAY)	"\0"
 #endif
 #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0)
-	"baudrate="	MK_STR(CONFIG_BAUDRATE)		"\0"
+	"baudrate="	__stringify(CONFIG_BAUDRATE)	"\0"
 #endif
 #ifdef	CONFIG_LOADS_ECHO
-	"loads_echo="	MK_STR(CONFIG_LOADS_ECHO)	"\0"
+	"loads_echo="	__stringify(CONFIG_LOADS_ECHO)	"\0"
 #endif
 #ifdef	CONFIG_ETHADDR
-	"ethaddr="	MK_STR(CONFIG_ETHADDR)		"\0"
+	"ethaddr="	__stringify(CONFIG_ETHADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH1ADDR
-	"eth1addr="	MK_STR(CONFIG_ETH1ADDR)		"\0"
+	"eth1addr="	__stringify(CONFIG_ETH1ADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH2ADDR
-	"eth2addr="	MK_STR(CONFIG_ETH2ADDR)		"\0"
+	"eth2addr="	__stringify(CONFIG_ETH2ADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH3ADDR
-	"eth3addr="	MK_STR(CONFIG_ETH3ADDR)		"\0"
+	"eth3addr="	__stringify(CONFIG_ETH3ADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH4ADDR
-	"eth4addr="	MK_STR(CONFIG_ETH4ADDR)		"\0"
+	"eth4addr="	__stringify(CONFIG_ETH4ADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETH5ADDR
-	"eth5addr="	MK_STR(CONFIG_ETH5ADDR)		"\0"
+	"eth5addr="	__stringify(CONFIG_ETH5ADDR)	"\0"
 #endif
 #ifdef	CONFIG_ETHPRIME
 	"ethprime="	CONFIG_ETHPRIME			"\0"
 #endif
 #ifdef	CONFIG_IPADDR
-	"ipaddr="	MK_STR(CONFIG_IPADDR)		"\0"
+	"ipaddr="	__stringify(CONFIG_IPADDR)	"\0"
 #endif
 #ifdef	CONFIG_SERVERIP
-	"serverip="	MK_STR(CONFIG_SERVERIP)		"\0"
+	"serverip="	__stringify(CONFIG_SERVERIP)	"\0"
 #endif
 #ifdef	CONFIG_SYS_AUTOLOAD
 	"autoload="	CONFIG_SYS_AUTOLOAD		"\0"
@@ -156,19 +149,19 @@ env_t environment __PPCENV__ = {
 	"rootpath="	CONFIG_ROOTPATH			"\0"
 #endif
 #ifdef	CONFIG_GATEWAYIP
-	"gatewayip="	MK_STR(CONFIG_GATEWAYIP)	"\0"
+	"gatewayip="	__stringify(CONFIG_GATEWAYIP)	"\0"
 #endif
 #ifdef	CONFIG_NETMASK
-	"netmask="	MK_STR(CONFIG_NETMASK)		"\0"
+	"netmask="	__stringify(CONFIG_NETMASK)	"\0"
 #endif
 #ifdef	CONFIG_HOSTNAME
-	"hostname="	MK_STR(CONFIG_HOSTNAME)		"\0"
+	"hostname="	__stringify(CONFIG_HOSTNAME)	"\0"
 #endif
 #ifdef	CONFIG_BOOTFILE
 	"bootfile="	CONFIG_BOOTFILE			"\0"
 #endif
 #ifdef	CONFIG_LOADADDR
-	"loadaddr="	MK_STR(CONFIG_LOADADDR)		"\0"
+	"loadaddr="	__stringify(CONFIG_LOADADDR)	"\0"
 #endif
 #ifdef	CONFIG_PREBOOT
 	"preboot="	CONFIG_PREBOOT			"\0"
@@ -177,7 +170,7 @@ env_t environment __PPCENV__ = {
 	"clocks_in_mhz=" "1"				"\0"
 #endif
 #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
-	"pcidelay="	MK_STR(CONFIG_PCI_BOOTDELAY)	"\0"
+	"pcidelay="	__stringify(CONFIG_PCI_BOOTDELAY)"\0"
 #endif
 #ifdef	CONFIG_ENV_VARS_UBOOT_CONFIG
 	"arch="		CONFIG_SYS_ARCH			"\0"
diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h
index d417e24..e4dea05 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -81,11 +81,11 @@
 #ifdef CONFIG_SYS_STMICRO_BOOT
 /* ST Micro serial flash */
 #define CONFIG_EXTRA_ENV_SETTINGS		\
-	"inpclk=" MK_STR(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
+	"inpclk=" __stringify(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
 	"loadaddr=0x40010000\0"			\
 	"uboot=u-boot.bin\0"			\
 	"load=loadb ${loadaddr} ${baudrate};"	\
-	"loadb " MK_STR(CONFIG_SYS_LOAD_ADDR2) " ${baudrate} \0"	\
+	"loadb " __stringify(CONFIG_SYS_LOAD_ADDR2) " ${baudrate} \0"	\
 	"upd=run load; run prog\0"		\
 	"prog=sf probe 0:2 10000 1;"		\
 	"sf erase 0 30000;"			\
@@ -95,20 +95,20 @@
 #endif
 #ifdef CONFIG_SYS_SPANSION_BOOT
 #define CONFIG_EXTRA_ENV_SETTINGS		\
-	"inpclk=" MK_STR(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
+	"inpclk=" __stringify(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
 	"loadaddr=0x40010000\0"			\
 	"uboot=u-boot.bin\0"			\
 	"load=loadb ${loadaddr} ${baudrate}\0"	\
 	"upd=run load; run prog\0"		\
-	"prog=prot off " MK_STR(CONFIG_SYS_FLASH_BASE)	\
-	" " MK_STR(CONFIG_SYS_UBOOT_END) ";"		\
-	"era " MK_STR(CONFIG_SYS_FLASH_BASE) " "	\
-	MK_STR(CONFIG_SYS_UBOOT_END) ";"		\
-	"cp.b ${loadaddr} " MK_STR(CONFIG_SYS_FLASH_BASE)	\
+	"prog=prot off " __stringify(CONFIG_SYS_FLASH_BASE)	\
+	" " __stringify(CONFIG_SYS_UBOOT_END) ";"		\
+	"era " __stringify(CONFIG_SYS_FLASH_BASE) " "		\
+	__stringify(CONFIG_SYS_UBOOT_END) ";"			\
+	"cp.b ${loadaddr} " __stringify(CONFIG_SYS_FLASH_BASE)	\
 	" ${filesize}; save\0"			\
 	"updsbf=run loadsbf; run progsbf\0"	\
 	"loadsbf=loadb ${loadaddr} ${baudrate};"	\
-	"loadb " MK_STR(CONFIG_SYS_LOAD_ADDR2) " ${baudrate} \0"	\
+	"loadb " __stringify(CONFIG_SYS_LOAD_ADDR2) " ${baudrate} \0"	\
 	"progsbf=sf probe 0:2 10000 1;"		\
 	"sf erase 0 30000;"			\
 	"sf write ${loadaddr} 0 30000;"		\
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index 30584fe..fe1cca5 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -99,7 +99,7 @@
 
 #	define CONFIG_EXTRA_ENV_SETTINGS		\
 		"netdev=eth0\0"				\
-		"inpclk=" MK_STR(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
+		"inpclk=" __stringify(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
 		"loadaddr=10000\0"			\
 		"u-boot=u-boot.bin\0"			\
 		"load=tftp ${loadaddr) ${u-boot}\0"	\
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index 0d09f0e..b720f32 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -118,7 +118,7 @@
 #define CONFIG_HOSTNAME		M5373EVB
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"			\
-	"loadaddr=" MK_STR(CONFIG_SYS_LOAD_ADDR) "\0"	\
+	"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0"	\
 	"u-boot=u-boot.bin\0"	\
 	"load=tftp ${loadaddr) ${u-boot}\0"	\
 	"upd=run load; run prog\0"	\
diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h
index 64928e9..6552f69 100644
--- a/include/configs/M54451EVB.h
+++ b/include/configs/M54451EVB.h
@@ -118,12 +118,12 @@
 #define	CONFIG_SYS_LOAD_ADDR2		0x40010007
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"netdev=eth0\0"				\
-	"inpclk=" MK_STR(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
+	"inpclk=" __stringify(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
 	"loadaddr=0x40010000\0"			\
 	"sbfhdr=sbfhdr.bin\0"			\
 	"uboot=u-boot.bin\0"			\
 	"load=tftp ${loadaddr} ${sbfhdr};"	\
-	"tftp " MK_STR(CONFIG_SYS_LOAD_ADDR2) " ${uboot} \0"	\
+	"tftp " __stringify(CONFIG_SYS_LOAD_ADDR2) " ${uboot} \0"	\
 	"upd=run load; run prog\0"		\
 	"prog=sf probe 0:1 1000000 3;"		\
 	"sf erase 0 30000;"			\
@@ -134,13 +134,13 @@
 #define CONFIG_SYS_UBOOT_END	0x3FFFF
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"netdev=eth0\0"				\
-	"inpclk=" MK_STR(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
+	"inpclk=" __stringify(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
 	"loadaddr=40010000\0"			\
 	"u-boot=u-boot.bin\0"			\
 	"load=tftp ${loadaddr) ${u-boot}\0"	\
 	"upd=run load; run prog\0"		\
-	"prog=prot off 0 " MK_STR(CONFIG_SYS_UBOOT_END)	\
-	"; era 0 " MK_STR(CONFIG_SYS_UBOOT_END) " ;"	\
+	"prog=prot off 0 " __stringify(CONFIG_SYS_UBOOT_END)	\
+	"; era 0 " __stringify(CONFIG_SYS_UBOOT_END) " ;"	\
 	"cp.b ${loadaddr} 0 ${filesize};"	\
 	"save\0"				\
 	""
diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h
index b623c33..1bc2c5a 100644
--- a/include/configs/M54455EVB.h
+++ b/include/configs/M54455EVB.h
@@ -125,12 +125,12 @@
 #define	CONFIG_SYS_LOAD_ADDR2		0x40010013
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"netdev=eth0\0"				\
-	"inpclk=" MK_STR(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
+	"inpclk=" __stringify(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
 	"loadaddr=0x40010000\0"			\
 	"sbfhdr=sbfhdr.bin\0"			\
 	"uboot=u-boot.bin\0"			\
 	"load=tftp ${loadaddr} ${sbfhdr};"	\
-	"tftp " MK_STR(CONFIG_SYS_LOAD_ADDR2) " ${uboot} \0"	\
+	"tftp " __stringify(CONFIG_SYS_LOAD_ADDR2) " ${uboot} \0"	\
 	"upd=run load; run prog\0"		\
 	"prog=sf probe 0:1 1000000 3;"		\
 	"sf erase 0 30000;"			\
@@ -146,16 +146,16 @@
 #endif
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"netdev=eth0\0"				\
-	"inpclk=" MK_STR(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
+	"inpclk=" __stringify(CONFIG_SYS_INPUT_CLKSRC) "\0"	\
 	"loadaddr=0x40010000\0"			\
 	"uboot=u-boot.bin\0"			\
 	"load=tftp ${loadaddr} ${uboot}\0"	\
 	"upd=run load; run prog\0"		\
-	"prog=prot off " MK_STR(CONFIG_SYS_FLASH_BASE)	\
-	" " MK_STR(CONFIG_SYS_UBOOT_END) ";"		\
-	"era " MK_STR(CONFIG_SYS_FLASH_BASE) " "	\
-	MK_STR(CONFIG_SYS_UBOOT_END) ";"		\
-	"cp.b ${loadaddr} " MK_STR(CONFIG_SYS_FLASH_BASE)	\
+	"prog=prot off " __stringify(CONFIG_SYS_FLASH_BASE)	\
+	" " __stringify(CONFIG_SYS_UBOOT_END) ";"		\
+	"era " __stringify(CONFIG_SYS_FLASH_BASE) " "		\
+	__stringify(CONFIG_SYS_UBOOT_END) ";"			\
+	"cp.b ${loadaddr} " __stringify(CONFIG_SYS_FLASH_BASE)	\
 	" ${filesize}; save\0"			\
 	""
 #endif
diff --git a/include/configs/MERGERBOX.h b/include/configs/MERGERBOX.h
index 077e0d0..c296e3c 100644
--- a/include/configs/MERGERBOX.h
+++ b/include/configs/MERGERBOX.h
@@ -548,9 +548,6 @@
 				"then; run fitboot;else;run ubiboot;fi;"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200n8"
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"console_nr=0\0"\
 	"stdin=serial\0"\
@@ -559,15 +556,15 @@
 	"boot_sqfs=1\0"\
 	"usb_dr_mode=host\0"\
 	"bootfile=MergerBox.fit\0"\
-	"baudrate=" MK_STR(CONFIG_BAUDRATE) "\0"\
+	"baudrate=" __stringify(CONFIG_BAUDRATE) "\0"\
 	"fpga=0\0"\
-	"fpgadata=" MK_STR(MV_FPGA_DATA) "\0"\
-	"fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0"\
-	"mv_kernel_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0"\
-	"mv_initrd_ram=" MK_STR(MV_INITRD_ADDR_RAM) "\0"\
-	"mv_dtb_ram=" MK_STR(MV_DTB_ADDR_RAM) "\0"\
-	"uboota=" MK_STR(CONFIG_SYS_TEXT_BASE) "\0"\
-	"fitaddr=" MK_STR(MV_FITADDR) "\0"\
+	"fpgadata=" __stringify(MV_FPGA_DATA) "\0"\
+	"fpgadatasize=" __stringify(MV_FPGA_SIZE) "\0"\
+	"mv_kernel_ram=" __stringify(MV_KERNEL_ADDR_RAM) "\0"\
+	"mv_initrd_ram=" __stringify(MV_INITRD_ADDR_RAM) "\0"\
+	"mv_dtb_ram=" __stringify(MV_DTB_ADDR_RAM) "\0"\
+	"uboota=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"\
+	"fitaddr=" __stringify(MV_FITADDR) "\0"\
 	"mv_version=" U_BOOT_VERSION "\0"\
 	"mtdids=" MTDIDS_DEFAULT "\0"\
 	"mtdparts=" MTDPARTS_DEFAULT "\0"\
@@ -602,12 +599,9 @@
 	"i2c_speed=i2c dev 0;i2c speed 300000;i2c dev 1;i2c speed 120000\0"\
 	"init_sdi_tx=i2c mw 21 6 0;i2c mw 21 2 0;i2c mw 21 3 0;sleep 1;"\
 		"i2c mw 21 2 ff;i2c mw 21 3 3c\0"\
-	"splashimage=" MK_STR(MV_SPLAH_ADDR) "\0"\
+	"splashimage=" __stringify(MV_SPLAH_ADDR) "\0"\
 	""
 
-#undef MK_STR
-#undef XMK_STR
-
 /*
  * FPGA
  */
diff --git a/include/configs/MPC8260ADS.h b/include/configs/MPC8260ADS.h
index bb72b35..c4c41c7 100644
--- a/include/configs/MPC8260ADS.h
+++ b/include/configs/MPC8260ADS.h
@@ -531,17 +531,18 @@
 #define CONFIG_NETDEV eth0
 #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"netdev=" MK_STR(CONFIG_NETDEV) "\0"				\
+	"netdev=" __stringify(CONFIG_NETDEV) "\0"			\
 	"tftpflash=tftpboot $loadaddr $uboot; "				\
-		"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-		"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-		"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-		"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-		"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
+		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" +$filesize; "	\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
+		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize; "	\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize\0"	\
 	"fdtaddr=400000\0"						\
 	"console=ttyCPM0\0"						\
 	"setbootargs=setenv bootargs "					\
@@ -565,7 +566,4 @@
 	"tftp $fdtaddr $fdtfile;"					\
 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif /* __CONFIG_H */
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 99edfe6..fd80be5 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -677,19 +677,21 @@
 #define CONFIG_BOOTDELAY	6	/* -1 disables auto-boot */
 #define CONFIG_BAUDRATE		115200
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"netdev=" CONFIG_NETDEV "\0"					\
 	"ethprime=TSEC1\0"						\
 	"uboot=" CONFIG_UBOOTPATH "\0"					\
 	"tftpflash=tftpboot $loadaddr $uboot; "				\
-		"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "\
-		"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-		"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "\
-		"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "\
-		"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"\
+		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" +$filesize; "	\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize; "	\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize\0"	\
 	"fdtaddr=780000\0"						\
 	"fdtfile=" CONFIG_FDTFILE "\0"					\
 	"console=ttyS0\0"						\
@@ -716,7 +718,4 @@
 	"tftp $fdtaddr $fdtfile;"					\
 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif	/* __CONFIG_H */
diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h
index 8c027f9..8d5ed0f 100644
--- a/include/configs/MPC8323ERDB.h
+++ b/include/configs/MPC8323ERDB.h
@@ -514,18 +514,20 @@
 #define CONFIG_BOOTDELAY	6	/* -1 disables auto-boot */
 #define CONFIG_BAUDRATE		115200
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"netdev=" CONFIG_NETDEV "\0"					\
 	"uboot=" CONFIG_UBOOTPATH "\0"					\
 	"tftpflash=tftp $loadaddr $uboot;"				\
-		"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "\
-		"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-		"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "\
-		"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "\
-		"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"\
+		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" +$filesize; "	\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize; "	\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize\0"	\
 	"fdtaddr=780000\0"						\
 	"fdtfile=" CONFIG_FDTFILE "\0"					\
 	"ramdiskaddr=1000000\0"						\
@@ -554,7 +556,4 @@
 	"tftp $fdtaddr $fdtfile;"					\
 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif	/* __CONFIG_H */
diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h
index 7ecb089..2c3f1f6 100644
--- a/include/configs/MPC8349ITX.h
+++ b/include/configs/MPC8349ITX.h
@@ -779,27 +779,31 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #define CONFIG_BOOTDELAY	6
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 #define CONFIG_BOOTARGS \
 	"root=/dev/nfs rw" \
-	" nfsroot=" MK_STR(CONFIG_SERVERIP) ":" CONFIG_ROOTPATH		\
-	" ip=" MK_STR(CONFIG_IPADDR) ":" MK_STR(CONFIG_SERVERIP) ":"	\
-		MK_STR(CONFIG_GATEWAYIP) ":" MK_STR(CONFIG_NETMASK) ":"	\
+	" nfsroot=" __stringify(CONFIG_SERVERIP) ":" CONFIG_ROOTPATH	\
+	" ip=" __stringify(CONFIG_IPADDR) ":"		\
+		__stringify(CONFIG_SERVERIP) ":"	\
+		__stringify(CONFIG_GATEWAYIP) ":"	\
+		__stringify(CONFIG_NETMASK) ":"		\
 		CONFIG_HOSTNAME ":" CONFIG_NETDEV ":off"		\
-	" console=" MK_STR(CONFIG_CONSOLE) "," MK_STR(CONFIG_BAUDRATE)
+	" console=" __stringify(CONFIG_CONSOLE) "," __stringify(CONFIG_BAUDRATE)
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"console=" MK_STR(CONFIG_CONSOLE) "\0"				\
+	"console=" __stringify(CONFIG_CONSOLE) "\0"			\
 	"netdev=" CONFIG_NETDEV "\0"					\
 	"uboot=" CONFIG_UBOOTPATH "\0"					\
 	"tftpflash=tftpboot $loadaddr $uboot; "				\
-		"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "\
-		"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-		"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "\
-		"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "\
-		"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"\
+		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" +$filesize; "	\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize; "	\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize\0"	\
 	"fdtaddr=780000\0"						\
 	"fdtfile=" CONFIG_FDTFILE "\0"
 
@@ -819,7 +823,4 @@ boards, we say we have two, but don't display a message if we find only one. */
 	"tftp $fdtaddr $fdtfile;"					\
 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index d821352..9ad7e3a 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -719,18 +719,20 @@
 #define CONFIG_BOOTDELAY	6	/* -1 disables auto-boot */
 #define CONFIG_BAUDRATE		115200
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"netdev=" CONFIG_NETDEV "\0"				\
 	"uboot=" CONFIG_UBOOTPATH "\0"					\
 	"tftpflash=tftp $loadaddr $uboot;"				\
-		"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
-		"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-		"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; " \
-		"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
-		"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0" \
+		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" +$filesize; "	\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize; "	\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize\0"	\
 	"fdtaddr=780000\0"						\
 	"fdtfile=" CONFIG_FDTFILE "\0"					\
 	"ramdiskaddr=1000000\0"						\
@@ -759,7 +761,4 @@
 	"tftp $fdtaddr $fdtfile;"					\
 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif	/* __CONFIG_H */
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 33ded71..dfd0c7e 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -797,21 +797,26 @@
 #define CONFIG_BAUDRATE	115200
 
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
- "netdev=eth0\0"						\
- "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
- "tftpflash=tftpboot $loadaddr $uboot; "			\
-	"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-	"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
- "consoledev=ttyS0\0"				\
- "ramdiskaddr=2000000\0"			\
- "ramdiskfile=8536ds/ramdisk.uboot\0"		\
- "fdtaddr=c00000\0"				\
- "fdtfile=8536ds/mpc8536ds.dtb\0"		\
- "bdev=sda3\0"					\
- "hwconfig=usb1:dr_mode=host,phy_type=ulpi\0"
+"netdev=eth0\0"						\
+"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"			\
+"tftpflash=tftpboot $loadaddr $uboot; "			\
+	"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" +$filesize; "	\
+	"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+		" +$filesize; "	\
+	"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" $filesize; "	\
+	"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+		" +$filesize; "	\
+	"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" $filesize\0"	\
+"consoledev=ttyS0\0"				\
+"ramdiskaddr=2000000\0"			\
+"ramdiskfile=8536ds/ramdisk.uboot\0"		\
+"fdtaddr=c00000\0"				\
+"fdtfile=8536ds/mpc8536ds.dtb\0"		\
+"bdev=sda3\0"					\
+"hwconfig=usb1:dr_mode=host,phy_type=ulpi\0"
 
 #define CONFIG_HDBOOT				\
  "setenv bootargs root=/dev/$bdev rw "		\
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index 7410050..83b8668 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -480,20 +480,25 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_BAUDRATE	115200
 
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
- "netdev=eth0\0"						\
- "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
- "tftpflash=tftpboot $loadaddr $uboot; "			\
-	"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-	"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
- "consoledev=ttyS0\0"				\
- "ramdiskaddr=2000000\0"			\
- "ramdiskfile=8544ds/ramdisk.uboot\0"		\
- "fdtaddr=c00000\0"				\
- "fdtfile=8544ds/mpc8544ds.dtb\0"		\
- "bdev=sda3\0"
+"netdev=eth0\0"						\
+"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"			\
+"tftpflash=tftpboot $loadaddr $uboot; "			\
+	"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" +$filesize; "	\
+	"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+		" +$filesize; "	\
+	"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" $filesize; "	\
+	"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+		" +$filesize; "	\
+	"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" $filesize\0"	\
+"consoledev=ttyS0\0"				\
+"ramdiskaddr=2000000\0"			\
+"ramdiskfile=8544ds/ramdisk.uboot\0"		\
+"fdtaddr=c00000\0"				\
+"fdtfile=8544ds/mpc8544ds.dtb\0"		\
+"bdev=sda3\0"
 
 #define CONFIG_NFSBOOTCOMMAND		\
  "setenv bootargs root=/dev/nfs rw "	\
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index e263994..29ce6e2 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -594,13 +594,18 @@ extern unsigned long get_clock_freq(void);
 #define	CONFIG_EXTRA_ENV_SETTINGS		\
 	"hwconfig=fsl_ddr:ecc=off\0"		\
 	"netdev=eth0\0"				\
-	"uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"	\
+	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"	\
 	"tftpflash=tftpboot $loadaddr $uboot; "	\
-		"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "   \
-		"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	      \
-		"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; " \
-		"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "    \
-		"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"\
+		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" +$filesize; "	\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize; "	\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize\0"	\
 	"consoledev=ttyS1\0"			\
 	"ramdiskaddr=2000000\0"			\
 	"ramdiskfile=ramdisk.uboot\0"		\
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index 956449e..99edda7 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -736,21 +736,26 @@
 #define CONFIG_BAUDRATE	115200
 
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
- "hwconfig=fsl_ddr:ctlr_intlv=bank,ecc=off\0"			\
- "netdev=eth0\0"						\
- "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
- "tftpflash=tftpboot $loadaddr $uboot; "			\
-	"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-	"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
- "consoledev=ttyS0\0"				\
- "ramdiskaddr=2000000\0"			\
- "ramdiskfile=8572ds/ramdisk.uboot\0"		\
- "fdtaddr=c00000\0"				\
- "fdtfile=8572ds/mpc8572ds.dtb\0"		\
- "bdev=sda3\0"
+"hwconfig=fsl_ddr:ctlr_intlv=bank,ecc=off\0"			\
+"netdev=eth0\0"						\
+"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"				\
+"tftpflash=tftpboot $loadaddr $uboot; "			\
+	"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" +$filesize; "	\
+	"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+		" +$filesize; "	\
+	"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" $filesize; "	\
+	"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+		" +$filesize; "	\
+	"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" $filesize\0"	\
+"consoledev=ttyS0\0"				\
+"ramdiskaddr=2000000\0"			\
+"ramdiskfile=8572ds/ramdisk.uboot\0"		\
+"fdtaddr=c00000\0"				\
+"fdtfile=8572ds/mpc8572ds.dtb\0"		\
+"bdev=sda3\0"
 
 #define CONFIG_HDBOOT				\
  "setenv bootargs root=/dev/$bdev rw "		\
diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h
index e10a987..c619827 100644
--- a/include/configs/MPC8610HPCD.h
+++ b/include/configs/MPC8610HPCD.h
@@ -591,58 +591,63 @@
 
 #ifdef ENV_DEBUG
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
- "netdev=eth0\0"						\
- "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
- "tftpflash=tftpboot $loadaddr $uboot; "			\
-	"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-	"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
- "consoledev=ttyS0\0"						\
- "ramdiskaddr=2000000\0"					\
- "ramdiskfile=8610hpcd/ramdisk.uboot\0"				\
- "fdtaddr=c00000\0"						\
- "fdtfile=8610hpcd/mpc8610_hpcd.dtb\0"				\
- "bdev=sda3\0"					\
- "en-wd=mw.b f8100010 0x08; echo -expect:- 08; md.b f8100010 1\0" \
- "dis-wd=mw.b f8100010 0x00; echo -expect:- 00; md.b f8100010 1\0" \
- "maxcpus=1"	\
- "eoi=mw e00400b0 0\0"						\
- "iack=md e00400a0 1\0"						\
- "ddrreg=md ${a}000 8; md ${a}080 8;md ${a}100 d; md ${a}140 4;" \
+"netdev=eth0\0"							\
+"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"			\
+"tftpflash=tftpboot $loadaddr $uboot; "				\
+	"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" +$filesize; "	\
+	"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+		" +$filesize; "	\
+	"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" $filesize; "	\
+	"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+		" +$filesize; "	\
+	"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+		" $filesize\0"	\
+"consoledev=ttyS0\0"						\
+"ramdiskaddr=2000000\0"					\
+"ramdiskfile=8610hpcd/ramdisk.uboot\0"				\
+"fdtaddr=c00000\0"						\
+"fdtfile=8610hpcd/mpc8610_hpcd.dtb\0"				\
+"bdev=sda3\0"					\
+"en-wd=mw.b f8100010 0x08; echo -expect:- 08; md.b f8100010 1\0" \
+"dis-wd=mw.b f8100010 0x00; echo -expect:- 00; md.b f8100010 1\0" \
+"maxcpus=1"	\
+"eoi=mw e00400b0 0\0"						\
+"iack=md e00400a0 1\0"						\
+"ddrreg=md ${a}000 8; md ${a}080 8;md ${a}100 d; md ${a}140 4;" \
 	"md ${a}bf0 4; md ${a}e00 3; md ${a}e20 3; md ${a}e40 7;" \
 	"md ${a}f00 5\0" \
- "ddr1regs=setenv a e0002; run ddrreg\0" \
- "gureg=md ${a}000 2c; md ${a}0b0 1; md ${a}0c0 1; md ${a}800 1;" \
+"ddr1regs=setenv a e0002; run ddrreg\0" \
+"gureg=md ${a}000 2c; md ${a}0b0 1; md ${a}0c0 1; md ${a}800 1;" \
 	"md ${a}900 6; md ${a}a00 1; md ${a}b20 3; md ${a}e00 1;" \
 	"md ${a}e60 1; md ${a}ef0 1d\0" \
- "guregs=setenv a e00e0; run gureg\0" \
- "mcmreg=md ${a}000 1b; md ${a}bf8 2; md ${a}e00 5\0" \
- "mcmregs=setenv a e0001; run mcmreg\0" \
- "diuregs=md e002c000 1d\0" \
- "dium=mw e002c01c\0" \
- "diuerr=md e002c014 1\0" \
- "pmregs=md e00e1000 2b\0" \
- "lawregs=md e0000c08 4b\0" \
- "lbcregs=md e0005000 36\0" \
- "dma0regs=md e0021100 12\0" \
- "dma1regs=md e0021180 12\0" \
- "dma2regs=md e0021200 12\0" \
- "dma3regs=md e0021280 12\0" \
+"guregs=setenv a e00e0; run gureg\0" \
+"mcmreg=md ${a}000 1b; md ${a}bf8 2; md ${a}e00 5\0" \
+"mcmregs=setenv a e0001; run mcmreg\0" \
+"diuregs=md e002c000 1d\0" \
+"dium=mw e002c01c\0" \
+"diuerr=md e002c014 1\0" \
+"pmregs=md e00e1000 2b\0" \
+"lawregs=md e0000c08 4b\0" \
+"lbcregs=md e0005000 36\0" \
+"dma0regs=md e0021100 12\0" \
+"dma1regs=md e0021180 12\0" \
+"dma2regs=md e0021200 12\0" \
+"dma3regs=md e0021280 12\0" \
  PCI_ENV \
  PCIE_ENV \
  DMA_ENV
 #else
-#define CONFIG_EXTRA_ENV_SETTINGS                               \
- "netdev=eth0\0"                                                \
- "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"                         \
- "consoledev=ttyS0\0"                                           \
- "ramdiskaddr=2000000\0"                                        \
- "ramdiskfile=8610hpcd/ramdisk.uboot\0"                         \
- "fdtaddr=c00000\0"                                             \
- "fdtfile=8610hpcd/mpc8610_hpcd.dtb\0"                          \
- "bdev=sda3\0"
+#define CONFIG_EXTRA_ENV_SETTINGS				\
+	"netdev=eth0\0"						\
+	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"consoledev=ttyS0\0"					\
+	"ramdiskaddr=2000000\0"					\
+	"ramdiskfile=8610hpcd/ramdisk.uboot\0"			\
+	"fdtaddr=c00000\0"					\
+	"fdtfile=8610hpcd/mpc8610_hpcd.dtb\0"			\
+	"bdev=sda3\0"
 #endif
 
 #define CONFIG_NFSBOOTCOMMAND					\
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index 7fd8ea8..2643097 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -728,13 +728,18 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
-	"uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
+	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"			\
 	"tftpflash=tftpboot $loadaddr $uboot; "				\
-		"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-		"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-		"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-		"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-		"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
+		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" +$filesize; "	\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize; "	\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize\0"	\
 	"consoledev=ttyS0\0"						\
 	"ramdiskaddr=2000000\0"						\
 	"ramdiskfile=your.ramdisk.u-boot\0"				\
diff --git a/include/configs/MVBC_P.h b/include/configs/MVBC_P.h
index eb0233b..6850965 100644
--- a/include/configs/MVBC_P.h
+++ b/include/configs/MVBC_P.h
@@ -139,9 +139,6 @@
 #define CONFIG_BOOTARGS		"root=/dev/ram ro rootfstype=squashfs"
 #define CONFIG_ENV_OVERWRITE
 
-#define XMK_STR(x)      #x
-#define MK_STR(x)       XMK_STR(x)
-
 #define CONFIG_EXTRA_ENV_SETTINGS				\
 	"console_nr=0\0"					\
 	"console=yes\0"						\
@@ -149,23 +146,23 @@
 	"stdout=serial\0"					\
 	"stderr=serial\0"					\
 	"fpga=0\0"						\
-	"fpgadata=" MK_STR(MV_FPGA_DATA) "\0"			\
-	"fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0"		\
-	"script_addr=" MK_STR(MV_SCRIPT_ADDR) "\0"		\
-	"script_addr2=" MK_STR(MV_SCRIPT_ADDR2) "\0"		\
-	"mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0"		\
-	"mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0"	\
-	"mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0"		\
-	"mv_initrd_addr_ram=" MK_STR(MV_INITRD_ADDR_RAM) "\0"	\
-	"mv_initrd_length=" MK_STR(MV_INITRD_LENGTH) "\0"	\
-	"mv_dtb_addr=" MK_STR(MV_DTB_ADDR) "\0"			\
-	"mv_dtb_addr_ram=" MK_STR(MV_DTB_ADDR_RAM) "\0"		\
-	"dtb_name=" MK_STR(MV_DTB_NAME) "\0"			\
-	"mv_scratch_addr=" MK_STR(MV_SCRATCH_ADDR) "\0"		\
-	"mv_scratch_length=" MK_STR(MV_SCRATCH_LENGTH) "\0"	\
+	"fpgadata=" __stringify(MV_FPGA_DATA) "\0"			\
+	"fpgadatasize=" __stringify(MV_FPGA_SIZE) "\0"		\
+	"script_addr=" __stringify(MV_SCRIPT_ADDR) "\0"		\
+	"script_addr2=" __stringify(MV_SCRIPT_ADDR2) "\0"		\
+	"mv_kernel_addr=" __stringify(MV_KERNEL_ADDR) "\0"		\
+	"mv_kernel_addr_ram=" __stringify(MV_KERNEL_ADDR_RAM) "\0"	\
+	"mv_initrd_addr=" __stringify(MV_INITRD_ADDR) "\0"		\
+	"mv_initrd_addr_ram=" __stringify(MV_INITRD_ADDR_RAM) "\0"	\
+	"mv_initrd_length=" __stringify(MV_INITRD_LENGTH) "\0"	\
+	"mv_dtb_addr=" __stringify(MV_DTB_ADDR) "\0"			\
+	"mv_dtb_addr_ram=" __stringify(MV_DTB_ADDR_RAM) "\0"		\
+	"dtb_name=" __stringify(MV_DTB_NAME) "\0"			\
+	"mv_scratch_addr=" __stringify(MV_SCRATCH_ADDR) "\0"		\
+	"mv_scratch_length=" __stringify(MV_SCRATCH_LENGTH) "\0"	\
 	"mv_version=" U_BOOT_VERSION "\0"			\
-	"dhcp_client_id=" MK_STR(MV_CI) "\0"			\
-	"dhcp_vendor-class-identifier=" MK_STR(MV_VCI) "\0"	\
+	"dhcp_client_id=" __stringify(MV_CI) "\0"			\
+	"dhcp_vendor-class-identifier=" __stringify(MV_VCI) "\0"	\
 	"netretry=no\0"						\
 	"use_static_ipaddr=no\0"				\
 	"static_ipaddr=192.168.90.10\0"				\
@@ -187,9 +184,6 @@
 	"sensor_cnt=1\0"					\
 	""
 
-#undef XMK_STR
-#undef MK_STR
-
 /*
  * IPB Bus clocking configuration.
  */
diff --git a/include/configs/MVBLM7.h b/include/configs/MVBLM7.h
index 9b458c3..a99ad3c 100644
--- a/include/configs/MVBLM7.h
+++ b/include/configs/MVBLM7.h
@@ -455,23 +455,23 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS				\
 	"console_nr=0\0"					\
-	"baudrate=" MK_STR(CONFIG_BAUDRATE) "\0"		\
+	"baudrate=" __stringify(CONFIG_BAUDRATE) "\0"		\
 	"stdin=serial\0"					\
 	"stdout=serial\0"					\
 	"stderr=serial\0"					\
 	"fpga=0\0"						\
-	"fpgadata=" MK_STR(MV_FPGA_DATA) "\0"			\
-	"fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0"		\
-	"script_addr=" MK_STR(MV_SCRIPT_ADDR) "\0"		\
-	"script_addr2=" MK_STR(MV_SCRIPT_ADDR2) "\0"		\
-	"mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0"		\
-	"mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0"	\
-	"mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0"		\
-	"mv_initrd_addr_ram=" MK_STR(MV_INITRD_ADDR_RAM) "\0"	\
-	"mv_initrd_length=" MK_STR(MV_INITRD_LENGTH) "\0"	\
-	"mv_dtb_addr=" MK_STR(MV_DTB_ADDR) "\0"			\
-	"mv_dtb_addr_ram=" MK_STR(MV_DTB_ADDR_RAM) "\0"		\
-	"dtb_name=" MK_STR(MV_DTB_NAME) "\0"			\
+	"fpgadata=" __stringify(MV_FPGA_DATA) "\0"			\
+	"fpgadatasize=" __stringify(MV_FPGA_SIZE) "\0"		\
+	"script_addr=" __stringify(MV_SCRIPT_ADDR) "\0"		\
+	"script_addr2=" __stringify(MV_SCRIPT_ADDR2) "\0"		\
+	"mv_kernel_addr=" __stringify(MV_KERNEL_ADDR) "\0"		\
+	"mv_kernel_addr_ram=" __stringify(MV_KERNEL_ADDR_RAM) "\0"	\
+	"mv_initrd_addr=" __stringify(MV_INITRD_ADDR) "\0"		\
+	"mv_initrd_addr_ram=" __stringify(MV_INITRD_ADDR_RAM) "\0"	\
+	"mv_initrd_length=" __stringify(MV_INITRD_LENGTH) "\0"	\
+	"mv_dtb_addr=" __stringify(MV_DTB_ADDR) "\0"			\
+	"mv_dtb_addr_ram=" __stringify(MV_DTB_ADDR_RAM) "\0"		\
+	"dtb_name=" __stringify(MV_DTB_NAME) "\0"			\
 	"mv_version=" U_BOOT_VERSION "\0"			\
 	"dhcp_client_id=" MV_CI "\0"				\
 	"dhcp_vendor-class-identifier=" MV_VCI "\0"		\
diff --git a/include/configs/MVSMR.h b/include/configs/MVSMR.h
index 0b75b76..bf2f44e 100644
--- a/include/configs/MVSMR.h
+++ b/include/configs/MVSMR.h
@@ -122,9 +122,6 @@
 #define CONFIG_BOOTARGS		"root=/dev/ram ro rootfstype=squashfs" \
 					" allocate=6M"
 
-#define XMK_STR(x)      #x
-#define MK_STR(x)       XMK_STR(x)
-
 #define CONFIG_EXTRA_ENV_SETTINGS				\
 	"console_nr=0\0"					\
 	"console=no\0"						\
@@ -132,19 +129,19 @@
 	"stdout=serial\0"					\
 	"stderr=serial\0"					\
 	"fpga=0\0"						\
-	"fpgadata=" MK_STR(MV_FPGA_DATA) "\0"			\
-	"fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0"		\
-	"mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0"		\
-	"mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0"	\
-	"script_addr=" MK_STR(MV_SCRIPT_ADDR) "\0"		\
-	"mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0"		\
-	"mv_initrd_addr_ram=" MK_STR(MV_INITRD_ADDR_RAM) "\0"	\
-	"mv_initrd_length=" MK_STR(MV_INITRD_LENGTH) "\0"	\
-	"mv_scratch_addr=" MK_STR(MV_SCRATCH_ADDR) "\0"		\
-	"mv_scratch_length=" MK_STR(MV_SCRATCH_LENGTH) "\0"	\
+	"fpgadata=" __stringify(MV_FPGA_DATA) "\0"			\
+	"fpgadatasize=" __stringify(MV_FPGA_SIZE) "\0"		\
+	"mv_kernel_addr=" __stringify(MV_KERNEL_ADDR) "\0"		\
+	"mv_kernel_addr_ram=" __stringify(MV_KERNEL_ADDR_RAM) "\0"	\
+	"script_addr=" __stringify(MV_SCRIPT_ADDR) "\0"		\
+	"mv_initrd_addr=" __stringify(MV_INITRD_ADDR) "\0"		\
+	"mv_initrd_addr_ram=" __stringify(MV_INITRD_ADDR_RAM) "\0"	\
+	"mv_initrd_length=" __stringify(MV_INITRD_LENGTH) "\0"	\
+	"mv_scratch_addr=" __stringify(MV_SCRATCH_ADDR) "\0"		\
+	"mv_scratch_length=" __stringify(MV_SCRATCH_LENGTH) "\0"	\
 	"mv_version=" U_BOOT_VERSION "\0"			\
-	"dhcp_client_id=" MK_STR(MV_CI) "\0"			\
-	"dhcp_vendor-class-identifier=" MK_STR(MV_VCI) "\0"	\
+	"dhcp_client_id=" __stringify(MV_CI) "\0"			\
+	"dhcp_vendor-class-identifier=" __stringify(MV_VCI) "\0"	\
 	"netretry=no\0"						\
 	"use_static_ipaddr=no\0"				\
 	"static_ipaddr=192.168.0.101\0"				\
@@ -155,9 +152,6 @@
 	"netboot=no\0"						\
 	""
 
-#undef XMK_STR
-#undef MK_STR
-
 /*
  * IPB Bus clocking configuration.
  */
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 67dba9f..ea6ddf7 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -726,9 +726,9 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_BAUDRATE		115200
 
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
-	"hwconfig=" MK_STR(CONFIG_DEF_HWCONFIG)  "\0"	\
+	"hwconfig=" __stringify(CONFIG_DEF_HWCONFIG)  "\0"	\
 	"netdev=eth0\0"						\
-	"uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
+	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
 	"loadaddr=1000000\0"			\
 	"consoledev=ttyS0\0"				\
 	"ramdiskaddr=2000000\0"			\
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index 50d3f8d..07b7ac5 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -495,8 +495,8 @@
 
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
 	"netdev=eth0\0"						\
-	"uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"			\
-	"ubootaddr=" MK_STR(CONFIG_SYS_TEXT_BASE) "\0"		\
+	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"	\
 	"tftpflash=tftpboot $loadaddr $uboot && "		\
 		"protect off $ubootaddr +$filesize && "		\
 		"erase $ubootaddr +$filesize && "		\
diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
index ab88166..2cb5719 100644
--- a/include/configs/P1_P2_RDB.h
+++ b/include/configs/P1_P2_RDB.h
@@ -653,14 +653,19 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
 	"netdev=eth0\0"						\
-	"uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
-	"loadaddr=1000000\0"			\
+	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"loadaddr=1000000\0"					\
 	"tftpflash=tftpboot $loadaddr $uboot; "			\
-		"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-		"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-		"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-		"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-		"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
+		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" +$filesize; "	\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize; "	\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize\0"	\
 	"consoledev=ttyS0\0"				\
 	"ramdiskaddr=2000000\0"			\
 	"ramdiskfile=rootfs.ext2.gz.uboot\0"		\
diff --git a/include/configs/P2020DS.h b/include/configs/P2020DS.h
index 5fc9563..791c0ee 100644
--- a/include/configs/P2020DS.h
+++ b/include/configs/P2020DS.h
@@ -717,30 +717,30 @@
 #define CONFIG_BAUDRATE	115200
 
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
- "perf_mode=performance\0"			\
+"perf_mode=performance\0"			\
 	"hwconfig=fsl_ddr:ctlr_intlv=bank,bank_intlv=cs0_cs1;"	\
 	"usb1:dr_mode=host,phy_type=ulpi\0"			\
- "netdev=eth0\0"						\
- "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
- "tftpflash=tftpboot $loadaddr $uboot; "			\
-	"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-	"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
- "satabootcmd=setenv bootargs root=/dev/$bdev rw "	\
+"netdev=eth0\0"						\
+"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"			\
+"tftpflash=tftpboot $loadaddr $uboot; "			\
+	"protect off " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
+	"erase " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
+	"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize; " \
+	"protect on " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
+	"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize\0" \
+"satabootcmd=setenv bootargs root=/dev/$bdev rw "	\
 	"console=$consoledev,$baudrate $othbootargs;"	\
 	"tftp $loadaddr $bootfile;"			\
 	"tftp $fdtaddr $fdtfile;"			\
 	"bootm $loadaddr - $fdtaddr"			\
- "consoledev=ttyS0\0"				\
- "ramdiskaddr=2000000\0"			\
- "ramdiskfile=p2020ds/ramdisk.uboot\0"		\
- "fdtaddr=c00000\0"				\
- "othbootargs=cache-sram-size=0x10000\0"	\
- "fdtfile=p2020ds/p2020ds.dtb\0"		\
- "bdev=sda3\0"					\
- "partition=scsi 0:0\0"
+"consoledev=ttyS0\0"				\
+"ramdiskaddr=2000000\0"			\
+"ramdiskfile=p2020ds/ramdisk.uboot\0"		\
+"fdtaddr=c00000\0"				\
+"othbootargs=cache-sram-size=0x10000\0"	\
+"fdtfile=p2020ds/p2020ds.dtb\0"		\
+"bdev=sda3\0"					\
+"partition=scsi 0:0\0"
 
 #define CONFIG_HDBOOT				\
  "setenv bootargs root=/dev/$bdev rw "		\
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 1251b5c..14d3363 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -650,8 +650,8 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 	"hwconfig=fsl_ddr:ctlr_intlv=cacheline,"		\
 	"bank_intlv=cs0_cs1\0"					\
 	"netdev=eth0\0"						\
-	"uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"			\
-	"ubootaddr=" MK_STR(CONFIG_SYS_TEXT_BASE) "\0"		\
+	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"			\
+	"ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"		\
 	"tftpflash=tftpboot $loadaddr $uboot && "		\
 	"protect off $ubootaddr +$filesize && "			\
 	"erase $ubootaddr +$filesize && "			\
@@ -659,7 +659,7 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 	"protect on $ubootaddr +$filesize && "			\
 	"cmp.b $loadaddr $ubootaddr $filesize\0"		\
 	"consoledev=ttyS0\0"					\
-	"usb_phy_type=" MK_STR(__USB_PHY_TYPE) "\0"		\
+	"usb_phy_type=" __stringify(__USB_PHY_TYPE) "\0"		\
 	"usb_dr_mode=host\0"					\
 	"ramdiskaddr=2000000\0"					\
 	"ramdiskfile=p2041rdb/ramdisk.uboot\0"			\
diff --git a/include/configs/SIMPC8313.h b/include/configs/SIMPC8313.h
index 00b7a4c..c0ffb33 100644
--- a/include/configs/SIMPC8313.h
+++ b/include/configs/SIMPC8313.h
@@ -537,19 +537,21 @@
 #define CONFIG_BOOTCOMMAND	"nand read $loadaddr kernel 600000;" \
 					"bootm $loadaddr - $fdtaddr"
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"netdev=" CONFIG_NETDEV "\0"					\
 	"ethprime=TSEC1\0"						\
 	"uboot=" CONFIG_UBOOTPATH "\0"					\
 	"tftpflash=tftpboot $loadaddr $uboot; "				\
-		"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
-		"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-		"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; " \
-		"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
-		"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0" \
+		"protect off " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" +$filesize; "	\
+		"erase " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize; "	\
+		"protect on " __stringify(CONFIG_SYS_TEXT_BASE)		\
+			" +$filesize; "	\
+		"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE)	\
+			" $filesize\0"	\
 	"fdtaddr=ae0000\0"						\
 	"fdtfile=" CONFIG_FDTFILE "\0"					\
 	"console=ttyS0\0"						\
@@ -592,7 +594,4 @@
 	"tftp $fdtaddr $fdtfile;"					\
 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif	/* __CONFIG_H */
diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h
index 95455c4..5a028fd 100644
--- a/include/configs/TQM85xx.h
+++ b/include/configs/TQM85xx.h
@@ -652,11 +652,13 @@
 #else
 #define CONFIG_ENV_CONSDEV		"consdev=ttyS0\0"
 #endif
-#define CONFIG_ENV_FDT_FILE	"fdt_file="MK_STR(CONFIG_HOSTNAME)"/" \
-				MK_STR(CONFIG_HOSTNAME)".dtb\0"
-#define CONFIG_ENV_BOOTFILE	"bootfile="MK_STR(CONFIG_HOSTNAME)"/uImage\0"
-#define CONFIG_ENV_UBOOT		"uboot="MK_STR(CONFIG_HOSTNAME)"/u-boot.bin\0" \
-				"uboot_addr="MK_STR(CONFIG_SYS_TEXT_BASE)"\0"
+#define CONFIG_ENV_FDT_FILE	"fdt_file="__stringify(CONFIG_HOSTNAME)"/" \
+				__stringify(CONFIG_HOSTNAME)".dtb\0"
+#define CONFIG_ENV_BOOTFILE						\
+	"bootfile="__stringify(CONFIG_HOSTNAME)"/uImage\0"
+#define CONFIG_ENV_UBOOT						\
+	"uboot="__stringify(CONFIG_HOSTNAME)"/u-boot.bin\0"		\
+	"uboot_addr="__stringify(CONFIG_SYS_TEXT_BASE)"\0"
 
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	CONFIG_ENV_BOOTFILE						\
diff --git a/include/configs/bf537-minotaur.h b/include/configs/bf537-minotaur.h
index ef9d236..feb9d73 100644
--- a/include/configs/bf537-minotaur.h
+++ b/include/configs/bf537-minotaur.h
@@ -173,7 +173,7 @@
 
 #define BOOT_ENV_SETTINGS \
 	"update=tftpboot $(loadaddr) u-boot.ldr;" \
-		"sf probe " MK_STR(BFIN_BOOT_SPI_SSEL) ";" \
+		"sf probe " __stringify(BFIN_BOOT_SPI_SSEL) ";" \
 		"sf erase 0 0x30000;" \
 		"sf write $(loadaddr) 0 $(filesize)" \
 	"flashboot=sf read 0x1000000 0x30000 0x320000;" \
diff --git a/include/configs/bf537-srv1.h b/include/configs/bf537-srv1.h
index 52d5d97..1de8ffe 100644
--- a/include/configs/bf537-srv1.h
+++ b/include/configs/bf537-srv1.h
@@ -173,7 +173,7 @@
 
 #define BOOT_ENV_SETTINGS \
 	"update=tftpboot $(loadaddr) u-boot.ldr;" \
-		"sf probe " MK_STR(BFIN_BOOT_SPI_SSEL) ";" \
+		"sf probe " __stringify(BFIN_BOOT_SPI_SSEL) ";" \
 		"sf erase 0 0x30000;" \
 		"sf write $(loadaddr) 0 $(filesize)" \
 	"flashboot=sf read 0x1000000 0x30000 0x320000;" \
diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h
index 3fbf5c6..c98c26d 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -150,13 +150,14 @@
 #endif
 #define CONFIG_BOOTARGS	\
 	"root=" CONFIG_BOOTARGS_ROOT " " \
-	"clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
+	"clkin_hz=" __stringify(CONFIG_CLKIN_HZ) " " \
 	"earlyprintk=" \
 		"serial," \
-		"uart" MK_STR(CONFIG_UART_CONSOLE) "," \
-		MK_STR(CONFIG_BAUDRATE) " " \
+		"uart" __stringify(CONFIG_UART_CONSOLE) "," \
+		__stringify(CONFIG_BAUDRATE) " " \
 	CONFIG_BOOTARGS_VIDEO \
-	"console=ttyBF" MK_STR(CONFIG_UART_CONSOLE) "," MK_STR(CONFIG_BAUDRATE)
+	"console=ttyBF" __stringify(CONFIG_UART_CONSOLE) "," \
+			__stringify(CONFIG_BAUDRATE)
 #if defined(CONFIG_CMD_NAND)
 # define NAND_ENV_SETTINGS \
 	"nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
@@ -183,8 +184,8 @@
 #    define CONFIG_BFIN_SPI_IMG_SIZE 0x40000
 #   endif
 #   define UBOOT_ENV_UPDATE \
-		"sf probe " MK_STR(BFIN_BOOT_SPI_SSEL) ";" \
-		"sf erase 0 " MK_STR(CONFIG_BFIN_SPI_IMG_SIZE) ";" \
+		"sf probe " __stringify(BFIN_BOOT_SPI_SSEL) ";" \
+		"sf erase 0 " __stringify(CONFIG_BFIN_SPI_IMG_SIZE) ";" \
 		"sf write $(loadaddr) 0 $(filesize)"
 #  endif
 # elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
diff --git a/include/configs/blackstamp.h b/include/configs/blackstamp.h
index 64fce30..83ad659 100644
--- a/include/configs/blackstamp.h
+++ b/include/configs/blackstamp.h
@@ -130,12 +130,12 @@
 #define CONFIG_BOOTCOMMAND   "run ramboot"
 #define CONFIG_BOOTARGS \
 	"root=/dev/mtdblock0 rw " \
-	"clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
+	"clkin_hz=" __stringify(CONFIG_CLKIN_HZ) " " \
 	"earlyprintk=" \
 		"serial," \
-		"uart" MK_STR(CONFIG_UART_CONSOLE) "," \
-		MK_STR(CONFIG_BAUDRATE) " " \
-	"console=ttyBF0," MK_STR(CONFIG_BAUDRATE)
+		"uart" __stringify(CONFIG_UART_CONSOLE) "," \
+		__stringify(CONFIG_BAUDRATE) " " \
+	"console=ttyBF0," __stringify(CONFIG_BAUDRATE)
 
 #if defined(CONFIG_CMD_NET)
 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
@@ -149,7 +149,7 @@
 		"eeprom write $(loadaddr) 0x0 $(filesize)"
 #  else
 #   define UBOOT_ENV_UPDATE \
-		"sf probe " MK_STR(BFIN_BOOT_SPI_SSEL) ";" \
+		"sf probe " __stringify(BFIN_BOOT_SPI_SSEL) ";" \
 		"sf erase 0 0x40000;" \
 		"sf write $(loadaddr) 0 $(filesize)"
 #  endif
diff --git a/include/configs/blackvme.h b/include/configs/blackvme.h
index f2dc6aa..523c4e4 100644
--- a/include/configs/blackvme.h
+++ b/include/configs/blackvme.h
@@ -184,10 +184,10 @@
  */
 #define CONFIG_BOOTARGS \
 	"root=/dev/mtdblock0 rw " \
-	"clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
+	"clkin_hz=" __stringify(CONFIG_CLKIN_HZ) " " \
 	"earlyprintk=serial,uart0," \
-	MK_STR(CONFIG_BAUDRATE) " " \
-	"console=ttyBF0," MK_STR(CONFIG_BAUDRATE) " "
+	__stringify(CONFIG_BAUDRATE) " " \
+	"console=ttyBF0," __stringify(CONFIG_BAUDRATE) " "
 
 /* Convenience env variables & commands.
  * Reserve kernstart = 0x20000  = 128 kB for U-Boot.
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 52a5ba9..2cca79f 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -733,10 +733,10 @@
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
 	"hwconfig=fsl_ddr:ctlr_intlv=cacheline,"		\
 	"bank_intlv=cs0_cs1;"					\
-	"usb1:dr_mode=host,phy_type=" MK_STR(__USB_PHY_TYPE) "\0"\
+	"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
 	"netdev=eth0\0"						\
-	"uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"			\
-	"ubootaddr=" MK_STR(CONFIG_SYS_TEXT_BASE) "\0"			\
+	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"	\
 	"tftpflash=tftpboot $loadaddr $uboot && "		\
 	"protect off $ubootaddr +$filesize && "			\
 	"erase $ubootaddr +$filesize && "			\
diff --git a/include/configs/linkstation.h b/include/configs/linkstation.h
index bb96034..eec7961 100644
--- a/include/configs/linkstation.h
+++ b/include/configs/linkstation.h
@@ -135,9 +135,6 @@
 
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 
-#define XMK_STR(x)		#x
-#define MK_STR(x)		XMK_STR(x)
-
 #if defined(CONFIG_HLAN) || defined(CONFIG_LAN)
 #define UBFILE			"share/u-boot/u-boot-hd.flash.bin"
 #elif defined(CONFIG_HGLAN)
@@ -153,10 +150,10 @@
 	"stdin=nc\0"								\
 	"stdout=nc\0"								\
 	"stderr=nc\0"								\
-	"ipaddr="MK_STR(CONFIG_IPADDR_LS)"\0"					\
+	"ipaddr="__stringify(CONFIG_IPADDR_LS)"\0"			\
 	"netmask=255.255.255.0\0"						\
-	"serverip="MK_STR(CONFIG_SERVERIP_LS)"\0"				\
-	"ncip="MK_STR(CONFIG_NCIP_LS)"\0"					\
+	"serverip="__stringify(CONFIG_SERVERIP_LS)"\0"			\
+	"ncip="__stringify(CONFIG_NCIP_LS)"\0"				\
 	"netretry=no\0"								\
 	"nc=setenv stdin nc;setenv stdout nc;setenv stderr nc\0"		\
 	"ser=setenv stdin serial;setenv stdout serial;setenv stderr serial\0"	\
diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index 0db559c..8097f28 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -141,8 +141,8 @@
 		"&& bootm 0x00100000 0x00800000\0"			\
 	"bootcmd_rescue=run config_nc_dhcp; run nc\0"			\
 	"eraseenv=sf probe 0 "						\
-		"&& sf erase " MK_STR(CONFIG_ENV_OFFSET)		\
-			" +" MK_STR(CONFIG_ENV_SIZE) "\0"		\
+		"&& sf erase " __stringify(CONFIG_ENV_OFFSET)		\
+			" +" __stringify(CONFIG_ENV_SIZE) "\0"		\
 	"config_nc_dhcp=setenv autoload_old ${autoload}; "		\
 		"setenv autoload no "					\
 		"&& bootp "						\
diff --git a/include/configs/mcc200.h b/include/configs/mcc200.h
index 1867eb6..d2bab45 100644
--- a/include/configs/mcc200.h
+++ b/include/configs/mcc200.h
@@ -134,9 +134,6 @@
 
 #undef	CONFIG_BOOTARGS
 
-#define XMK_STR(x)		#x
-#define MK_STR(x)		XMK_STR(x)
-
 #ifdef CONFIG_PRS200
 # define CONFIG_SYS__BOARDNAME		"prs200"
 # define CONFIG_SYS__LINUX_CONSOLE	"ttyS0"
@@ -155,7 +152,7 @@
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"ubootver=" U_BOOT_VERSION "\0"					\
 	"netdev=eth0\0"							\
-	"hostname=" CONFIG_SYS__BOARDNAME "\0"					\
+	"hostname=" CONFIG_SYS__BOARDNAME "\0"				\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
 		"nfsroot=${serverip}:${rootpath}\0"			\
 	"ramargs=setenv bootargs root=/dev/mtdblock2 "			\
@@ -176,15 +173,13 @@
 	"rootpath=/opt/eldk/ppc_6xx\0"					\
 	"bootfile=/tftpboot/" CONFIG_SYS__BOARDNAME "/uImage\0"		\
 	"load=tftp 200000 /tftpboot/" CONFIG_SYS__BOARDNAME "/u-boot.bin\0"	\
-	"text_base=" MK_STR(CONFIG_SYS_TEXT_BASE) "\0"				\
+	"text_base=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"		\
 	"kernel_addr=0xFC0C0000\0"					\
 	"update=protect off ${text_base} +${filesize};"			\
 		"era ${text_base} +${filesize};"			\
 		"cp.b 200000 ${text_base} ${filesize}\0"		\
 	"unlock=yes\0"							\
 	""
-#undef MK_STR
-#undef XMK_STR
 
 #define CONFIG_BOOTCOMMAND	"run flash_self"
 
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 2cb942b..d76f880 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -871,15 +871,15 @@ i2c mw 18 3 __SW_BOOT_MASK 1; reset
 
 #define	CONFIG_EXTRA_ENV_SETTINGS	\
 "netdev=eth0\0"	\
-"uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"	\
+"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"	\
 "loadaddr=1000000\0"	\
 "bootfile=uImage\0"	\
 "tftpflash=tftpboot $loadaddr $uboot; "	\
-	"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-	"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
+	"protect off " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
+	"erase " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
+	"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize; " \
+	"protect on " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
+	"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize\0" \
 "hwconfig=usb1:dr_mode=host,phy_type=ulpi\0"    \
 "consoledev=ttyS0\0"	\
 "ramdiskaddr=2000000\0"	\
@@ -895,11 +895,11 @@ i2c mw 18 3 __SW_BOOT_MASK 1; reset
 "ramdisk_size=120000\0"	\
 "map_lowernorbank=i2c dev 1; i2c mw 18 1 02 1; i2c mw 18 3 fd 1\0" \
 "map_uppernorbank=i2c dev 1; i2c mw 18 1 00 1; i2c mw 18 3 fd 1\0" \
-MK_STR(__NOR_RST_CMD)"\0" \
-MK_STR(__SPI_RST_CMD)"\0" \
-MK_STR(__SD_RST_CMD)"\0" \
-MK_STR(__NAND_RST_CMD)"\0" \
-MK_STR(__PCIE_RST_CMD)"\0"
+__stringify(__NOR_RST_CMD)"\0" \
+__stringify(__SPI_RST_CMD)"\0" \
+__stringify(__SD_RST_CMD)"\0" \
+__stringify(__NAND_RST_CMD)"\0" \
+__stringify(__PCIE_RST_CMD)"\0"
 
 #define CONFIG_NFSBOOTCOMMAND	\
 "setenv bootargs root=/dev/nfs rw "	\
diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h
index 8e8e14c..2209ddf 100644
--- a/include/configs/sbc8548.h
+++ b/include/configs/sbc8548.h
@@ -627,19 +627,19 @@
 #define CONFIG_BAUDRATE	115200
 
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
- "netdev=eth0\0"						\
- "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
- "tftpflash=tftpboot $loadaddr $uboot; "			\
-	"protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
-	"erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "	\
-	"protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "		\
-	"cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"	\
- "consoledev=ttyS0\0"				\
- "ramdiskaddr=2000000\0"			\
- "ramdiskfile=uRamdisk\0"			\
- "fdtaddr=c00000\0"				\
- "fdtfile=sbc8548.dtb\0"
+"netdev=eth0\0"						\
+"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"				\
+"tftpflash=tftpboot $loadaddr $uboot; "			\
+	"protect off " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
+	"erase " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
+	"cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize; " \
+	"protect on " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; "	\
+	"cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize\0" \
+"consoledev=ttyS0\0"				\
+"ramdiskaddr=2000000\0"			\
+"ramdiskfile=uRamdisk\0"			\
+"fdtaddr=c00000\0"				\
+"fdtfile=sbc8548.dtb\0"
 
 #define CONFIG_NFSBOOTCOMMAND						\
    "setenv bootargs root=/dev/nfs rw "					\
diff --git a/include/configs/ve8313.h b/include/configs/ve8313.h
index a587636..d3b8379 100644
--- a/include/configs/ve8313.h
+++ b/include/configs/ve8313.h
@@ -500,22 +500,17 @@
 #define CONFIG_BOOTDELAY	6	/* -1 disables auto-boot */
 #define CONFIG_BAUDRATE		115200
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"netdev=" MK_STR(CONFIG_NETDEV) "\0"				\
-	"ethprime=" MK_STR(CONFIG_TSEC1_NAME) "\0"			\
-	"u-boot=" MK_STR(CONFIG_UBOOTPATH) "\0"				\
+	"netdev=" __stringify(CONFIG_NETDEV) "\0"			\
+	"ethprime=" __stringify(CONFIG_TSEC1_NAME) "\0"			\
+	"u-boot=" __stringify(CONFIG_UBOOTPATH) "\0"			\
 	"u-boot_addr_r=100000\0"					\
 	"load=tftp ${u-boot_addr_r} ${u-boot}\0"			\
-	"update=protect off " MK_STR(CONFIG_SYS_FLASH_BASE) " +${filesize};" \
-	"erase " MK_STR(CONFIG_SYS_FLASH_BASE) " +${filesize};"		\
-	"cp.b ${u-boot_addr_r} " MK_STR(CONFIG_SYS_FLASH_BASE)		\
+	"update=protect off " __stringify(CONFIG_SYS_FLASH_BASE)	\
+		" +${filesize};"	\
+	"erase " __stringify(CONFIG_SYS_FLASH_BASE) " +${filesize};"	\
+	"cp.b ${u-boot_addr_r} " __stringify(CONFIG_SYS_FLASH_BASE)	\
 	" ${filesize};"							\
-	"protect on " MK_STR(CONFIG_SYS_FLASH_BASE) " +${filesize}\0"	\
-
-#undef MK_STR
-#undef XMK_STR
+	"protect on " __stringify(CONFIG_SYS_FLASH_BASE) " +${filesize}\0" \
 
 #endif	/* __CONFIG_H */
diff --git a/include/configs/xpedite1000.h b/include/configs/xpedite1000.h
index 4703d9d..506d646 100644
--- a/include/configs/xpedite1000.h
+++ b/include/configs/xpedite1000.h
@@ -263,9 +263,9 @@ extern void out32(unsigned int, unsigned long);
  * ff000000 - ffbfffff	OS Use/Filesystem (12MB)
  */
 
-#define CONFIG_UBOOT_ENV_ADDR	MK_STR(CONFIG_SYS_TEXT_BASE)
-#define CONFIG_FDT_ENV_ADDR	MK_STR(0xfff00000)
-#define CONFIG_OS_ENV_ADDR	MK_STR(0xffc00000)
+#define CONFIG_UBOOT_ENV_ADDR	__stringify(CONFIG_SYS_TEXT_BASE)
+#define CONFIG_FDT_ENV_ADDR	__stringify(0xfff00000)
+#define CONFIG_OS_ENV_ADDR	__stringify(0xffc00000)
 
 #define CONFIG_PROG_UBOOT						\
 	"$download_cmd $loadaddr $ubootfile; "				\
diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h
index 038f4f4..1851a00 100644
--- a/include/configs/xpedite517x.h
+++ b/include/configs/xpedite517x.h
@@ -615,12 +615,12 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
  * f6f00000 - f7efffff	Sec OS image (16MB)
  * f0000000 - f6efffff	Sec OS Use/Filesystem (111MB)
  */
-#define CONFIG_UBOOT1_ENV_ADDR	MK_STR(0xfff00000)
-#define CONFIG_UBOOT2_ENV_ADDR	MK_STR(0xf7f00000)
-#define CONFIG_FDT1_ENV_ADDR	MK_STR(0xfffc0000)
-#define CONFIG_FDT2_ENV_ADDR	MK_STR(0xf7fc0000)
-#define CONFIG_OS1_ENV_ADDR	MK_STR(0xfef00000)
-#define CONFIG_OS2_ENV_ADDR	MK_STR(0xf6f00000)
+#define CONFIG_UBOOT1_ENV_ADDR	__stringify(0xfff00000)
+#define CONFIG_UBOOT2_ENV_ADDR	__stringify(0xf7f00000)
+#define CONFIG_FDT1_ENV_ADDR	__stringify(0xfffc0000)
+#define CONFIG_FDT2_ENV_ADDR	__stringify(0xf7fc0000)
+#define CONFIG_OS1_ENV_ADDR	__stringify(0xfef00000)
+#define CONFIG_OS2_ENV_ADDR	__stringify(0xf6f00000)
 
 #define CONFIG_PROG_UBOOT1						\
 	"$download_cmd $loadaddr $ubootfile; "				\
diff --git a/include/configs/xpedite520x.h b/include/configs/xpedite520x.h
index 16ec455..ff99481 100644
--- a/include/configs/xpedite520x.h
+++ b/include/configs/xpedite520x.h
@@ -398,12 +398,12 @@
  * faf00000 - fbefffff     Sec OS image (16MB)
  * f8000000 - faefffff     Sec OS Use/Filesystem (47MB)
  */
-#define CONFIG_UBOOT1_ENV_ADDR	MK_STR(0xfff80000)
-#define CONFIG_UBOOT2_ENV_ADDR	MK_STR(0xfbf80000)
-#define CONFIG_FDT1_ENV_ADDR	MK_STR(0xfff00000)
-#define CONFIG_FDT2_ENV_ADDR	MK_STR(0xfbf00000)
-#define CONFIG_OS1_ENV_ADDR	MK_STR(0xfef00000)
-#define CONFIG_OS2_ENV_ADDR	MK_STR(0xfaf00000)
+#define CONFIG_UBOOT1_ENV_ADDR	__stringify(0xfff80000)
+#define CONFIG_UBOOT2_ENV_ADDR	__stringify(0xfbf80000)
+#define CONFIG_FDT1_ENV_ADDR	__stringify(0xfff00000)
+#define CONFIG_FDT2_ENV_ADDR	__stringify(0xfbf00000)
+#define CONFIG_OS1_ENV_ADDR	__stringify(0xfef00000)
+#define CONFIG_OS2_ENV_ADDR	__stringify(0xfaf00000)
 
 #define CONFIG_PROG_UBOOT1						\
 	"$download_cmd $loadaddr $ubootfile; "				\
diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h
index 6a469bb..46f1c90 100644
--- a/include/configs/xpedite537x.h
+++ b/include/configs/xpedite537x.h
@@ -470,12 +470,12 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
  * f6f00000 - f7efffff     Sec OS image (16MB)
  * f0000000 - f6efffff     Sec OS Use/Filesystem (111MB)
  */
-#define CONFIG_UBOOT1_ENV_ADDR	MK_STR(0xfff80000)
-#define CONFIG_UBOOT2_ENV_ADDR	MK_STR(0xf7f80000)
-#define CONFIG_FDT1_ENV_ADDR	MK_STR(0xfff00000)
-#define CONFIG_FDT2_ENV_ADDR	MK_STR(0xf7f00000)
-#define CONFIG_OS1_ENV_ADDR	MK_STR(0xfef00000)
-#define CONFIG_OS2_ENV_ADDR	MK_STR(0xf6f00000)
+#define CONFIG_UBOOT1_ENV_ADDR	__stringify(0xfff80000)
+#define CONFIG_UBOOT2_ENV_ADDR	__stringify(0xf7f80000)
+#define CONFIG_FDT1_ENV_ADDR	__stringify(0xfff00000)
+#define CONFIG_FDT2_ENV_ADDR	__stringify(0xf7f00000)
+#define CONFIG_OS1_ENV_ADDR	__stringify(0xfef00000)
+#define CONFIG_OS2_ENV_ADDR	__stringify(0xf6f00000)
 
 #define CONFIG_PROG_UBOOT1						\
 	"$download_cmd $loadaddr $ubootfile; "				\
diff --git a/include/configs/xpedite550x.h b/include/configs/xpedite550x.h
index dda6657..2acf6c8 100644
--- a/include/configs/xpedite550x.h
+++ b/include/configs/xpedite550x.h
@@ -455,12 +455,12 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
  * f6f00000 - f7efffff     Sec OS image (16MB)
  * f0000000 - f6efffff     Sec OS Use/Filesystem (111MB)
  */
-#define CONFIG_UBOOT1_ENV_ADDR	MK_STR(0xfff80000)
-#define CONFIG_UBOOT2_ENV_ADDR	MK_STR(0xf7f80000)
-#define CONFIG_FDT1_ENV_ADDR	MK_STR(0xfff00000)
-#define CONFIG_FDT2_ENV_ADDR	MK_STR(0xf7f00000)
-#define CONFIG_OS1_ENV_ADDR	MK_STR(0xfef00000)
-#define CONFIG_OS2_ENV_ADDR	MK_STR(0xf6f00000)
+#define CONFIG_UBOOT1_ENV_ADDR	__stringify(0xfff80000)
+#define CONFIG_UBOOT2_ENV_ADDR	__stringify(0xf7f80000)
+#define CONFIG_FDT1_ENV_ADDR	__stringify(0xfff00000)
+#define CONFIG_FDT2_ENV_ADDR	__stringify(0xf7f00000)
+#define CONFIG_OS1_ENV_ADDR	__stringify(0xfef00000)
+#define CONFIG_OS2_ENV_ADDR	__stringify(0xf6f00000)
 
 #define CONFIG_PROG_UBOOT1						\
 	"$download_cmd $loadaddr $ubootfile; "				\
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index e292d2b..c76e80f 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -121,9 +121,6 @@ static unsigned char active_flag = 1;
 static unsigned char obsolete_flag = 0;
 
 
-#define XMK_STR(x)	#x
-#define MK_STR(x)	XMK_STR(x)
-
 static char default_environment[] = {
 #if defined(CONFIG_BOOTARGS)
 	"bootargs=" CONFIG_BOOTARGS "\0"
@@ -138,40 +135,40 @@ static char default_environment[] = {
 	"nfsboot=" CONFIG_NFSBOOTCOMMAND "\0"
 #endif
 #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
-	"bootdelay=" MK_STR (CONFIG_BOOTDELAY) "\0"
+	"bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0"
 #endif
 #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0)
-	"baudrate=" MK_STR (CONFIG_BAUDRATE) "\0"
+	"baudrate=" __stringify(CONFIG_BAUDRATE) "\0"
 #endif
 #ifdef	CONFIG_LOADS_ECHO
-	"loads_echo=" MK_STR (CONFIG_LOADS_ECHO) "\0"
+	"loads_echo=" __stringify(CONFIG_LOADS_ECHO) "\0"
 #endif
 #ifdef	CONFIG_ETHADDR
-	"ethaddr=" MK_STR (CONFIG_ETHADDR) "\0"
+	"ethaddr=" __stringify(CONFIG_ETHADDR) "\0"
 #endif
 #ifdef	CONFIG_ETH1ADDR
-	"eth1addr=" MK_STR (CONFIG_ETH1ADDR) "\0"
+	"eth1addr=" __stringify(CONFIG_ETH1ADDR) "\0"
 #endif
 #ifdef	CONFIG_ETH2ADDR
-	"eth2addr=" MK_STR (CONFIG_ETH2ADDR) "\0"
+	"eth2addr=" __stringify(CONFIG_ETH2ADDR) "\0"
 #endif
 #ifdef	CONFIG_ETH3ADDR
-	"eth3addr=" MK_STR (CONFIG_ETH3ADDR) "\0"
+	"eth3addr=" __stringify(CONFIG_ETH3ADDR) "\0"
 #endif
 #ifdef	CONFIG_ETH4ADDR
-	"eth4addr=" MK_STR (CONFIG_ETH4ADDR) "\0"
+	"eth4addr=" __stringify(CONFIG_ETH4ADDR) "\0"
 #endif
 #ifdef	CONFIG_ETH5ADDR
-	"eth5addr=" MK_STR (CONFIG_ETH5ADDR) "\0"
+	"eth5addr=" __stringify(CONFIG_ETH5ADDR) "\0"
 #endif
 #ifdef	CONFIG_ETHPRIME
 	"ethprime=" CONFIG_ETHPRIME "\0"
 #endif
 #ifdef	CONFIG_IPADDR
-	"ipaddr=" MK_STR (CONFIG_IPADDR) "\0"
+	"ipaddr=" __stringify(CONFIG_IPADDR) "\0"
 #endif
 #ifdef	CONFIG_SERVERIP
-	"serverip=" MK_STR (CONFIG_SERVERIP) "\0"
+	"serverip=" __stringify(CONFIG_SERVERIP) "\0"
 #endif
 #ifdef	CONFIG_SYS_AUTOLOAD
 	"autoload=" CONFIG_SYS_AUTOLOAD "\0"
@@ -180,19 +177,19 @@ static char default_environment[] = {
 	"rootpath=" CONFIG_ROOTPATH "\0"
 #endif
 #ifdef	CONFIG_GATEWAYIP
-	"gatewayip=" MK_STR (CONFIG_GATEWAYIP) "\0"
+	"gatewayip=" __stringify(CONFIG_GATEWAYIP) "\0"
 #endif
 #ifdef	CONFIG_NETMASK
-	"netmask=" MK_STR (CONFIG_NETMASK) "\0"
+	"netmask=" __stringify(CONFIG_NETMASK) "\0"
 #endif
 #ifdef	CONFIG_HOSTNAME
-	"hostname=" MK_STR (CONFIG_HOSTNAME) "\0"
+	"hostname=" __stringify(CONFIG_HOSTNAME) "\0"
 #endif
 #ifdef	CONFIG_BOOTFILE
 	"bootfile=" CONFIG_BOOTFILE "\0"
 #endif
 #ifdef	CONFIG_LOADADDR
-	"loadaddr=" MK_STR (CONFIG_LOADADDR) "\0"
+	"loadaddr=" __stringify(CONFIG_LOADADDR) "\0"
 #endif
 #ifdef	CONFIG_PREBOOT
 	"preboot=" CONFIG_PREBOOT "\0"
@@ -201,7 +198,7 @@ static char default_environment[] = {
 	"clocks_in_mhz=" "1" "\0"
 #endif
 #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
-	"pcidelay=" MK_STR (CONFIG_PCI_BOOTDELAY) "\0"
+	"pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY) "\0"
 #endif
 #ifdef  CONFIG_EXTRA_ENV_SETTINGS
 	CONFIG_EXTRA_ENV_SETTINGS
@@ -400,7 +397,7 @@ int fw_env_write(char *name, char *value)
 		    (strcmp(name, "serial#") == 0) ||
 		    ((strcmp(name, "ethaddr") == 0)
 #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
-		    && (strcmp(oldval, MK_STR(CONFIG_ETHADDR)) != 0)
+		    && (strcmp(oldval, __stringify(CONFIG_ETHADDR)) != 0)
 #endif /* CONFIG_OVERWRITE_ETHADDR_ONCE && CONFIG_ETHADDR */
 		   ) ) {
 			fprintf (stderr, "Can't overwrite \"%s\"\n", name);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
  2012-08-08 10:52 [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Marek Vasut
  2012-08-08 10:52 ` [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr() Marek Vasut
  2012-08-08 10:52 ` [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR() Marek Vasut
@ 2012-08-08 15:16 ` Mike Frysinger
  2012-08-08 15:21 ` Mike Frysinger
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2012-08-08 15:16 UTC (permalink / raw)
  To: u-boot

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120808/0e3acbd7/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR()
  2012-08-08 10:52 ` [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR() Marek Vasut
@ 2012-08-08 15:17   ` Mike Frysinger
  2012-08-10 20:26   ` Anatolij Gustschin
  2012-08-10 21:17   ` Anatolij Gustschin
  2 siblings, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2012-08-08 15:17 UTC (permalink / raw)
  To: u-boot

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120808/b4dc31a2/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr()
  2012-08-08 10:52 ` [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr() Marek Vasut
@ 2012-08-08 15:18   ` Mike Frysinger
  2012-08-10 20:22   ` Anatolij Gustschin
  1 sibling, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2012-08-08 15:18 UTC (permalink / raw)
  To: u-boot

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120808/52c36062/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
  2012-08-08 10:52 [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Marek Vasut
                   ` (2 preceding siblings ...)
  2012-08-08 15:16 ` [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Mike Frysinger
@ 2012-08-08 15:21 ` Mike Frysinger
  2012-08-08 16:01   ` Marek Vasut
  2012-08-10 20:21 ` Anatolij Gustschin
  2012-08-10 20:51 ` [U-Boot] [PATCH 1/3 V2] " Marek Vasut
  5 siblings, 1 reply; 19+ messages in thread
From: Mike Frysinger @ 2012-08-08 15:21 UTC (permalink / raw)
  To: u-boot

On Wednesday 08 August 2012 06:52:17 Marek Vasut wrote:
> This function converts static number to string in preprocessor.
> This is useful as it allows higher usage of puts() in favour of printf()

a few more to convert:
include/nios2.h:#define _str_(x) #x
include/configs/astro_mcf5373l.h:#define _QUOTEME(x)    #x
include/configs/tegra2-common.h:#define QUOTE_(m)       #m
board/logicpd/zoom2/zoom2_serial.h:#define S(a) #a

not sure if we also want to clean up (in case they're copied from Linux -- 
then we'd prob just leave these headers alone, but fix any usage outside of the 
headers to use your new stringify):
arch/mips/include/asm/mipsregs.h:#define __STR(x) #x
arch/powerpc/include/asm/processor.h:#define tostring(s)        #s
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120808/48065c03/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
  2012-08-08 15:21 ` Mike Frysinger
@ 2012-08-08 16:01   ` Marek Vasut
  2012-08-09  2:08     ` Mike Frysinger
  0 siblings, 1 reply; 19+ messages in thread
From: Marek Vasut @ 2012-08-08 16:01 UTC (permalink / raw)
  To: u-boot

Dear Mike Frysinger,

> On Wednesday 08 August 2012 06:52:17 Marek Vasut wrote:
> > This function converts static number to string in preprocessor.
> > This is useful as it allows higher usage of puts() in favour of printf()
> 
> a few more to convert:
> include/nios2.h:#define _str_(x) #x
> include/configs/astro_mcf5373l.h:#define _QUOTEME(x)    #x
> include/configs/tegra2-common.h:#define QUOTE_(m)       #m
> board/logicpd/zoom2/zoom2_serial.h:#define S(a) #a
> 
> not sure if we also want to clean up (in case they're copied from Linux --
> then we'd prob just leave these headers alone, but fix any usage outside of
> the headers to use your new stringify):
> arch/mips/include/asm/mipsregs.h:#define __STR(x) #x
> arch/powerpc/include/asm/processor.h:#define tostring(s)        #s
> -mike

Ok, I'll send a subsequent patch for these ... what about merging these now tho?

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
  2012-08-08 16:01   ` Marek Vasut
@ 2012-08-09  2:08     ` Mike Frysinger
  0 siblings, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2012-08-09  2:08 UTC (permalink / raw)
  To: u-boot

On Wednesday 08 August 2012 12:01:07 Marek Vasut wrote:
> Dear Mike Frysinger,
> > On Wednesday 08 August 2012 06:52:17 Marek Vasut wrote:
> > > This function converts static number to string in preprocessor.
> > > This is useful as it allows higher usage of puts() in favour of
> > > printf()
> > 
> > a few more to convert:
> > include/nios2.h:#define _str_(x) #x
> > include/configs/astro_mcf5373l.h:#define _QUOTEME(x)    #x
> > include/configs/tegra2-common.h:#define QUOTE_(m)       #m
> > board/logicpd/zoom2/zoom2_serial.h:#define S(a) #a
> > 
> > not sure if we also want to clean up (in case they're copied from Linux
> > -- then we'd prob just leave these headers alone, but fix any usage
> > outside of the headers to use your new stringify):
> > arch/mips/include/asm/mipsregs.h:#define __STR(x) #x
> > arch/powerpc/include/asm/processor.h:#define tostring(s)        #s
> 
> Ok, I'll send a subsequent patch for these ... what about merging these now
> tho?

fine by me
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120808/f0fddfa6/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
  2012-08-08 10:52 [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Marek Vasut
                   ` (3 preceding siblings ...)
  2012-08-08 15:21 ` Mike Frysinger
@ 2012-08-10 20:21 ` Anatolij Gustschin
  2012-08-10 20:45   ` Wolfgang Denk
  2012-08-10 20:51 ` [U-Boot] [PATCH 1/3 V2] " Marek Vasut
  5 siblings, 1 reply; 19+ messages in thread
From: Anatolij Gustschin @ 2012-08-10 20:21 UTC (permalink / raw)
  To: u-boot

Hi,

On Wed,  8 Aug 2012 12:52:17 +0200
Marek Vasut <marex@denx.de> wrote:

> This function converts static number to string in preprocessor.
> This is useful as it allows higher usage of puts() in favour of printf()
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
>  include/common.h          |    1 +
>  include/linux/stringify.h |   12 ++++++++++++
>  2 files changed, 13 insertions(+)
>  create mode 100644 include/linux/stringify.h

applied to my staging branch, thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr()
  2012-08-08 10:52 ` [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr() Marek Vasut
  2012-08-08 15:18   ` Mike Frysinger
@ 2012-08-10 20:22   ` Anatolij Gustschin
  1 sibling, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2012-08-10 20:22 UTC (permalink / raw)
  To: u-boot

Hi,

On Wed,  8 Aug 2012 12:52:18 +0200
Marek Vasut <marex@denx.de> wrote:

> Kill multiple occurances and redeclaration of xstr in favor of __stringify().
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
>  include/configs/MPC8308RDB.h        |    9 +++------
>  include/configs/amcc-common.h       |   25 +++++++++++-------------
>  include/configs/at91sam9263ek.h     |    5 +----
>  include/configs/cam_enc_4xx.h       |   36 +++++++++++++++++------------------
>  include/configs/ea20.h              |   11 ++++-------
>  include/configs/enbw_cmc.h          |   19 ++++++++----------
>  include/configs/flea3.h             |   14 ++++++--------
>  include/configs/ima3-mx53.h         |   10 ++++------
>  include/configs/imx27lite-common.h  |   15 ++++++---------
>  include/configs/km/keymile-common.h |   13 +++++--------
>  include/configs/km/km-powerpc.h     |   12 ++++++------
>  include/configs/km/km_arm.h         |   14 +++++++-------
>  include/configs/manroland/common.h  |   21 +++++++++-----------
>  include/configs/mpc8308_p1m.h       |    9 +++------
>  include/configs/mx35pdk.h           |   14 ++++++--------
>  include/configs/qong.h              |    9 +++------
>  include/configs/tam3517-common.h    |   11 ++++-------
>  include/configs/tx25.h              |    5 +----
>  18 files changed, 104 insertions(+), 148 deletions(-)

applied, thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR()
  2012-08-08 10:52 ` [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR() Marek Vasut
  2012-08-08 15:17   ` Mike Frysinger
@ 2012-08-10 20:26   ` Anatolij Gustschin
  2012-08-10 21:17   ` Anatolij Gustschin
  2 siblings, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2012-08-10 20:26 UTC (permalink / raw)
  To: u-boot

Hi,

On Wed,  8 Aug 2012 12:52:19 +0200
Marek Vasut <marex@denx.de> wrote:

> Kill multiple occurances and redeclaration of MK_STR
> in favor of __stringify().
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
>  arch/blackfin/include/asm/config-pre.h |    2 -
>  arch/blackfin/lib/board.c              |    2 +-
>  board/w7o/w7o.c                        |    9 +---
>  common/cmd_nvedit.c                    |    5 +-
>  common/env_common.c                    |   34 ++++++------
>  common/env_embedded.c                  |   39 ++++++--------
>  include/configs/M52277EVB.h            |   18 +++----
>  include/configs/M5253DEMO.h            |    2 +-
>  include/configs/M5373EVB.h             |    2 +-
>  include/configs/M54451EVB.h            |   10 ++--
>  include/configs/M54455EVB.h            |   16 +++---
>  include/configs/MERGERBOX.h            |   24 ++++-----
>  include/configs/MPC8260ADS.h           |   22 ++++----
>  include/configs/MPC8313ERDB.h          |   21 ++++----
>  include/configs/MPC8323ERDB.h          |   21 ++++----
>  include/configs/MPC8349ITX.h           |   33 ++++++------
>  include/configs/MPC837XERDB.h          |   21 ++++----
>  include/configs/MPC8536DS.h            |   35 ++++++------
>  include/configs/MPC8544DS.h            |   33 +++++++-----
>  include/configs/MPC8548CDS.h           |   17 +++---
>  include/configs/MPC8572DS.h            |   35 ++++++------
>  include/configs/MPC8610HPCD.h          |   93 +++++++++++++++++---------------
>  include/configs/MPC8641HPCN.h          |   17 +++---
>  include/configs/MVBC_P.h               |   38 ++++++-------
>  include/configs/MVBLM7.h               |   26 ++++-----
>  include/configs/MVSMR.h                |   30 +++++------
>  include/configs/P1010RDB.h             |    4 +-
>  include/configs/P1022DS.h              |    4 +-
>  include/configs/P1_P2_RDB.h            |   19 ++++---
>  include/configs/P2020DS.h              |   36 ++++++-------
>  include/configs/P2041RDB.h             |    6 +--
>  include/configs/SIMPC8313.h            |   21 ++++----
>  include/configs/TQM85xx.h              |   12 +++--
>  include/configs/bf537-minotaur.h       |    2 +-
>  include/configs/bf537-srv1.h           |    2 +-
>  include/configs/bfin_adi_common.h      |   13 ++---
>  include/configs/blackstamp.h           |   10 ++--
>  include/configs/blackvme.h             |    6 +--
>  include/configs/corenet_ds.h           |    6 +--
>  include/configs/linkstation.h          |    9 ++--
>  include/configs/lsxl.h                 |    4 +-
>  include/configs/mcc200.h               |    9 +---
>  include/configs/p1_p2_rdb_pc.h         |   22 ++++----
>  include/configs/sbc8548.h              |   26 ++++-----
>  include/configs/ve8313.h               |   21 +++-----
>  include/configs/xpedite1000.h          |    6 +--
>  include/configs/xpedite517x.h          |   12 ++---
>  include/configs/xpedite520x.h          |   12 ++---
>  include/configs/xpedite537x.h          |   12 ++---
>  include/configs/xpedite550x.h          |   12 ++---
>  tools/env/fw_env.c                     |   37 ++++++-------
>  51 files changed, 453 insertions(+), 475 deletions(-)

applied to my staging branch, thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
  2012-08-10 20:21 ` Anatolij Gustschin
@ 2012-08-10 20:45   ` Wolfgang Denk
  2012-08-10 20:52     ` Marek Vasut
  2012-08-10 21:20     ` Anatolij Gustschin
  0 siblings, 2 replies; 19+ messages in thread
From: Wolfgang Denk @ 2012-08-10 20:45 UTC (permalink / raw)
  To: u-boot

Dear Anatolij Gustschin,

In message <20120810222104.1e6c4afc@wker> you wrote:
> Hi,
> 
> On Wed,  8 Aug 2012 12:52:17 +0200
> Marek Vasut <marex@denx.de> wrote:
> 
> > This function converts static number to string in preprocessor.
> > This is useful as it allows higher usage of puts() in favour of printf()
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Wolfgang Denk <wd@denx.de>
> > ---
> >  include/common.h          |    1 +
> >  include/linux/stringify.h |   12 ++++++++++++
> >  2 files changed, 13 insertions(+)
> >  create mode 100644 include/linux/stringify.h
> 
> applied to my staging branch, thanks!

Please undo.  This patch does not meet formal requirements.  It
contains code copied from Linux without sufficient attribution.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Even if you can deceive people about  a  product  through  misleading
statements, sooner or later the product will speak for itself.
- Hajime Karatsu

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3 V2] COMMON: Add __stringify() function
  2012-08-08 10:52 [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Marek Vasut
                   ` (4 preceding siblings ...)
  2012-08-10 20:21 ` Anatolij Gustschin
@ 2012-08-10 20:51 ` Marek Vasut
  5 siblings, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2012-08-10 20:51 UTC (permalink / raw)
  To: u-boot

Copied from Linux kernel include/linux/stringify.h:
commit 8f7c2c37319a81ef4c2bfdec67b1ccd5744d97e4
Date:   Wed Apr 8 16:58:57 2009 +0800

This function converts static number to string in preprocessor.
This is useful as it allows higher usage of puts() in favour of printf()

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
---
 include/common.h          |    1 +
 include/linux/stringify.h |   12 ++++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 include/linux/stringify.h

V2: Add proper attribution

diff --git a/include/common.h b/include/common.h
index 39859d3..8f596ec 100644
--- a/include/common.h
+++ b/include/common.h
@@ -39,6 +39,7 @@ typedef volatile unsigned char	vu_char;
 #include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/string.h>
+#include <linux/stringify.h>
 #include <asm/ptrace.h>
 #include <stdarg.h>
 #if defined(CONFIG_PCI) && (defined(CONFIG_4xx) && !defined(CONFIG_AP1000))
diff --git a/include/linux/stringify.h b/include/linux/stringify.h
new file mode 100644
index 0000000..841cec8
--- /dev/null
+++ b/include/linux/stringify.h
@@ -0,0 +1,12 @@
+#ifndef __LINUX_STRINGIFY_H
+#define __LINUX_STRINGIFY_H
+
+/* Indirect stringification.  Doing two levels allows the parameter to be a
+ * macro itself.  For example, compile with -DFOO=bar, __stringify(FOO)
+ * converts to "bar".
+ */
+
+#define __stringify_1(x...)	#x
+#define __stringify(x...)	__stringify_1(x)
+
+#endif	/* !__LINUX_STRINGIFY_H */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
  2012-08-10 20:45   ` Wolfgang Denk
@ 2012-08-10 20:52     ` Marek Vasut
  2012-08-10 21:20     ` Anatolij Gustschin
  1 sibling, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2012-08-10 20:52 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

> Dear Anatolij Gustschin,
> 
> In message <20120810222104.1e6c4afc@wker> you wrote:
> > Hi,
> > 
> > On Wed,  8 Aug 2012 12:52:17 +0200
> > 
> > Marek Vasut <marex@denx.de> wrote:
> > > This function converts static number to string in preprocessor.
> > > This is useful as it allows higher usage of puts() in favour of
> > > printf()
> > > 
> > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > Cc: Wolfgang Denk <wd@denx.de>
> > > ---
> > > 
> > >  include/common.h          |    1 +
> > >  include/linux/stringify.h |   12 ++++++++++++
> > >  2 files changed, 13 insertions(+)
> > >  create mode 100644 include/linux/stringify.h
> > 
> > applied to my staging branch, thanks!
> 
> Please undo.  This patch does not meet formal requirements.  It
> contains code copied from Linux without sufficient attribution.

Definitelly agree with this one ... I should be more careful with this. V2 
submitted.

> Best regards,
> 
> Wolfgang Denk

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR()
  2012-08-08 10:52 ` [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR() Marek Vasut
  2012-08-08 15:17   ` Mike Frysinger
  2012-08-10 20:26   ` Anatolij Gustschin
@ 2012-08-10 21:17   ` Anatolij Gustschin
  2012-08-10 21:20     ` Marek Vasut
  2 siblings, 1 reply; 19+ messages in thread
From: Anatolij Gustschin @ 2012-08-10 21:17 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On Wed,  8 Aug 2012 12:52:19 +0200
Marek Vasut <marex@denx.de> wrote:
...
> diff --git a/common/env_common.c b/common/env_common.c
> index d9e990d..39e1792 100644
> --- a/common/env_common.c
> +++ b/common/env_common.c
> @@ -37,8 +37,6 @@ DECLARE_GLOBAL_DATA_PTR;
>  /************************************************************************
>   * Default settings to be used when no valid environment is found
>   */
> -#define XMK_STR(x)	#x
> -#define MK_STR(x)	XMK_STR(x)

including linux/stringify.h here is needed. It doesn't build
otherwise, since this file doesn't include common.h:
...
Configuring for actux1_4_16 - Board: actux1, Options: FLASH2X2
/home/ag/git/u-boot/common/env_embedded.c:110:15: error: expected ?}? before ?__stringify?
make[1]: *** [env_embedded.o] Error 1
make: *** [tools] Error 2
arm-linux-gnueabi-size: './u-boot': No such file
/home/ag/git/u-boot/common/env_embedded.c:110:15: error: expected ?}? before ?__stringify?
make[1]: *** [env_embedded.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes.  Stop.
make: *** [tools] Error 2

Please fix. Thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR()
  2012-08-10 21:17   ` Anatolij Gustschin
@ 2012-08-10 21:20     ` Marek Vasut
  0 siblings, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2012-08-10 21:20 UTC (permalink / raw)
  To: u-boot

Dear Anatolij Gustschin,

> Hi Marek,
> 
> On Wed,  8 Aug 2012 12:52:19 +0200
> Marek Vasut <marex@denx.de> wrote:
> ...
> 
> > diff --git a/common/env_common.c b/common/env_common.c
> > index d9e990d..39e1792 100644
> > --- a/common/env_common.c
> > +++ b/common/env_common.c
> > @@ -37,8 +37,6 @@ DECLARE_GLOBAL_DATA_PTR;
> > 
> >  /***********************************************************************
> >  *
> >  
> >   * Default settings to be used when no valid environment is found
> >   */
> > 
> > -#define XMK_STR(x)	#x
> > -#define MK_STR(x)	XMK_STR(x)
> 
> including linux/stringify.h here is needed. It doesn't build
> otherwise, since this file doesn't include common.h:
> ...
> Configuring for actux1_4_16 - Board: actux1, Options: FLASH2X2
> /home/ag/git/u-boot/common/env_embedded.c:110:15: error: expected ?}?
> before ?__stringify? make[1]: *** [env_embedded.o] Error 1
> make: *** [tools] Error 2
> arm-linux-gnueabi-size: './u-boot': No such file
> /home/ag/git/u-boot/common/env_embedded.c:110:15: error: expected ?}?
> before ?__stringify? make[1]: *** [env_embedded.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: *** wait: No child processes.  Stop.
> make: *** [tools] Error 2

Will do a full rebuild again. Sorry for the crap.

> Please fix. Thanks!
> 
> Anatolij

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
  2012-08-10 20:45   ` Wolfgang Denk
  2012-08-10 20:52     ` Marek Vasut
@ 2012-08-10 21:20     ` Anatolij Gustschin
  2012-08-10 21:23       ` Marek Vasut
  1 sibling, 1 reply; 19+ messages in thread
From: Anatolij Gustschin @ 2012-08-10 21:20 UTC (permalink / raw)
  To: u-boot

Hello Wolfgang,

On Fri, 10 Aug 2012 22:45:54 +0200
Wolfgang Denk <wd@denx.de> wrote:
...
> > applied to my staging branch, thanks!
> 
> Please undo.  This patch does not meet formal requirements.  It
> contains code copied from Linux without sufficient attribution.

OK, dropped for now. This series also needs more build-testing, it seems.

Thanks,
Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
  2012-08-10 21:20     ` Anatolij Gustschin
@ 2012-08-10 21:23       ` Marek Vasut
  0 siblings, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2012-08-10 21:23 UTC (permalink / raw)
  To: u-boot

Dear Anatolij Gustschin,

> Hello Wolfgang,
> 
> On Fri, 10 Aug 2012 22:45:54 +0200
> Wolfgang Denk <wd@denx.de> wrote:
> ...
> 
> > > applied to my staging branch, thanks!
> > 
> > Please undo.  This patch does not meet formal requirements.  It
> > contains code copied from Linux without sufficient attribution.
> 
> OK, dropped for now. This series also needs more build-testing, it seems.

Yes, and I'll also fix the request from Mike while at that. I won't be 
resubmitting it tonight as the build tests will take a bit more time.

> Thanks,
> Anatolij

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-08-10 21:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-08 10:52 [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Marek Vasut
2012-08-08 10:52 ` [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr() Marek Vasut
2012-08-08 15:18   ` Mike Frysinger
2012-08-10 20:22   ` Anatolij Gustschin
2012-08-08 10:52 ` [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR() Marek Vasut
2012-08-08 15:17   ` Mike Frysinger
2012-08-10 20:26   ` Anatolij Gustschin
2012-08-10 21:17   ` Anatolij Gustschin
2012-08-10 21:20     ` Marek Vasut
2012-08-08 15:16 ` [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function Mike Frysinger
2012-08-08 15:21 ` Mike Frysinger
2012-08-08 16:01   ` Marek Vasut
2012-08-09  2:08     ` Mike Frysinger
2012-08-10 20:21 ` Anatolij Gustschin
2012-08-10 20:45   ` Wolfgang Denk
2012-08-10 20:52     ` Marek Vasut
2012-08-10 21:20     ` Anatolij Gustschin
2012-08-10 21:23       ` Marek Vasut
2012-08-10 20:51 ` [U-Boot] [PATCH 1/3 V2] " Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox