| To: | linux-mips@linux-mips.org, ralf@linux-mips.org |
|---|---|
| Subject: | [PATCH 05/12] MIPS: PCI: Fix for byte swap for Netlogic XLP |
| From: | "Jayachandran C" <jayachandranc@netlogicmicro.com> |
| Date: | Fri, 13 Jul 2012 21:53:18 +0530 |
| Cc: | "Jayachandran C" <jayachandranc@netlogicmicro.com> |
| In-reply-to: | <1342196605-4260-1-git-send-email-jayachandranc@netlogicmicro.com> |
| List-archive: | <http://www.linux-mips.org/archives/linux-mips/> |
| List-help: | <mailto:ecartis@linux-mips.org?Subject=help> |
| List-id: | linux-mips <linux-mips.eddie.linux-mips.org> |
| List-owner: | <mailto:ralf@linux-mips.org> |
| List-post: | <mailto:linux-mips@linux-mips.org> |
| List-software: | Ecartis version 1.0.0 |
| List-subscribe: | <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips> |
| List-unsubscribe: | <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips> |
| References: | <1342196605-4260-1-git-send-email-jayachandranc@netlogicmicro.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
The last 12 bits of the PCIe hardware swap size and limit registers
are significant, while the same bits of the bridge PCIe registers
are 0.
So, to program limits correctly, we need to set the last 12 bits of
the value read from the bridge limit registers to 1 before writing
to the PCIe limit registers.
Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
---
arch/mips/pci/pci-xlp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/mips/pci/pci-xlp.c b/arch/mips/pci/pci-xlp.c
index 3e177e9..140557a 100644
--- a/arch/mips/pci/pci-xlp.c
+++ b/arch/mips/pci/pci-xlp.c
@@ -213,13 +213,14 @@ static int xlp_enable_pci_bswap(void)
nlm_write_pci_reg(pciebase, PCIE_BYTE_SWAP_MEM_BASE, reg);
reg = nlm_read_bridge_reg(sysbase, BRIDGE_PCIEMEM_LIMIT0 + i);
- nlm_write_pci_reg(pciebase, PCIE_BYTE_SWAP_MEM_LIM, reg);
+ nlm_write_pci_reg(pciebase, PCIE_BYTE_SWAP_MEM_LIM,
+ reg | 0xfff);
reg = nlm_read_bridge_reg(sysbase, BRIDGE_PCIEIO_BASE0 + i);
nlm_write_pci_reg(pciebase, PCIE_BYTE_SWAP_IO_BASE, reg);
reg = nlm_read_bridge_reg(sysbase, BRIDGE_PCIEIO_LIMIT0 + i);
- nlm_write_pci_reg(pciebase, PCIE_BYTE_SWAP_IO_LIM, reg);
+ nlm_write_pci_reg(pciebase, PCIE_BYTE_SWAP_IO_LIM, reg | 0xfff);
}
return 0;
}
--
1.7.9.5
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 09/12] MIPS: Netlogic: Add support for built in DTB, Jayachandran C |
|---|---|
| Next by Date: | [PATCH 12/12] MIPS: Netlogic: XLP defconfig update, Jayachandran C |
| Previous by Thread: | [PATCH 09/12] MIPS: Netlogic: Add support for built in DTB, Jayachandran C |
| Next by Thread: | Re: [PATCH 05/12] MIPS: PCI: Fix for byte swap for Netlogic XLP, Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |