1 From 601e5ea89b1fd6fb8047ea7c23eae6eb1c90145f Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Tue, 21 Feb 2012 14:25:03 +0100
4 Subject: [PATCH 20/70] MIPS: lantiq: helper functions for SoC detection
6 Add additional functions for runtime soc detection. We need these for the
9 Signed-off-by: John Crispin <blogic@openwrt.org>
11 .../include/asm/mach-lantiq/falcon/lantiq_soc.h | 16 ++++++++++++++--
12 .../mips/include/asm/mach-lantiq/xway/lantiq_soc.h | 5 +++++
13 2 files changed, 19 insertions(+), 2 deletions(-)
15 diff --git a/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h
16 index a5dc06a..0aa1f16 100644
17 --- a/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h
18 +++ b/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h
19 @@ -134,8 +134,20 @@ extern int ltq_gpio_mux_set(unsigned int pin, unsigned int mux);
20 #define LTQ_EIU_BASE_ADDR 0
21 #define LTQ_EBU_PCC_ISTAT 0
23 -#define ltq_is_ar9() 0
24 -#define ltq_is_vr9() 0
25 +static inline int ltq_is_ar9(void)
30 +static inline int ltq_is_vr9(void)
35 +static inline int ltq_is_falcon(void)
40 #endif /* CONFIG_SOC_FALCON */
41 #endif /* _LTQ_XWAY_H__ */
42 diff --git a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
43 index 6c5b705..45e480c 100644
44 --- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
45 +++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
46 @@ -164,5 +164,10 @@ static inline int ltq_is_vr9(void)
47 return (ltq_get_soc_type() == SOC_TYPE_VR9);
50 +static inline int ltq_is_falcon(void)
55 #endif /* CONFIG_SOC_TYPE_XWAY */
56 #endif /* _LTQ_XWAY_H__ */