diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2020-03-08 00:00:18 +0200 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-03-08 00:00:18 +0200 |
commit | 3010be7cfa594aac6134887b8505b3f1bd619ad4 (patch) | |
tree | 867d21a3537efafc20045dc58ffd18104f0ca474 /drivers/of | |
parent | a0edb0970a4d09aed24b6f37cd6fd0c545565485 (diff) | |
parent | 4db1ebdd40ec0b6ee8fb5744b20274a37aea267d (diff) |
Merge branch 'android-4.4-p' of https://android.googlesource.com/kernel/common into lineage-17.1-caf-msm8998
This brings LA.UM.8.4.r1-05200-8x98.0 up to date with
https://android.googlesource.com/kernel/common/ android-4.4-p at commit:
4db1ebdd40ec0 FROMLIST: HID: nintendo: add nintendo switch controller driver
Conflicts:
arch/arm64/boot/Makefile
arch/arm64/kernel/psci.c
arch/x86/configs/x86_64_cuttlefish_defconfig
drivers/md/dm.c
drivers/of/Kconfig
drivers/thermal/thermal_core.c
fs/proc/meminfo.c
kernel/locking/spinlock_debug.c
kernel/time/hrtimer.c
net/wireless/util.c
Change-Id: I5b5163497b7c6ab8487ffbb2d036e4cda01ed670
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/Kconfig | 4 | ||||
-rw-r--r-- | drivers/of/address.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index 60efdd584d15..ea02d4af4b7b 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -118,6 +118,10 @@ config OF_OVERLAY While this option is selected automatically when needed, you can enable it manually to improve device tree unit test coverage. +config OF_DMA_DEFAULT_COHERENT + # arches should select this if DMA is coherent by default for OF devices + bool + config OF_BATTERYDATA def_bool y help diff --git a/drivers/of/address.c b/drivers/of/address.c index 5393be762da4..555d328cbd2c 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -1025,12 +1025,16 @@ EXPORT_SYMBOL_GPL(of_dma_get_range); * @np: device node * * It returns true if "dma-coherent" property was found - * for this device in DT. + * for this device in the DT, or if DMA is coherent by + * default for OF devices on the current platform. */ bool of_dma_is_coherent(struct device_node *np) { struct device_node *node = of_node_get(np); + if (IS_ENABLED(CONFIG_OF_DMA_DEFAULT_COHERENT)) + return true; + while (node) { if (of_property_read_bool(node, "dma-coherent")) { of_node_put(node); |