Module Name:    src
Committed By:   jmcneill
Date:           Sun Nov  7 17:13:53 UTC 2021

Modified Files:
        src/sys/dev/fdt: fdt_intr.c fdtvar.h

Log Message:
fdt: add helper for finding intr parent phandle


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/fdt/fdt_intr.c
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/fdt/fdtvar.h

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/fdt_intr.c
diff -u src/sys/dev/fdt/fdt_intr.c:1.29 src/sys/dev/fdt/fdt_intr.c:1.30
--- src/sys/dev/fdt/fdt_intr.c:1.29	Fri Jan 15 22:59:49 2021
+++ src/sys/dev/fdt/fdt_intr.c	Sun Nov  7 17:13:53 2021
@@ -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 <jmcne...@invisible.ca>
@@ -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 @@ fdtbus_put_interrupt_cookie(struct fdtbu
 	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)

Index: src/sys/dev/fdt/fdtvar.h
diff -u src/sys/dev/fdt/fdtvar.h:1.72 src/sys/dev/fdt/fdtvar.h:1.73
--- src/sys/dev/fdt/fdtvar.h:1.72	Mon Sep  6 14:03:18 2021
+++ src/sys/dev/fdt/fdtvar.h	Sun Nov  7 17:13:53 2021
@@ -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 <jmcne...@invisible.ca>
@@ -336,6 +336,7 @@ void		fdtbus_intr_unmask(int, void *);
 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);

Reply via email to