summaryrefslogtreecommitdiffstats
path: root/include/ppc4xx.h
diff options
context:
space:
mode:
authorAdam Graham <agraham@amcc.com>2008-09-03 12:26:59 -0700
committerStefan Roese <sr@denx.de>2008-09-05 12:04:16 +0200
commitf6b6c45840f9b4671d2d97243a12a1f3ffb64765 (patch)
tree6a6ff862226277c87cbed68551ac10b9b12a98f9 /include/ppc4xx.h
parent075d0b81e896e8735ae26372cd384f87cbd24e41 (diff)
downloadblackbird-obmc-uboot-f6b6c45840f9b4671d2d97243a12a1f3ffb64765.tar.gz
blackbird-obmc-uboot-f6b6c45840f9b4671d2d97243a12a1f3ffb64765.zip
ppc4xx: Update Kilauea to use PPC4xx DDR autocalibration routines
Signed-off-by: Adam Graham <agraham@amcc.com> Signed-off-by: Stefan Roese <sr@denx.de>
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__ */
OpenPOWER on IntegriCloud