summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/fsl_pci.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-02-13 10:01:19 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2019-02-18 14:41:03 +0300
commit391133fd5adaba319795cd96882d1ea405c41cf6 (patch)
tree6ae53a126e71ecf6491f3a8b82960db47e38e9fe /arch/powerpc/sysdev/fsl_pci.c
parent7c1013b48778e203d4b17ea49ef0e450dd921664 (diff)
downloadlinux-391133fd5adaba319795cd96882d1ea405c41cf6.tar.xz
powerpc/dma: move pci_dma_dev_setup_swiotlb to fsl_pci.c
pci_dma_dev_setup_swiotlb is only used by the fsl_pci code, and closely related to it, so fsl_pci.c seems like a better place for it. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_pci.c')
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 918be816b097..561f97d698cc 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -114,6 +114,15 @@ static struct pci_ops fsl_indirect_pcie_ops =
static u64 pci64_dma_offset;
#ifdef CONFIG_SWIOTLB
+static void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev)
+{
+ struct pci_controller *hose = pci_bus_to_host(pdev->bus);
+ struct dev_archdata *sd = &pdev->dev.archdata;
+
+ sd->max_direct_dma_addr =
+ hose->dma_window_base_cur + hose->dma_window_size;
+}
+
static void setup_swiotlb_ops(struct pci_controller *hose)
{
if (ppc_swiotlb_enable) {