Skip to content

Commit

Permalink
mt76x0: phy: use mt76_poll_msec in mt76x0_phy_temp_sensor
Browse files Browse the repository at this point in the history
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")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Nov 1, 2018
1 parent 172f081 commit 2ae2046
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mt76x0/phy.c
Expand Up @@ -687,8 +687,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;
}
Expand Down

0 comments on commit 2ae2046

Please sign in to comment.