summaryrefslogtreecommitdiffstats
path: root/include/ppc4xx.h
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2008-09-09 16:16:20 -0500
committerAndrew Fleming-AFLEMING <afleming@freescale.com>2008-09-09 16:16:20 -0500
commit650a9e7abc44ce1ce73d6668eaf0ba2d6b8025e9 (patch)
tree30732e12d39390eda22338e98db7b8ab9025bf22 /include/ppc4xx.h
parent6cc64f9b5f69239c8b1969572b5a3a4aab7de5b9 (diff)
parent3b20fd83c73c22acfcb0c6663be747bd5c8b7011 (diff)
downloadu-boot-650a9e7abc44ce1ce73d6668eaf0ba2d6b8025e9.tar.gz
u-boot-650a9e7abc44ce1ce73d6668eaf0ba2d6b8025e9.tar.xz
u-boot-650a9e7abc44ce1ce73d6668eaf0ba2d6b8025e9.zip
Merge branch 'denx'
Diffstat (limited to 'include/ppc4xx.h')
-rw-r--r--include/ppc4xx.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/ppc4xx.h b/include/ppc4xx.h
index 59a3b06b71..e216663a86 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__ */