projects
/
coreboot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6a259b
)
standard functions
author
Greg Watson
<jarrah@users.sourceforge.net>
Sun, 5 Oct 2003 05:15:48 +0000
(
05:15
+0000)
committer
Greg Watson
<jarrah@users.sourceforge.net>
Sun, 5 Oct 2003 05:15:48 +0000
(
05:15
+0000)
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1195
2b7e53f0
-3cfb-0310-b3e9-
8179ed1497e1
src/arch/ppc/include/ppc.h
patch
|
blob
|
history
diff --git
a/src/arch/ppc/include/ppc.h
b/src/arch/ppc/include/ppc.h
index 8213d47e3ab9e072465793c29bb4cdd34ce510df..d35eb70c54fb883086bcf74dace55c3a1e4ab785 100644
(file)
--- 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);