COMMON: Use __stringify() instead of MK_STR()
authorMarek Vasut <marex@denx.de>
Sun, 23 Sep 2012 15:41:24 +0000 (17:41 +0200)
committerTom Rini <trini@ti.com>
Mon, 15 Oct 2012 18:53:47 +0000 (11:53 -0700)
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>
Signed-off-by: Tom Rini <trini@ti.com>
51 files changed:
arch/blackfin/include/asm/config-pre.h
arch/blackfin/lib/board.c
board/w7o/w7o.c
common/cmd_nvedit.c
common/env_common.c
common/env_embedded.c
include/configs/M52277EVB.h
include/configs/M5253DEMO.h
include/configs/M5373EVB.h
include/configs/M54451EVB.h
include/configs/M54455EVB.h
include/configs/MERGERBOX.h
include/configs/MPC8260ADS.h
include/configs/MPC8313ERDB.h
include/configs/MPC8323ERDB.h
include/configs/MPC8349ITX.h
include/configs/MPC837XERDB.h
include/configs/MPC8536DS.h
include/configs/MPC8544DS.h
include/configs/MPC8548CDS.h
include/configs/MPC8572DS.h
include/configs/MPC8610HPCD.h
include/configs/MPC8641HPCN.h
include/configs/MVBC_P.h
include/configs/MVBLM7.h
include/configs/MVSMR.h
include/configs/P1010RDB.h
include/configs/P1022DS.h
include/configs/P1_P2_RDB.h
include/configs/P2020DS.h
include/configs/P2041RDB.h
include/configs/SIMPC8313.h
include/configs/bf537-minotaur.h
include/configs/bf537-srv1.h
include/configs/bfin_adi_common.h
include/configs/blackstamp.h
include/configs/blackvme.h
include/configs/corenet_ds.h
include/configs/linkstation.h
include/configs/lsxl.h
include/configs/mcc200.h
include/configs/p1_p2_rdb_pc.h
include/configs/sbc8548.h
include/configs/socfpga_cyclone5.h
include/configs/ve8313.h
include/configs/xpedite1000.h
include/configs/xpedite517x.h
include/configs/xpedite520x.h
include/configs/xpedite537x.h
include/configs/xpedite550x.h
tools/env/fw_env.c

index 4ce67d4cd01d251e20c6ac0aea00a598e94614b1..be5687ce6f92bfaf02f6053cfcb930c8d95a3ae8 100644 (file)
@@ -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.
index c380d271e7c834c07bcd1060f5e2e1a75fb63fcc..6a9282c77b4ca7717e7dac79677250f7c4d673af 100644 (file)
@@ -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();
index 5c84e65a09db17befe6564cbb429713ca7ccc9aa..4392779163d70458862f6c2ccc51847c28be19f6 100644 (file)
 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],
index bb1d4ec3e54df90a6df9d8ce7de7add30b1b3b90..772cffa8a20dbae2ff0541b8b33ce45fe82810b4 100644 (file)
@@ -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
  */
@@ -259,7 +256,7 @@ int env_check_apply(const char *name, const char *oldval,
                if (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 */
                        )) {
                        printf("Can't overwrite \"%s\"\n", name);
index 57221efe01f6547eea67ccf99e8d597875d7df38..61c4be54d0ea28e22e0f937235d3b27483a60a67 100644 (file)
@@ -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,40 +52,40 @@ 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_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"
@@ -99,25 +97,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"
index 3872878885c4aca4b1673f852400b65aafb7c59f..8cc08ae4da972f708a167eea9f8c1b1ffdc9ea9d 100644 (file)
@@ -28,6 +28,7 @@
 #include <config.h>
 #undef __ASSEMBLY__
 #include <environment.h>
+#include <linux/stringify.h>
 
 /* Handle HOSTS that have prepended crap on symbol names, not TARGETS. */
 #if defined(__APPLE__)
        asm(".globl " GEN_SYMNAME(name));       \
        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 +108,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 +150,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 +171,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"
index d417e2406cd596c662caad8e730952b8ac1905c1..e4dea05ea7da59a731a6f55a711724d76db1a6ed 100644 (file)
 #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;"                     \
 #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;"         \
index 30584fe7159172980c6d4e76a11b5c1ee68109b0..fe1cca50e1d549e2816af997dd3a60f7ee75dce3 100644 (file)
@@ -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"     \
index 45d10645578545b829e3cf7cda5ac2228b07ffae..4437bbae865fabbfc1dd250474dad947b3a0264a 100644 (file)
 #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"      \
index 64928e99be2576596000a6ec766be3fbd0c17aa0..6552f69cc85a1cb6a862642b78180c10312a5627 100644 (file)
 #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;"                     \
 #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"                                \
        ""
index b623c33318aa918391f04d6b3d780955da51918d..1bc2c5a0a4abb08bc6f03e8363ba12893f2103c3 100644 (file)
 #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;"                     \
 #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
index 077e0d0f96fd931fb16c137296e0c285cc59996e..c296e3cf069ea92551c233ad918a1bca79cda6ec 100644 (file)
                                "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"\
        "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"\
        "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
  */
index bb72b3584927bbbdf27899fdde42c976de4d4002..c4c41c77deb0d72bc2a052e3eb3c3973cfcdc331 100644 (file)
 #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 "                                  \
        "tftp $fdtaddr $fdtfile;"                                       \
        "bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif /* __CONFIG_H */
index 99edfe66022de8700a9f1e0493781cb7bd378b35..fd80be59042d7c993b0a36a7d0b2c84b1d3bd0a7 100644 (file)
 #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"                                               \
        "tftp $fdtaddr $fdtfile;"                                       \
        "bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif /* __CONFIG_H */
index 8c027f97561264993985fb99e92a26a310be696b..8d5ed0f7aba8bc44d557c309c5071efaddeed63d 100644 (file)
 #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"                                         \
        "tftp $fdtaddr $fdtfile;"                                       \
        "bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif /* __CONFIG_H */
index 7ecb089a359d426babba0e0b5bb87a2f395795be..2c3f1f62a64f00bfbbf501e4cbb22defb90602a0 100644 (file)
@@ -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
index d8213526de8b57da28c4383757b9f4d00ff1756a..9ad7e3a90ff293b8d651c28dacdf0d07aa8124b4 100644 (file)
 #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"                                         \
        "tftp $fdtaddr $fdtfile;"                                       \
        "bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif /* __CONFIG_H */
index ceed5eaff01a134d6795fbd0250e8b253b42fcba..bcd77b608f3782f1b013a7865398d9a4b76997b9 100644 (file)
 #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 "         \
index 7410050f7be51b95f6c0373ba7d81463560389c4..83b8668bac88b094480342d13093f7a9c0d106c2 100644 (file)
@@ -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 "   \
index 95ce0034c389b9338a50852803161876b47efc77..0e22cc7e14df46432e01900d1f64d40089f2f785 100644 (file)
@@ -593,13 +593,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"           \
index d1b5b70ad5bd662c1ee25b2d59b0b63f45c50201..a62b7d53a950aba11f9e0d7b0dee1c8678d01eed 100644 (file)
 #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 "         \
index e10a9876721724809a0beb3553f2823b3b60e088..c61982745fe9d545435d5959d694fa24dbfb4ee9 100644 (file)
 
 #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                                  \
index 7fd8ea8f2afe004d4d873cf9b594ff021164b0f7..264309772a9b8890ae9fde42b5ba8bea69e0555f 100644 (file)
@@ -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"                             \
index eb0233bef2795a1e81a0065b0b8e7d02b503dad5..6850965fb38eb684064f36e04eceb87d127174c8 100644 (file)
 #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"                                         \
        "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"                         \
        "sensor_cnt=1\0"                                        \
        ""
 
-#undef XMK_STR
-#undef MK_STR
-
 /*
  * IPB Bus clocking configuration.
  */
index 9b458c33f916095ae6def48495de837e95e9c51f..a99ad3c44b9e5c64534f0720665de5ff119c1164 100644 (file)
 
 #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"             \
index 0b75b7622b765ea338828b9919820ca729e9695d..bf2f44ec6e9915b4709645086e509f7a9278d20c 100644 (file)
 #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"                                          \
        "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"                         \
        "netboot=no\0"                                          \
        ""
 
-#undef XMK_STR
-#undef MK_STR
-
 /*
  * IPB Bus clocking configuration.
  */
index 67dba9f72807811f18957ee62bb81f59324c99d4..ea6ddf757318d78ff4757fcd07246c978fd6216c 100644 (file)
@@ -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"                 \
index 1d97e957202a101dd8a45dcfe16a24c92147a281..b3c850d584ed73a4d77ffcaf666f7af301baf468 100644 (file)
 
 #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 && "               \
index ab881662d14332599e8dce87570ff4116a184b21..2cb5719063a571a14a2929b9e6d8bad093d21896 100644 (file)
@@ -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"            \
index ae22acb27aac0c91d9c84cd1ca41f715d2733c02..0cc57816927d8b8720586a8bf70959bfd73bc604 100644 (file)
 #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 "         \
index 31696655bbe242ade826348fd4dc51c6174eb135..5cdb628ab1760165a551c78e4999727752544f3f 100644 (file)
@@ -707,8 +707,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 && "                       \
@@ -716,7 +716,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"                  \
index 00b7a4c93ad0543ad1d31eb0f7cb9b3d40039fbf..c0ffb33129d6bad831b6cb6a7297e709765f129e 100644 (file)
 #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"                                               \
        "tftp $fdtaddr $fdtfile;"                                       \
        "bootm $loadaddr $ramdiskaddr $fdtaddr"
 
-#undef MK_STR
-#undef XMK_STR
-
 #endif /* __CONFIG_H */
index ef9d236b1d8be12090c5056c1d5fed9771f11734..feb9d7344ac3a69224a98ebf03c1a0fb74dd3ad5 100644 (file)
 
 #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;" \
index 52d5d97abb2723006a9fa8a251cb89f5ecbc54ec..1de8ffe2dfc8b290e1e1cf9054cb4f4ff99c8832 100644 (file)
 
 #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;" \
index 3fbf5c68e71a1c38f619afd3df495bad042759ce..c98c26d1d8eb7967dc1f9ea4ace282d0c40469f7 100644 (file)
 #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" \
 #    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)
index 64fce30584c643abcb245f90f02374f0dccea3af..83ad659cdfa49772e614613a1853f0f51fd96f2c 100644 (file)
 #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)
                "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
index f2dc6aae9d3631fd68e2293967a29ef9e7811f06..523c4e409a51c86a45b80cbc4c11f89d106ecb19 100644 (file)
  */
 #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.
index f4f9bd12a4c13a5affb020a4e2c9228df5546f31..8489d16dda2ad2b5f30728572270ed087cb15815 100644 (file)
 #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 && "                       \
index bb9603418bc8ab35f1c3d4216b278bbb995b4df7..eec79619c10a2ba2ee68711974995e8652fa9900 100644 (file)
 
 #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)
        "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"   \
index 0db559cf6cc2828e9b3147a0ca469eba61b06433..8097f28ccc54bd136404d14f58a8f4af0c4397c2 100644 (file)
                "&& 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 "                                             \
index 1867eb66d65281e1a88e1b9a6e4fbe4419a8cc0f..d2bab457cc911a9f2b899317b8c36a0f0b9f0bb8 100644 (file)
 
 #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"
 #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 "                  \
        "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"
 
index b18f4a0ec55481d939b2a58392e1fbd78fd7d7e9..350150b11555a41477061dda9363a4d3e1e9f2c2 100644 (file)
@@ -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 "    \
index 8e8e14cf30fca966e3394efba3fe3e7f7fdbb2df..2209ddf8238db9010cc54111d2e9da177e8c6246 100644 (file)
 #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 "                                 \
index d9eb5d99055e99ca86e792b98e7ec08f33345f08..42077bd6fd4619a788369819062e377ff8cd3708 100644 (file)
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "verify=n\0" \
-       "loadaddr= " MK_STR(CONFIG_SYS_LOAD_ADDR) "\0" \
+       "loadaddr= " __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
        "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
                "bootm ${loadaddr} - ${fdt_addr}\0" \
        "bootimage=uImage\0" \
index a5876366b14f798117cb296d2e822477667df9c3..d3b8379186390058a2a60caddb49ed4d9afda08b 100644 (file)
 #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 */
index 4703d9d9b016806f8be72399b07d510be29a84e5..506d646fec98696e4665bdf59439be87b22e793a 100644 (file)
@@ -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; "                          \
index 038f4f4270ec1f1f94a011c11ae43251d37f2160..1851a00c16202485c01c972213267851493d5da7 100644 (file)
@@ -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; "                          \
index 16ec455bdebc556508d5a379dc51c567e66e5b4c..ff99481b2f8d8c48ff562c66da67b2c1acc985f3 100644 (file)
  * 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; "                          \
index 6a469bb6026c31bf0e698338a2504018052fd611..46f1c903f1356e617ee2572fc219b6d2eb18ba14 100644 (file)
@@ -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; "                          \
index dda665719bfef631acb8ee7e10690aa5637ead07..2acf6c80a5eee260f9e75691b04e0284d8513c16 100644 (file)
@@ -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; "                          \
index 1a2c22756eeed6c840cb6b7fbc2b3f253e99b7ce..9f8dfdccbf41a844d4aba98b309f49c0ee380cdb 100644 (file)
@@ -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_ENV_VARS_UBOOT_CONFIG
        "arch=" CONFIG_SYS_ARCH "\0"
@@ -411,7 +408,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);