MIPS: Octeon: Rewrite DMA mapping functions.
All Octeon chips can support more than 4GB of RAM. Also due to how Octeon PCI is setup, even some configurations with less than 4GB of RAM will have portions that are not accessible from 32-bit devices. Enable the swiotlb code to handle the cases where a device cannot directly do DMA. This is a complete rewrite of the Octeon DMA mapping code. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Patchwork: http://patchwork.linux-mips.org/patch/1639/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
ee71b7d2f8
commit
b93b2abce4
@@ -75,6 +75,8 @@ union cvmx_pcie_address {
|
||||
} mem;
|
||||
};
|
||||
|
||||
#include <dma-coherence.h>
|
||||
|
||||
/**
|
||||
* Return the Core virtual base address for PCIe IO access. IOs are
|
||||
* read/written as an offset from this address.
|
||||
@@ -1391,6 +1393,9 @@ static int __init octeon_pcie_setup(void)
|
||||
cvmx_pcie_get_io_size(1) - 1;
|
||||
register_pci_controller(&octeon_pcie1_controller);
|
||||
}
|
||||
|
||||
octeon_pci_dma_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user