From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Tony Breeds To: Benjamin Herrenschmidt , Josh Boyer Subject: [PATCH 5/6] powerpc/boot: Add mfdcrx Date: Wed, 30 Nov 2011 16:23:59 +1100 Message-Id: <1322630640-13708-6-git-send-email-tony@bakeyournoodle.com> In-Reply-To: <1322630640-13708-1-git-send-email-tony@bakeyournoodle.com> References: <1322630640-13708-1-git-send-email-tony@bakeyournoodle.com> Cc: LinuxPPC-dev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Signed-off-by: Tony Breeds --- arch/powerpc/boot/dcr.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h index 645a7c9..51b5893 100644 --- a/arch/powerpc/boot/dcr.h +++ b/arch/powerpc/boot/dcr.h @@ -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) : "g"(rn)); \ + rval; \ + }) /* 440GP/440GX SDRAM controller DCRs */ #define DCRN_SDRAM0_CFGADDR 0x010 -- 1.7.6.4