Commit 71bb496c authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt7915: fix polling firmware-own status

Check the register status bit instead of the trigger bit
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent b4bb8469
...@@ -2697,7 +2697,7 @@ static int mt7915_driver_own(struct mt7915_dev *dev) ...@@ -2697,7 +2697,7 @@ static int mt7915_driver_own(struct mt7915_dev *dev)
{ {
mt76_wr(dev, MT_TOP_LPCR_HOST_BAND0, MT_TOP_LPCR_HOST_DRV_OWN); mt76_wr(dev, MT_TOP_LPCR_HOST_BAND0, MT_TOP_LPCR_HOST_DRV_OWN);
if (!mt76_poll_msec(dev, MT_TOP_LPCR_HOST_BAND0, if (!mt76_poll_msec(dev, MT_TOP_LPCR_HOST_BAND0,
MT_TOP_LPCR_HOST_FW_OWN, 0, 500)) { MT_TOP_LPCR_HOST_FW_OWN_STAT, 0, 500)) {
dev_err(dev->mt76.dev, "Timeout for driver own\n"); dev_err(dev->mt76.dev, "Timeout for driver own\n");
return -EIO; return -EIO;
} }
......
...@@ -567,6 +567,7 @@ ...@@ -567,6 +567,7 @@
#define MT_TOP_LPCR_HOST_BAND0 MT_TOP(0x10) #define MT_TOP_LPCR_HOST_BAND0 MT_TOP(0x10)
#define MT_TOP_LPCR_HOST_FW_OWN BIT(0) #define MT_TOP_LPCR_HOST_FW_OWN BIT(0)
#define MT_TOP_LPCR_HOST_DRV_OWN BIT(1) #define MT_TOP_LPCR_HOST_DRV_OWN BIT(1)
#define MT_TOP_LPCR_HOST_FW_OWN_STAT BIT(2)
#define MT_TOP_MISC MT_TOP(0xf0) #define MT_TOP_MISC MT_TOP(0xf0)
#define MT_TOP_MISC_FW_STATE GENMASK(2, 0) #define MT_TOP_MISC_FW_STATE GENMASK(2, 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment