aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-3.3/0020-MIPS-lantiq-helper-functions-for-SoC-detection.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-04-16 12:31:48 +0000
committerJohn Crispin <john@openwrt.org>2012-04-16 12:31:48 +0000
commit83948d6385c9ce23545a159ffd64f5b2854332ed (patch)
tree1d79b701055f05ca319d5ac3623af6615f394844 /target/linux/lantiq/patches-3.3/0020-MIPS-lantiq-helper-functions-for-SoC-detection.patch
parentfb2b2b958e9da0d9ea0195a0829da52a0eda667c (diff)
downloadupstream-83948d6385c9ce23545a159ffd64f5b2854332ed.tar.gz
upstream-83948d6385c9ce23545a159ffd64f5b2854332ed.tar.bz2
upstream-83948d6385c9ce23545a159ffd64f5b2854332ed.zip
adds 3.3 patches and files
SVN-Revision: 31307
Diffstat (limited to 'target/linux/lantiq/patches-3.3/0020-MIPS-lantiq-helper-functions-for-SoC-detection.patch')
-rw-r--r--target/linux/lantiq/patches-3.3/0020-MIPS-lantiq-helper-functions-for-SoC-detection.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.3/0020-MIPS-lantiq-helper-functions-for-SoC-detection.patch b/target/linux/lantiq/patches-3.3/0020-MIPS-lantiq-helper-functions-for-SoC-detection.patch
new file mode 100644
index 0000000000..d8027da206
--- /dev/null
+++ b/target/linux/lantiq/patches-3.3/0020-MIPS-lantiq-helper-functions-for-SoC-detection.patch
@@ -0,0 +1,59 @@
+From 601e5ea89b1fd6fb8047ea7c23eae6eb1c90145f Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Tue, 21 Feb 2012 14:25:03 +0100
+Subject: [PATCH 20/70] MIPS: lantiq: helper functions for SoC detection
+
+Add additional functions for runtime soc detection. We need these for the
+serial driver.
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+---
+ .../include/asm/mach-lantiq/falcon/lantiq_soc.h | 16 ++++++++++++++--
+ .../mips/include/asm/mach-lantiq/xway/lantiq_soc.h | 5 +++++
+ 2 files changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h
+index a5dc06a..0aa1f16 100644
+--- a/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h
++++ b/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h
+@@ -134,8 +134,20 @@ extern int ltq_gpio_mux_set(unsigned int pin, unsigned int mux);
+ #define LTQ_EIU_BASE_ADDR 0
+ #define LTQ_EBU_PCC_ISTAT 0
+
+-#define ltq_is_ar9() 0
+-#define ltq_is_vr9() 0
++static inline int ltq_is_ar9(void)
++{
++ return 0;
++}
++
++static inline int ltq_is_vr9(void)
++{
++ return 0;
++}
++
++static inline int ltq_is_falcon(void)
++{
++ return 1;
++}
+
+ #endif /* CONFIG_SOC_FALCON */
+ #endif /* _LTQ_XWAY_H__ */
+diff --git a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
+index 6c5b705..45e480c 100644
+--- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
++++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
+@@ -164,5 +164,10 @@ static inline int ltq_is_vr9(void)
+ return (ltq_get_soc_type() == SOC_TYPE_VR9);
+ }
+
++static inline int ltq_is_falcon(void)
++{
++ return 0;
++}
++
+ #endif /* CONFIG_SOC_TYPE_XWAY */
+ #endif /* _LTQ_XWAY_H__ */
+--
+1.7.9.1
+