diff options
author | John Crispin <blogic@openwrt.org> | 2014-03-16 08:53:02 +0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 09:45:19 +0300 |
commit | 2920b83d35e24ec80777625ab809ce7dcf08a84a (patch) | |
tree | 8711ce73814f76ed61db1d8d97572c8d115c0163 /arch/mips/include/asm/mach-ralink | |
parent | 2adf550f2669645eaca7559c9ce7fc2e1dbfc636 (diff) | |
download | linux-2920b83d35e24ec80777625ab809ce7dcf08a84a.tar.xz |
MIPS: ralink: add a helper for reading the ECO version
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/8000/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/mach-ralink')
-rw-r--r-- | arch/mips/include/asm/mach-ralink/mt7620.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-ralink/mt7620.h b/arch/mips/include/asm/mach-ralink/mt7620.h index 6f9b24f51157..7ff929005d15 100644 --- a/arch/mips/include/asm/mach-ralink/mt7620.h +++ b/arch/mips/include/asm/mach-ralink/mt7620.h @@ -105,4 +105,9 @@ #define MT7620_GPIO_MODE_EPHY BIT(15) #define MT7620_GPIO_MODE_WDT BIT(22) +static inline int mt7620_get_eco(void) +{ + return rt_sysc_r32(SYSC_REG_CHIP_REV) & CHIP_REV_ECO_MASK; +} + #endif |