Thread (3 messages) flat view 3 messages, 3 authors, 2004-01-05

Re: PPC32: Add support for the OpenPIC register set to be in BE mode.

From: Anton Blanchard <hidden>
Date: 2004-01-05 15:28:30

quoted
diff -Nru a/arch/ppc/kernel/open_pic.c b/arch/ppc/kernel/open_pic.c
--- a/arch/ppc/kernel/open_pic.c	Sat Jan  3 12:02:04 2004
+++ b/arch/ppc/kernel/open_pic.c	Sat Jan  3 12:02:04 2004
@@ -166,13 +166,21 @@
 {
 	u_int val;

+#ifdef CONFIG_PPC_OPENPIC_BE
+	val = in_be32(addr);
+#else
 	val = in_le32(addr);
+#endif
 	return val;
 }
Wouldn't it be better to #define openpic_in() and openpic_out() macros, so you
need the #ifdef at one spot only?
Or grab the bit out of the ppc64 openpic code that detects this at runtime
and get rid of the CONFIG option completely :)

Anton

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help