linux/drivers/of
Heiko Stuebner 12b827758f
of: also handle dma-noncoherent in of_dma_is_coherent()
of_dma_is_coherent() currently expects the architecture to be
non-coherent and some devices being coherent getting marked
as such with the dma-coherent devicetree property.

For PowerPC CONFIG_OF_DMA_DEFAULT_COHERENT was added which currently
makes of_dma_is_coherent() always return true but doesn't handle
the case of the architecture being coherent but some devices not.

So modify the function to also check for dma-noncoherent and
set a suitable default return value. If CONFIG_OF_DMA_DEFAULT_COHERENT
is set the value starts with true and finding dma-noncoherent will
set it to false and without CONFIG_OF_DMA_DEFAULT_COHERENT, the
behaviour is reversed.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20220706231536.2041855-2-heiko@sntech.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2022-07-28 15:30:20 -07:00
..
unittest-data of: overlay: unittest: add tests for overlay notifiers 2022-05-03 11:53:15 -05:00
address.c of: also handle dma-noncoherent in of_dma_is_coherent() 2022-07-28 15:30:20 -07:00
base.c Revert "of: base: Introduce of_alias_get_alias_list() to check alias IDs" 2022-03-21 11:35:29 -05:00
device.c of: Check 'of_node_reused' flag on of_match_device() 2022-01-20 12:55:26 -06:00
dynamic.c of: Add missing 'Return' section in kerneldoc comments 2021-03-27 12:59:03 -06:00
fdt_address.c
fdt.c Devicetree updates for v5.19: 2022-05-25 14:56:06 -07:00
irq.c of/irq: fix typo in comment 2022-05-23 16:37:01 -05:00
Kconfig of: net: move of_net under net/ 2021-10-07 13:39:51 +01:00
kexec.c of: Support more than one crash kernel regions for kexec -s 2022-05-07 19:57:35 +01:00
kobj.c of: kobj: make of_node_is_(initialized|attached) parameters const 2021-10-20 13:37:25 -05:00
Makefile of: net: move of_net under net/ 2021-10-07 13:39:51 +01:00
of_numa.c of, numa: Fetch empty NUMA node ID from distance map 2021-10-04 13:13:44 -05:00
of_private.h of: kobj: make of_node_is_(initialized|attached) parameters const 2021-10-20 13:37:25 -05:00
of_reserved_mem.c cma: factor out minimum alignment requirement 2022-03-22 15:57:05 -07:00
overlay.c of: overlay: do not free changeset when of_overlay_apply returns error 2022-05-03 11:53:15 -05:00
pdt.c of: Remove struct device_node.type pointer 2019-01-10 16:24:44 -06:00
platform.c drm for 5.19-rc1 2022-05-25 16:18:27 -07:00
property.c Devicetree updates for v5.19: 2022-05-25 14:56:06 -07:00
resolver.c of: overlay: log the error cause on resolver failure 2020-03-02 11:32:44 -06:00
unittest.c of: overlay: do not free changeset when of_overlay_apply returns error 2022-05-03 11:53:15 -05:00