diff options
author | 2019-03-13 09:41:12 +0000 | |
---|---|---|
committer | 2019-03-13 09:41:12 +0000 | |
commit | c26129e1c555a71379967ddea16f450ec299c07a (patch) | |
tree | a796c9d55816875c404ac0739ff3ce2e40c016ca /sys/dev/fdt/imxccm.c | |
parent | Store whether or not the VFP was active on entering the unhandled (diff) | |
download | wireguard-openbsd-c26129e1c555a71379967ddea16f450ec299c07a.tar.xz wireguard-openbsd-c26129e1c555a71379967ddea16f450ec299c07a.zip |
Since new bindings might use the same clock index for divs, gates and
muxes, quietly return if the clock has no gate, but it's a div/mux.
With this clocks that are defined in both gates and divs/muxes can
be enabled.
Diffstat (limited to 'sys/dev/fdt/imxccm.c')
-rw-r--r-- | sys/dev/fdt/imxccm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/fdt/imxccm.c b/sys/dev/fdt/imxccm.c index 0ec5e31bb2c..47e057783d9 100644 --- a/sys/dev/fdt/imxccm.c +++ b/sys/dev/fdt/imxccm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxccm.c,v 1.12 2019/01/11 08:00:34 patrick Exp $ */ +/* $OpenBSD: imxccm.c,v 1.13 2019/03/13 09:41:12 patrick Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se> * @@ -993,11 +993,10 @@ imxccm_enable(void *cookie, uint32_t *cells, int on) } } - if ((idx < sc->sc_ndivs && sc->sc_divs[idx].reg != 0) || - (idx < sc->sc_nmuxs && sc->sc_muxs[idx].reg != 0)) - return; - if (idx >= sc->sc_ngates || sc->sc_gates[idx].reg == 0) { + if ((idx < sc->sc_ndivs && sc->sc_divs[idx].reg != 0) || + (idx < sc->sc_nmuxs && sc->sc_muxs[idx].reg != 0)) + return; printf("%s: 0x%08x\n", __func__, idx); return; } |