package: fix insmod on install
[openwrt.git] / target / linux / ramips / patches-3.8 / 0114-MIPS-ralink-add-cpu-feature-overrides.h.patch
1 From 33c525913af22d1b799a7218ee48579c22a50cf8 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/137] MIPS: ralink: add cpu-feature-overrides.h
5
6 Add cpu-feature-overrides.h for RT288x, RT305x and RT3883.
7
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/
11 ---
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
20
21 --- /dev/null
22 +++ b/arch/mips/include/asm/mach-ralink/rt288x/cpu-feature-overrides.h
23 @@ -0,0 +1,56 @@
24 +/*
25 + * Ralink RT288x specific CPU feature overrides
26 + *
27 + * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
28 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
29 + *
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
33 + *
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.
37 + *
38 + */
39 +#ifndef _RT288X_CPU_FEATURE_OVERRIDES_H
40 +#define _RT288X_CPU_FEATURE_OVERRIDES_H
41 +
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
53 +
54 +#define cpu_has_prefetch       1
55 +#define cpu_has_ejtag          1
56 +#define cpu_has_llsc           1
57 +
58 +#define cpu_has_mips16         1
59 +#define cpu_has_mdmx           0
60 +#define cpu_has_mips3d         0
61 +#define cpu_has_smartmips      0
62 +
63 +#define cpu_has_mips32r1       1
64 +#define cpu_has_mips32r2       1
65 +#define cpu_has_mips64r1       0
66 +#define cpu_has_mips64r2       0
67 +
68 +#define cpu_has_dsp            0
69 +#define cpu_has_mipsmt         0
70 +
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
75 +
76 +#define cpu_dcache_line_size() 16
77 +#define cpu_icache_line_size() 16
78 +
79 +#endif /* _RT288X_CPU_FEATURE_OVERRIDES_H */
80 --- /dev/null
81 +++ b/arch/mips/include/asm/mach-ralink/rt305x/cpu-feature-overrides.h
82 @@ -0,0 +1,56 @@
83 +/*
84 + * Ralink RT305x specific CPU feature overrides
85 + *
86 + * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
87 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
88 + *
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
92 + *
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.
96 + *
97 + */
98 +#ifndef _RT305X_CPU_FEATURE_OVERRIDES_H
99 +#define _RT305X_CPU_FEATURE_OVERRIDES_H
100 +
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
112 +
113 +#define cpu_has_prefetch       1
114 +#define cpu_has_ejtag          1
115 +#define cpu_has_llsc           1
116 +
117 +#define cpu_has_mips16         1
118 +#define cpu_has_mdmx           0
119 +#define cpu_has_mips3d         0
120 +#define cpu_has_smartmips      0
121 +
122 +#define cpu_has_mips32r1       1
123 +#define cpu_has_mips32r2       1
124 +#define cpu_has_mips64r1       0
125 +#define cpu_has_mips64r2       0
126 +
127 +#define cpu_has_dsp            1
128 +#define cpu_has_mipsmt         0
129 +
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
134 +
135 +#define cpu_dcache_line_size() 32
136 +#define cpu_icache_line_size() 32
137 +
138 +#endif /* _RT305X_CPU_FEATURE_OVERRIDES_H */
139 --- /dev/null
140 +++ b/arch/mips/include/asm/mach-ralink/rt3883/cpu-feature-overrides.h
141 @@ -0,0 +1,55 @@
142 +/*
143 + * Ralink RT3662/RT3883 specific CPU feature overrides
144 + *
145 + * Copyright (C) 2011-2013 Gabor Juhos <juhosg@openwrt.org>
146 + *
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
150 + *
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.
154 + *
155 + */
156 +#ifndef _RT3883_CPU_FEATURE_OVERRIDES_H
157 +#define _RT3883_CPU_FEATURE_OVERRIDES_H
158 +
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
170 +
171 +#define cpu_has_prefetch       1
172 +#define cpu_has_ejtag          1
173 +#define cpu_has_llsc           1
174 +
175 +#define cpu_has_mips16         1
176 +#define cpu_has_mdmx           0
177 +#define cpu_has_mips3d         0
178 +#define cpu_has_smartmips      0
179 +
180 +#define cpu_has_mips32r1       1
181 +#define cpu_has_mips32r2       1
182 +#define cpu_has_mips64r1       0
183 +#define cpu_has_mips64r2       0
184 +
185 +#define cpu_has_dsp            1
186 +#define cpu_has_mipsmt         0
187 +
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
192 +
193 +#define cpu_dcache_line_size() 32
194 +#define cpu_icache_line_size() 32
195 +
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)
200  # Ralink RT288x
201  #
202  load-$(CONFIG_SOC_RT288X)      += 0xffffffff88000000
203 +cflags-$(CONFIG_SOC_RT288X)    += -I$(srctree)/arch/mips/include/asm/mach-ralink/rt288x
204  
205  #
206  # Ralink RT305x
207  #
208  load-$(CONFIG_SOC_RT305X)      += 0xffffffff80000000
209 +cflags-$(CONFIG_SOC_RT305X)    += -I$(srctree)/arch/mips/include/asm/mach-ralink/rt305x
210  
211  #
212  # Ralink RT3883
213  #
214  load-$(CONFIG_SOC_RT3883)      += 0xffffffff80000000
215 +cflags-$(CONFIG_SOC_RT3883)    += -I$(srctree)/arch/mips/include/asm/mach-ralink/rt3883
216  
217  #
218  # Ralink MT7620