diff options
author | Wolfgang Denk <wd@denx.de> | 2008-09-09 02:24:51 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-09-09 02:24:51 +0200 |
commit | ab00e7a23e088505b22cba7b84145806129b83bf (patch) | |
tree | 5acdfb4c2b87058d132dc8fe9fb81d394cb034bd /include/ppc4xx.h | |
parent | 4d2ae70e8c31c22e5710df5ff236b5565ea2cf2c (diff) | |
parent | 5ff889349d2ace13f10c9335e09365fcec8247cc (diff) | |
download | u-boot-imx-ab00e7a23e088505b22cba7b84145806129b83bf.zip u-boot-imx-ab00e7a23e088505b22cba7b84145806129b83bf.tar.gz u-boot-imx-ab00e7a23e088505b22cba7b84145806129b83bf.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Conflicts:
Makefile
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'include/ppc4xx.h')
-rw-r--r-- | include/ppc4xx.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/ppc4xx.h b/include/ppc4xx.h index 59a3b06..e216663 100644 --- a/include/ppc4xx.h +++ b/include/ppc4xx.h @@ -203,6 +203,19 @@ typedef struct unsigned long pllPlbDiv; } PPC4xx_SYS_INFO; +static inline u32 get_mcsr(void) +{ + u32 val; + + asm volatile("mfspr %0, 0x23c" : "=r" (val) :); + return val; +} + +static inline void set_mcsr(u32 val) +{ + asm volatile("mtspr 0x23c, %0" : "=r" (val) :); +} + #endif /* __ASSEMBLY__ */ #endif /* __PPC4XX_H__ */ |