summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/arch/rlx/include/asm/cpu-features.h
blob: 412ef6b9ad224da2f70561f058a6a648384cfabe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2003, 2004 Ralf Baechle
 * Copyright (C) 2004  Maciej W. Rozycki
 */
#ifndef __ASM_CPU_FEATURES_H
#define __ASM_CPU_FEATURES_H

#include <asm/cpu.h>
#include <asm/cpu-info.h>
#include <bspcpu.h>

#ifndef current_cpu_type
#define current_cpu_type()      current_cpu_data.cputype
#endif

#define cpu_has_tlb               1
#define cpu_has_3k_cache	      1
#define cpu_has_mips16            1

#ifdef CONFIG_CPU_HAS_EJTAG
#define cpu_has_ejtag		      1
#else
#define cpu_has_ejtag		      0
#endif

#ifdef CONFIG_CPU_HAS_LLSC
#define cpu_has_llsc	      	  1
#else
#define cpu_has_llsc		      0
#endif

#ifndef cpu_dcache_line_size
#define cpu_dcache_line_size()	cpu_dcache_line
#endif
#ifndef cpu_icache_line_size
#define cpu_icache_line_size()	cpu_icache_line
#endif
#ifndef cpu_scache_line_size
#define cpu_scache_line_size()	cpu_scache_line
#endif

#ifndef cpu_scache_line
#define cpu_scache_line 0
#endif

#ifndef cpu_dcache_line
#define cpu_dcache_line 0
#endif

#ifndef cpu_icache_line
#define cpu_icache_line 0
#endif

#ifndef cpu_scache_size
#define cpu_scache_size 0
#endif

#ifndef cpu_dcache_size
#define cpu_dcache_size 0
#endif

#ifndef cpu_icache_size
#define cpu_icache_size 0
#endif

#ifndef cpu_tlb_entry
#define cpu_tlb_entry 0
#endif

/* tonywu: below does not matter, should set to zero except icache snoop */
#define cpu_has_4kex             0
#define cpu_has_4k_cache         0
#define cpu_has_6k_cache         0
#define cpu_has_8k_cache         0
#define cpu_has_tx39_cache       0
#define cpu_has_octeon_cache     0
#define cpu_has_fpu              0
#define raw_cpu_has_fpu          0
#define cpu_has_32fpr            0
#define cpu_has_counter		     0
#define cpu_has_watch	     	 0
#define cpu_has_divec	     	 0
#define cpu_has_vce              0	
#define cpu_has_cache_cdex_p     0
#define cpu_has_cache_cdex_s     0
#define cpu_has_prefetch         0
#define cpu_has_mcheck           0
#define cpu_has_mdmx             0
#define cpu_has_mips3d           0
#define cpu_has_smartmips        0
#define cpu_has_vtag_icache	     0
#define cpu_has_dc_aliases	     0
#define cpu_has_ic_fills_f_dc	 0
#define cpu_has_pindexed_dcache	 0

/*
 * I-Cache snoops remote store.  This only matters on SMP.  Some multiprocessors
 * such as the R10000 have I-Caches that snoop local stores; the embedded ones
 * don't.  For maintaining I-cache coherency this means we need to flush the
 * D-cache all the way back to whever the I-cache does refills from, so the
 * I-cache has a chance to see the new data at all.  Then we have to flush the
 * I-cache also.
 * Note we may have been rescheduled and may no longer be running on the CPU
 * that did the store so we can't optimize this into only doing the flush on
 * the local CPU.
 */
#define cpu_icache_snoops_remote_store	1
#define cpu_has_mips32r1	0
#define cpu_has_mips32r2	0
#define cpu_has_mips64r1	0
#define cpu_has_mips64r2	0

/*
 * Shortcuts ...
 */
#define cpu_has_mips32	(cpu_has_mips32r1 | cpu_has_mips32r2)
#define cpu_has_mips64	(cpu_has_mips64r1 | cpu_has_mips64r2)
#define cpu_has_mips_r1	(cpu_has_mips32r1 | cpu_has_mips64r1)
#define cpu_has_mips_r2	(cpu_has_mips32r2 | cpu_has_mips64r2)
#define cpu_has_mips_r	(cpu_has_mips32r1 | cpu_has_mips32r2 | \
			 cpu_has_mips64r1 | cpu_has_mips64r2)

/*
 * MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other
 * pre-MIPS32/MIPS53 processors have CLO, CLZ.  For 64-bit kernels
 * cpu_has_clo_clz also indicates the availability of DCLO and DCLZ.
 */
#define cpu_has_clo_clz	           0
#define cpu_has_dsp		           0
#define cpu_has_mipsmt             0
#define cpu_has_userlocal          0

#define cpu_has_nofpuex	           0
#define cpu_has_64bits             0 
#define cpu_has_64bit_zero_reg     0
#define cpu_has_64bit_gp_regs      0
#define cpu_has_64bit_addresses	   0

#define cpu_has_vint               0
#define cpu_has_veic               0
#define cpu_has_inclusive_pcaches  0

#endif /* __ASM_CPU_FEATURES_H */