|
@@ -24,8 +24,6 @@
|
|
#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()
|
|
*----------------------------------------------------------------------*/
|
|
*----------------------------------------------------------------------*/
|
|
@@ -39,14 +37,8 @@
|
|
* Access to control regs
|
|
* Access to control regs
|
|
*----------------------------------------------------------------------*/
|
|
*----------------------------------------------------------------------*/
|
|
|
|
|
|
-#define rdctl(reg)\
|
|
|
|
- ({unsigned int val;\
|
|
|
|
- asm volatile("rdctl %0, ctl" __stringify(reg) \
|
|
|
|
- : "=r" (val) ); val;})
|
|
|
|
-
|
|
|
|
-#define wrctl(reg,val)\
|
|
|
|
- asm volatile( "wrctl ctl" _str_(reg) ",%0"\
|
|
|
|
- : : "r" (val))
|
|
|
|
|
|
+#define rdctl(reg) __builtin_rdctl(reg)
|
|
|
|
+#define wrctl(reg, val) __builtin_wrctl(reg, val)
|
|
|
|
|
|
/*------------------------------------------------------------------------
|
|
/*------------------------------------------------------------------------
|
|
* Control reg bit masks
|
|
* Control reg bit masks
|