* [PATCH] Support 8-bit and 16-bit PCI ops on TX4927 in BE
@ 2005-01-22 17:57 Manish Lachwani
2005-01-22 21:14 ` Steven J. Hill
0 siblings, 1 reply; 2+ messages in thread
From: Manish Lachwani @ 2005-01-22 17:57 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
[-- Attachment #1: Type: text/plain, Size: 147 bytes --]
Hi Ralf,
Attached patch supports 8-bit and 16-bit PCI operations on TX4927 in big endian mode. Please review and/or apply
Thanks
Manish Lachwani
[-- Attachment #2: common_mips_tx4927_BE.patch --]
[-- Type: text/plain, Size: 1739 bytes --]
Source: MontaVista Software, Inc. | URL | Manish Lachwani <mlachwani@mvista.com>
MR: 9909
Type: Defect Fix
Disposition: Submitted to linux-mips.org
Keywords:
Signed-off-by: Manish Lachwani <mlachwani@mvista.com>
Description:
Support for BE mode on Tx4927 based board
Index: linux-2.6.10/arch/mips/pci/ops-tx4927.c
===================================================================
--- linux-2.6.10.orig/arch/mips/pci/ops-tx4927.c
+++ linux-2.6.10/arch/mips/pci/ops-tx4927.c
@@ -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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Support 8-bit and 16-bit PCI ops on TX4927 in BE
2005-01-22 17:57 [PATCH] Support 8-bit and 16-bit PCI ops on TX4927 in BE Manish Lachwani
@ 2005-01-22 21:14 ` Steven J. Hill
0 siblings, 0 replies; 2+ messages in thread
From: Steven J. Hill @ 2005-01-22 21:14 UTC (permalink / raw)
To: Manish Lachwani; +Cc: linux-mips, ralf
Manish Lachwani wrote:
>
> Attached patch supports 8-bit and 16-bit PCI operations on TX4927 in big endian mode. Please review and/or apply
>
Applied.
-Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-22 21:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-22 17:57 [PATCH] Support 8-bit and 16-bit PCI ops on TX4927 in BE Manish Lachwani
2005-01-22 21:14 ` Steven J. Hill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox