mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt792x: ensure MCU ready before ROM patch download
Restart the MCU and poll FW state to ensure correct MCU status before downloading the ROM patch. This is a prerequisite for enabling MT7902 PCIe and has been validated on MT7921 and MT7925 since they share the common code path. Signed-off-by: Sean Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -925,6 +925,13 @@ int mt792x_load_firmware(struct mt792x_dev *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
mt76_connac_mcu_restart(&dev->mt76);
|
||||
|
||||
if (!mt76_poll_msec(dev, MT_CONN_ON_MISC, MT_TOP_MISC_FW_STATE,
|
||||
MT_TOP_MISC2_FW_PWR_ON, 1000))
|
||||
dev_warn(dev->mt76.dev,
|
||||
"MCU is not ready for firmware download\n");
|
||||
|
||||
ret = mt76_connac2_load_patch(&dev->mt76, mt792x_patch_name(dev));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user