de1cd528733a9c25316ed34134b009cfd8d60255
[openwrt/openwrt.git] / target / linux / lantiq / patches-3.14 / 0010-MIPS-lantiq-export-soc-type.patch
1 From 6804142b47f2634b0657e4dfcec7a34e982b6ddb Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Wed, 10 Sep 2014 22:29:21 +0200
4 Subject: [PATCH 10/36] MIPS: lantiq: export soc type
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 ---
11 arch/mips/include/asm/mach-lantiq/lantiq.h | 2 ++
12 arch/mips/lantiq/prom.c | 5 +++++
13 2 files changed, 7 insertions(+)
14
15 diff --git a/arch/mips/include/asm/mach-lantiq/lantiq.h b/arch/mips/include/asm/mach-lantiq/lantiq.h
16 index f196cce..4e5ae65 100644
17 --- a/arch/mips/include/asm/mach-lantiq/lantiq.h
18 +++ b/arch/mips/include/asm/mach-lantiq/lantiq.h
19 @@ -48,6 +48,8 @@ extern struct clk *clk_get_ppe(void);
20 extern unsigned char ltq_boot_select(void);
21 /* find out what caused the last cpu reset */
22 extern int ltq_reset_cause(void);
23 +/* find out the soc type */
24 +extern int ltq_soc_type(void);
25
26 #define IOPORT_RESOURCE_START 0x10000000
27 #define IOPORT_RESOURCE_END 0xffffffff
28 diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c
29 index 227feed..4c652c6 100644
30 --- a/arch/mips/lantiq/prom.c
31 +++ b/arch/mips/lantiq/prom.c
32 @@ -36,6 +36,11 @@ const char *get_system_type(void)
33 return soc_info.sys_type;
34 }
35
36 +int ltq_soc_type(void)
37 +{
38 + return soc_info.type;
39 +}
40 +
41 void prom_free_prom_memory(void)
42 {
43 }
44 --
45 1.7.10.4
46