mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
ed57a9f6a8
This is an automatically generated commit which aids following Kernel patch history, as git will see the move and copy as a rename thus defeating the purpose. See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html for the original discussion. Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
20 lines
506 B
Diff
20 lines
506 B
Diff
--- a/arch/mips/include/asm/mach-ralink/mt7620.h
|
|
+++ b/arch/mips/include/asm/mach-ralink/mt7620.h
|
|
@@ -61,4 +61,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
|