Commit a40ffec5 authored by Tom Rini's avatar Tom Rini

PPC32: Move PowerPC Book E (and IBM 40x) register definitions to their own fil

e.
parent 511ffaa3
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#ifdef CONFIG_44x #ifdef CONFIG_44x
#include <asm/ibm4xx.h> #include <asm/ibm4xx.h>
#endif #endif
#include <asm/reg.h>
#include "nonstdio.h" #include "nonstdio.h"
#include "zlib.h" #include "zlib.h"
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <asm/reg.h>
#include <asm/ibm44x.h> #include <asm/ibm44x.h>
#include <asm/mmu.h> #include <asm/mmu.h>
......
...@@ -16,48 +16,6 @@ ...@@ -16,48 +16,6 @@
#include <linux/config.h> #include <linux/config.h>
#ifdef CONFIG_4xx
#ifndef __ASSEMBLY__
/* Device Control Registers */
#define stringify(s) tostring(s)
#define tostring(s) #s
#define mfdcr(rn) mfdcr_or_dflt(rn, 0)
#define mfdcr_or_dflt(rn,default_rval) \
({unsigned int rval; \
if (rn == 0) \
rval = default_rval; \
else \
asm volatile("mfdcr %0," stringify(rn) : "=r" (rval)); \
rval;})
#define mtdcr(rn, v) \
do { \
if (rn != 0) \
asm volatile("mtdcr " stringify(rn) ",%0" : : "r" (v)); \
} while (0)
/* R/W of indirect DCRs make use of standard naming conventions for DCRs */
#define mfdcri(base, reg) \
({ \
mtdcr(base##_CFGADDR, base##_##reg); \
mfdcr(base##_CFGDATA); \
})
#define mtdcri(base, reg, data) \
do { \
mtdcr(base##_CFGADDR, base##_##reg); \
mtdcr(base##_CFGDATA, data); \
} while (0)
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_4xx */
#ifdef CONFIG_40x #ifdef CONFIG_40x
#if defined(CONFIG_ASH) #if defined(CONFIG_ASH)
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment