Commit 51926d5ee0be029fb45f10f42756df97279f8ad3
Committed by
Tom Rini
1 parent
5368c55d4c
Exists in
master
and in
54 other branches
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>
Showing 4 changed files with 12 additions and 19 deletions Side-by-side Diff
board/logicpd/zoom2/zoom2_serial.h
... | ... | @@ -22,6 +22,8 @@ |
22 | 22 | #ifndef ZOOM2_SERIAL_H |
23 | 23 | #define ZOOM2_SERIAL_H |
24 | 24 | |
25 | +#include <linux/stringify.h> | |
26 | + | |
25 | 27 | extern int zoom2_debug_board_connected (void); |
26 | 28 | |
27 | 29 | #define SERIAL_TL16CP754C_BASE 0x10000000 /* Zoom2 Serial chip address */ |
... | ... | @@ -31,9 +33,6 @@ |
31 | 33 | #define QUAD_BASE_2 (SERIAL_TL16CP754C_BASE + 0x200) |
32 | 34 | #define QUAD_BASE_3 (SERIAL_TL16CP754C_BASE + 0x300) |
33 | 35 | |
34 | -#define S(a) #a | |
35 | -#define N(a) S(quad##a) | |
36 | - | |
37 | 36 | #define QUAD_INIT(n) \ |
38 | 37 | int quad_init_##n(void) \ |
39 | 38 | { \ |
... | ... | @@ -61,7 +60,7 @@ |
61 | 60 | } \ |
62 | 61 | struct serial_device zoom2_serial_device##n = \ |
63 | 62 | { \ |
64 | - N(n), \ | |
63 | + __stringify(n), \ | |
65 | 64 | quad_init_##n, \ |
66 | 65 | NULL, \ |
67 | 66 | quad_setbrg_##n, \ |
include/configs/astro_mcf5373l.h
... | ... | @@ -33,6 +33,8 @@ |
33 | 33 | #ifndef _CONFIG_ASTRO_MCF5373L_H |
34 | 34 | #define _CONFIG_ASTRO_MCF5373L_H |
35 | 35 | |
36 | +#include <linux/stringify.h> | |
37 | + | |
36 | 38 | /* |
37 | 39 | * set the card type to actually compile for; either of |
38 | 40 | * the possibilities listed below has to be used! |
39 | 41 | |
... | ... | @@ -209,12 +211,9 @@ |
209 | 211 | * u-boot: 'set' command |
210 | 212 | */ |
211 | 213 | |
212 | -#define _QUOTEME(x) #x | |
213 | -#define QUOTEME(x) _QUOTEME(x) | |
214 | - | |
215 | 214 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
216 | 215 | "loaderversion=11\0" \ |
217 | - "card_id="QUOTEME(ASTRO_ID)"(ASTRO_ID)"\0" \" \ | |
216 | + "card_id="__stringify(ASTRO_ID)"(ASTRO_ID)"\0" \" \ | |
218 | 217 | "alterafile=0\0" \ |
219 | 218 | "xilinxfile=0\0" \ |
220 | 219 | "xilinxload=imxtract 0x540000 $xilinxfile 0x41000000&&"\ |
include/configs/tegra20-common.h
... | ... | @@ -24,16 +24,9 @@ |
24 | 24 | #ifndef __TEGRA20_COMMON_H |
25 | 25 | #define __TEGRA20_COMMON_H |
26 | 26 | #include <asm/sizes.h> |
27 | +#include <linux/stringify.h> | |
27 | 28 | |
28 | 29 | /* |
29 | - * QUOTE(m) will evaluate to a string version of the value of the macro m | |
30 | - * passed in. The extra level of indirection here is to first evaluate the | |
31 | - * macro m before applying the quoting operator. | |
32 | - */ | |
33 | -#define QUOTE_(m) #m | |
34 | -#define QUOTE(m) QUOTE_(m) | |
35 | - | |
36 | -/* | |
37 | 30 | * High Level Configuration Options |
38 | 31 | */ |
39 | 32 | #define CONFIG_ARMCORTEXA9 /* This is an ARM V7 CPU core */ |
... | ... | @@ -58,7 +51,8 @@ |
58 | 51 | #define TEGRA_LP0_ADDR 0x1C406000 |
59 | 52 | #define TEGRA_LP0_SIZE 0x2000 |
60 | 53 | #define TEGRA_LP0_VEC \ |
61 | - "lp0_vec=" QUOTE(TEGRA_LP0_SIZE) "@" QUOTE(TEGRA_LP0_ADDR) " " | |
54 | + "lp0_vec=" __stringify(TEGRA_LP0_SIZE) \ | |
55 | + "@" __stringify(TEGRA_LP0_ADDR) " " | |
62 | 56 | #else |
63 | 57 | #define TEGRA_LP0_VEC |
64 | 58 | #endif |
include/nios2.h
... | ... | @@ -24,6 +24,8 @@ |
24 | 24 | #ifndef __NIOS2_H__ |
25 | 25 | #define __NIOS2_H__ |
26 | 26 | |
27 | +#include <linux/stringify.h> | |
28 | + | |
27 | 29 | /*------------------------------------------------------------------------ |
28 | 30 | * Control registers -- use with wrctl() & rdctl() |
29 | 31 | *----------------------------------------------------------------------*/ |
30 | 32 | |
... | ... | @@ -36,11 +38,10 @@ |
36 | 38 | /*------------------------------------------------------------------------ |
37 | 39 | * Access to control regs |
38 | 40 | *----------------------------------------------------------------------*/ |
39 | -#define _str_(x) #x | |
40 | 41 | |
41 | 42 | #define rdctl(reg)\ |
42 | 43 | ({unsigned int val;\ |
43 | - asm volatile( "rdctl %0, ctl" _str_(reg)\ | |
44 | + asm volatile("rdctl %0, ctl" __stringify(reg) \ | |
44 | 45 | : "=r" (val) ); val;}) |
45 | 46 | |
46 | 47 | #define wrctl(reg,val)\ |