Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/ti use fdtbus_intr_establish_xname
details: https://anonhg.NetBSD.org/src/rev/b9253c3433aa
branches: trunk
changeset: 979873:b9253c3433aa
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Jan 15 23:19:33 2021 +0000
description:
use fdtbus_intr_establish_xname
diffstat:
sys/arch/arm/ti/if_cpsw.c | 24 ++++++++++++++++++------
sys/arch/arm/ti/ti_com.c | 8 ++++----
sys/arch/arm/ti/ti_ehci.c | 8 ++++----
sys/arch/arm/ti/ti_gpio.c | 8 ++++----
sys/arch/arm/ti/ti_iic.c | 8 ++++----
sys/arch/arm/ti/ti_motg.c | 8 ++++----
sys/arch/arm/ti/ti_omaptimer.c | 10 +++++-----
sys/arch/arm/ti/ti_sdhc.c | 8 ++++----
8 files changed, 47 insertions(+), 35 deletions(-)
diffs (254 lines):
diff -r bf9d5023f203 -r b9253c3433aa sys/arch/arm/ti/if_cpsw.c
--- a/sys/arch/arm/ti/if_cpsw.c Fri Jan 15 23:15:28 2021 +0000
+++ b/sys/arch/arm/ti/if_cpsw.c Fri Jan 15 23:19:33 2021 +0000
@@ -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 @@
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 @@
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;
diff -r bf9d5023f203 -r b9253c3433aa sys/arch/arm/ti/ti_com.c
--- a/sys/arch/arm/ti/ti_com.c Fri Jan 15 23:15:28 2021 +0000
+++ b/sys/arch/arm/ti/ti_com.c Fri Jan 15 23:19:33 2021 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
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);
diff -r bf9d5023f203 -r b9253c3433aa sys/arch/arm/ti/ti_ehci.c
--- a/sys/arch/arm/ti/ti_ehci.c Fri Jan 15 23:15:28 2021 +0000
+++ b/sys/arch/arm/ti/ti_ehci.c Fri Jan 15 23:19:33 2021 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
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);
diff -r bf9d5023f203 -r b9253c3433aa sys/arch/arm/ti/ti_gpio.c
--- a/sys/arch/arm/ti/ti_gpio.c Fri Jan 15 23:15:28 2021 +0000
+++ b/sys/arch/arm/ti/ti_gpio.c Fri Jan 15 23:19:33 2021 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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_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);
diff -r bf9d5023f203 -r b9253c3433aa sys/arch/arm/ti/ti_iic.c
--- a/sys/arch/arm/ti/ti_iic.c Fri Jan 15 23:15:28 2021 +0000
+++ b/sys/arch/arm/ti/ti_iic.c Fri Jan 15 23:19:33 2021 +0000
@@ -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 @@
}
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;
diff -r bf9d5023f203 -r b9253c3433aa sys/arch/arm/ti/ti_motg.c
--- a/sys/arch/arm/ti/ti_motg.c Fri Jan 15 23:15:28 2021 +0000
+++ b/sys/arch/arm/ti/ti_motg.c Fri Jan 15 23:19:33 2021 +0000
@@ -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 @@
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);
diff -r bf9d5023f203 -r b9253c3433aa sys/arch/arm/ti/ti_omaptimer.c
--- a/sys/arch/arm/ti/ti_omaptimer.c Fri Jan 15 23:15:28 2021 +0000
+++ b/sys/arch/arm/ti/ti_omaptimer.c Fri Jan 15 23:19:33 2021 +0000
@@ -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 @@
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 */
diff -r bf9d5023f203 -r b9253c3433aa sys/arch/arm/ti/ti_sdhc.c
--- a/sys/arch/arm/ti/ti_sdhc.c Fri Jan 15 23:15:28 2021 +0000
+++ b/sys/arch/arm/ti/ti_sdhc.c Fri Jan 15 23:19:33 2021 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index