Big and Little Endian Support
Copyright © 2002 Marvell
CONFIDENTIAL
Doc. No. MV-S300165-00, Rev. A
May 21, 2002, Preliminary
Document Classification: Proprietary Information
Page 155
D.4.3 Master Swapping
The Master’s swapping setting is determined by the PCI Command registers (Offset: 0xc00 and 0xc80)
MByteSwap bit [0] and MWordSwap [10] and the xbar command bit [14:12], which determine the initiating unit
(PCI/CPU/DMA).
Reg 0xC00 MSwapEn bit [21] PCI Master Swap Enable
•
0 - PCI master data swapping is determined via MByteSwap and MWordSwap bits (bits 0, 10 in 0xc00) as in
the GT-64120/130
•
1 - PCI master data swapping is determine via PCISwap bits in CPU to PCI Address Decoding registers or
PCISwap bits in PCI to PCI Address decoding registers. (On the xbar command, bits 14-12 determine the ini-
tiator unit PCI/CPU/DMA)
To use the PCI as a 64-bit bus (for Big64), the option of force64 is available to force the PCI master to assert the
REQ64# signal. When asserting REQ64#, ensure that the slave always responds with ACK64#.
D.4.4 Slave Swapping
The slave performs data swapping determined by the PCI Command registers (Offset: 0xc00 and 0xc80) or
according to swap bits in the access.
There are four cases:
•
SSwapEn bit [20]) is set to ‘0’. The swapping is according to SWordSwap bit [11]) and SbyteSwap bit [16]).
•
SswapEn bit [20]) is set to ‘1’ and there is a hit in the access. The swapping is according to the PCISwap bits
[26:24] in the access.
•
SswapEn [20]) is set to ‘1’ and there is no hit in the access. The swapping is according to SWordSwap bit [11]
and SbyteSwap bit [16]).
•
There is an access to internal registers or to configuration registers. The swapping is according to SintSwap
bits [26:24]), regardless of any other configuration bits.
In the following example, the data 0x7766554433221100 is written, with all byte enabled valid (all ‘0’), from the PCI
to the SDRAM.
Here is how it looks on a 64 bit PCI bus:
In case of starting address with offset 0:
Pad[31:0] = 0x33221100
Pad[63:32] = 0x77665544
In case of starting address with offset 4:
First phase - Pad[31:0] = don’t care
Pad[63:32] = 0x33221100
Table 37:
Master Swapping
Swap
Xbar Command
PCI Command Register
Result
Byte
bit 12
bit 0
active low (0-swap)
Word
bit 13
bit 10
active high (1-swap)