linux-brain/drivers/of
Michael Ellerman 3ea667a633 of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc
There's an OF helper called of_dma_is_coherent(), which checks if a
device has a "dma-coherent" property to see if the device is coherent
for DMA.

But on some platforms devices are coherent by default, and on some
platforms it's not possible to update existing device trees to add the
"dma-coherent" property.

So add a Kconfig symbol to allow arch code to tell
of_dma_is_coherent() that devices are coherent by default, regardless
of the presence of the property.

Select that symbol on powerpc when NOT_COHERENT_CACHE is not set, ie.
when the system has a coherent cache.

Fixes: 92ea637ede ("of: introduce of_dma_is_coherent() helper")
Cc: stable@vger.kernel.org # v3.16+
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit dabf6b36b83a18d57e3d4b9d50544ed040d86255)
(cherry picked from commit 43557841be)
2020-02-26 04:54:28 +08:00
..
unittest-data of: overlay: check prevents multiple fragments touching same property 2018-11-08 22:12:03 -08:00
Kconfig of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc 2020-02-26 04:54:28 +08:00
Makefile PCI: Move OF-related PCI functions into PCI core 2018-01-17 17:36:39 -06:00
address.c of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc 2020-02-26 04:54:28 +08:00
base.c mmc: add feature of setting slot index via devicetree alias 2019-11-25 15:45:36 +08:00
device.c of/device.c: fix the wrong comments 2019-05-01 13:41:07 -05:00
dynamic.c of: Remove struct device_node.type pointer 2019-01-10 16:24:44 -06:00
fdt.c Revert "of/fdt: Remove dead code and mark functions with __init" 2019-11-25 16:31:48 +08:00
fdt_address.c of: Use SPDX license tag for DT files 2018-01-08 08:22:45 -06:00
irq.c of: irq: fix a trivial typo in a doc comment 2019-08-14 20:12:16 -06:00
kobj.c of: overlay: add missing of_node_get() in __of_attach_node_sysfs 2018-11-08 22:10:53 -08:00
of_mdio.c of: mdio: Fix a signedness bug in of_phy_get_and_connect() 2019-09-27 10:19:09 +02:00
of_net.c of_net: add property "nvmem-mac-address" for of_get_mac_addr() 2019-12-02 18:04:25 +08:00
of_numa.c of, numa: Validate some distance map rules 2018-11-08 12:44:34 -06:00
of_private.h of: __of_detach_node() - remove node from phandle cache 2018-12-21 12:42:36 -06:00
of_reserved_mem.c of: of_reserved_mem: Ensure cma reserved region not cross the low/high memory 2019-11-25 15:46:59 +08:00
overlay.c of: Remove struct device_node.type pointer 2019-01-10 16:24:44 -06:00
pdt.c of: Remove struct device_node.type pointer 2019-01-10 16:24:44 -06:00
platform.c drivers: Introduce device lookup variants by of_node 2019-07-30 13:07:41 +02:00
property.c of: property: Document that of_graph_get_endpoint_by_regs needs of_node_put 2019-04-10 09:03:03 -05:00
resolver.c of: resolver: Add of_node_put() before return and break 2019-08-12 16:52:24 -06:00
unittest.c of: unittest: fix memory leak in unittest_data_add 2019-10-23 14:42:44 -05:00