From: John Crispin Date: Sun, 16 Mar 2014 04:53:02 +0000 (+0000) Subject: MIPS: ralink: add a helper for reading the ECO version X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2920b83d35e24ec80777625ab809ce7dcf08a84a;p=linux-beck.git 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 --- 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