diff options
author | Marek Vasut <marex@denx.de> | 2012-09-23 17:41:25 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-15 11:53:47 -0700 |
commit | 51926d5ee0be029fb45f10f42756df97279f8ad3 (patch) | |
tree | 651bfdf030853d4499f6729b7eb8b57f0247e38e /include | |
parent | 5368c55d4ca463405225dd184ecabf370b715c05 (diff) | |
download | u-boot-imx-51926d5ee0be029fb45f10f42756df97279f8ad3.zip u-boot-imx-51926d5ee0be029fb45f10f42756df97279f8ad3.tar.gz u-boot-imx-51926d5ee0be029fb45f10f42756df97279f8ad3.tar.bz2 |
COMMON: Use __stringify() instead of rest of implementations
Fix up the rest of implementations of __stringify().
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/astro_mcf5373l.h | 7 | ||||
-rw-r--r-- | include/configs/tegra20-common.h | 12 | ||||
-rw-r--r-- | include/nios2.h | 5 |
3 files changed, 9 insertions, 15 deletions
diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h index 5c4cac9..a0ed8f1 100644 --- a/include/configs/astro_mcf5373l.h +++ b/include/configs/astro_mcf5373l.h @@ -33,6 +33,8 @@ #ifndef _CONFIG_ASTRO_MCF5373L_H #define _CONFIG_ASTRO_MCF5373L_H +#include <linux/stringify.h> + /* * set the card type to actually compile for; either of * the possibilities listed below has to be used! @@ -209,12 +211,9 @@ * u-boot: 'set' command */ -#define _QUOTEME(x) #x -#define QUOTEME(x) _QUOTEME(x) - #define CONFIG_EXTRA_ENV_SETTINGS \ "loaderversion=11\0" \ - "card_id="QUOTEME(ASTRO_ID)"\0" \ + "card_id="__stringify(ASTRO_ID)"\0" \ "alterafile=0\0" \ "xilinxfile=0\0" \ "xilinxload=imxtract 0x540000 $xilinxfile 0x41000000&&"\ diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h index 098cdb4..e213375 100644 --- a/include/configs/tegra20-common.h +++ b/include/configs/tegra20-common.h @@ -24,14 +24,7 @@ #ifndef __TEGRA20_COMMON_H #define __TEGRA20_COMMON_H #include <asm/sizes.h> - -/* - * QUOTE(m) will evaluate to a string version of the value of the macro m - * passed in. The extra level of indirection here is to first evaluate the - * macro m before applying the quoting operator. - */ -#define QUOTE_(m) #m -#define QUOTE(m) QUOTE_(m) +#include <linux/stringify.h> /* * High Level Configuration Options @@ -58,7 +51,8 @@ #define TEGRA_LP0_ADDR 0x1C406000 #define TEGRA_LP0_SIZE 0x2000 #define TEGRA_LP0_VEC \ - "lp0_vec=" QUOTE(TEGRA_LP0_SIZE) "@" QUOTE(TEGRA_LP0_ADDR) " " + "lp0_vec=" __stringify(TEGRA_LP0_SIZE) \ + "@" __stringify(TEGRA_LP0_ADDR) " " #else #define TEGRA_LP0_VEC #endif diff --git a/include/nios2.h b/include/nios2.h index 54954e3..df8126a 100644 --- a/include/nios2.h +++ b/include/nios2.h @@ -24,6 +24,8 @@ #ifndef __NIOS2_H__ #define __NIOS2_H__ +#include <linux/stringify.h> + /*------------------------------------------------------------------------ * Control registers -- use with wrctl() & rdctl() *----------------------------------------------------------------------*/ @@ -36,11 +38,10 @@ /*------------------------------------------------------------------------ * Access to control regs *----------------------------------------------------------------------*/ -#define _str_(x) #x #define rdctl(reg)\ ({unsigned int val;\ - asm volatile( "rdctl %0, ctl" _str_(reg)\ + asm volatile("rdctl %0, ctl" __stringify(reg) \ : "=r" (val) ); val;}) #define wrctl(reg,val)\ |