From 2920b83d35e24ec80777625ab809ce7dcf08a84a Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 16 Mar 2014 04:53:02 +0000 Subject: [PATCH] MIPS: ralink: add a helper for reading the ECO version Signed-off-by: John Crispin Patchwork: http://patchwork.linux-mips.org/patch/8000/ Signed-off-by: Ralf Baechle --- arch/mips/include/asm/mach-ralink/mt7620.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/mips/include/asm/mach-ralink/mt7620.h b/arch/mips/include/asm/mach-ralink/mt7620.h index 6f9b24f..7ff9290 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 -- 2.7.4