aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2010-08-04 17:53:57 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-08-05 08:26:31 -0400
commit2b5987abaf2dd6c3934e0376b7d9f64411cdcf03 (patch)
tree1d3609613faed623728eed98a83565f781201420 /arch/mips/include/asm
parent70dc6f045fce6907b5d10377850a78ada6837ffb (diff)
MIPS: Octeon: Allow more than 3.75GB of memory with PCIe
We reserve the 3.75GB - 4GB region of PCIe address space for device to device transfers, making the corresponding physical memory under direct mapping unavailable for DMA. To allow for PCIe DMA to all physical memory we map this chunk of physical memory with BAR1. Because of the resulting discontinuity in the mapping function, we remove a page of memory at each end of the range so multi-page DMA buffers can never be allocated that span the range. Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1535/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r--arch/mips/include/asm/octeon/pci-octeon.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/include/asm/octeon/pci-octeon.h b/arch/mips/include/asm/octeon/pci-octeon.h
index 6ac5d3e3398e..ece78043acf6 100644
--- a/arch/mips/include/asm/octeon/pci-octeon.h
+++ b/arch/mips/include/asm/octeon/pci-octeon.h
@@ -15,6 +15,19 @@
15#define PCI_CONFIG_SPACE_DELAY 10000 15#define PCI_CONFIG_SPACE_DELAY 10000
16 16
17/* 17/*
18 * The physical memory base mapped by BAR1. 256MB at the end of the
19 * first 4GB.
20 */
21#define CVMX_PCIE_BAR1_PHYS_BASE ((1ull << 32) - (1ull << 28))
22#define CVMX_PCIE_BAR1_PHYS_SIZE (1ull << 28)
23
24/*
25 * The RC base of BAR1. gen1 has a 39-bit BAR2, gen2 has 41-bit BAR2,
26 * place BAR1 so it is the same for both.
27 */
28#define CVMX_PCIE_BAR1_RC_BASE (1ull << 41)
29
30/*
18 * pcibios_map_irq() is defined inside pci-octeon.c. All it does is 31 * pcibios_map_irq() is defined inside pci-octeon.c. All it does is
19 * call the Octeon specific version pointed to by this variable. This 32 * call the Octeon specific version pointed to by this variable. This
20 * function needs to change for PCI or PCIe based hosts. 33 * function needs to change for PCI or PCIe based hosts.