1 From f5d5b8b69f5b11fdd810a1a56eff91077ad5ba84 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Wed, 10 Apr 2013 09:19:07 +0200
4 Subject: [PATCH 114/164] MIPS: ralink: add cpu-feature-overrides.h
6 Add cpu-feature-overrides.h for RT288x, RT305x and RT3883.
8 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 Patchwork: http://patchwork.linux-mips.org/patch/5175/
12 .../asm/mach-ralink/rt288x/cpu-feature-overrides.h | 56 ++++++++++++++++++++
13 .../asm/mach-ralink/rt305x/cpu-feature-overrides.h | 56 ++++++++++++++++++++
14 .../asm/mach-ralink/rt3883/cpu-feature-overrides.h | 55 +++++++++++++++++++
15 arch/mips/ralink/Platform | 3 ++
16 4 files changed, 170 insertions(+)
17 create mode 100644 arch/mips/include/asm/mach-ralink/rt288x/cpu-feature-overrides.h
18 create mode 100644 arch/mips/include/asm/mach-ralink/rt305x/cpu-feature-overrides.h
19 create mode 100644 arch/mips/include/asm/mach-ralink/rt3883/cpu-feature-overrides.h
22 +++ b/arch/mips/include/asm/mach-ralink/rt288x/cpu-feature-overrides.h
25 + * Ralink RT288x specific CPU feature overrides
27 + * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
28 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
30 + * This file was derived from: include/asm-mips/cpu-features.h
31 + * Copyright (C) 2003, 2004 Ralf Baechle
32 + * Copyright (C) 2004 Maciej W. Rozycki
34 + * This program is free software; you can redistribute it and/or modify it
35 + * under the terms of the GNU General Public License version 2 as published
36 + * by the Free Software Foundation.
39 +#ifndef _RT288X_CPU_FEATURE_OVERRIDES_H
40 +#define _RT288X_CPU_FEATURE_OVERRIDES_H
42 +#define cpu_has_tlb 1
43 +#define cpu_has_4kex 1
44 +#define cpu_has_3k_cache 0
45 +#define cpu_has_4k_cache 1
46 +#define cpu_has_tx39_cache 0
47 +#define cpu_has_sb1_cache 0
48 +#define cpu_has_fpu 0
49 +#define cpu_has_32fpr 0
50 +#define cpu_has_counter 1
51 +#define cpu_has_watch 1
52 +#define cpu_has_divec 1
54 +#define cpu_has_prefetch 1
55 +#define cpu_has_ejtag 1
56 +#define cpu_has_llsc 1
58 +#define cpu_has_mips16 1
59 +#define cpu_has_mdmx 0
60 +#define cpu_has_mips3d 0
61 +#define cpu_has_smartmips 0
63 +#define cpu_has_mips32r1 1
64 +#define cpu_has_mips32r2 1
65 +#define cpu_has_mips64r1 0
66 +#define cpu_has_mips64r2 0
68 +#define cpu_has_dsp 0
69 +#define cpu_has_mipsmt 0
71 +#define cpu_has_64bits 0
72 +#define cpu_has_64bit_zero_reg 0
73 +#define cpu_has_64bit_gp_regs 0
74 +#define cpu_has_64bit_addresses 0
76 +#define cpu_dcache_line_size() 16
77 +#define cpu_icache_line_size() 16
79 +#endif /* _RT288X_CPU_FEATURE_OVERRIDES_H */
81 +++ b/arch/mips/include/asm/mach-ralink/rt305x/cpu-feature-overrides.h
84 + * Ralink RT305x specific CPU feature overrides
86 + * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
87 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
89 + * This file was derived from: include/asm-mips/cpu-features.h
90 + * Copyright (C) 2003, 2004 Ralf Baechle
91 + * Copyright (C) 2004 Maciej W. Rozycki
93 + * This program is free software; you can redistribute it and/or modify it
94 + * under the terms of the GNU General Public License version 2 as published
95 + * by the Free Software Foundation.
98 +#ifndef _RT305X_CPU_FEATURE_OVERRIDES_H
99 +#define _RT305X_CPU_FEATURE_OVERRIDES_H
101 +#define cpu_has_tlb 1
102 +#define cpu_has_4kex 1
103 +#define cpu_has_3k_cache 0
104 +#define cpu_has_4k_cache 1
105 +#define cpu_has_tx39_cache 0
106 +#define cpu_has_sb1_cache 0
107 +#define cpu_has_fpu 0
108 +#define cpu_has_32fpr 0
109 +#define cpu_has_counter 1
110 +#define cpu_has_watch 1
111 +#define cpu_has_divec 1
113 +#define cpu_has_prefetch 1
114 +#define cpu_has_ejtag 1
115 +#define cpu_has_llsc 1
117 +#define cpu_has_mips16 1
118 +#define cpu_has_mdmx 0
119 +#define cpu_has_mips3d 0
120 +#define cpu_has_smartmips 0
122 +#define cpu_has_mips32r1 1
123 +#define cpu_has_mips32r2 1
124 +#define cpu_has_mips64r1 0
125 +#define cpu_has_mips64r2 0
127 +#define cpu_has_dsp 1
128 +#define cpu_has_mipsmt 0
130 +#define cpu_has_64bits 0
131 +#define cpu_has_64bit_zero_reg 0
132 +#define cpu_has_64bit_gp_regs 0
133 +#define cpu_has_64bit_addresses 0
135 +#define cpu_dcache_line_size() 32
136 +#define cpu_icache_line_size() 32
138 +#endif /* _RT305X_CPU_FEATURE_OVERRIDES_H */
140 +++ b/arch/mips/include/asm/mach-ralink/rt3883/cpu-feature-overrides.h
143 + * Ralink RT3662/RT3883 specific CPU feature overrides
145 + * Copyright (C) 2011-2013 Gabor Juhos <juhosg@openwrt.org>
147 + * This file was derived from: include/asm-mips/cpu-features.h
148 + * Copyright (C) 2003, 2004 Ralf Baechle
149 + * Copyright (C) 2004 Maciej W. Rozycki
151 + * This program is free software; you can redistribute it and/or modify it
152 + * under the terms of the GNU General Public License version 2 as published
153 + * by the Free Software Foundation.
156 +#ifndef _RT3883_CPU_FEATURE_OVERRIDES_H
157 +#define _RT3883_CPU_FEATURE_OVERRIDES_H
159 +#define cpu_has_tlb 1
160 +#define cpu_has_4kex 1
161 +#define cpu_has_3k_cache 0
162 +#define cpu_has_4k_cache 1
163 +#define cpu_has_tx39_cache 0
164 +#define cpu_has_sb1_cache 0
165 +#define cpu_has_fpu 0
166 +#define cpu_has_32fpr 0
167 +#define cpu_has_counter 1
168 +#define cpu_has_watch 1
169 +#define cpu_has_divec 1
171 +#define cpu_has_prefetch 1
172 +#define cpu_has_ejtag 1
173 +#define cpu_has_llsc 1
175 +#define cpu_has_mips16 1
176 +#define cpu_has_mdmx 0
177 +#define cpu_has_mips3d 0
178 +#define cpu_has_smartmips 0
180 +#define cpu_has_mips32r1 1
181 +#define cpu_has_mips32r2 1
182 +#define cpu_has_mips64r1 0
183 +#define cpu_has_mips64r2 0
185 +#define cpu_has_dsp 1
186 +#define cpu_has_mipsmt 0
188 +#define cpu_has_64bits 0
189 +#define cpu_has_64bit_zero_reg 0
190 +#define cpu_has_64bit_gp_regs 0
191 +#define cpu_has_64bit_addresses 0
193 +#define cpu_dcache_line_size() 32
194 +#define cpu_icache_line_size() 32
196 +#endif /* _RT3883_CPU_FEATURE_OVERRIDES_H */
197 --- a/arch/mips/ralink/Platform
198 +++ b/arch/mips/ralink/Platform
199 @@ -8,16 +8,19 @@ cflags-$(CONFIG_RALINK) += -I$(srctree)
202 load-$(CONFIG_SOC_RT288X) += 0xffffffff88000000
203 +cflags-$(CONFIG_SOC_RT288X) += -I$(srctree)/arch/mips/include/asm/mach-ralink/rt288x
208 load-$(CONFIG_SOC_RT305X) += 0xffffffff80000000
209 +cflags-$(CONFIG_SOC_RT305X) += -I$(srctree)/arch/mips/include/asm/mach-ralink/rt305x
214 load-$(CONFIG_SOC_RT3883) += 0xffffffff80000000
215 +cflags-$(CONFIG_SOC_RT3883) += -I$(srctree)/arch/mips/include/asm/mach-ralink/rt3883