Skip to contentSkip to conversation

mt76x0: phy: use mt76_poll_msec in mt76x0_phy_temp_sensor

PATCH Applied Lorenzo Bianconi 2 participants 2 messages Oct 27, 2018 – Nov 5, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 mt76x0: phy: use mt76_poll_msec in mt76x0_phy_temp_sensor

In reply to a message not in the archive

Use mt76_poll_msec utility routine for CORE_R34 register polling instead of mt76_poll in order to allow the hw to complete requested calibration since on slow devices (e.g. mt7620 based boards) calibration takes longer than 2ms

Fixes 66a34c66e0cb ("mt76x0: phy: add phy/vco temperature compensation")
---
 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x0/phy.c +1 -2
index c734987a344c..830ea6047f10 100644
@@ -686,8 +686,7 @@ static void mt76x0_phy_temp_sensor(struct mt76x02_dev *dev)
 	mt76x0_rf_wr(dev, MT_RF(0, 67), 0x01);
 
 	mt76_wr(dev, MT_BBP(CORE, 34), 0x00080055);
-
-	if (!mt76_poll(dev, MT_BBP(CORE, 34), BIT(4), 0, 2000)) {
+	if (!mt76_poll_msec(dev, MT_BBP(CORE, 34), BIT(4), 0, 200)) {
 		mt76_clear(dev, MT_BBP(CORE, 34), BIT(4));
 		goto done;
 	}
Signature · 1 line
2.19.1
maintainer Applied
#2 lore raw
Quoted 7 lines · Lorenzo Bianconi

Use mt76_poll_msec utility routine for CORE_R34 register polling instead of mt76_poll in order to allow the hw to complete requested calibration since on slow devices (e.g. mt7620 based boards) calibration takes longer than 2ms

Fixes 66a34c66e0cb ("mt76x0: phy: add phy/vco temperature compensation")

Applied, thanks.

- Felix