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>
This commit is contained in:
parent
5368c55d4c
commit
51926d5ee0
|
@ -22,6 +22,8 @@
|
||||||
#ifndef ZOOM2_SERIAL_H
|
#ifndef ZOOM2_SERIAL_H
|
||||||
#define ZOOM2_SERIAL_H
|
#define ZOOM2_SERIAL_H
|
||||||
|
|
||||||
|
#include <linux/stringify.h>
|
||||||
|
|
||||||
extern int zoom2_debug_board_connected (void);
|
extern int zoom2_debug_board_connected (void);
|
||||||
|
|
||||||
#define SERIAL_TL16CP754C_BASE 0x10000000 /* Zoom2 Serial chip address */
|
#define SERIAL_TL16CP754C_BASE 0x10000000 /* Zoom2 Serial chip address */
|
||||||
|
@ -31,9 +33,6 @@ extern int zoom2_debug_board_connected (void);
|
||||||
#define QUAD_BASE_2 (SERIAL_TL16CP754C_BASE + 0x200)
|
#define QUAD_BASE_2 (SERIAL_TL16CP754C_BASE + 0x200)
|
||||||
#define QUAD_BASE_3 (SERIAL_TL16CP754C_BASE + 0x300)
|
#define QUAD_BASE_3 (SERIAL_TL16CP754C_BASE + 0x300)
|
||||||
|
|
||||||
#define S(a) #a
|
|
||||||
#define N(a) S(quad##a)
|
|
||||||
|
|
||||||
#define QUAD_INIT(n) \
|
#define QUAD_INIT(n) \
|
||||||
int quad_init_##n(void) \
|
int quad_init_##n(void) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -61,7 +60,7 @@ int quad_tstc_##n(void) \
|
||||||
} \
|
} \
|
||||||
struct serial_device zoom2_serial_device##n = \
|
struct serial_device zoom2_serial_device##n = \
|
||||||
{ \
|
{ \
|
||||||
N(n), \
|
__stringify(n), \
|
||||||
quad_init_##n, \
|
quad_init_##n, \
|
||||||
NULL, \
|
NULL, \
|
||||||
quad_setbrg_##n, \
|
quad_setbrg_##n, \
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#ifndef _CONFIG_ASTRO_MCF5373L_H
|
#ifndef _CONFIG_ASTRO_MCF5373L_H
|
||||||
#define _CONFIG_ASTRO_MCF5373L_H
|
#define _CONFIG_ASTRO_MCF5373L_H
|
||||||
|
|
||||||
|
#include <linux/stringify.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set the card type to actually compile for; either of
|
* set the card type to actually compile for; either of
|
||||||
* the possibilities listed below has to be used!
|
* the possibilities listed below has to be used!
|
||||||
|
@ -209,12 +211,9 @@
|
||||||
* u-boot: 'set' command
|
* u-boot: 'set' command
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _QUOTEME(x) #x
|
|
||||||
#define QUOTEME(x) _QUOTEME(x)
|
|
||||||
|
|
||||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
"loaderversion=11\0" \
|
"loaderversion=11\0" \
|
||||||
"card_id="QUOTEME(ASTRO_ID)"\0" \
|
"card_id="__stringify(ASTRO_ID)"\0" \
|
||||||
"alterafile=0\0" \
|
"alterafile=0\0" \
|
||||||
"xilinxfile=0\0" \
|
"xilinxfile=0\0" \
|
||||||
"xilinxload=imxtract 0x540000 $xilinxfile 0x41000000&&"\
|
"xilinxload=imxtract 0x540000 $xilinxfile 0x41000000&&"\
|
||||||
|
|
|
@ -24,14 +24,7 @@
|
||||||
#ifndef __TEGRA20_COMMON_H
|
#ifndef __TEGRA20_COMMON_H
|
||||||
#define __TEGRA20_COMMON_H
|
#define __TEGRA20_COMMON_H
|
||||||
#include <asm/sizes.h>
|
#include <asm/sizes.h>
|
||||||
|
#include <linux/stringify.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)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* High Level Configuration Options
|
* High Level Configuration Options
|
||||||
|
@ -58,7 +51,8 @@
|
||||||
#define TEGRA_LP0_ADDR 0x1C406000
|
#define TEGRA_LP0_ADDR 0x1C406000
|
||||||
#define TEGRA_LP0_SIZE 0x2000
|
#define TEGRA_LP0_SIZE 0x2000
|
||||||
#define TEGRA_LP0_VEC \
|
#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
|
#else
|
||||||
#define TEGRA_LP0_VEC
|
#define TEGRA_LP0_VEC
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#ifndef __NIOS2_H__
|
#ifndef __NIOS2_H__
|
||||||
#define __NIOS2_H__
|
#define __NIOS2_H__
|
||||||
|
|
||||||
|
#include <linux/stringify.h>
|
||||||
|
|
||||||
/*------------------------------------------------------------------------
|
/*------------------------------------------------------------------------
|
||||||
* Control registers -- use with wrctl() & rdctl()
|
* Control registers -- use with wrctl() & rdctl()
|
||||||
*----------------------------------------------------------------------*/
|
*----------------------------------------------------------------------*/
|
||||||
|
@ -36,11 +38,10 @@
|
||||||
/*------------------------------------------------------------------------
|
/*------------------------------------------------------------------------
|
||||||
* Access to control regs
|
* Access to control regs
|
||||||
*----------------------------------------------------------------------*/
|
*----------------------------------------------------------------------*/
|
||||||
#define _str_(x) #x
|
|
||||||
|
|
||||||
#define rdctl(reg)\
|
#define rdctl(reg)\
|
||||||
({unsigned int val;\
|
({unsigned int val;\
|
||||||
asm volatile( "rdctl %0, ctl" _str_(reg)\
|
asm volatile("rdctl %0, ctl" __stringify(reg) \
|
||||||
: "=r" (val) ); val;})
|
: "=r" (val) ); val;})
|
||||||
|
|
||||||
#define wrctl(reg,val)\
|
#define wrctl(reg,val)\
|
||||||
|
|
Loading…
Reference in New Issue