aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bwn
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2016-05-24 01:20:30 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2016-05-24 01:20:30 +0000
commita7978cf36df87402d74aaaef408969c6a69d7977 (patch)
tree8f541ff24579c32c5663d4949899a80c61c1a897 /sys/dev/bwn
parentf4a3eb02973afb7e2c2d1a116dbcb331f91ae022 (diff)
downloadsrc-a7978cf36df87402d74aaaef408969c6a69d7977.tar.gz
src-a7978cf36df87402d74aaaef408969c6a69d7977.zip
Notes
Diffstat (limited to 'sys/dev/bwn')
-rw-r--r--sys/dev/bwn/if_bwn.c15
-rw-r--r--sys/dev/bwn/if_bwn_phy_common.c6
2 files changed, 18 insertions, 3 deletions
diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c
index d13002497457..4874347d27e9 100644
--- a/sys/dev/bwn/if_bwn.c
+++ b/sys/dev/bwn/if_bwn.c
@@ -4712,11 +4712,9 @@ bwn_rf_turnoff(struct bwn_mac *mac)
/*
* SSB PHY reset.
- *
- * XXX TODO: BCMA PHY reset.
*/
static void
-bwn_phy_reset(struct bwn_mac *mac)
+bwn_phy_reset_siba(struct bwn_mac *mac)
{
struct bwn_softc *sc = mac->mac_sc;
@@ -4729,6 +4727,17 @@ bwn_phy_reset(struct bwn_mac *mac)
DELAY(1000);
}
+static void
+bwn_phy_reset(struct bwn_mac *mac)
+{
+
+ if (bwn_is_bus_siba(mac)) {
+ bwn_phy_reset_siba(mac);
+ } else {
+ BWN_ERRPRINTF(mac->mac_sc, "%s: unknown bus!\n", __func__);
+ }
+}
+
static int
bwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
{
diff --git a/sys/dev/bwn/if_bwn_phy_common.c b/sys/dev/bwn/if_bwn_phy_common.c
index bcc9dc9dfb60..4a3b044de11c 100644
--- a/sys/dev/bwn/if_bwn_phy_common.c
+++ b/sys/dev/bwn/if_bwn_phy_common.c
@@ -157,6 +157,8 @@ bwn_phy_force_clock(struct bwn_mac *mac, int force)
else
tmp &= ~SIBA_TGSLOW_FGC;
siba_write_4(sc->sc_dev, SIBA_TGSLOW, tmp);
+ } else {
+ BWN_ERRPRINTF(sc, "%s: unknown bus!\n", __func__);
}
}
@@ -190,6 +192,8 @@ bwn_mac_phy_clock_set(struct bwn_mac *mac, int enabled)
else
val &= ~BWN_TGSLOW_MACPHYCLKEN;
siba_write_4(sc->sc_dev, SIBA_TGSLOW, val);
+ } else {
+ BWN_ERRPRINTF(sc, "%s: unknown bus!\n", __func__);
}
}
@@ -205,5 +209,7 @@ bwn_wireless_core_phy_pll_reset(struct bwn_mac *mac)
siba_cc_mask32(sc->sc_dev, SIBA_CC_CHIPCTL_DATA, ~0x4);
siba_cc_set32(sc->sc_dev, SIBA_CC_CHIPCTL_DATA, 0x4);
siba_cc_mask32(sc->sc_dev, SIBA_CC_CHIPCTL_DATA, ~0x4);
+ } else {
+ BWN_ERRPRINTF(sc, "%s: unknown bus!\n", __func__);
}
}