summaryrefslogtreecommitdiff
path: root/sys/dev/fdt/dwpcie.c
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2020-04-23 19:48:27 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2020-04-23 19:48:27 +0000
commit734b71c350a61b9b58b02e96a64da20fe23a5993 (patch)
treee341ff8a32f08e67c9548b2c769367d95f08cc9d /sys/dev/fdt/dwpcie.c
parentb4921f76f870f2461ae9f70dabeb2c6d3ddcd425 (diff)
Since apparently the bikeshedding over i.MX8M PCIe device tree
bindings still hasn't resulted in an upstream commit in Linux, accept the ext_osc attribute if ext_osc exists without a value, or if it has a value greater zero. This improves compatibility with various device trees.
Diffstat (limited to 'sys/dev/fdt/dwpcie.c')
-rw-r--r--sys/dev/fdt/dwpcie.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c
index f7194dee960..8ffe9c35b44 100644
--- a/sys/dev/fdt/dwpcie.c
+++ b/sys/dev/fdt/dwpcie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwpcie.c,v 1.15 2019/08/26 11:24:03 patrick Exp $ */
+/* $OpenBSD: dwpcie.c,v 1.16 2020/04/23 19:48:26 patrick Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
*
@@ -652,7 +652,8 @@ dwpcie_imx8mq_init(struct dwpcie_softc *sc)
}
regmap_write_4(gpr, IOMUXC_GPR12, reg);
- if (OF_getproplen(sc->sc_node, "ext_osc") == 0) {
+ if (OF_getproplen(sc->sc_node, "ext_osc") == 0 ||
+ OF_getpropint(sc->sc_node, "ext_osc", 0)) {
reg = regmap_read_4(gpr, off);
reg |= IMX8MQ_GPR_PCIE_REF_USE_PAD;
regmap_write_4(gpr, off, reg);