[PATCH v2 02/11] mt76: mt7915: refine register definition

Ben Greear greearb at candelatech.com
Fri Nov 12 12:05:13 PST 2021


On 11/5/21 3:02 AM, Bo Jiao wrote:
> From: Bo Jiao <Bo.Jiao at mediatek.com>
> 
> 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 at 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 at 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 at 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 <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com




More information about the Linux-mediatek mailing list