diff options
author | DENG Qingfang <dengqf6@mail2.sysu.edu.cn> | 2020-03-01 17:01:09 +0800 |
---|---|---|
committer | Chuanhong Guo <gch981213@gmail.com> | 2020-04-04 12:04:13 +0800 |
commit | c70545f397187b36c1220ae16b4db19f39857c93 (patch) | |
tree | 752dc048ea32cf02d8cba30fc54d024ed58ce812 /target/linux/ramips/patches-5.4/300-mt7620-export-chip-version-and-pkg.patch | |
parent | b51ea43f900191bc8ce7411dad39239fac6df4f8 (diff) | |
download | upstream-c70545f397187b36c1220ae16b4db19f39857c93.tar.gz upstream-c70545f397187b36c1220ae16b4db19f39857c93.tar.bz2 upstream-c70545f397187b36c1220ae16b4db19f39857c93.zip |
ramips: copy patches and kernel config to 5.4
Copy patches and kernel config to 5.4 for ramips
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Diffstat (limited to 'target/linux/ramips/patches-5.4/300-mt7620-export-chip-version-and-pkg.patch')
-rw-r--r-- | target/linux/ramips/patches-5.4/300-mt7620-export-chip-version-and-pkg.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-5.4/300-mt7620-export-chip-version-and-pkg.patch b/target/linux/ramips/patches-5.4/300-mt7620-export-chip-version-and-pkg.patch new file mode 100644 index 0000000000..0cb1fede30 --- /dev/null +++ b/target/linux/ramips/patches-5.4/300-mt7620-export-chip-version-and-pkg.patch @@ -0,0 +1,19 @@ +--- 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 |