mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 20:34:23 -04:00
mt76: mt7615: fix mt7615_driver_own routine
Introduce MT_PCIE_DOORBELL_PUSH register to fix mt7615_driver_own
routine for mt7663e
Fixes: f40ac0f3d3 ("mt76: mt7615: introduce mt7663e support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
8f997dddc0
commit
3380616191
@@ -1686,16 +1686,20 @@ static void mt7622_trigger_hif_int(struct mt7615_dev *dev, bool en)
|
||||
|
||||
static int mt7615_driver_own(struct mt7615_dev *dev)
|
||||
{
|
||||
struct mt76_dev *mdev = &dev->mt76;
|
||||
u32 addr;
|
||||
|
||||
addr = is_mt7663(&dev->mt76) ? MT_CONN_HIF_ON_LPCTL : MT_CFG_LPCR_HOST;
|
||||
addr = is_mt7663(mdev) ? MT_PCIE_DOORBELL_PUSH : MT_CFG_LPCR_HOST;
|
||||
mt76_wr(dev, addr, MT_CFG_LPCR_HOST_DRV_OWN);
|
||||
|
||||
mt7622_trigger_hif_int(dev, true);
|
||||
|
||||
addr = is_mt7663(mdev) ? MT_CONN_HIF_ON_LPCTL : MT_CFG_LPCR_HOST;
|
||||
if (!mt76_poll_msec(dev, addr, MT_CFG_LPCR_HOST_FW_OWN, 0, 3000)) {
|
||||
dev_err(dev->mt76.dev, "Timeout for driver own\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
mt7622_trigger_hif_int(dev, false);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -68,6 +68,7 @@ enum mt7615_reg_base {
|
||||
#define MT_HIF2_BASE 0xf0000
|
||||
#define MT_HIF2(ofs) (MT_HIF2_BASE + (ofs))
|
||||
#define MT_PCIE_IRQ_ENABLE MT_HIF2(0x188)
|
||||
#define MT_PCIE_DOORBELL_PUSH MT_HIF2(0x1484)
|
||||
|
||||
#define MT_CFG_LPCR_HOST MT_HIF(0x1f0)
|
||||
#define MT_CFG_LPCR_HOST_FW_OWN BIT(0)
|
||||
|
||||
Reference in New Issue
Block a user