Module Name: src
Committed By: jmcneill
Date: Fri Jan 15 23:19:33 UTC 2021
Modified Files:
src/sys/arch/arm/ti: if_cpsw.c ti_com.c ti_ehci.c ti_gpio.c ti_iic.c
ti_motg.c ti_omaptimer.c ti_sdhc.c
Log Message:
use fdtbus_intr_establish_xname
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/ti/if_cpsw.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/ti/ti_com.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/ti/ti_ehci.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/ti/ti_gpio.c \
src/sys/arch/arm/ti/ti_sdhc.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/ti/ti_iic.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/ti/ti_motg.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/ti/ti_omaptimer.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/arch/arm/ti/if_cpsw.c
diff -u src/sys/arch/arm/ti/if_cpsw.c:1.12 src/sys/arch/arm/ti/if_cpsw.c:1.13
--- src/sys/arch/arm/ti/if_cpsw.c:1.12 Tue Feb 4 05:15:45 2020
+++ src/sys/arch/arm/ti/if_cpsw.c Fri Jan 15 23:19:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cpsw.c,v 1.12 2020/02/04 05:15:45 thorpej Exp $ */
+/* $NetBSD: if_cpsw.c,v 1.13 2021/01/15 23:19:33 jmcneill Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.12 2020/02/04 05:15:45 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.13 2021/01/15 23:19:33 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -398,6 +398,7 @@ cpsw_attach(device_t parent, device_t se
bus_addr_t addr;
bus_size_t size;
int error, slave, len;
+ char xname[16];
u_int i;
KERNHIST_INIT(cpswhist, 4096);
@@ -462,10 +463,21 @@ cpsw_attach(device_t parent, device_t se
memcpy(sc->sc_enaddr, macaddr, ETHER_ADDR_LEN);
}
- sc->sc_rxthih = fdtbus_intr_establish(phandle, CPSW_INTROFF_RXTH, IPL_VM, FDT_INTR_FLAGS, cpsw_rxthintr, sc);
- sc->sc_rxih = fdtbus_intr_establish(phandle, CPSW_INTROFF_RX, IPL_VM, FDT_INTR_FLAGS, cpsw_rxintr, sc);
- sc->sc_txih = fdtbus_intr_establish(phandle, CPSW_INTROFF_TX, IPL_VM, FDT_INTR_FLAGS, cpsw_txintr, sc);
- sc->sc_miscih = fdtbus_intr_establish(phandle, CPSW_INTROFF_MISC, IPL_VM, FDT_INTR_FLAGS, cpsw_miscintr, sc);
+ snprintf(xname, sizeof(xname), "%s rxth", device_xname(self));
+ sc->sc_rxthih = fdtbus_intr_establish_xname(phandle, CPSW_INTROFF_RXTH,
+ IPL_VM, FDT_INTR_FLAGS, cpsw_rxthintr, sc, xname);
+
+ snprintf(xname, sizeof(xname), "%s rx", device_xname(self));
+ sc->sc_rxih = fdtbus_intr_establish_xname(phandle, CPSW_INTROFF_RX,
+ IPL_VM, FDT_INTR_FLAGS, cpsw_rxintr, sc, xname);
+
+ snprintf(xname, sizeof(xname), "%s tx", device_xname(self));
+ sc->sc_txih = fdtbus_intr_establish_xname(phandle, CPSW_INTROFF_TX,
+ IPL_VM, FDT_INTR_FLAGS, cpsw_txintr, sc, xname);
+
+ snprintf(xname, sizeof(xname), "%s misc", device_xname(self));
+ sc->sc_miscih = fdtbus_intr_establish_xname(phandle, CPSW_INTROFF_MISC,
+ IPL_VM, FDT_INTR_FLAGS, cpsw_miscintr, sc, xname);
sc->sc_bst = faa->faa_bst;
sc->sc_bss = size;
Index: src/sys/arch/arm/ti/ti_com.c
diff -u src/sys/arch/arm/ti/ti_com.c:1.9 src/sys/arch/arm/ti/ti_com.c:1.10
--- src/sys/arch/arm/ti/ti_com.c:1.9 Mon Sep 28 11:54:23 2020
+++ src/sys/arch/arm/ti/ti_com.c Fri Jan 15 23:19:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_com.c,v 1.9 2020/09/28 11:54:23 jmcneill Exp $ */
+/* $NetBSD: ti_com.c,v 1.10 2021/01/15 23:19:33 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <[email protected]>
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: ti_com.c,v 1.9 2020/09/28 11:54:23 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: ti_com.c,v 1.10 2021/01/15 23:19:33 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -118,8 +118,8 @@ ti_com_attach(device_t parent, device_t
return;
}
- ssc->ssc_ih = fdtbus_intr_establish(phandle, 0, IPL_SERIAL,
- FDT_INTR_MPSAFE, comintr, sc);
+ ssc->ssc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_SERIAL,
+ FDT_INTR_MPSAFE, comintr, sc, device_xname(self));
if (ssc->ssc_ih == NULL) {
aprint_error_dev(self, "failed to establish interrupt on %s\n",
intrstr);
Index: src/sys/arch/arm/ti/ti_ehci.c
diff -u src/sys/arch/arm/ti/ti_ehci.c:1.1 src/sys/arch/arm/ti/ti_ehci.c:1.2
--- src/sys/arch/arm/ti/ti_ehci.c:1.1 Wed Oct 30 21:41:40 2019
+++ src/sys/arch/arm/ti/ti_ehci.c Fri Jan 15 23:19:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_ehci.c,v 1.1 2019/10/30 21:41:40 jmcneill Exp $ */
+/* $NetBSD: ti_ehci.c,v 1.2 2021/01/15 23:19:33 jmcneill Exp $ */
/*-
* Copyright (c) 2015-2019 Jared McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_ehci.c,v 1.1 2019/10/30 21:41:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_ehci.c,v 1.2 2021/01/15 23:19:33 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -136,8 +136,8 @@ ti_ehci_attach(device_t parent, device_t
return;
}
- ih = fdtbus_intr_establish(phandle, 0, IPL_USB, FDT_INTR_MPSAFE,
- ehci_intr, sc);
+ ih = fdtbus_intr_establish_xname(phandle, 0, IPL_USB, FDT_INTR_MPSAFE,
+ ehci_intr, sc, device_xname(self));
if (ih == NULL) {
aprint_error_dev(self, "couldn't establish interrupt on %s\n",
intrstr);
Index: src/sys/arch/arm/ti/ti_gpio.c
diff -u src/sys/arch/arm/ti/ti_gpio.c:1.5 src/sys/arch/arm/ti/ti_gpio.c:1.6
--- src/sys/arch/arm/ti/ti_gpio.c:1.5 Fri Jan 15 00:38:23 2021
+++ src/sys/arch/arm/ti/ti_gpio.c Fri Jan 15 23:19:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_gpio.c,v 1.5 2021/01/15 00:38:23 jmcneill Exp $ */
+/* $NetBSD: ti_gpio.c,v 1.6 2021/01/15 23:19:33 jmcneill Exp $ */
/*-
* Copyright (c) 2019 Jared McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_gpio.c,v 1.5 2021/01/15 00:38:23 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_gpio.c,v 1.6 2021/01/15 23:19:33 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -528,8 +528,8 @@ ti_gpio_attach(device_t parent, device_t
ti_gpio_attach_ports(sc);
- sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, FDT_INTR_MPSAFE,
- ti_gpio_intr, sc);
+ sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM,
+ FDT_INTR_MPSAFE, ti_gpio_intr, sc, device_xname(self));
if (sc->sc_ih == NULL) {
aprint_error_dev(self, "failed to establish interrupt on %s\n",
intrstr);
Index: src/sys/arch/arm/ti/ti_sdhc.c
diff -u src/sys/arch/arm/ti/ti_sdhc.c:1.5 src/sys/arch/arm/ti/ti_sdhc.c:1.6
--- src/sys/arch/arm/ti/ti_sdhc.c:1.5 Thu Nov 28 23:57:09 2019
+++ src/sys/arch/arm/ti/ti_sdhc.c Fri Jan 15 23:19:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_sdhc.c,v 1.5 2019/11/28 23:57:09 jmcneill Exp $ */
+/* $NetBSD: ti_sdhc.c,v 1.6 2021/01/15 23:19:33 jmcneill Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_sdhc.c,v 1.5 2019/11/28 23:57:09 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_sdhc.c,v 1.6 2021/01/15 23:19:33 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -305,8 +305,8 @@ no_dma:
aprint_error_dev(dev, "couldn't decode interrupt\n");
return;
}
- sc->sc_ih = fdtbus_intr_establish(sc->sc_phandle, 0, IPL_VM,
- 0, sdhc_intr, &sc->sc);
+ sc->sc_ih = fdtbus_intr_establish_xname(sc->sc_phandle, 0, IPL_VM,
+ 0, sdhc_intr, &sc->sc, device_xname(dev));
if (sc->sc_ih == NULL) {
aprint_error_dev(dev, "couldn't establish interrupt\n");
return;
Index: src/sys/arch/arm/ti/ti_iic.c
diff -u src/sys/arch/arm/ti/ti_iic.c:1.8 src/sys/arch/arm/ti/ti_iic.c:1.9
--- src/sys/arch/arm/ti/ti_iic.c:1.8 Wed Dec 23 16:02:12 2020
+++ src/sys/arch/arm/ti/ti_iic.c Fri Jan 15 23:19:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_iic.c,v 1.8 2020/12/23 16:02:12 thorpej Exp $ */
+/* $NetBSD: ti_iic.c,v 1.9 2021/01/15 23:19:33 jmcneill Exp $ */
/*
* Copyright (c) 2013 Manuel Bouyer. All rights reserved.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_iic.c,v 1.8 2020/12/23 16:02:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_iic.c,v 1.9 2021/01/15 23:19:33 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -271,8 +271,8 @@ ti_iic_attach(device_t parent, device_t
}
sc->sc_type = of_search_compatible(phandle, compat_data)->data;
- sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET, 0,
- ti_iic_intr, sc);
+ sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_NET, 0,
+ ti_iic_intr, sc, device_xname(self));
if (sc->sc_ih == NULL) {
aprint_error(": couldn't establish interrupt\n");
return;
Index: src/sys/arch/arm/ti/ti_motg.c
diff -u src/sys/arch/arm/ti/ti_motg.c:1.2 src/sys/arch/arm/ti/ti_motg.c:1.3
--- src/sys/arch/arm/ti/ti_motg.c:1.2 Wed Jun 3 19:16:23 2020
+++ src/sys/arch/arm/ti/ti_motg.c Fri Jan 15 23:19:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_motg.c,v 1.2 2020/06/03 19:16:23 jmcneill Exp $ */
+/* $NetBSD: ti_motg.c,v 1.3 2021/01/15 23:19:33 jmcneill Exp $ */
/*
* Copyright (c) 2013 Manuel Bouyer. All rights reserved.
*
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_motg.c,v 1.2 2020/06/03 19:16:23 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_motg.c,v 1.3 2021/01/15 23:19:33 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -126,8 +126,8 @@ ti_motg_attach(device_t parent, device_t
aprint_error(": couldn't map registers\n");
return;
}
- sc->sc_ctrlih = fdtbus_intr_establish(phandle, 0, IPL_USB, 0,
- ti_motg_intr, sc);
+ sc->sc_ctrlih = fdtbus_intr_establish_xname(phandle, 0, IPL_USB, 0,
+ ti_motg_intr, sc, device_xname(self));
sc->sc_motg.sc_bus.ub_dmatag = faa->faa_dmat;
val = TIOTG_USBC_READ4(sc, USBCTRL_REV);
Index: src/sys/arch/arm/ti/ti_omaptimer.c
diff -u src/sys/arch/arm/ti/ti_omaptimer.c:1.4 src/sys/arch/arm/ti/ti_omaptimer.c:1.5
--- src/sys/arch/arm/ti/ti_omaptimer.c:1.4 Wed Oct 30 21:40:04 2019
+++ src/sys/arch/arm/ti/ti_omaptimer.c Fri Jan 15 23:19:33 2021
@@ -1,7 +1,7 @@
-/* $NetBSD: ti_omaptimer.c,v 1.4 2019/10/30 21:40:04 jmcneill Exp $ */
+/* $NetBSD: ti_omaptimer.c,v 1.5 2021/01/15 23:19:33 jmcneill Exp $ */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_omaptimer.c,v 1.4 2019/10/30 21:40:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_omaptimer.c,v 1.5 2021/01/15 23:19:33 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -106,11 +106,11 @@ omaptimer_cpu_initclocks(void)
KASSERT(sc != NULL);
if (!fdtbus_intr_str(sc->sc_phandle, 0, intrstr, sizeof(intrstr)))
panic("%s: failed to decode interrupt", __func__);
- ih = fdtbus_intr_establish(sc->sc_phandle, 0, IPL_CLOCK,
- FDT_INTR_MPSAFE, omaptimer_intr, NULL);
+ ih = fdtbus_intr_establish_xname(sc->sc_phandle, 0, IPL_CLOCK,
+ FDT_INTR_MPSAFE, omaptimer_intr, NULL, device_xname(sc->sc_dev));
if (ih == NULL)
panic("%s: failed to establish timer interrupt", __func__);
-
+
aprint_normal_dev(sc->sc_dev, "interrupting on %s\n", intrstr);
/* Enable interrupts */