patch-2.4.25 linux-2.4.25/arch/ppc/kernel/open_pic.c

Next file: linux-2.4.25/arch/ppc/kernel/ppc_htab.c
Previous file: linux-2.4.25/arch/ppc/kernel/m8xx_wdt.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/arch/ppc/kernel/open_pic.c linux-2.4.25/arch/ppc/kernel/open_pic.c
@@ -69,7 +69,6 @@
  * These functions are not used but the code is kept here
  * for completeness and future reference.
  */
-static void openpic_reset(void);
 #ifdef notused
 static void openpic_enable_8259_pass_through(void);
 static u_int openpic_get_priority(void);
@@ -167,13 +166,21 @@
 {
 	u_int val;
 
+#ifdef CONFIG_PPC_OPENPIC_BE
+	val = in_be32(addr);
+#else
 	val = in_le32(addr);
+#endif
 	return val;
 }
 
 static inline void openpic_write(volatile u_int *addr, u_int val)
 {
+#ifdef CONFIG_PPC_OPENPIC_BE
+	out_be32(addr, val);
+#else
 	out_le32(addr, val);
+#endif
 }
 
 static inline u_int openpic_readfield(volatile u_int *addr, u_int mask)
@@ -212,7 +219,7 @@
 u_int openpic_read_IPI(volatile u_int* addr)
 {
          u_int val = 0;
-#ifdef CONFIG_POWER3
+#if defined(CONFIG_PPC_OPENPIC_BE) || defined(CONFIG_POWER3)
         val = in_be32(addr);
 #else
         val = in_le32(addr);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)