powerpc/boot: Add mfdcrx
authorTony Breeds <tony@bakeyournoodle.com>
Wed, 30 Nov 2011 21:39:22 +0000 (21:39 +0000)
committerJosh Boyer <jwboyer@gmail.com>
Fri, 9 Dec 2011 12:49:50 +0000 (07:49 -0500)
Needed for currituck support.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
arch/powerpc/boot/dcr.h

index 645a7c964e5fce7221e7ef12f04ec5423188df59..cc73f7a95e26c488b5afabc1b6691d9f7456920a 100644 (file)
@@ -9,6 +9,12 @@
        })
 #define mtdcr(rn, val) \
        asm volatile("mtdcr %0,%1" : : "i"(rn), "r"(val))
+#define mfdcrx(rn) \
+       ({      \
+               unsigned long rval; \
+               asm volatile("mfdcrx %0,%1" : "=r"(rval) : "r"(rn)); \
+               rval; \
+       })
 
 /* 440GP/440GX SDRAM controller DCRs */
 #define DCRN_SDRAM0_CFGADDR                            0x010