mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: connac2: add per-chip PCIe register definitions
Add MT_PCIE_MAC_{INT_ENABLE,PM} definitions to mt7921/regs.h and
wire up mt7921_pcie_reg in mt7921_pci_probe() to provide connac2
series chips with their own PCIe register definitions.
This is a preparation patch before enabling MT7928 PCIe support.
Signed-off-by: Xiong <[email protected]>
Signed-off-by: Emery Hsin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
610830a7da
commit
eacf301a0b
@@ -286,6 +286,10 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
|
|||||||
.drv_own = mt792xe_mcu_drv_pmctrl,
|
.drv_own = mt792xe_mcu_drv_pmctrl,
|
||||||
.fw_own = mt792xe_mcu_fw_pmctrl,
|
.fw_own = mt792xe_mcu_fw_pmctrl,
|
||||||
};
|
};
|
||||||
|
static const struct mt792x_pcie_reg mt7921_pcie_reg = {
|
||||||
|
.imask = MT_PCIE_MAC_INT_ENABLE,
|
||||||
|
.pm = MT_PCIE_MAC_PM,
|
||||||
|
};
|
||||||
static const struct mt792x_irq_map irq_map = {
|
static const struct mt792x_irq_map irq_map = {
|
||||||
.host_irq_enable = MT_WFDMA0_HOST_INT_ENA,
|
.host_irq_enable = MT_WFDMA0_HOST_INT_ENA,
|
||||||
.tx = {
|
.tx = {
|
||||||
@@ -355,6 +359,7 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
|
|||||||
|
|
||||||
dev->fw_features = features;
|
dev->fw_features = features;
|
||||||
dev->hif_ops = &mt7921_pcie_ops;
|
dev->hif_ops = &mt7921_pcie_ops;
|
||||||
|
dev->pcie_reg = &mt7921_pcie_reg;
|
||||||
dev->irq_map = &irq_map;
|
dev->irq_map = &irq_map;
|
||||||
mt76_mmio_init(&dev->mt76, regs);
|
mt76_mmio_init(&dev->mt76, regs);
|
||||||
|
|
||||||
|
|||||||
@@ -78,4 +78,9 @@
|
|||||||
#define MT_WTBL_UPDATE_WLAN_IDX GENMASK(9, 0)
|
#define MT_WTBL_UPDATE_WLAN_IDX GENMASK(9, 0)
|
||||||
#define MT_WTBL_UPDATE_ADM_COUNT_CLEAR BIT(12)
|
#define MT_WTBL_UPDATE_ADM_COUNT_CLEAR BIT(12)
|
||||||
|
|
||||||
|
#define MT_PCIE_MAC_BASE 0x10000
|
||||||
|
#define MT_PCIE_MAC(ofs) (MT_PCIE_MAC_BASE + (ofs))
|
||||||
|
#define MT_PCIE_MAC_INT_ENABLE MT_PCIE_MAC(0x188)
|
||||||
|
#define MT_PCIE_MAC_PM MT_PCIE_MAC(0x194)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user