Re: [PATCH v2 02/11] mt76: mt7915: refine register definition
From: Ben Greear <hidden>
Date: 2021-11-12 20:05:27
Also in:
linux-mediatek
On 11/5/21 3:02 AM, Bo Jiao wrote:
From: Bo Jiao <redacted> Add mt7915_reg_desc to differentiate chip generations. This is an intermediate patch to introduce mt7916 support.
While merging this into my patched tree, I noticed this discrepency,
it seems this patch is changing the value for SDR32/33 and/or confusing
SDR32 with SDR33.
Is this on purpose?
[greearb@ben-dt4 linux-5.16.dev.y]$ git am --show-current-patch|grep 088
+ [MIB_SDR32] = { INVALID_BASE, 0x088 },
-#define MT_MIB_SDR32(_band) MT_WF_MIB(_band, 0x088)
+#define MT_MIB_SDR33(_band) MT_WF_MIB(_band, 0x088)
[greearb@ben-dt4 linux-5.16.dev.y]$ git am --show-current-patch|grep SDR32
cnt = mt76_rr(dev, MT_MIB_SDR32(ext_phy));
mib->tx_pkt_ebf_cnt += FIELD_GET(MT_MIB_SDR32_TX_PKT_EBF_CNT_MASK, cnt);
+ [MIB_SDR32] = { INVALID_BASE, 0x088 },
+ [MIB_SDR32] = { INVALID_BASE, 0x7a8 },
+ MIB_SDR32,
-#define MT_MIB_SDR32(_band) MT_WF_MIB(_band, 0x088)
+#define MT_MIB_SDR32(_band) MT_WF_MIB(_band, __REG_OFFS(dev, MIB_SDR32))
#define MT_MIB_SDR32_TX_PKT_EBF_CNT_MASK GENMASK(15, 0)
+#define MT_MIB_SDR32_TX_PKT_IBF_CNT_MASK __MASK(dev, MIB_BF_TX_CNT)
[greearb@ben-dt4 linux-5.16.dev.y]$ git am --show-current-patch|grep SDR33
- cnt = mt76_rr(dev, MT_MIB_SDR33(ext_phy));
- mib->tx_pkt_ibf_cnt += FIELD_GET(MT_MIB_SDR33_TX_PKT_IBF_CNT_MASK, cnt);
+ cnt = mt76_rr(dev, MT_MIB_SDR33(ext_phy));
-#define MT_MIB_SDR33(_band) MT_WF_MIB(_band, 0x08c)
-#define MT_MIB_SDR33_TX_PKT_IBF_CNT_MASK GENMASK(15, 0)
+#define MT_MIB_SDR33(_band) MT_WF_MIB(_band, 0x088)
Thanks,
Ben
--
Ben Greear [off-list ref]
Candela Technologies Inc http://www.candelatech.com