Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/fdt fdt: add helper for finding intr parent phandle



details:   https://anonhg.NetBSD.org/src/rev/80afc49047dd
branches:  trunk
changeset: 1024868:80afc49047dd
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Nov 07 17:13:53 2021 +0000

description:
fdt: add helper for finding intr parent phandle

diffstat:

 sys/dev/fdt/fdt_intr.c |  10 ++++++++--
 sys/dev/fdt/fdtvar.h   |   3 ++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (48 lines):

diff -r f272949c8e94 -r 80afc49047dd sys/dev/fdt/fdt_intr.c
--- a/sys/dev/fdt/fdt_intr.c    Sun Nov 07 17:13:38 2021 +0000
+++ b/sys/dev/fdt/fdt_intr.c    Sun Nov 07 17:13:53 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_intr.c,v 1.29 2021/01/15 22:59:49 jmcneill Exp $ */
+/* $NetBSD: fdt_intr.c,v 1.30 2021/11/07 17:13:53 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.29 2021/01/15 22:59:49 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.30 2021/11/07 17:13:53 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -177,6 +177,12 @@
        mutex_exit(&fdtbus_interrupt_cookie_mutex);
 }
 
+int
+fdtbus_intr_parent(int phandle)
+{
+       return fdtbus_get_interrupt_parent(phandle);
+}
+
 void *
 fdtbus_intr_establish(int phandle, u_int index, int ipl, int flags,
     int (*func)(void *), void *arg)
diff -r f272949c8e94 -r 80afc49047dd sys/dev/fdt/fdtvar.h
--- a/sys/dev/fdt/fdtvar.h      Sun Nov 07 17:13:38 2021 +0000
+++ b/sys/dev/fdt/fdtvar.h      Sun Nov 07 17:13:53 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtvar.h,v 1.72 2021/09/06 14:03:18 jmcneill Exp $ */
+/* $NetBSD: fdtvar.h,v 1.73 2021/11/07 17:13:53 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -336,6 +336,7 @@
 void           fdtbus_intr_disestablish(int, void *);
 bool           fdtbus_intr_str(int, u_int, char *, size_t);
 bool           fdtbus_intr_str_raw(int, const u_int *, char *, size_t);
+int            fdtbus_intr_parent(int);
 int            fdtbus_gpio_count(int, const char *);
 struct fdtbus_gpio_pin *fdtbus_gpio_acquire(int, const char *, int);
 struct fdtbus_gpio_pin *fdtbus_gpio_acquire_index(int, const char *, int, int);



Home | Main Index | Thread Index | Old Index