Module Name: src Committed By: jmcneill Date: Fri Jan 15 23:58:18 UTC 2021
Modified Files: src/sys/arch/arm/nxp: if_enet_imx.c imx6_pcie.c imx6_pwm.c imx6_spi.c imx6_usb.c imx_ahcisata.c imx_com.c imx_gpio.c imx_sdhc.c imxwdog.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nxp/if_enet_imx.c \ src/sys/arch/arm/nxp/imx6_pcie.c src/sys/arch/arm/nxp/imx6_pwm.c \ src/sys/arch/arm/nxp/imx6_usb.c src/sys/arch/arm/nxp/imx_ahcisata.c \ src/sys/arch/arm/nxp/imx_com.c src/sys/arch/arm/nxp/imx_sdhc.c \ src/sys/arch/arm/nxp/imxwdog.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nxp/imx6_spi.c \ src/sys/arch/arm/nxp/imx_gpio.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/nxp/if_enet_imx.c diff -u src/sys/arch/arm/nxp/if_enet_imx.c:1.1 src/sys/arch/arm/nxp/if_enet_imx.c:1.2 --- src/sys/arch/arm/nxp/if_enet_imx.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/if_enet_imx.c Fri Jan 15 23:58:18 2021 @@ -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 @@ static void * 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 @@ enet_intr_establish(struct enet_softc *s 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); Index: src/sys/arch/arm/nxp/imx6_pcie.c diff -u src/sys/arch/arm/nxp/imx6_pcie.c:1.1 src/sys/arch/arm/nxp/imx6_pcie.c:1.2 --- src/sys/arch/arm/nxp/imx6_pcie.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imx6_pcie.c Fri Jan 15 23:58:18 2021 @@ -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 @@ imx6_pcie_attach(device_t parent, device 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); Index: src/sys/arch/arm/nxp/imx6_pwm.c diff -u src/sys/arch/arm/nxp/imx6_pwm.c:1.1 src/sys/arch/arm/nxp/imx6_pwm.c:1.2 --- src/sys/arch/arm/nxp/imx6_pwm.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imx6_pwm.c Fri Jan 15 23:58:18 2021 @@ -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 @@ imx6_pwm_attach(device_t parent, device_ 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); Index: src/sys/arch/arm/nxp/imx6_usb.c diff -u src/sys/arch/arm/nxp/imx6_usb.c:1.1 src/sys/arch/arm/nxp/imx6_usb.c:1.2 --- src/sys/arch/arm/nxp/imx6_usb.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imx6_usb.c Fri Jan 15 23:58:18 2021 @@ -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 @@ imx6_usb_intr_establish(struct imxehci_s 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); Index: src/sys/arch/arm/nxp/imx_ahcisata.c diff -u src/sys/arch/arm/nxp/imx_ahcisata.c:1.1 src/sys/arch/arm/nxp/imx_ahcisata.c:1.2 --- src/sys/arch/arm/nxp/imx_ahcisata.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imx_ahcisata.c Fri Jan 15 23:58:18 2021 @@ -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 @@ imx_ahcisata_attach(device_t parent, dev 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); Index: src/sys/arch/arm/nxp/imx_com.c diff -u src/sys/arch/arm/nxp/imx_com.c:1.1 src/sys/arch/arm/nxp/imx_com.c:1.2 --- src/sys/arch/arm/nxp/imx_com.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imx_com.c Fri Jan 15 23:58:18 2021 @@ -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 @@ imx_com_attach(device_t parent, device_t 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; Index: src/sys/arch/arm/nxp/imx_sdhc.c diff -u src/sys/arch/arm/nxp/imx_sdhc.c:1.1 src/sys/arch/arm/nxp/imx_sdhc.c:1.2 --- src/sys/arch/arm/nxp/imx_sdhc.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imx_sdhc.c Fri Jan 15 23:58:18 2021 @@ -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 @@ imx_sdhc_attach(device_t parent, device_ 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); Index: src/sys/arch/arm/nxp/imxwdog.c diff -u src/sys/arch/arm/nxp/imxwdog.c:1.1 src/sys/arch/arm/nxp/imxwdog.c:1.2 --- src/sys/arch/arm/nxp/imxwdog.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imxwdog.c Fri Jan 15 23:58:18 2021 @@ -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 @@ imxwdog_attach(device_t parent, device_t aprint_error_dev(sc->sc_dev, "failed to decode interrupt\n"); return NULL; } - ih = fdtbus_intr_establish(phandle, 0, IPL_VM, FDT_INTR_MPSAFE, - imxwdog_intr, sc); + ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, FDT_INTR_MPSAFE, + imxwdog_intr, sc, device_xname(sc->sc_dev)); if (ih == NULL) { aprint_error_dev(sc->sc_dev, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/nxp/imx6_spi.c diff -u src/sys/arch/arm/nxp/imx6_spi.c:1.2 src/sys/arch/arm/nxp/imx6_spi.c:1.3 --- src/sys/arch/arm/nxp/imx6_spi.c:1.2 Wed Dec 23 16:52:06 2020 +++ src/sys/arch/arm/nxp/imx6_spi.c Fri Jan 15 23:58:18 2021 @@ -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 @@ imxspi_attach(device_t parent, device_t 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); Index: src/sys/arch/arm/nxp/imx_gpio.c diff -u src/sys/arch/arm/nxp/imx_gpio.c:1.2 src/sys/arch/arm/nxp/imx_gpio.c:1.3 --- src/sys/arch/arm/nxp/imx_gpio.c:1.2 Fri Jan 15 00:38:22 2021 +++ src/sys/arch/arm/nxp/imx_gpio.c Fri Jan 15 23:58:18 2021 @@ -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 @@ imxgpio_attach(device_t parent, device_t 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 @@ imxgpio_attach(device_t parent, device_t 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);