Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11ddce15 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Michael Ellerman
Browse files

dma-mapping, powerpc: simplify the arch dma_set_mask override



Instead of letting the architecture supply all of dma_set_mask just
give it an additional hook selected by Kconfig.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatarChristian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 9b18114c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -886,6 +886,7 @@ config FSL_SOC

config FSL_PCI
 	bool
	select ARCH_HAS_DMA_SET_MASK
	select PPC_INDIRECT_PCI
	select PCI_QUIRKS

+0 −2
Original line number Diff line number Diff line
@@ -110,7 +110,5 @@ static inline void set_dma_offset(struct device *dev, dma_addr_t off)
		dev->archdata.dma_offset = off;
}

#define HAVE_ARCH_DMA_SET_MASK 1

#endif /* __KERNEL__ */
#endif	/* _ASM_DMA_MAPPING_H */
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ struct machdep_calls {
#endif
#endif /* CONFIG_PPC64 */

	int		(*dma_set_mask)(struct device *dev, u64 dma_mask);
	void		(*dma_set_mask)(struct device *dev, u64 dma_mask);

	int		(*probe)(void);
	void		(*setup_arch)(void); /* Optional, may be NULL */
+1 −0
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ obj-$(CONFIG_UPROBES) += uprobes.o
obj-$(CONFIG_PPC_UDBG_16550)	+= legacy_serial.o udbg_16550.o
obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
obj-$(CONFIG_SWIOTLB)		+= dma-swiotlb.o
obj-$(CONFIG_ARCH_HAS_DMA_SET_MASK) += dma-mask.o

pci64-$(CONFIG_PPC64)		+= pci_dn.o pci-hotplug.o isa-bridge.o
obj-$(CONFIG_PCI)		+= pci_$(BITS).o $(pci64-y) \
+12 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0

#include <linux/dma-mapping.h>
#include <linux/export.h>
#include <asm/machdep.h>

void arch_dma_set_mask(struct device *dev, u64 dma_mask)
{
	if (ppc_md.dma_set_mask)
		ppc_md.dma_set_mask(dev, dma_mask);
}
EXPORT_SYMBOL(arch_dma_set_mask);
Loading