]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/include/asm/ppc.h
powerpc: mpc8xx: make get_immr() independent of CONFIG_8xx
[u-boot] / arch / powerpc / include / asm / ppc.h
index 4d9af6c37ce56dbd40c413c2b2aac185bc06284e..6ba10974b6d2d86b06f1a2fb697bc1d56bf106c6 100644 (file)
@@ -13,6 +13,9 @@
 
 #ifndef __ASSEMBLY__
 
+#if defined(CONFIG_8xx)
+#include <asm/8xx_immap.h>
+#endif
 #ifdef CONFIG_MPC86xx
 #include <mpc86xx.h>
 #include <asm/immap_86xx.h>
@@ -25,9 +28,6 @@
 #include <mpc83xx.h>
 #include <asm/immap_83xx.h>
 #endif
-#ifdef CONFIG_4xx
-#include <asm/ppc4xx.h>
-#endif
 #ifdef CONFIG_SOC_DA8XX
 #include <asm/arch/hardware.h>
 #endif
 #include <asm/arch/immap_lsch2.h>
 #endif
 
-uint get_pvr(void);
-uint get_svr(void);
-uint rd_ic_cst(void);
-void wr_ic_cst(uint);
-void wr_ic_adr(uint);
-uint rd_dc_cst(void);
-void wr_dc_cst(uint);
-void wr_dc_adr(uint);
-
-#if defined(CONFIG_4xx)        || \
-       defined(CONFIG_MPC85xx) || \
+#include <asm/processor.h>
+
+static inline uint get_immr(uint mask)
+{
+       uint immr = mfspr(SPRN_IMMR);
+
+       return mask ? (immr & mask) : immr;
+}
+
+static inline uint get_pvr(void)
+{
+       return mfspr(PVR);
+}
+
+static inline uint get_svr(void)
+{
+       return mfspr(SVR);
+}
+
+#if defined(CONFIG_MPC85xx)    || \
        defined(CONFIG_MPC86xx) || \
        defined(CONFIG_MPC83xx)
 unsigned char  in8(unsigned int);
@@ -94,6 +103,28 @@ static inline ulong get_ddr_freq(ulong dummy)
 ulong get_ddr_freq(ulong);
 #endif
 
+static inline unsigned long get_msr(void)
+{
+       unsigned long msr;
+
+       asm volatile ("mfmsr %0" : "=r" (msr) : );
+
+       return msr;
+}
+
+static inline void set_msr(unsigned long msr)
+{
+       asm volatile ("mtmsr %0" : : "r" (msr));
+}
+
+#ifdef CONFIG_CMD_REGINFO
+void print_reginfo(void);
+#endif
+
+void interrupt_init_cpu(unsigned *);
+void timer_interrupt_cpu(struct pt_regs *);
+unsigned long search_exception_table(unsigned long addr);
+
 #endif /* !__ASSEMBLY__ */
 
 #ifdef CONFIG_PPC