summaryrefslogtreecommitdiff
path: root/include/nios2.h
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-09-23 17:41:25 +0200
committerTom Rini <trini@ti.com>2012-10-15 11:53:47 -0700
commit51926d5ee0be029fb45f10f42756df97279f8ad3 (patch)
tree651bfdf030853d4499f6729b7eb8b57f0247e38e /include/nios2.h
parent5368c55d4ca463405225dd184ecabf370b715c05 (diff)
downloadu-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/nios2.h')
-rw-r--r--include/nios2.h5
1 files changed, 3 insertions, 2 deletions
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)\