Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/sunxi use fdtbus_intr_establish_xname



details:   https://anonhg.NetBSD.org/src/rev/792ce3746a56
branches:  trunk
changeset: 949740:792ce3746a56
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Jan 15 22:47:32 2021 +0000

description:
use fdtbus_intr_establish_xname

diffstat:

 sys/arch/arm/sunxi/sun4i_dma.c     |   8 ++++----
 sys/arch/arm/sunxi/sun4i_emac.c    |   8 ++++----
 sys/arch/arm/sunxi/sun4i_spi.c     |   7 ++++---
 sys/arch/arm/sunxi/sun6i_dma.c     |   8 ++++----
 sys/arch/arm/sunxi/sun8i_codec.c   |   8 ++++----
 sys/arch/arm/sunxi/sun8i_crypto.c  |   8 ++++----
 sys/arch/arm/sunxi/sunxi_can.c     |   8 ++++----
 sys/arch/arm/sunxi/sunxi_emac.c    |   8 ++++----
 sys/arch/arm/sunxi/sunxi_gmac.c    |   9 +++++----
 sys/arch/arm/sunxi/sunxi_gpio.c    |   8 ++++----
 sys/arch/arm/sunxi/sunxi_hstimer.c |   8 ++++----
 sys/arch/arm/sunxi/sunxi_lcdc.c    |   8 ++++----
 sys/arch/arm/sunxi/sunxi_lradc.c   |  18 +++++++++---------
 sys/arch/arm/sunxi/sunxi_mmc.c     |   8 ++++----
 sys/arch/arm/sunxi/sunxi_musb.c    |   8 ++++----
 sys/arch/arm/sunxi/sunxi_nand.c    |   8 ++++----
 sys/arch/arm/sunxi/sunxi_nmi.c     |   8 ++++----
 sys/arch/arm/sunxi/sunxi_rsb.c     |   8 ++++----
 sys/arch/arm/sunxi/sunxi_sata.c    |   7 ++++---
 sys/arch/arm/sunxi/sunxi_thermal.c |   8 ++++----
 sys/arch/arm/sunxi/sunxi_timer.c   |   8 ++++----
 sys/arch/arm/sunxi/sunxi_ts.c      |   7 ++++---
 sys/arch/arm/sunxi/sunxi_twi.c     |   7 ++++---
 23 files changed, 98 insertions(+), 93 deletions(-)

diffs (truncated from 693 to 300 lines):

diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sun4i_dma.c
--- a/sys/arch/arm/sunxi/sun4i_dma.c    Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sun4i_dma.c    Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun4i_dma.c,v 1.3 2018/04/20 18:04:12 bouyer Exp $ */
+/* $NetBSD: sun4i_dma.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sun4i_dma.c,v 1.3 2018/04/20 18:04:12 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun4i_dma.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -408,8 +408,8 @@
                }
        }
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_SCHED,
-           FDT_INTR_MPSAFE, sun4idma_intr, sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_SCHED,
+           FDT_INTR_MPSAFE, sun4idma_intr, sc, device_xname(sc->sc_dev));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(sc->sc_dev,
                    "couldn't establish interrupt on %s\n", intrstr);
diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sun4i_emac.c
--- a/sys/arch/arm/sunxi/sun4i_emac.c   Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sun4i_emac.c   Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun4i_emac.c,v 1.12 2020/01/29 06:05:31 thorpej Exp $ */
+/* $NetBSD: sun4i_emac.c,v 1.13 2021/01/15 22:47:32 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2013-2017 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: sun4i_emac.c,v 1.12 2020/01/29 06:05:31 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun4i_emac.c,v 1.13 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -299,8 +299,8 @@
        sun4i_emac_write(sc, EMAC_INT_STA_REG,
            sun4i_emac_read(sc, EMAC_INT_STA_REG));
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET, 0,
-           sun4i_emac_intr, sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_NET, 0,
+           sun4i_emac_intr, sc, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sun4i_spi.c
--- a/sys/arch/arm/sunxi/sun4i_spi.c    Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sun4i_spi.c    Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sun4i_spi.c,v 1.5 2019/09/11 15:03:52 bouyer Exp $     */
+/*     $NetBSD: sun4i_spi.c,v 1.6 2021/01/15 22:47:32 jmcneill Exp $   */
 
 /*
  * Copyright (c) 2019 Tobias Nygren
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sun4i_spi.c,v 1.5 2019/09/11 15:03:52 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun4i_spi.c,v 1.6 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -149,7 +149,8 @@
                return;
        }
 
-       sc->sc_intrh = fdtbus_intr_establish(phandle, 0, IPL_VM, 0, sun4ispi_intr, sc);
+       sc->sc_intrh = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, 0,
+           sun4ispi_intr, sc, device_xname(self));
        if (sc->sc_intrh == NULL) {
                aprint_error(": unable to establish interrupt\n");
                return;
diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sun6i_dma.c
--- a/sys/arch/arm/sunxi/sun6i_dma.c    Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sun6i_dma.c    Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun6i_dma.c,v 1.9 2019/03/06 19:16:53 jakllsch Exp $ */
+/* $NetBSD: sun6i_dma.c,v 1.10 2021/01/15 22:47:32 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sun6i_dma.c,v 1.9 2019/03/06 19:16:53 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun6i_dma.c,v 1.10 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -507,8 +507,8 @@
        if (conf->autogate)
                DMA_WRITE(sc, conf->autogate_reg, conf->autogate_mask);
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_SCHED, FDT_INTR_MPSAFE,
-           sun6idma_intr, sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_SCHED,
+           FDT_INTR_MPSAFE, sun6idma_intr, sc, device_xname(sc->sc_dev));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(sc->sc_dev,
                    "couldn't establish interrupt on %s\n", intrstr);
diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sun8i_codec.c
--- a/sys/arch/arm/sunxi/sun8i_codec.c  Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sun8i_codec.c  Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun8i_codec.c,v 1.7 2019/06/06 23:19:07 jmcneill Exp $ */
+/* $NetBSD: sun8i_codec.c,v 1.8 2021/01/15 22:47:32 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sun8i_codec.c,v 1.7 2019/06/06 23:19:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun8i_codec.c,v 1.8 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -456,8 +456,8 @@
        /* Schedule initial jack detect task */
        workqueue_enqueue(sc->sc_workq, &sc->sc_work, NULL);
 
-       ih = fdtbus_intr_establish(phandle, 0, IPL_VM, FDT_INTR_MPSAFE,
-           sun8i_codec_intr, sc);
+       ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, FDT_INTR_MPSAFE,
+           sun8i_codec_intr, sc, device_xname(self));
        if (ih == NULL) {
                aprint_error_dev(self, "couldn't establish interrupt on %s\n",
                    intrstr);
diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sun8i_crypto.c
--- a/sys/arch/arm/sunxi/sun8i_crypto.c Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sun8i_crypto.c Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sun8i_crypto.c,v 1.18 2020/06/14 16:29:47 ad Exp $     */
+/*     $NetBSD: sun8i_crypto.c,v 1.19 2021/01/15 22:47:32 jmcneill Exp $       */
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.18 2020/06/14 16:29:47 ad Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.19 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -416,8 +416,8 @@
        sun8i_crypto_write(sc, SUN8I_CRYPTO_ISR, 0);
 
        /* Establish an interrupt handler.  */
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, FDT_INTR_MPSAFE,
-           &sun8i_crypto_intr, sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM,
+           FDT_INTR_MPSAFE, &sun8i_crypto_intr, sc, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sunxi_can.c
--- a/sys/arch/arm/sunxi/sunxi_can.c    Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_can.c    Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sunxi_can.c,v 1.3 2020/01/29 06:05:31 thorpej Exp $    */
+/*     $NetBSD: sunxi_can.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $   */
 
 /*-
  * Copyright (c) 2017,2018 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.3 2020/01/29 06:05:31 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -202,8 +202,8 @@
        sunxi_can_write(sc, SUNXI_CAN_INT_REG,
            sunxi_can_read(sc, SUNXI_CAN_INT_REG));
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET, 0,
-           sunxi_can_intr, sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_NET, 0,
+           sunxi_can_intr, sc, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sunxi_emac.c
--- a/sys/arch/arm/sunxi/sunxi_emac.c   Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_emac.c   Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_emac.c,v 1.29 2020/01/29 06:05:31 thorpej Exp $ */
+/* $NetBSD: sunxi_emac.c,v 1.30 2021/01/15 22:47:32 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2016-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -33,7 +33,7 @@
 #include "opt_net_mpsafe.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.29 2020/01/29 06:05:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.30 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -1414,8 +1414,8 @@
        }
 
        /* Install interrupt handler */
-       sc->ih = fdtbus_intr_establish(phandle, 0, IPL_NET,
-           FDT_INTR_FLAGS, sunxi_emac_intr, sc);
+       sc->ih = fdtbus_intr_establish_xname(phandle, 0, IPL_NET,
+           FDT_INTR_FLAGS, sunxi_emac_intr, sc, device_xname(self));
        if (sc->ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sunxi_gmac.c
--- a/sys/arch/arm/sunxi/sunxi_gmac.c   Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_gmac.c   Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_gmac.c,v 1.7 2019/11/01 13:30:02 bad Exp $ */
+/* $NetBSD: sunxi_gmac.c,v 1.8 2021/01/15 22:47:32 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_gmac.c,v 1.7 2019/11/01 13:30:02 bad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_gmac.c,v 1.8 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -200,8 +200,9 @@
        aprint_naive("\n");
        aprint_normal(": GMAC\n");
 
-       if (fdtbus_intr_establish(phandle, 0, IPL_NET, DWCGMAC_FDT_INTR_MPSAFE,
-           sunxi_gmac_intr, sc) == NULL) {
+       if (fdtbus_intr_establish_xname(phandle, 0, IPL_NET,
+           DWCGMAC_FDT_INTR_MPSAFE, sunxi_gmac_intr, sc,
+           device_xname(self)) == NULL) {
                aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr);
                return;
        }
diff -r b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sunxi_gpio.c
--- a/sys/arch/arm/sunxi/sunxi_gpio.c   Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_gpio.c   Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_gpio.c,v 1.29 2021/01/15 00:38:23 jmcneill Exp $ */
+/* $NetBSD: sunxi_gpio.c,v 1.30 2021/01/15 22:47:32 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "opt_soc.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.29 2021/01/15 00:38:23 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.30 2021/01/15 22:47:32 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -1038,8 +1038,8 @@
                aprint_error_dev(self, "failed to decode interrupt\n");
                return;
        }
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, FDT_INTR_MPSAFE,
-           sunxi_gpio_intr, sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM,
+           FDT_INTR_MPSAFE, sunxi_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 b6f2871a56dd -r 792ce3746a56 sys/arch/arm/sunxi/sunxi_hstimer.c
--- a/sys/arch/arm/sunxi/sunxi_hstimer.c        Fri Jan 15 22:35:39 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_hstimer.c        Fri Jan 15 22:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_hstimer.c,v 1.2 2019/06/14 21:48:43 tnn Exp $ */
+/* $NetBSD: sunxi_hstimer.c,v 1.3 2021/01/15 22:47:32 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Tobias Nygren <tnn%NetBSD.org@localhost>
@@ -28,7 +28,7 @@



Home | Main Index | Thread Index | Old Index