Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/6ec2d9d6c545
branches:  trunk
changeset: 979875:6ec2d9d6c545
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Jan 15 23:58:18 2021 +0000

description:
use fdtbus_intr_establish_xname

diffstat:

 sys/arch/arm/nxp/if_enet_imx.c  |  10 +++++++---
 sys/arch/arm/nxp/imx6_pcie.c    |   8 ++++----
 sys/arch/arm/nxp/imx6_pwm.c     |   8 ++++----
 sys/arch/arm/nxp/imx6_spi.c     |   8 ++++----
 sys/arch/arm/nxp/imx6_usb.c     |   8 ++++----
 sys/arch/arm/nxp/imx_ahcisata.c |   8 ++++----
 sys/arch/arm/nxp/imx_com.c      |   8 ++++----
 sys/arch/arm/nxp/imx_gpio.c     |  12 ++++++------
 sys/arch/arm/nxp/imx_sdhc.c     |   8 ++++----
 sys/arch/arm/nxp/imxwdog.c      |   8 ++++----
 10 files changed, 45 insertions(+), 41 deletions(-)

diffs (truncated from 310 to 300 lines):

diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/if_enet_imx.c
--- a/sys/arch/arm/nxp/if_enet_imx.c    Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/if_enet_imx.c    Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_enet_imx.c,v 1.1 2020/12/23 14:42:38 skrll Exp $    */
+/*     $NetBSD: if_enet_imx.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.1 2020/12/23 14:42:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include "opt_fdt.h"
 
@@ -183,6 +183,7 @@
 enet_intr_establish(struct enet_softc *sc, int phandle, u_int index)
 {
        char intrstr[128];
+       char xname[16];
        void *ih;
 
        if (!fdtbus_intr_str(phandle, index, intrstr, sizeof(intrstr))) {
@@ -191,7 +192,10 @@
                return NULL;
        }
 
-       ih = fdtbus_intr_establish(phandle, index, IPL_NET, 0, enet_intr, sc);
+       snprintf(xname, sizeof(xname), "%s #%u", device_xname(sc->sc_dev),
+           index);
+       ih = fdtbus_intr_establish_xname(phandle, index, IPL_NET, 0,
+           enet_intr, sc, xname);
        if (ih == NULL) {
                aprint_error_dev(sc->sc_dev, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/imx6_pcie.c
--- a/sys/arch/arm/nxp/imx6_pcie.c      Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/imx6_pcie.c      Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx6_pcie.c,v 1.1 2020/12/23 14:42:38 skrll Exp $      */
+/*     $NetBSD: imx6_pcie.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $   */
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.1 2020/12/23 14:42:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include "opt_pci.h"
 #include "opt_fdt.h"
@@ -208,8 +208,8 @@
                return;
        }
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM,
-           FDT_INTR_MPSAFE, imxpcie_intr, sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM,
+           FDT_INTR_MPSAFE, imxpcie_intr, sc, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/imx6_pwm.c
--- a/sys/arch/arm/nxp/imx6_pwm.c       Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/imx6_pwm.c       Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx6_pwm.c,v 1.1 2020/12/23 14:42:38 skrll Exp $       */
+/*     $NetBSD: imx6_pwm.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $    */
 /*-
  * Copyright (c) 2019  Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx6_pwm.c,v 1.1 2020/12/23 14:42:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_pwm.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -116,8 +116,8 @@
                return;
        }
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM,
-           0, imxpwm_intr, sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM,
+           0, imxpwm_intr, sc, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/imx6_spi.c
--- a/sys/arch/arm/nxp/imx6_spi.c       Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/imx6_spi.c       Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx6_spi.c,v 1.2 2020/12/23 16:52:06 skrll Exp $       */
+/*     $NetBSD: imx6_spi.c,v 1.3 2021/01/15 23:58:18 jmcneill Exp $    */
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx6_spi.c,v 1.2 2020/12/23 16:52:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_spi.c,v 1.3 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include "opt_imxspi.h"
 
@@ -161,8 +161,8 @@
                return;
        }
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM,
-           0, imxspi_intr, &ifsc->sc_imxspi);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM,
+           0, imxspi_intr, &ifsc->sc_imxspi, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "couldn't establish interrupt on %s\n",
                    intrstr);
diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/imx6_usb.c
--- a/sys/arch/arm/nxp/imx6_usb.c       Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/imx6_usb.c       Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx6_usb.c,v 1.1 2020/12/23 14:42:38 skrll Exp $       */
+/*     $NetBSD: imx6_usb.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $    */
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx6_usb.c,v 1.1 2020/12/23 14:42:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_usb.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include "opt_fdt.h"
 
@@ -266,8 +266,8 @@
                aprint_error_dev(sc->sc_dev, "failed to decode interrupt\n");
                return NULL;
        }
-       ih = fdtbus_intr_establish(ifsc->sc_phandle, 0, IPL_USB,
-           FDT_INTR_MPSAFE, ehci_intr, hsc);
+       ih = fdtbus_intr_establish_xname(ifsc->sc_phandle, 0, IPL_USB,
+           FDT_INTR_MPSAFE, ehci_intr, hsc, device_xname(sc->sc_dev));
        if (ih == NULL) {
                aprint_error_dev(sc->sc_dev, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/imx_ahcisata.c
--- a/sys/arch/arm/nxp/imx_ahcisata.c   Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/imx_ahcisata.c   Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx_ahcisata.c,v 1.1 2020/12/23 14:42:38 skrll Exp $   */
+/*     $NetBSD: imx_ahcisata.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $        */
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx_ahcisata.c,v 1.1 2020/12/23 14:42:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx_ahcisata.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -183,8 +183,8 @@
                return;
        }
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_BIO, 0,
-           ahci_intr, &sc->sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_BIO, 0,
+           ahci_intr, &sc->sc, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/imx_com.c
--- a/sys/arch/arm/nxp/imx_com.c        Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/imx_com.c        Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx_com.c,v 1.1 2020/12/23 14:42:38 skrll Exp $        */
+/*     $NetBSD: imx_com.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $     */
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx_com.c,v 1.1 2020/12/23 14:42:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx_com.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include "opt_fdt.h"
 #include "opt_imxuart.h"
@@ -115,8 +115,8 @@
                return;
        }
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_SERIAL,
-           0, imxuintr, sc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_SERIAL,
+           0, imxuintr, sc, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt\n");
                return;
diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/imx_gpio.c
--- a/sys/arch/arm/nxp/imx_gpio.c       Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/imx_gpio.c       Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx_gpio.c,v 1.2 2021/01/15 00:38:22 jmcneill Exp $    */
+/*     $NetBSD: imx_gpio.c,v 1.3 2021/01/15 23:58:18 jmcneill Exp $    */
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx_gpio.c,v 1.2 2021/01/15 00:38:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx_gpio.c,v 1.3 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include "opt_fdt.h"
 #include "gpio.h"
@@ -124,8 +124,8 @@
                aprint_error_dev(self, "failed to decode interrupt\n");
                return;
        }
-       sc->gpio_is = fdtbus_intr_establish(phandle, 0, IPL_HIGH, 0,
-           pic_handle_intr, &sc->gpio_pic);
+       sc->gpio_is = fdtbus_intr_establish_xname(phandle, 0, IPL_HIGH, 0,
+           pic_handle_intr, &sc->gpio_pic, device_xname(self));
        if (sc->gpio_is == NULL) {
                aprint_error_dev(self, "couldn't establish interrupt on %s\n",
                    intrstr);
@@ -137,8 +137,8 @@
                aprint_error_dev(self, "failed to decode interrupt\n");
                return;
        }
-       sc->gpio_is_high = fdtbus_intr_establish(phandle, 1, IPL_HIGH, 0,
-           pic_handle_intr, &sc->gpio_pic);
+       sc->gpio_is_high = fdtbus_intr_establish_xname(phandle, 1, IPL_HIGH, 0,
+           pic_handle_intr, &sc->gpio_pic, device_xname(self));
        if (sc->gpio_is_high == NULL) {
                aprint_error_dev(self, "couldn't establish interrupt on %s\n",
                    intrstr);
diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/imx_sdhc.c
--- a/sys/arch/arm/nxp/imx_sdhc.c       Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/imx_sdhc.c       Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx_sdhc.c,v 1.1 2020/12/23 14:42:38 skrll Exp $       */
+/*     $NetBSD: imx_sdhc.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $    */
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx_sdhc.c,v 1.1 2020/12/23 14:42:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx_sdhc.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include "opt_fdt.h"
 
@@ -199,8 +199,8 @@
                return;
        }
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_SDMMC,
-           FDT_INTR_MPSAFE, sdhc_intr, &sc->sc_sdhc);
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_SDMMC,
+           FDT_INTR_MPSAFE, sdhc_intr, &sc->sc_sdhc, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "couldn't establish interrupt on %s\n",
                    intrstr);
diff -r fbe2e93c2bf0 -r 6ec2d9d6c545 sys/arch/arm/nxp/imxwdog.c
--- a/sys/arch/arm/nxp/imxwdog.c        Fri Jan 15 23:43:51 2021 +0000
+++ b/sys/arch/arm/nxp/imxwdog.c        Fri Jan 15 23:58:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imxwdog.c,v 1.1 2020/12/23 14:42:38 skrll Exp $        */
+/*     $NetBSD: imxwdog.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $     */
 
 /*
  * Copyright (c) 2010  Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxwdog.c,v 1.1 2020/12/23 14:42:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxwdog.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $");
 
 #include "opt_imx.h"
 
@@ -175,8 +175,8 @@



Home | Main Index | Thread Index | Old Index