diff options
author | Christoph Hellwig <hch@lst.de> | 2019-02-13 08:01:20 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-02-18 22:41:03 +1100 |
commit | 74194cdaac41f6dfaacd9433f739dcbd83125d0b (patch) | |
tree | 6e2dc6d362d1c2f55e9678f4de418da50a86e5b5 /arch/powerpc/sysdev | |
parent | 391133fd5adaba319795cd96882d1ea405c41cf6 (diff) | |
download | linux-74194cdaac41f6dfaacd9433f739dcbd83125d0b.tar.bz2 |
powerpc/dma: remove max_direct_dma_addr
The max_direct_dma_addr duplicates the bus_dma_mask field in struct
device. Use the generic field instead.
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')
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 561f97d698cc..b710cee023a2 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -117,9 +117,8 @@ static u64 pci64_dma_offset; 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 = + pdev->dev.bus_dma_mask = hose->dma_window_base_cur + hose->dma_window_size; } @@ -144,6 +143,7 @@ static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask) * mapping that allows addressing any RAM address from across PCI. */ if (dev_is_pci(dev) && dma_mask >= pci64_dma_offset * 2 - 1) { + dev->bus_dma_mask = 0; set_dma_ops(dev, &dma_nommu_ops); set_dma_offset(dev, pci64_dma_offset); } |