Skip to content

Commit d31a49d

Browse files
Ansuelkuba-moo
authored andcommitted
net: airoha: Fix wrong GDM4 register definition
Fix wrong GDM4 register definition, in Airoha SDK GDM4 is defined at offset 0x2400 but this doesn't make sense as it does conflict with the CDM4 that is in the same location. Following the pattern where each GDM base is at the FWD_CFG, currently GDM4 base offset is set to 0x2500. This is correct but REG_GDM4_FWD_CFG and REG_GDM4_SRC_PORT_SET are still using the SDK reference with the 0x2400 offset. Fix these 2 define by subtracting 0x100 to each register to reflect the real address location. Fixes: 23020f0 ("net: airoha: Introduce ethernet support for EN7581 SoC") Signed-off-by: Christian Marangi <[email protected]> Acked-by: Lorenzo Bianconi <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 110b43e commit d31a49d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mediatek/airoha_eth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,11 @@
266266
#define REG_GDM3_FWD_CFG GDM3_BASE
267267
#define GDM3_PAD_EN_MASK BIT(28)
268268

269-
#define REG_GDM4_FWD_CFG (GDM4_BASE + 0x100)
269+
#define REG_GDM4_FWD_CFG GDM4_BASE
270270
#define GDM4_PAD_EN_MASK BIT(28)
271271
#define GDM4_SPORT_OFFSET0_MASK GENMASK(11, 8)
272272

273-
#define REG_GDM4_SRC_PORT_SET (GDM4_BASE + 0x33c)
273+
#define REG_GDM4_SRC_PORT_SET (GDM4_BASE + 0x23c)
274274
#define GDM4_SPORT_OFF2_MASK GENMASK(19, 16)
275275
#define GDM4_SPORT_OFF1_MASK GENMASK(15, 12)
276276
#define GDM4_SPORT_OFF0_MASK GENMASK(11, 8)

0 commit comments

Comments
 (0)