The RT6352 wireless core included in all MT7620 chips is implemented differently in MT7620A (TFBGA) and MT7620N (DR-QFN). Hence provide accessor functions similar to the already existing mt7620_get_eco() function which allow the rt2x00 wireless driver to figure out which WiSoC it is being run on. Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx> --- arch/mips/include/asm/mach-ralink/mt7620.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/mips/include/asm/mach-ralink/mt7620.h b/arch/mips/include/asm/mach-ralink/mt7620.h index 66af4ccb5c6c..d0310a92a63f 100644 --- a/arch/mips/include/asm/mach-ralink/mt7620.h +++ b/arch/mips/include/asm/mach-ralink/mt7620.h @@ -137,4 +137,16 @@ static inline int mt7620_get_eco(void) return rt_sysc_r32(SYSC_REG_CHIP_REV) & CHIP_REV_ECO_MASK; } +static inline int mt7620_get_chipver(void) +{ + return (rt_sysc_r32(SYSC_REG_CHIP_REV) >> CHIP_REV_VER_SHIFT) & + CHIP_REV_VER_MASK; +} + +static inline int mt7620_get_pkg(void) +{ + return (rt_sysc_r32(SYSC_REG_CHIP_REV) >> CHIP_REV_PKG_SHIFT) & + CHIP_REV_PKG_MASK; +} + #endif -- 2.19.1