Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt Look for child node by compat string snps,dwc3 i...
details: https://anonhg.NetBSD.org/src/rev/4e7531f62612
branches: trunk
changeset: 1024870:4e7531f62612
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Nov 07 17:14:20 2021 +0000
description:
Look for child node by compat string snps,dwc3 instead of by name.
diffstat:
sys/dev/fdt/dwc3_fdt.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 3c2b92b620e2 -r 4e7531f62612 sys/dev/fdt/dwc3_fdt.c
--- a/sys/dev/fdt/dwc3_fdt.c Sun Nov 07 17:14:09 2021 +0000
+++ b/sys/dev/fdt/dwc3_fdt.c Sun Nov 07 17:14:20 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc3_fdt.c,v 1.18 2021/09/14 22:00:11 jmcneill Exp $ */
+/* $NetBSD: dwc3_fdt.c,v 1.19 2021/11/07 17:14:20 jmcneill Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.18 2021/09/14 22:00:11 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.19 2021/11/07 17:14:20 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -244,7 +244,10 @@
/* Find dwc3 sub-node */
if (of_compatible_lookup(phandle, compat_data_dwc3) == NULL) {
- dwc3_phandle = of_find_firstchild_byname(phandle, "dwc3");
+ dwc3_phandle = of_find_bycompat(phandle, "snps,dwc3");
+ if (dwc3_phandle <= 0) {
+ dwc3_phandle = of_find_firstchild_byname(phandle, "dwc3");
+ }
} else {
dwc3_phandle = phandle;
}
Home |
Main Index |
Thread Index |
Old Index