summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGreg Watson <jarrah@users.sourceforge.net>2003-10-05 05:15:48 +0000
committerGreg Watson <jarrah@users.sourceforge.net>2003-10-05 05:15:48 +0000
commit5b3b9aa5de84d4d564fb2c887f615a0953c945e9 (patch)
treeb7484005681a3e443facaa0550d3cf1463deb1a1 /src/arch
parentb6a259b0d26d1829ac38db646d267543daed216a (diff)
standard functions
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1195 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/ppc/include/ppc.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/arch/ppc/include/ppc.h b/src/arch/ppc/include/ppc.h
index 8213d47e3a..d35eb70c54 100644
--- a/src/arch/ppc/include/ppc.h
+++ b/src/arch/ppc/include/ppc.h
@@ -10,9 +10,12 @@
/* stringify is needed for macro expansion */
#define stringify(x) #x
-#define ppc_getdcr(reg) ({unsigned int result; \
+#define mfdcr(reg) ({unsigned int result; \
__asm__ volatile("mfdcr %0, " stringify(reg) \
- : "=r" (result)); result;})
+ : "=r" (result)); result;})
+
+#define mtdcr(reg, v) asm volatile("mtdcr " stringify(reg) ",%0" \
+ : : "r" (v))
extern unsigned ppc_getmsr(void);
extern unsigned ppc_gethid0(void);