mt7603: more mac init

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2015-12-07 03:01:15 +01:00
parent bb8f947cc5
commit 02a3f14162
2 changed files with 15 additions and 7 deletions
+8 -7
View File
@@ -41,17 +41,18 @@ wait_for_wpdma(struct mt7603_dev *dev)
static int
mt7603_mac_reset(struct mt7603_dev *dev)
{
u32 val;
mt76_wr(dev, MT_WPDMA_GLO_CFG, 0x52000850);
mt76_wr(dev, MT_DMA_DCR0, 0x1000);
mt76_rmw(dev, MT_DMA_DCR0, 0xffff, 0xc0211000);
mt76_wr(dev, MT_DMA_DCR1, GENMASK(13, 11));
val = mt76_rr(dev, MT_DMA_VCFR0);
val &= ~BIT(0); /* To HIF */
val |= BIT(13); /* Rx Ring 1 */
mt76_wr(dev, MT_DMA_VCFR0, val);
mt76_rmw(dev, MT_DMA_VCFR0, BIT(0), BIT(13));
mt76_rmw(dev, MT_DMA_TMCFR0, BIT(0) | BIT(1), BIT(13));
mt76_clear(dev, MT_WF_RMAC_TMR_PA, BIT(31));
mt76_set(dev, MT_WF_RMAC_RMACDR, BIT(30));
mt76_rmw(dev, MT_WF_RMAC_MAXMINLEN, 0xffffff, 0x19000);
return 0;
}
+7
View File
@@ -79,6 +79,13 @@
#define MT_DMA_DCR1 MT_WF_DMA(0x004)
#define MT_DMA_RCFR0 MT_WF_DMA(0x070)
#define MT_DMA_VCFR0 MT_WF_DMA(0x07c)
#define MT_DMA_TMCFR0 MT_WF_DMA(0x088)
#define MT_WF_RMAC_BASE 0x21800
#define MT_WF_RMAC(ofs) (MT_WF_RMAC_BASE + (ofs))
#define MT_WF_RMAC_RMACDR MT_WF_RMAC(0x078)
#define MT_WF_RMAC_MAXMINLEN MT_WF_RMAC(0x098)
#define MT_WF_RMAC_TMR_PA MT_WF_RMAC(0x0e0)
#define MT_PCIE_REMAP_BASE_1 0x40000
#define MT_PCIE_REMAP_BASE_2 0x80000