Skip to content

Commit 47026c4

Browse files
quic-kdybciorobherring
authored andcommitted
of: address: Allow to specify nonposted-mmio per-device
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 7f62346 commit 47026c4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/of/address.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,10 +1032,11 @@ EXPORT_SYMBOL_GPL(of_dma_is_coherent);
10321032
static bool of_mmio_is_nonposted(const struct device_node *np)
10331033
{
10341034
struct device_node *parent __free(device_node) = of_get_parent(np);
1035-
if (!parent)
1036-
return false;
10371035

1038-
return of_property_read_bool(parent, "nonposted-mmio");
1036+
if (of_property_read_bool(np, "nonposted-mmio"))
1037+
return true;
1038+
1039+
return parent && of_property_read_bool(parent, "nonposted-mmio");
10391040
}
10401041

10411042
static int __of_address_to_resource(struct device_node *dev, int index, int bar_no,

0 commit comments

Comments
 (0)