MIPS: use dma_direct_ops for coherent I/O

Switch the simple cache coherent architectures that don't require any
DMA address translation to dma_direct_ops.

We'll soon use at least parts of the direct DMA ops implementation for
all platforms, so select the symbol globally.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Patchwork: https://patchwork.linux-mips.org/patch/19540/
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Tom Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: iommu@lists.linux-foundation.org
Cc: linux-mips@linux-mips.org
This commit is contained in:
Christoph Hellwig 2018-06-15 13:08:43 +02:00 committed by Paul Burton
parent d7e64bf949
commit dffbfde758
No known key found for this signature in database
GPG Key ID: 3EA79FACB57500DD
2 changed files with 2 additions and 15 deletions

View File

@ -16,6 +16,7 @@ config MIPS
select BUILDTIME_EXTABLE_SORT select BUILDTIME_EXTABLE_SORT
select CLONE_BACKWARDS select CLONE_BACKWARDS
select CPU_PM if CPU_IDLE select CPU_PM if CPU_IDLE
select DMA_DIRECT_OPS
select GENERIC_ATOMIC64 if !64BIT select GENERIC_ATOMIC64 if !64BIT
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_CMOS_UPDATE select GENERIC_CMOS_UPDATE
@ -569,7 +570,6 @@ config NEC_MARKEINS
bool "NEC EMMA2RH Mark-eins board" bool "NEC EMMA2RH Mark-eins board"
select SOC_EMMA2RH select SOC_EMMA2RH
select HW_HAS_PCI select HW_HAS_PCI
select MIPS_DMA_DEFAULT
help help
This enables support for the NEC Electronics Mark-eins boards. This enables support for the NEC Electronics Mark-eins boards.
@ -583,14 +583,12 @@ config MACH_VR41XX
config NXP_STB220 config NXP_STB220
bool "NXP STB220 board" bool "NXP STB220 board"
select MIPS_DMA_DEFAULT
select SOC_PNX833X select SOC_PNX833X
help help
Support for NXP Semiconductors STB220 Development Board. Support for NXP Semiconductors STB220 Development Board.
config NXP_STB225 config NXP_STB225
bool "NXP 225 board" bool "NXP 225 board"
select MIPS_DMA_DEFAULT
select SOC_PNX833X select SOC_PNX833X
select SOC_PNX8335 select SOC_PNX8335
help help
@ -768,7 +766,6 @@ config SGI_IP32
config SIBYTE_CRHINE config SIBYTE_CRHINE
bool "Sibyte BCM91120C-CRhine" bool "Sibyte BCM91120C-CRhine"
select BOOT_ELF32 select BOOT_ELF32
select MIPS_DMA_DEFAULT
select SIBYTE_BCM1120 select SIBYTE_BCM1120
select SWAP_IO_SPACE select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1 select SYS_HAS_CPU_SB1
@ -778,7 +775,6 @@ config SIBYTE_CRHINE
config SIBYTE_CARMEL config SIBYTE_CARMEL
bool "Sibyte BCM91120x-Carmel" bool "Sibyte BCM91120x-Carmel"
select BOOT_ELF32 select BOOT_ELF32
select MIPS_DMA_DEFAULT
select SIBYTE_BCM1120 select SIBYTE_BCM1120
select SWAP_IO_SPACE select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1 select SYS_HAS_CPU_SB1
@ -788,7 +784,6 @@ config SIBYTE_CARMEL
config SIBYTE_CRHONE config SIBYTE_CRHONE
bool "Sibyte BCM91125C-CRhone" bool "Sibyte BCM91125C-CRhone"
select BOOT_ELF32 select BOOT_ELF32
select MIPS_DMA_DEFAULT
select SIBYTE_BCM1125 select SIBYTE_BCM1125
select SWAP_IO_SPACE select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1 select SYS_HAS_CPU_SB1
@ -799,7 +794,6 @@ config SIBYTE_CRHONE
config SIBYTE_RHONE config SIBYTE_RHONE
bool "Sibyte BCM91125E-Rhone" bool "Sibyte BCM91125E-Rhone"
select BOOT_ELF32 select BOOT_ELF32
select MIPS_DMA_DEFAULT
select SIBYTE_BCM1125H select SIBYTE_BCM1125H
select SWAP_IO_SPACE select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1 select SYS_HAS_CPU_SB1
@ -810,7 +804,6 @@ config SIBYTE_SWARM
bool "Sibyte BCM91250A-SWARM" bool "Sibyte BCM91250A-SWARM"
select BOOT_ELF32 select BOOT_ELF32
select HAVE_PATA_PLATFORM select HAVE_PATA_PLATFORM
select MIPS_DMA_DEFAULT
select SIBYTE_SB1250 select SIBYTE_SB1250
select SWAP_IO_SPACE select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1 select SYS_HAS_CPU_SB1
@ -823,7 +816,6 @@ config SIBYTE_LITTLESUR
bool "Sibyte BCM91250C2-LittleSur" bool "Sibyte BCM91250C2-LittleSur"
select BOOT_ELF32 select BOOT_ELF32
select HAVE_PATA_PLATFORM select HAVE_PATA_PLATFORM
select MIPS_DMA_DEFAULT
select SIBYTE_SB1250 select SIBYTE_SB1250
select SWAP_IO_SPACE select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1 select SYS_HAS_CPU_SB1
@ -834,7 +826,6 @@ config SIBYTE_LITTLESUR
config SIBYTE_SENTOSA config SIBYTE_SENTOSA
bool "Sibyte BCM91250E-Sentosa" bool "Sibyte BCM91250E-Sentosa"
select BOOT_ELF32 select BOOT_ELF32
select MIPS_DMA_DEFAULT
select SIBYTE_SB1250 select SIBYTE_SB1250
select SWAP_IO_SPACE select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1 select SYS_HAS_CPU_SB1
@ -844,7 +835,6 @@ config SIBYTE_SENTOSA
config SIBYTE_BIGSUR config SIBYTE_BIGSUR
bool "Sibyte BCM91480B-BigSur" bool "Sibyte BCM91480B-BigSur"
select BOOT_ELF32 select BOOT_ELF32
select MIPS_DMA_DEFAULT
select NR_CPUS_DEFAULT_4 select NR_CPUS_DEFAULT_4
select SIBYTE_BCM1x80 select SIBYTE_BCM1x80
select SWAP_IO_SPACE select SWAP_IO_SPACE
@ -965,7 +955,6 @@ config NLM_XLR_BOARD
select SYS_HAS_CPU_XLR select SYS_HAS_CPU_XLR
select SYS_SUPPORTS_SMP select SYS_SUPPORTS_SMP
select HW_HAS_PCI select HW_HAS_PCI
select MIPS_DMA_DEFAULT
select SWAP_IO_SPACE select SWAP_IO_SPACE
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
@ -992,7 +981,6 @@ config NLM_XLP_BOARD
select SYS_HAS_CPU_XLP select SYS_HAS_CPU_XLP
select SYS_SUPPORTS_SMP select SYS_SUPPORTS_SMP
select HW_HAS_PCI select HW_HAS_PCI
select MIPS_DMA_DEFAULT
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select PHYS_ADDR_T_64BIT select PHYS_ADDR_T_64BIT
@ -1018,7 +1006,6 @@ config MIPS_PARAVIRT
bool "Para-Virtualized guest system" bool "Para-Virtualized guest system"
select CEVT_R4K select CEVT_R4K
select CSRC_R4K select CSRC_R4K
select MIPS_DMA_DEFAULT
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN

View File

@ -20,7 +20,7 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
#elif defined(CONFIG_MIPS_DMA_DEFAULT) #elif defined(CONFIG_MIPS_DMA_DEFAULT)
return &mips_default_dma_map_ops; return &mips_default_dma_map_ops;
#else #else
return NULL; return &dma_direct_ops;
#endif #endif
} }