From 11e046788a1e66fe5ecccf8e8e96815b1684475e Mon Sep 17 00:00:00 2001 From: Patrick Wildt Date: Thu, 17 May 2018 06:53:46 +0000 Subject: Recent Broadcom chipsets have a dedicated PMU core and it can't be accessed using the Chipcommon core anymore. --- sys/dev/ic/bwfm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/dev/ic') diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index 84e11ffa0ee..718d904b4f1 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.44 2018/05/16 08:20:00 patrick Exp $ */ +/* $OpenBSD: bwfm.c,v 1.45 2018/05/17 06:53:45 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt @@ -1034,10 +1034,10 @@ bwfm_chip_sr_capable(struct bwfm_softc *sc) if (sc->sc_chip.ch_pmurev < 17) return 0; - core = bwfm_chip_get_core(sc, BWFM_AGENT_CORE_CHIPCOMMON); switch (sc->sc_chip.ch_chip) { case BRCM_CC_4354_CHIP_ID: case BRCM_CC_4356_CHIP_ID: + core = bwfm_chip_get_pmu(sc); sc->sc_buscore_ops->bc_write(sc, core->co_base + BWFM_CHIP_REG_CHIPCONTROL_ADDR, 3); reg = sc->sc_buscore_ops->bc_read(sc, core->co_base + @@ -1046,16 +1046,19 @@ bwfm_chip_sr_capable(struct bwfm_softc *sc) case BRCM_CC_43241_CHIP_ID: case BRCM_CC_4335_CHIP_ID: case BRCM_CC_4339_CHIP_ID: + core = bwfm_chip_get_pmu(sc); sc->sc_buscore_ops->bc_write(sc, core->co_base + BWFM_CHIP_REG_CHIPCONTROL_ADDR, 3); reg = sc->sc_buscore_ops->bc_read(sc, core->co_base + BWFM_CHIP_REG_CHIPCONTROL_DATA); return reg != 0; case BRCM_CC_43430_CHIP_ID: + core = bwfm_chip_get_core(sc, BWFM_AGENT_CORE_CHIPCOMMON); reg = sc->sc_buscore_ops->bc_read(sc, core->co_base + BWFM_CHIP_REG_SR_CONTROL1); return reg != 0; default: + core = bwfm_chip_get_pmu(sc); reg = sc->sc_buscore_ops->bc_read(sc, core->co_base + BWFM_CHIP_REG_PMUCAPABILITIES_EXT); if ((reg & BWFM_CHIP_REG_PMUCAPABILITIES_SR_SUPP) == 0) -- cgit v1.2.3