summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2018-08-06 10:52:31 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2018-08-06 10:52:31 +0000
commit756513a8315b6ca749ecd30c0f81bb32e3f9e24e (patch)
tree99a78ffb6065fc7698bf7d29f0fd4a8b11064679 /sys/dev/fdt
parent2f9ac048c224e8b785cddc55c0590b34b8808a36 (diff)
Give the FDT interrupt API a more generic naming by replacing the
arm_intr_* prefix with fdt_intr_*. ok kettenis@
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/ahci_fdt.c6
-rw-r--r--sys/dev/fdt/bcm2835_aux.c8
-rw-r--r--sys/dev/fdt/com_fdt.c4
-rw-r--r--sys/dev/fdt/dwmmc.c4
-rw-r--r--sys/dev/fdt/dwpcie.c8
-rw-r--r--sys/dev/fdt/ehci_fdt.c8
-rw-r--r--sys/dev/fdt/if_dwge_fdt.c4
-rw-r--r--sys/dev/fdt/if_dwxe.c4
-rw-r--r--sys/dev/fdt/if_fec.c8
-rw-r--r--sys/dev/fdt/if_mvneta.c4
-rw-r--r--sys/dev/fdt/imxesdhc.c4
-rw-r--r--sys/dev/fdt/imxgpc.c8
-rw-r--r--sys/dev/fdt/imxgpio.c12
-rw-r--r--sys/dev/fdt/imxiic.c4
-rw-r--r--sys/dev/fdt/imxuart.c4
-rw-r--r--sys/dev/fdt/mvicu.c8
-rw-r--r--sys/dev/fdt/pluart_fdt.c4
-rw-r--r--sys/dev/fdt/rkpcie.c6
-rw-r--r--sys/dev/fdt/sdhc_fdt.c4
-rw-r--r--sys/dev/fdt/sximmc.c4
-rw-r--r--sys/dev/fdt/sxitwi.c4
-rw-r--r--sys/dev/fdt/virtio_mmio.c6
-rw-r--r--sys/dev/fdt/xhci_fdt.c6
23 files changed, 66 insertions, 66 deletions
diff --git a/sys/dev/fdt/ahci_fdt.c b/sys/dev/fdt/ahci_fdt.c
index d28fc588cb4..f92d48974fe 100644
--- a/sys/dev/fdt/ahci_fdt.c
+++ b/sys/dev/fdt/ahci_fdt.c
@@ -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);
}
diff --git a/sys/dev/fdt/bcm2835_aux.c b/sys/dev/fdt/bcm2835_aux.c
index 692c3362828..a7370e40228 100644
--- a/sys/dev/fdt/bcm2835_aux.c
+++ b/sys/dev/fdt/bcm2835_aux.c
@@ -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);
}
diff --git a/sys/dev/fdt/com_fdt.c b/sys/dev/fdt/com_fdt.c
index 17db61f311f..a025d36f70d 100644
--- a/sys/dev/fdt/com_fdt.c
+++ b/sys/dev/fdt/com_fdt.c
@@ -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);
}
diff --git a/sys/dev/fdt/dwmmc.c b/sys/dev/fdt/dwmmc.c
index 3a86d4c1708..6efe48d1580 100644
--- a/sys/dev/fdt/dwmmc.c
+++ b/sys/dev/fdt/dwmmc.c
@@ -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");
diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c
index 0a338ccb37d..fdd5f299363 100644
--- a/sys/dev/fdt/dwpcie.c
+++ b/sys/dev/fdt/dwpcie.c
@@ -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);
}
diff --git a/sys/dev/fdt/ehci_fdt.c b/sys/dev/fdt/ehci_fdt.c
index 7d53486aab2..aea7386c211 100644
--- a/sys/dev/fdt/ehci_fdt.c
+++ b/sys/dev/fdt/ehci_fdt.c
@@ -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;
}
diff --git a/sys/dev/fdt/if_dwge_fdt.c b/sys/dev/fdt/if_dwge_fdt.c
index 242465e6de9..b4b1b0fed65 100644
--- a/sys/dev/fdt/if_dwge_fdt.c
+++ b/sys/dev/fdt/if_dwge_fdt.c
@@ -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");
diff --git a/sys/dev/fdt/if_dwxe.c b/sys/dev/fdt/if_dwxe.c
index d7ba5b72675..3a561f76968 100644
--- a/sys/dev/fdt/if_dwxe.c
+++ b/sys/dev/fdt/if_dwxe.c
@@ -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);
}
diff --git a/sys/dev/fdt/if_fec.c b/sys/dev/fdt/if_fec.c
index cf95a5716ee..f6ca5a9706c 100644
--- a/sys/dev/fdt/if_fec.c
+++ b/sys/dev/fdt/if_fec.c
@@ -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);
diff --git a/sys/dev/fdt/if_mvneta.c b/sys/dev/fdt/if_mvneta.c
index 4abea483923..47259fd82db 100644
--- a/sys/dev/fdt/if_mvneta.c
+++ b/sys/dev/fdt/if_mvneta.c
@@ -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;
diff --git a/sys/dev/fdt/imxesdhc.c b/sys/dev/fdt/imxesdhc.c
index 093bd7da9c0..c3f8d4cd4f9 100644
--- a/sys/dev/fdt/imxesdhc.c
+++ b/sys/dev/fdt/imxesdhc.c
@@ -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,
diff --git a/sys/dev/fdt/imxgpc.c b/sys/dev/fdt/imxgpc.c
index 02d30aaa5c4..574113014af 100644
--- a/sys/dev/fdt/imxgpc.c
+++ b/sys/dev/fdt/imxgpc.c
@@ -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");
}
diff --git a/sys/dev/fdt/imxgpio.c b/sys/dev/fdt/imxgpio.c
index eefa4a0cbb3..fee68566a31 100644
--- a/sys/dev/fdt/imxgpio.c
+++ b/sys/dev/fdt/imxgpio.c
@@ -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);
}
}
diff --git a/sys/dev/fdt/imxiic.c b/sys/dev/fdt/imxiic.c
index 930d6fb0ef9..56f324f6d21 100644
--- a/sys/dev/fdt/imxiic.c
+++ b/sys/dev/fdt/imxiic.c
@@ -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
diff --git a/sys/dev/fdt/imxuart.c b/sys/dev/fdt/imxuart.c
index 6f3722affc9..84c7eb5aee6 100644
--- a/sys/dev/fdt/imxuart.c
+++ b/sys/dev/fdt/imxuart.c
@@ -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;
diff --git a/sys/dev/fdt/mvicu.c b/sys/dev/fdt/mvicu.c
index f3115365b31..46baffb370a 100644
--- a/sys/dev/fdt/mvicu.c
+++ b/sys/dev/fdt/mvicu.c
@@ -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 *
diff --git a/sys/dev/fdt/pluart_fdt.c b/sys/dev/fdt/pluart_fdt.c
index 41a6b3de021..0aad1ab1ee6 100644
--- a/sys/dev/fdt/pluart_fdt.c
+++ b/sys/dev/fdt/pluart_fdt.c
@@ -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;
diff --git a/sys/dev/fdt/rkpcie.c b/sys/dev/fdt/rkpcie.c
index 615ac3aba21..df5fc1b39fe 100644
--- a/sys/dev/fdt/rkpcie.c
+++ b/sys/dev/fdt/rkpcie.c
@@ -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);
}
diff --git a/sys/dev/fdt/sdhc_fdt.c b/sys/dev/fdt/sdhc_fdt.c
index 897c34c45f7..6eef5a3d61d 100644
--- a/sys/dev/fdt/sdhc_fdt.c
+++ b/sys/dev/fdt/sdhc_fdt.c
@@ -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");
diff --git a/sys/dev/fdt/sximmc.c b/sys/dev/fdt/sximmc.c
index 293db1af683..eb5cf7f353e 100644
--- a/sys/dev/fdt/sximmc.c
+++ b/sys/dev/fdt/sximmc.c
@@ -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");
diff --git a/sys/dev/fdt/sxitwi.c b/sys/dev/fdt/sxitwi.c
index 6541d1353d6..3c261d7cc5b 100644
--- a/sys/dev/fdt/sxitwi.c
+++ b/sys/dev/fdt/sxitwi.c
@@ -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");
diff --git a/sys/dev/fdt/virtio_mmio.c b/sys/dev/fdt/virtio_mmio.c
index bc588a9a99a..b4728019b81 100644
--- a/sys/dev/fdt/virtio_mmio.c
+++ b/sys/dev/fdt/virtio_mmio.c
@@ -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);
diff --git a/sys/dev/fdt/xhci_fdt.c b/sys/dev/fdt/xhci_fdt.c
index 177b62c1e96..2105e0cb3b2 100644
--- a/sys/dev/fdt/xhci_fdt.c
+++ b/sys/dev/fdt/xhci_fdt.c
@@ -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);
}