Date: Sat, 8 May 2021 14:47:41 GMT From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 9146c6240d14 - main - ofw: support for a single 'port' DTS property. Message-ID: <202105081447.148ElfvN087472@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=9146c6240d14df78e2cb3397b3ba33eb587e7972 commit 9146c6240d14df78e2cb3397b3ba33eb587e7972 Author: Ruslan Bukin <br@FreeBSD.org> AuthorDate: 2021-05-08 14:41:57 +0000 Commit: Ruslan Bukin <br@FreeBSD.org> CommitDate: 2021-05-08 14:41:57 +0000 ofw: support for a single 'port' DTS property. On rk3399 the VOP-little node has a single 'port' property (not a collection of 'ports' or indexed ports). Reviewed by: manu Sponsored by: UKRI Differential Revision: https://reviews.freebsd.org/D30165 --- sys/dev/ofw/ofw_graph.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/ofw/ofw_graph.c b/sys/dev/ofw/ofw_graph.c index 0ef53486804d..3f7ddb004eb0 100644 --- a/sys/dev/ofw/ofw_graph.c +++ b/sys/dev/ofw/ofw_graph.c @@ -60,6 +60,14 @@ ofw_graph_get_port_by_idx(phandle_t node, uint32_t idx) if (child != 0) return (child); + /* Now check for 'port' without explicit index. */ + if (idx == 0) { + snprintf(portnode, sizeof(portnode), "port"); + child = ofw_bus_find_child(node, portnode); + if (child != 0) + return (child); + } + /* Next try to look under ports */ ports = ofw_bus_find_child(node, "ports"); if (ports == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105081447.148ElfvN087472>