linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: sjhill@linux-mips.org
Date: Sat, 22 Jan 2005 21:08:17 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     sjhill@ftp.linux-mips.org       05/01/22 21:08:11

Modified files:
        arch/mips/pci  : ops-tx4927.c 

Log message:
        Source: MontaVista Software, Inc. | URL | Manish Lachwani 
<mlachwani@mvista.com>
        Signed-off-by: Manish Lachwani <mlachwani@mvista.com>
        Description:
        Support for BE mode on Tx4927 based board

diff -urN linux/arch/mips/pci/ops-tx4927.c linux/arch/mips/pci/ops-tx4927.c
--- linux/arch/mips/pci/ops-tx4927.c    2004/11/12 03:10:46     1.3
+++ linux/arch/mips/pci/ops-tx4927.c    2005/01/22 21:08:11     1.4
@@ -130,11 +130,21 @@
        switch (size) {
        case 1:
                *val = *(volatile u8 *) ((ulong) & tx4927_pcicptr->
-                              g2pcfgdata | (where & 3));
+                              g2pcfgdata | 
+#ifdef __LITTLE_ENDIAN
+                                               (where & 3));
+#else
+                                               ((where & 0x3) ^ 0x3));
+#endif
                break;
        case 2:
                *val = *(volatile u16 *) ((ulong) & tx4927_pcicptr->
-                               g2pcfgdata | (where & 3));
+                               g2pcfgdata | 
+#ifdef __LITTLE_ENDIAN
+                                               (where & 3));
+#else
+                                               ((where & 0x3) ^ 0x2));
+#endif
                break;
        case 4:
                *val = tx4927_pcicptr->g2pcfgdata;
@@ -179,12 +189,22 @@
        switch (size) {
        case 1:
                 *(volatile u8 *) ((ulong) & tx4927_pcicptr->
-                          g2pcfgdata | (where & 3)) = val;
+                          g2pcfgdata | 
+#ifdef __LITTLE_ENDIAN
+                                       (where & 3)) = val;
+#else
+                                       ((where & 0x3) ^ 0x3)) = val;
+#endif
                break;
 
        case 2:
                *(volatile u16 *) ((ulong) & tx4927_pcicptr->
-                           g2pcfgdata | (where & 3)) = val;
+                           g2pcfgdata | 
+#ifdef __LITTLE_ENDIAN
+                                       (where & 3)) = val;
+#else
+                                       ((where & 0x3) ^ 0x2)) = val;
+#endif
                break;
        case 4:
                tx4927_pcicptr->g2pcfgdata = val;

<Prev in Thread] Current Thread [Next in Thread>