aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-12-09 17:29:03 +0000
committerJohn Crispin <blogic@openwrt.org>2013-12-09 17:29:03 +0000
commit0c6b6702e33fb8aa9cf53f397c000b36c4f9ea0b (patch)
tree20def6005a9f7de1c3b3ae96b01ef99c5b0b7774 /target/linux/ramips
parentdbd8651cdfa6e8444853429bde37979ef3ea1bd4 (diff)
downloadmaster-187ad058-0c6b6702e33fb8aa9cf53f397c000b36c4f9ea0b.tar.gz
master-187ad058-0c6b6702e33fb8aa9cf53f397c000b36c4f9ea0b.tar.bz2
master-187ad058-0c6b6702e33fb8aa9cf53f397c000b36c4f9ea0b.zip
ralink: add helper that identifies the mt7620 ECO
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39014 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/patches-3.10/800-eco.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-3.10/800-eco.patch b/target/linux/ramips/patches-3.10/800-eco.patch
new file mode 100644
index 0000000000..cb78d2e32d
--- /dev/null
+++ b/target/linux/ramips/patches-3.10/800-eco.patch
@@ -0,0 +1,14 @@
+Index: linux-3.10.18/arch/mips/include/asm/mach-ralink/mt7620.h
+===================================================================
+--- linux-3.10.18.orig/arch/mips/include/asm/mach-ralink/mt7620.h 2013-12-06 16:20:27.753388970 +0100
++++ linux-3.10.18/arch/mips/include/asm/mach-ralink/mt7620.h 2013-12-06 16:21:14.021390074 +0100
+@@ -101,4 +101,9 @@
+ #define MT7620_GPIO_MODE_EPHY 15
+ #define MT7620_GPIO_MODE_PA 20
+
++static inline int mt7620_get_eco(void)
++{
++ return rt_sysc_r32(SYSC_REG_CHIP_REV) & CHIP_REV_ECO_MASK;
++}
++
+ #endif