2022-03-27 19:26:31 +00:00
|
|
|
--- a/arch/mips/include/asm/mach-ralink/mt7620.h
|
|
|
|
+++ b/arch/mips/include/asm/mach-ralink/mt7620.h
|
2023-06-17 11:30:59 +00:00
|
|
|
@@ -61,4 +61,16 @@ static inline int mt7620_get_eco(void)
|
2022-03-27 19:26:31 +00:00
|
|
|
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
|