]> git.karo-electronics.de Git - linux-beck.git/commitdiff
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 6f9b24f51157571cf9e80d77028051e06e384610..7ff929005d15e40bc03013c49f3f480c0c4fba27 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