From: jsg Date: Fri, 22 Jul 2016 13:20:30 +0000 (+0000) Subject: Fallback to the known fec irq number on imx.6 if the fdt X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5f0c642c99dab0b6c14d10084547207b767bc9ca;p=openbsd Fallback to the known fec irq number on imx.6 if the fdt interrupts-extended property is missing or not the size we expect. Some dtbs implement a workaround for "ERR006687 ENET: Only the ENET wake-up interrupt request can wake the system from Wait mode" suggested by the IMX6DQCE errata document to set an undocumented gpio mux mode and handle the interrupt via gpio. We don't support gpio interrupts yet, hopefully this change is enough to make interrupts work on wandboard and sabre lite again till we do. Discussed with kettenis and patrick, tested on sabre lite by patrick. --- diff --git a/sys/arch/armv7/imx/if_fec.c b/sys/arch/armv7/imx/if_fec.c index 54df48554bf..d9ef8a591d2 100644 --- a/sys/arch/armv7/imx/if_fec.c +++ b/sys/arch/armv7/imx/if_fec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fec.c,v 1.8 2016/07/21 02:32:23 jsg Exp $ */ +/* $OpenBSD: if_fec.c,v 1.9 2016/07/22 13:20:30 jsg Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt * @@ -303,7 +303,7 @@ fec_attach(struct device *parent, struct device *self, void *aux) if (OF_getpropintarray(faa->fa_node, "interrupts-extended", intr, sizeof(intr)) < sizeof(intr)) - return; + intr[2] = 0x76; sc->sc_node = faa->fa_node; sc->sc_iot = faa->fa_iot;