[PATCH 2/2] of: address: Allow to specify nonposted-mmio per-device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Certain IP blocks may strictly require/expect a nE mapping to function
correctly, while others may be fine without it (which is preferred for
performance reasons).

Allow specifying nonposted-mmio on a per-device basis.

Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
---
 drivers/of/address.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/of/address.c b/drivers/of/address.c
index 2041ea112ded70e11d3831b403901c36c8c29a93..f0f8f0dd191cfe05dfc29246da5fe665d5fb9c6e 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -1035,10 +1035,11 @@ EXPORT_SYMBOL_GPL(of_dma_is_coherent);
 static bool of_mmio_is_nonposted(const struct device_node *np)
 {
 	struct device_node *parent __free(device_node) = of_get_parent(np);
-	if (!parent)
-		return false;
 
-	return of_property_read_bool(parent, "nonposted-mmio");
+	if (of_property_read_bool(np, "nonposted-mmio"))
+		return true;
+
+	return parent && of_property_read_bool(parent, "nonposted-mmio");
 }
 
 static int __of_address_to_resource(struct device_node *dev, int index, int bar_no,

-- 
2.48.1





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux