Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/fdt Until we have proper FDT iommu support, refuse t...



details:   https://anonhg.NetBSD.org/src/rev/7f92b93abea4
branches:  trunk
changeset: 1023262:7f92b93abea4
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Aug 30 22:49:42 2021 +0000

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

diffstat:

 sys/dev/fdt/dwc3_fdt.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 3d8307e246fd -r 7f92b93abea4 sys/dev/fdt/dwc3_fdt.c
--- a/sys/dev/fdt/dwc3_fdt.c    Mon Aug 30 22:49:03 2021 +0000
+++ b/sys/dev/fdt/dwc3_fdt.c    Mon Aug 30 22:49:42 2021 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
        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");



Home | Main Index | Thread Index | Old Index