Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/fdt Print interrupt info
details: https://anonhg.NetBSD.org/src/rev/b6910f12fe05
branches: trunk
changeset: 433310:b6910f12fe05
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Sep 07 12:50:58 2018 +0000
description:
Print interrupt info
diffstat:
sys/arch/arm/fdt/plcom_fdt.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (47 lines):
diff -r 86ea1b462290 -r b6910f12fe05 sys/arch/arm/fdt/plcom_fdt.c
--- a/sys/arch/arm/fdt/plcom_fdt.c Fri Sep 07 10:20:32 2018 +0000
+++ b/sys/arch/arm/fdt/plcom_fdt.c Fri Sep 07 12:50:58 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: plcom_fdt.c,v 1.1 2017/06/02 14:30:58 jmcneill Exp $ */
+/* $NetBSD: plcom_fdt.c,v 1.2 2018/09/07 12:50:58 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plcom_fdt.c,v 1.1 2017/06/02 14:30:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plcom_fdt.c,v 1.2 2018/09/07 12:50:58 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -62,6 +62,7 @@
struct plcom_softc * const sc = device_private(self);
struct fdt_attach_args * const faa = aux;
const int phandle = faa->faa_phandle;
+ char intrstr[128];
struct clk *clk;
bus_addr_t addr;
bus_size_t size;
@@ -72,6 +73,11 @@
return;
}
+ if (!fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr))) {
+ aprint_error(": failed to decode interrupt\n");
+ return;
+ }
+
sc->sc_dev = self;
/* Enable clocks */
@@ -98,6 +104,8 @@
}
plcom_attach_subr(sc);
+ aprint_normal_dev(self, "interrupting on %s\n", intrstr);
+
ih = fdtbus_intr_establish(phandle, 0, IPL_SERIAL, FDT_INTR_MPSAFE,
plcomintr, sc);
if (ih == NULL) {
Home |
Main Index |
Thread Index |
Old Index