Module Name:    src
Committed By:   jmcneill
Date:           Mon Aug 30 22:49:42 UTC 2021

Modified Files:
        src/sys/dev/fdt: dwc3_fdt.c

Log Message:
Until we have proper FDT iommu support, refuse to attach when an iommu
is required.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/fdt/dwc3_fdt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/fdt/dwc3_fdt.c
diff -u src/sys/dev/fdt/dwc3_fdt.c:1.16 src/sys/dev/fdt/dwc3_fdt.c:1.17
--- src/sys/dev/fdt/dwc3_fdt.c:1.16	Sat Aug  7 16:19:10 2021
+++ src/sys/dev/fdt/dwc3_fdt.c	Mon Aug 30 22:49:42 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc3_fdt.c,v 1.16 2021/08/07 16:19:10 thorpej Exp $ */
+/* $NetBSD: dwc3_fdt.c,v 1.17 2021/08/30 22:49:42 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcne...@invisible.ca>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.16 2021/08/07 16:19:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.17 2021/08/30 22:49:42 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -242,6 +242,12 @@ dwc3_fdt_attach(device_t parent, device_
 	void *ih;
 	u_int n;
 
+	/* XXX IOMMUs not supported yet */
+	if (of_hasprop(phandle, "iommus")) {
+		aprint_error(": devices behind IOMMUs not supported\n");
+		return;
+	}
+
 	/* Find dwc3 sub-node */
 	if (of_compatible_lookup(phandle, compat_data_dwc3) == NULL) {
 		dwc3_phandle = of_find_firstchild_byname(phandle, "dwc3");

Reply via email to