Give the FDT interrupt API a more generic naming by replacing the
authorpatrick <patrick@openbsd.org>
Mon, 6 Aug 2018 10:52:30 +0000 (10:52 +0000)
committerpatrick <patrick@openbsd.org>
Mon, 6 Aug 2018 10:52:30 +0000 (10:52 +0000)
arm_intr_* prefix with fdt_intr_*.

ok kettenis@

27 files changed:
sys/arch/arm/include/fdt.h
sys/arch/arm64/include/fdt.h
sys/arch/octeon/include/fdt.h
sys/arch/octeon/include/intr.h
sys/dev/fdt/ahci_fdt.c
sys/dev/fdt/bcm2835_aux.c
sys/dev/fdt/com_fdt.c
sys/dev/fdt/dwmmc.c
sys/dev/fdt/dwpcie.c
sys/dev/fdt/ehci_fdt.c
sys/dev/fdt/if_dwge_fdt.c
sys/dev/fdt/if_dwxe.c
sys/dev/fdt/if_fec.c
sys/dev/fdt/if_mvneta.c
sys/dev/fdt/imxesdhc.c
sys/dev/fdt/imxgpc.c
sys/dev/fdt/imxgpio.c
sys/dev/fdt/imxiic.c
sys/dev/fdt/imxuart.c
sys/dev/fdt/mvicu.c
sys/dev/fdt/pluart_fdt.c
sys/dev/fdt/rkpcie.c
sys/dev/fdt/sdhc_fdt.c
sys/dev/fdt/sximmc.c
sys/dev/fdt/sxitwi.c
sys/dev/fdt/virtio_mmio.c
sys/dev/fdt/xhci_fdt.c

index d13fcf0..a0f571e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdt.h,v 1.7 2018/05/07 14:13:54 kettenis Exp $ */
+/* $OpenBSD: fdt.h,v 1.8 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
  *
@@ -40,4 +40,14 @@ extern bus_space_tag_t fdt_cons_bs_tag;
 
 void *fdt_find_cons(const char *);
 
+#define fdt_intr_establish arm_intr_establish_fdt
+#define fdt_intr_establish_idx arm_intr_establish_fdt_idx
+#define fdt_intr_establish_imap arm_intr_establish_fdt_imap
+#define fdt_intr_establish_msi arm_intr_establish_fdt_msi
+#define fdt_intr_disestablish arm_intr_disestablish_fdt
+#define fdt_intr_get_parent arm_intr_get_parent
+#define fdt_intr_parent_establish arm_intr_parent_establish_fdt
+#define fdt_intr_parent_disestablish arm_intr_parent_disestablish_fdt
+#define fdt_intr_register arm_intr_register_fdt
+
 #endif /* __ARM_FDT_H__ */
index 2ec9cc0..0ae8b4f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdt.h,v 1.4 2018/05/06 17:16:48 kettenis Exp $ */
+/* $OpenBSD: fdt.h,v 1.5 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
  *
@@ -40,4 +40,14 @@ extern bus_space_tag_t fdt_cons_bs_tag;
 
 void *fdt_find_cons(const char *);
 
+#define fdt_intr_establish arm_intr_establish_fdt
+#define fdt_intr_establish_idx arm_intr_establish_fdt_idx
+#define fdt_intr_establish_imap arm_intr_establish_fdt_imap
+#define fdt_intr_establish_msi arm_intr_establish_fdt_msi
+#define fdt_intr_disestablish arm_intr_disestablish_fdt
+#define fdt_intr_get_parent arm_intr_get_parent
+#define fdt_intr_parent_establish arm_intr_parent_establish_fdt
+#define fdt_intr_parent_disestablish arm_intr_parent_disestablish_fdt
+#define fdt_intr_register arm_intr_register_fdt
+
 #endif /* __ARM_FDT_H__ */
index a55251c..cd3e917 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: fdt.h,v 1.1 2016/12/08 16:24:51 visa Exp $    */
+/*     $OpenBSD: fdt.h,v 1.2 2018/08/06 10:52:30 patrick Exp $ */
 
 /*
  * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
@@ -34,4 +34,7 @@ struct fdt_attach_args {
        int                      fa_scells;
 };
 
+#define fdt_intr_establish octeon_intr_establish_fdt
+#define fdt_intr_disestablish octeon_intr_disestablish_fdt
+
 #endif /* __OCTEON_FDT_H__ */
index 4cac1e5..14ba896 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: intr.h,v 1.16 2018/01/22 09:40:45 mpi Exp $ */
+/*     $OpenBSD: intr.h,v 1.17 2018/08/06 10:52:30 patrick Exp $ */
 
 /*
  * Copyright (c) 2001-2004 Opsycon AB  (www.opsycon.se / www.opsycon.com)
@@ -216,10 +216,6 @@ void       *octeon_intr_establish_fdt_idx(int, int, int, int (*)(void *),
            void *, const char *);
 void    octeon_intr_disestablish_fdt(void *);
 
-/* XXX Needed by 'MI' code in sys/dev/fdt. */
-#define arm_intr_establish_fdt         octeon_intr_establish_fdt
-#define arm_intr_disestablish_fdt      octeon_intr_disestablish_fdt
-
 #endif /* _LOCORE */
 
 #endif /* _MACHINE_INTR_H_ */
index d28fc58..f92d489 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci_fdt.c,v 1.3 2017/07/28 14:54:13 visa Exp $ */
+/* $OpenBSD: ahci_fdt.c,v 1.4 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2013,2017 Patrick Wildt <patrick@blueri.se>
  *
@@ -74,7 +74,7 @@ ahci_fdt_attach(struct device *parent, struct device *self, void *aux)
            faa->fa_reg[0].size, 0, &sc->sc_ioh))
                panic("ahci_fdt_attach: bus_space_map failed!");
 
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_BIO,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_BIO,
            ahci_intr, sc, sc->sc_dev.dv_xname);
        if (sc->sc_ih == NULL) {
                printf(": unable to establish interrupt\n");
@@ -90,7 +90,7 @@ ahci_fdt_attach(struct device *parent, struct device *self, void *aux)
 
        return;
 irq:
-       arm_intr_disestablish_fdt(sc->sc_ih);
+       fdt_intr_disestablish(sc->sc_ih);
 unmap:
        bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
 }
index 692c336..a7370e4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: bcm2835_aux.c,v 1.2 2018/02/25 01:45:01 guenther Exp $        */
+/*     $OpenBSD: bcm2835_aux.c,v 1.3 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2017 Mark kettenis <kettenis@openbsd.org>
  *
@@ -96,8 +96,8 @@ bcmaux_attach(struct device *parent, struct device *self, void *aux)
        sc->sc_ic.ic_node = faa->fa_node;
        sc->sc_ic.ic_cookie = &sc->sc_ic;
        sc->sc_ic.ic_establish = bcm_aux_intr_establish_fdt;
-       sc->sc_ic.ic_disestablish = arm_intr_disestablish_fdt;
-       arm_intr_register_fdt(&sc->sc_ic);
+       sc->sc_ic.ic_disestablish = fdt_intr_disestablish;
+       fdt_intr_register(&sc->sc_ic);
 }
 
 uint32_t
@@ -124,5 +124,5 @@ bcm_aux_intr_establish_fdt(void *cookie, int *cells, int level,
        if (idx != BCMAUX_UART)
                return NULL;
 
-       return arm_intr_establish_fdt(ic->ic_node, level, func, arg, name);
+       return fdt_intr_establish(ic->ic_node, level, func, arg, name);
 }
index 17db61f..a025d36 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_fdt.c,v 1.2 2018/07/20 05:37:06 jsg Exp $ */
+/* $OpenBSD: com_fdt.c,v 1.3 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
  *
@@ -148,7 +148,7 @@ com_fdt_attach(struct device *parent, struct device *self, void *aux)
 
        com_attach_subr(sc);
 
-       arm_intr_establish_fdt(faa->fa_node, IPL_TTY, intr,
+       fdt_intr_establish(faa->fa_node, IPL_TTY, intr,
            sc, sc->sc_dev.dv_xname);
 }
 
index 3a86d4c..6efe48d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dwmmc.c,v 1.15 2018/06/03 17:26:31 kettenis Exp $     */
+/*     $OpenBSD: dwmmc.c,v 1.16 2018/08/06 10:52:30 patrick Exp $      */
 /*
  * Copyright (c) 2017 Mark Kettenis
  *
@@ -323,7 +323,7 @@ dwmmc_attach(struct device *parent, struct device *self, void *aux)
        div = OF_getpropint(faa->fa_node, "samsung,dw-mshc-ciu-div", div);
        sc->sc_clkbase /= (div + 1);
 
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_BIO,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_BIO,
            dwmmc_intr, sc, sc->sc_dev.dv_xname);
        if (sc->sc_ih == NULL) {
                printf(": can't establish interrupt\n");
index 0a338cc..fdd5f29 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dwpcie.c,v 1.8 2018/08/03 22:40:05 kettenis Exp $     */
+/*     $OpenBSD: dwpcie.c,v 1.9 2018/08/06 10:52:30 patrick Exp $      */
 /*
  * Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
  *
@@ -379,7 +379,7 @@ dwpcie_armada8k_init(struct dwpcie_softc *sc)
                delay(1000);
        }
 
-       sc->sc_ih = arm_intr_establish_fdt(sc->sc_node, IPL_AUDIO | IPL_MPSAFE,
+       sc->sc_ih = fdt_intr_establish(sc->sc_node, IPL_AUDIO | IPL_MPSAFE,
            dwpcie_armada8k_intr, sc, sc->sc_dev.dv_xname);
 
        /* Unmask INTx interrupts. */
@@ -582,7 +582,7 @@ dwpcie_intr_establish(void *v, pci_intr_handle_t ihp, int level,
 
                /* Assume hardware passes Requester ID as sideband data. */
                data = pci_requester_id(ih->ih_pc, ih->ih_tag);
-               cookie = arm_intr_establish_fdt_msi(sc->sc_node, &addr,
+               cookie = fdt_intr_establish_msi(sc->sc_node, &addr,
                    &data, level, func, arg, (void *)name);
                if (cookie == NULL)
                        return NULL;
@@ -618,7 +618,7 @@ dwpcie_intr_establish(void *v, pci_intr_handle_t ihp, int level,
                reg[1] = reg[2] = 0;
                reg[3] = ih->ih_intrpin;
 
-               cookie = arm_intr_establish_fdt_imap(sc->sc_node, reg,
+               cookie = fdt_intr_establish_imap(sc->sc_node, reg,
                    sizeof(reg), level, func, arg, name);
        }
 
index 7d53486..aea7386 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ehci_fdt.c,v 1.3 2017/12/30 16:32:52 kettenis Exp $ */
+/*     $OpenBSD: ehci_fdt.c,v 1.4 2018/08/06 10:52:30 patrick Exp $ */
 
 /*
  * Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -98,7 +98,7 @@ ehci_fdt_attach(struct device *parent, struct device *self, void *aux)
        sc->sc.sc_offs = EREAD1(&sc->sc, EHCI_CAPLENGTH);
        EOWRITE2(&sc->sc, EHCI_USBINTR, 0);
 
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_USB,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_USB,
            ehci_intr, &sc->sc, devname);
        if (sc->sc_ih == NULL) {
                printf(": can't establish interrupt\n");
@@ -123,7 +123,7 @@ ehci_fdt_attach(struct device *parent, struct device *self, void *aux)
        return;
 
 disestablish_intr:
-       arm_intr_disestablish_fdt(sc->sc_ih);
+       fdt_intr_disestablish(sc->sc_ih);
        sc->sc_ih = NULL;
 unmap:
        bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size);
@@ -143,7 +143,7 @@ ehci_fdt_detach(struct device *self, int flags)
                return rv;
 
        if (sc->sc_ih != NULL) {
-               arm_intr_disestablish_fdt(sc->sc_ih);
+               fdt_intr_disestablish(sc->sc_ih);
                sc->sc_ih = NULL;
        }
 
index 242465e..b4b1b0f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_dwge_fdt.c,v 1.7 2018/02/26 13:11:48 kettenis Exp $        */
+/*     $OpenBSD: if_dwge_fdt.c,v 1.8 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
  * Copyright (c) 2016 Mark Kettenis <kettenis@openbsd.org>
@@ -141,7 +141,7 @@ dwge_fdt_attach(struct device *parent, struct device *self, void *aux)
        /* Reset PHY */
        dwge_fdt_reset_phy(fsc);
 
-       fsc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_NET,
+       fsc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_NET,
            dwge_fdt_intr, sc, sc->sc_dev.dv_xname);
        if (fsc->sc_ih == NULL) {
                printf(": unable to establish interrupt\n");
index d7ba5b7..3a561f7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_dwxe.c,v 1.9 2018/05/28 08:22:41 kettenis Exp $    */
+/*     $OpenBSD: if_dwxe.c,v 1.10 2018/08/06 10:52:30 patrick Exp $    */
 /*
  * Copyright (c) 2008 Mark Kettenis
  * Copyright (c) 2017 Patrick Wildt <patrick@blueri.se>
@@ -456,7 +456,7 @@ dwxe_attach(struct device *parent, struct device *self, void *aux)
        if_attach(ifp);
        ether_ifattach(ifp);
 
-       arm_intr_establish_fdt(faa->fa_node, IPL_NET, dwxe_intr, sc,
+       fdt_intr_establish(faa->fa_node, IPL_NET, dwxe_intr, sc,
            sc->sc_dev.dv_xname);
 }
 
index cf95a57..f6ca5a9 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fec.c,v 1.5 2018/06/17 17:20:23 patrick Exp $ */
+/* $OpenBSD: if_fec.c,v 1.6 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
  *
@@ -345,11 +345,11 @@ fec_attach(struct device *parent, struct device *self, void *aux)
        HWRITE4(sc, ENET_EIMR, 0);
        HWRITE4(sc, ENET_EIR, 0xffffffff);
 
-       sc->sc_ih[0] = arm_intr_establish_fdt_idx(faa->fa_node, 0, IPL_NET,
+       sc->sc_ih[0] = fdt_intr_establish_idx(faa->fa_node, 0, IPL_NET,
            fec_intr, sc, sc->sc_dev.dv_xname);
-       sc->sc_ih[1] = arm_intr_establish_fdt_idx(faa->fa_node, 1, IPL_NET,
+       sc->sc_ih[1] = fdt_intr_establish_idx(faa->fa_node, 1, IPL_NET,
            fec_intr, sc, sc->sc_dev.dv_xname);
-       sc->sc_ih[2] = arm_intr_establish_fdt_idx(faa->fa_node, 2, IPL_NET,
+       sc->sc_ih[2] = fdt_intr_establish_idx(faa->fa_node, 2, IPL_NET,
            fec_intr, sc, sc->sc_dev.dv_xname);
 
        tsize = ENET_MAX_TXD * sizeof(struct fec_buf_desc);
index 4abea48..47259fd 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_mvneta.c,v 1.5 2018/07/09 16:30:13 patrick Exp $   */
+/*     $OpenBSD: if_mvneta.c,v 1.6 2018/08/06 10:52:30 patrick Exp $   */
 /*     $NetBSD: if_mvneta.c,v 1.41 2015/04/15 10:15:40 hsuenaga Exp $  */
 /*
  * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi
@@ -584,7 +584,7 @@ mvneta_attach(struct device *parent, struct device *self, void *aux)
        while (MVNETA_READ(sc, MVNETA_PMACC2) & MVNETA_PMACC2_PORTMACRESET)
                ;
 
-       arm_intr_establish_fdt(faa->fa_node, IPL_NET, mvneta_intr, sc,
+       fdt_intr_establish(faa->fa_node, IPL_NET, mvneta_intr, sc,
            sc->sc_dev.dv_xname);
 
        ifp = &sc->sc_ac.ac_if;
index 093bd7d..c3f8d4c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: imxesdhc.c,v 1.8 2018/06/10 14:14:55 kettenis Exp $   */
+/*     $OpenBSD: imxesdhc.c,v 1.9 2018/08/06 10:52:30 patrick Exp $    */
 /*
  * Copyright (c) 2009 Dale Rahn <drahn@openbsd.org>
  * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -315,7 +315,7 @@ imxesdhc_attach(struct device *parent, struct device *self, void *aux)
 
        clock_set_assigned(faa->fa_node);
 
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_SDMMC,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_SDMMC,
           imxesdhc_intr, sc, sc->sc_dev.dv_xname);
 
        OF_getpropintarray(sc->sc_node, "cd-gpios", sc->sc_gpio,
index 02d30aa..5741130 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: imxgpc.c,v 1.3 2018/06/10 14:16:00 kettenis Exp $     */
+/*     $OpenBSD: imxgpc.c,v 1.4 2018/08/06 10:52:30 patrick Exp $      */
 /*
  * Copyright (c) 2016 Mark Kettenis
  *
@@ -57,9 +57,9 @@ imxgpc_attach(struct device *parent, struct device *self, void *aux)
 
        sc->sc_ic.ic_node = faa->fa_node;
        sc->sc_ic.ic_cookie = &sc->sc_ic;
-       sc->sc_ic.ic_establish = arm_intr_parent_establish_fdt;
-       sc->sc_ic.ic_disestablish = arm_intr_parent_disestablish_fdt;
-       arm_intr_register_fdt(&sc->sc_ic);
+       sc->sc_ic.ic_establish = fdt_intr_parent_establish;
+       sc->sc_ic.ic_disestablish = fdt_intr_parent_disestablish;
+       fdt_intr_register(&sc->sc_ic);
 
        printf("\n");
 }
index eefa4a0..fee6856 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxgpio.c,v 1.1 2018/03/30 19:38:00 patrick Exp $ */
+/* $OpenBSD: imxgpio.c,v 1.2 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
  * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
@@ -131,7 +131,7 @@ imxgpio_attach(struct device *parent, struct device *self, void *aux)
        sc->sc_ic.ic_cookie = sc;
        sc->sc_ic.ic_establish = imxgpio_intr_establish;
        sc->sc_ic.ic_disestablish = imxgpio_intr_disestablish;
-       arm_intr_register_fdt(&sc->sc_ic);
+       fdt_intr_register(&sc->sc_ic);
 
        printf("\n");
 
@@ -359,15 +359,15 @@ imxgpio_recalc_ipl(struct imxgpio_softc *sc)
                sc->sc_ipl = max;
 
                if (sc->sc_ih_l != NULL)
-                       arm_intr_disestablish_fdt(sc->sc_ih_l);
+                       fdt_intr_disestablish(sc->sc_ih_l);
 
                if (sc->sc_ih_h != NULL)
-                       arm_intr_disestablish_fdt(sc->sc_ih_h);
+                       fdt_intr_disestablish(sc->sc_ih_h);
 
                if (sc->sc_ipl != IPL_NONE) {
-                       sc->sc_ih_l = arm_intr_establish_fdt_idx(sc->sc_node, 0,
+                       sc->sc_ih_l = fdt_intr_establish_idx(sc->sc_node, 0,
                            sc->sc_ipl, imxgpio_intr, sc, sc->sc_dev.dv_xname);
-                       sc->sc_ih_h = arm_intr_establish_fdt_idx(sc->sc_node, 1,
+                       sc->sc_ih_h = fdt_intr_establish_idx(sc->sc_node, 1,
                            sc->sc_ipl, imxgpio_intr, sc, sc->sc_dev.dv_xname);
                }
        }
index 930d6fb..56f324f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxiic.c,v 1.4 2018/06/10 09:25:50 patrick Exp $ */
+/* $OpenBSD: imxiic.c,v 1.5 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2013 Patrick Wildt <patrick@blueri.se>
  *
@@ -125,7 +125,7 @@ imxiic_attach(struct device *parent, struct device *self, void *aux)
                panic("imxiic_attach: bus_space_map failed!");
 
 #if 0
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_BIO,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_BIO,
            imxiic_intr, sc, sc->sc_dev.dv_xname);
 #endif
 
index 6f3722a..84c7eb5 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxuart.c,v 1.3 2018/06/11 09:15:22 kettenis Exp $ */
+/* $OpenBSD: imxuart.c,v 1.4 2018/08/06 10:52:30 patrick Exp $ */
 /*
  * Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
  *
@@ -166,7 +166,7 @@ imxuart_attach(struct device *parent, struct device *self, void *aux)
 
        pinctrl_byname(faa->fa_node, "default");
 
-       sc->sc_irq = arm_intr_establish_fdt(faa->fa_node, IPL_TTY,
+       sc->sc_irq = fdt_intr_establish(faa->fa_node, IPL_TTY,
            imxuart_intr, sc, sc->sc_dev.dv_xname);
 
        sc->sc_node = faa->fa_node;
index f311536..46baffb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: mvicu.c,v 1.2 2018/03/29 18:11:55 kettenis Exp $      */
+/*     $OpenBSD: mvicu.c,v 1.3 2018/08/06 10:52:30 patrick Exp $       */
 /*
  * Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
  *
@@ -125,8 +125,8 @@ mvicu_attach(struct device *parent, struct device *self, void *aux)
 
        printf("\n");
 
-       extern uint32_t arm_intr_get_parent(int);
-       phandle = arm_intr_get_parent(node);
+       extern uint32_t fdt_intr_get_parent(int);
+       phandle = fdt_intr_get_parent(node);
        extern LIST_HEAD(, interrupt_controller) interrupt_controllers;
        LIST_FOREACH(ic, &interrupt_controllers, ic_list) {
                if (ic->ic_phandle == phandle)
@@ -138,7 +138,7 @@ mvicu_attach(struct device *parent, struct device *self, void *aux)
        sc->sc_ic.ic_cookie = sc;
        sc->sc_ic.ic_establish = mvicu_intr_establish;
        sc->sc_ic.ic_disestablish = mvicu_intr_disestablish;
-       arm_intr_register_fdt(&sc->sc_ic);
+       fdt_intr_register(&sc->sc_ic);
 }
 
 void *
index 41a6b3d..0aad1ab 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pluart_fdt.c,v 1.1 2018/07/02 12:46:20 kettenis Exp $ */
+/*     $OpenBSD: pluart_fdt.c,v 1.2 2018/08/06 10:52:30 patrick Exp $  */
 /*
  * Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
  * Copyright (c) 2005 Dale Rahn <drahn@dalerahn.com>
@@ -68,7 +68,7 @@ pluart_fdt_attach(struct device *parent, struct device *self, void *aux)
                return;
        }
 
-       sc->sc_irq = arm_intr_establish_fdt(faa->fa_node, IPL_TTY, pluart_intr,
+       sc->sc_irq = fdt_intr_establish(faa->fa_node, IPL_TTY, pluart_intr,
            sc, sc->sc_dev.dv_xname);
 
        sc->sc_iot = faa->fa_iot;
index 615ac3a..df5fc1b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rkpcie.c,v 1.4 2018/07/30 10:56:00 kettenis Exp $     */
+/*     $OpenBSD: rkpcie.c,v 1.5 2018/08/06 10:52:30 patrick Exp $      */
 /*
  * Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
  *
@@ -558,7 +558,7 @@ rkpcie_intr_establish(void *v, pci_intr_handle_t ihp, int level,
 
                /* Assume hardware passes Requester ID as sideband data. */
                data = pci_requester_id(ih->ih_pc, ih->ih_tag);
-               cookie = arm_intr_establish_fdt_msi(sc->sc_node, &addr,
+               cookie = fdt_intr_establish_msi(sc->sc_node, &addr,
                    &data, level, func, arg, name);
                if (cookie == NULL)
                        return NULL;
@@ -590,7 +590,7 @@ rkpcie_intr_establish(void *v, pci_intr_handle_t ihp, int level,
                    PCIE_CLIENT_INTA_UNMASK | PCIE_CLIENT_INTB_UNMASK |
                    PCIE_CLIENT_INTC_UNMASK | PCIE_CLIENT_INTD_UNMASK);
 
-               cookie = arm_intr_establish_fdt_idx(sc->sc_node, 1, level,
+               cookie = fdt_intr_establish_idx(sc->sc_node, 1, level,
                    func, arg, name);
        }
 
index 897c34c..6eef5a3 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sdhc_fdt.c,v 1.2 2017/05/06 16:25:48 kettenis Exp $   */
+/*     $OpenBSD: sdhc_fdt.c,v 1.3 2018/08/06 10:52:30 patrick Exp $    */
 /*
  * Copyright (c) 2017 Mark Kettenis
  *
@@ -84,7 +84,7 @@ sdhc_fdt_attach(struct device *parent, struct device *self, void *aux)
        clock_enable_all(faa->fa_node);
        reset_deassert_all(faa->fa_node);
 
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_BIO,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_BIO,
            sdhc_intr, sc, sc->sc.sc_dev.dv_xname);
        if (sc->sc_ih == NULL) {
                printf(": can't establish interrupt\n");
index 293db1a..eb5cf7f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sximmc.c,v 1.4 2018/05/27 18:03:22 kettenis Exp $ */
+/* $OpenBSD: sximmc.c,v 1.5 2018/08/06 10:52:30 patrick Exp $ */
 /* $NetBSD: awin_mmc.c,v 1.23 2015/11/14 10:32:40 bouyer Exp $ */
 
 /*-
@@ -415,7 +415,7 @@ sximmc_attach(struct device *parent, struct device *self, void *aux)
        sc->sc_vqmmc = OF_getpropint(sc->sc_node, "vqmmc-supply", 0);
        sc->sc_pwrseq = OF_getpropint(sc->sc_node, "mmc-pwrseq", 0);
 
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_BIO,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_BIO,
            sximmc_intr, sc, sc->sc_dev.dv_xname);
        if (sc->sc_ih == NULL) {
                printf(": can't to establish interrupt\n");
index 6541d13..3c261d7 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sxitwi.c,v 1.9 2018/07/24 21:53:46 kettenis Exp $ */
+/* $OpenBSD: sxitwi.c,v 1.10 2018/08/06 10:52:30 patrick Exp $ */
 /*     $NetBSD: gttwsi_core.c,v 1.2 2014/11/23 13:37:27 jmcneill Exp $ */
 /*
  * Copyright (c) 2008 Eiji Kawauchi.
@@ -275,7 +275,7 @@ sxitwi_attach(struct device *parent, struct device *self, void *aux)
        sxitwi_write_4(sc, TWSI_SOFTRESET, SOFTRESET_VAL);
 
        /* Establish interrupt */
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_BIO,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_BIO,
            sxitwi_intr, sc, sc->sc_dev.dv_xname);
        if (sc->sc_ih == NULL) {
                printf(": can't to establish interrupt\n");
index bc588a9..b472801 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: virtio_mmio.c,v 1.2 2017/02/24 17:12:31 patrick Exp $ */
+/*     $OpenBSD: virtio_mmio.c,v 1.3 2018/08/06 10:52:30 patrick Exp $ */
 /*     $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */
 
 /*
@@ -254,7 +254,7 @@ virtio_mmio_attach(struct device *parent, struct device *self, void *aux)
                goto fail_1;
        }
 
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, vsc->sc_ipl,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, vsc->sc_ipl,
            virtio_mmio_intr, sc, vsc->sc_dev.dv_xname);
        if (sc->sc_ih == NULL) {
                printf("%s: couldn't establish interrupt\n",
@@ -286,7 +286,7 @@ virtio_mmio_detach(struct device *self, int flags)
        }
        KASSERT(vsc->sc_child == 0 || vsc->sc_child == VIRTIO_CHILD_ERROR);
        KASSERT(vsc->sc_vqs == 0);
-       arm_intr_disestablish_fdt(sc->sc_ih);
+       fdt_intr_disestablish(sc->sc_ih);
        sc->sc_ih = 0;
        if (sc->sc_iosize)
                bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_iosize);
index 177b62c..2105e0c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: xhci_fdt.c,v 1.11 2018/05/08 13:41:52 mpi Exp $       */
+/*     $OpenBSD: xhci_fdt.c,v 1.12 2018/08/06 10:52:30 patrick Exp $   */
 /*
  * Copyright (c) 2017 Mark kettenis <kettenis@openbsd.org>
  *
@@ -88,7 +88,7 @@ xhci_fdt_attach(struct device *parent, struct device *self, void *aux)
                return;
        }
 
-       sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_USB,
+       sc->sc_ih = fdt_intr_establish(faa->fa_node, IPL_USB,
            xhci_intr, sc, sc->sc.sc_bus.bdev.dv_xname);
        if (sc->sc_ih == NULL) {
                printf(": can't establish interrupt\n");
@@ -123,7 +123,7 @@ xhci_fdt_attach(struct device *parent, struct device *self, void *aux)
        return;
 
 disestablish_ret:
-       arm_intr_disestablish_fdt(sc->sc_ih);
+       fdt_intr_disestablish(sc->sc_ih);
 unmap:
        bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size);
 }