[U-Boot] [PATCH 2/4] COMMON: Use __stringify() instead of xstr()

Marek Vasut marex at denx.de
Sun Sep 23 17:41:23 CEST 2012


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

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Wolfgang Denk <wd at 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 9421b53..3503822 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -156,11 +156,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 91ab812..e5bec63 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -401,8 +401,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) */
@@ -414,22 +412,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"					\
@@ -446,14 +444,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};"			\
@@ -462,11 +460,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 337d504..a0998ef 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -229,9 +229,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					\
@@ -262,9 +259,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;"	\
@@ -281,7 +278,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 e2e0d5c..2d63b67 100644
--- a/include/configs/enbw_cmc.h
+++ b/include/configs/enbw_cmc.h
@@ -182,18 +182,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 "			\
@@ -205,9 +202,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 027a5dc..149d8cd 100644
--- a/include/configs/flea3.h
+++ b/include/configs/flea3.h
@@ -223,8 +223,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					\
@@ -237,16 +235,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;"		\
@@ -260,9 +258,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 567061a..5979907 100644
--- a/include/configs/ima3-mx53.h
+++ b/include/configs/ima3-mx53.h
@@ -181,8 +181,6 @@
  */
 
 #define HOSTNAME ima3-mx53
-#define xstr(s)	str(s)
-#define str(s)	#s
 
 #define CONFIG_HOSTNAME ima3-mx53
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
@@ -204,9 +202,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"					\
@@ -235,7 +233,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 a2853a7..8fb3337 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -204,9 +204,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 "			\
@@ -219,19 +216,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 27b77d3..1d6e0ab 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						\
 	""
 
@@ -267,16 +267,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 5816152..87f927a 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -241,8 +241,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					\
@@ -256,16 +254,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;"		\
@@ -275,9 +273,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} +80000;"			\
 		"erase ${uboot_addr} +80000;"				\
 		"cp.b ${loadaddr} ${uboot_addr} ${filesize}\0"		\
diff --git a/include/configs/qong.h b/include/configs/qong.h
index 485e1b1..683dcb7 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 375265d..a48447d 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -293,9 +293,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} "			\
@@ -315,8 +312,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;"		\
@@ -331,10 +328,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 71b1d32..80194d8 100644
--- a/include/configs/tx25.h
+++ b/include/configs/tx25.h
@@ -146,9 +146,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 "			\
@@ -162,7 +159,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.7.6



More information about the U-Boot mailing list