MIPS: ralink: add a helper for reading the ECO version
authorJohn Crispin <blogic@openwrt.org>
Sun, 16 Mar 2014 04:53:02 +0000 (04:53 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 24 Nov 2014 06:45:19 +0000 (07:45 +0100)
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>
arch/mips/include/asm/mach-ralink/mt7620.h

index 6f9b24f..7ff9290 100644 (file)
 #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