diff options
Diffstat (limited to 'sys/arch/armv7/sunxi/sxie.c')
-rw-r--r-- | sys/arch/armv7/sunxi/sxie.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/arch/armv7/sunxi/sxie.c b/sys/arch/armv7/sunxi/sxie.c index c0d4fd8666b..cdcc2819633 100644 --- a/sys/arch/armv7/sunxi/sxie.c +++ b/sys/arch/armv7/sunxi/sxie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxie.c,v 1.17 2016/07/27 11:45:02 patrick Exp $ */ +/* $OpenBSD: sxie.c,v 1.18 2016/08/05 19:00:25 kettenis Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se> * Copyright (c) 2013 Artturi Alm @@ -211,16 +211,11 @@ sxie_attach(struct device *parent, struct device *self, void *aux) struct fdt_attach_args *faa = aux; struct mii_data *mii; struct ifnet *ifp; - int s, irq; + int s; - if (faa->fa_nreg != 1 || (faa->fa_nintr != 1 && faa->fa_nintr != 3)) + if (faa->fa_nreg < 1) return; - if (faa->fa_nintr == 1) - irq = faa->fa_intr[0]; - else - irq = faa->fa_intr[1]; - sc->sc_iot = faa->fa_iot; if (bus_space_map(sc->sc_iot, faa->fa_reg[0].addr, @@ -233,7 +228,7 @@ sxie_attach(struct device *parent, struct device *self, void *aux) sxie_socware_init(sc); sc->txf_inuse = 0; - sc->sc_ih = arm_intr_establish(irq, IPL_NET, + sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_NET, sxie_intr, sc, sc->sc_dev.dv_xname); s = splnet(); |