aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/cpu-features.h16
-rw-r--r--include/asm-mips/cpu-info.h2
-rw-r--r--include/asm-mips/cpu.h10
-rw-r--r--include/asm-mips/mipsregs.h47
4 files changed, 70 insertions, 5 deletions
diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h
index 9a2de642eee6..012deda63e68 100644
--- a/include/asm-mips/cpu-features.h
+++ b/include/asm-mips/cpu-features.h
@@ -4,6 +4,7 @@
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 2003, 2004 Ralf Baechle 6 * Copyright (C) 2003, 2004 Ralf Baechle
7 * Copyright (C) 2004 Maciej W. Rozycki
7 */ 8 */
8#ifndef __ASM_CPU_FEATURES_H 9#ifndef __ASM_CPU_FEATURES_H
9#define __ASM_CPU_FEATURES_H 10#define __ASM_CPU_FEATURES_H
@@ -39,9 +40,6 @@
39#ifndef cpu_has_watch 40#ifndef cpu_has_watch
40#define cpu_has_watch (cpu_data[0].options & MIPS_CPU_WATCH) 41#define cpu_has_watch (cpu_data[0].options & MIPS_CPU_WATCH)
41#endif 42#endif
42#ifndef cpu_has_mips16
43#define cpu_has_mips16 (cpu_data[0].options & MIPS_CPU_MIPS16)
44#endif
45#ifndef cpu_has_divec 43#ifndef cpu_has_divec
46#define cpu_has_divec (cpu_data[0].options & MIPS_CPU_DIVEC) 44#define cpu_has_divec (cpu_data[0].options & MIPS_CPU_DIVEC)
47#endif 45#endif
@@ -66,6 +64,18 @@
66#ifndef cpu_has_llsc 64#ifndef cpu_has_llsc
67#define cpu_has_llsc (cpu_data[0].options & MIPS_CPU_LLSC) 65#define cpu_has_llsc (cpu_data[0].options & MIPS_CPU_LLSC)
68#endif 66#endif
67#ifndef cpu_has_mips16
68#define cpu_has_mips16 (cpu_data[0].ases & MIPS_ASE_MIPS16)
69#endif
70#ifndef cpu_has_mdmx
71#define cpu_has_mdmx (cpu_data[0].ases & MIPS_ASE_MDMX)
72#endif
73#ifndef cpu_has_mips3d
74#define cpu_has_mips3d (cpu_data[0].ases & MIPS_ASE_MIPS3D)
75#endif
76#ifndef cpu_has_smartmips
77#define cpu_has_smartmips (cpu_data[0].ases & MIPS_ASE_SMARTMIPS)
78#endif
69#ifndef cpu_has_vtag_icache 79#ifndef cpu_has_vtag_icache
70#define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG) 80#define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG)
71#endif 81#endif
diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h
index 20a35b15a31d..d5cf519f8fcc 100644
--- a/include/asm-mips/cpu-info.h
+++ b/include/asm-mips/cpu-info.h
@@ -7,6 +7,7 @@
7 * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003 Ralf Baechle 7 * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003 Ralf Baechle
8 * Copyright (C) 1996 Paul M. Antoine 8 * Copyright (C) 1996 Paul M. Antoine
9 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 9 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
10 * Copyright (C) 2004 Maciej W. Rozycki
10 */ 11 */
11#ifndef __ASM_CPU_INFO_H 12#ifndef __ASM_CPU_INFO_H
12#define __ASM_CPU_INFO_H 13#define __ASM_CPU_INFO_H
@@ -61,6 +62,7 @@ struct cpuinfo_mips {
61 * Capability and feature descriptor structure for MIPS CPU 62 * Capability and feature descriptor structure for MIPS CPU
62 */ 63 */
63 unsigned long options; 64 unsigned long options;
65 unsigned long ases;
64 unsigned int processor_id; 66 unsigned int processor_id;
65 unsigned int fpu_id; 67 unsigned int fpu_id;
66 unsigned int cputype; 68 unsigned int cputype;
diff --git a/include/asm-mips/cpu.h b/include/asm-mips/cpu.h
index 8e167bfd40b1..a4f85a279c52 100644
--- a/include/asm-mips/cpu.h
+++ b/include/asm-mips/cpu.h
@@ -3,6 +3,7 @@
3 * various MIPS cpu types. 3 * various MIPS cpu types.
4 * 4 *
5 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) 5 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
6 * Copyright (C) 2004 Maciej W. Rozycki
6 */ 7 */
7#ifndef _ASM_CPU_H 8#ifndef _ASM_CPU_H
8#define _ASM_CPU_H 9#define _ASM_CPU_H
@@ -213,7 +214,6 @@
213#define MIPS_CPU_32FPR 0x00000020 /* 32 dbl. prec. FP registers */ 214#define MIPS_CPU_32FPR 0x00000020 /* 32 dbl. prec. FP registers */
214#define MIPS_CPU_COUNTER 0x00000040 /* Cycle count/compare */ 215#define MIPS_CPU_COUNTER 0x00000040 /* Cycle count/compare */
215#define MIPS_CPU_WATCH 0x00000080 /* watchpoint registers */ 216#define MIPS_CPU_WATCH 0x00000080 /* watchpoint registers */
216#define MIPS_CPU_MIPS16 0x00000100 /* code compression */
217#define MIPS_CPU_DIVEC 0x00000200 /* dedicated interrupt vector */ 217#define MIPS_CPU_DIVEC 0x00000200 /* dedicated interrupt vector */
218#define MIPS_CPU_VCE 0x00000400 /* virt. coherence conflict possible */ 218#define MIPS_CPU_VCE 0x00000400 /* virt. coherence conflict possible */
219#define MIPS_CPU_CACHE_CDEX_P 0x00000800 /* Create_Dirty_Exclusive CACHE op */ 219#define MIPS_CPU_CACHE_CDEX_P 0x00000800 /* Create_Dirty_Exclusive CACHE op */
@@ -225,4 +225,12 @@
225#define MIPS_CPU_SUBSET_CACHES 0x00020000 /* P-cache subset enforced */ 225#define MIPS_CPU_SUBSET_CACHES 0x00020000 /* P-cache subset enforced */
226#define MIPS_CPU_PREFETCH 0x00040000 /* CPU has usable prefetch */ 226#define MIPS_CPU_PREFETCH 0x00040000 /* CPU has usable prefetch */
227 227
228/*
229 * CPU ASE encodings
230 */
231#define MIPS_ASE_MIPS16 0x00000001 /* code compression */
232#define MIPS_ASE_MDMX 0x00000002 /* MIPS digital media extension */
233#define MIPS_ASE_MIPS3D 0x00000004 /* MIPS-3D */
234#define MIPS_ASE_SMARTMIPS 0x00000008 /* SmartMIPS */
235
228#endif /* _ASM_CPU_H */ 236#endif /* _ASM_CPU_H */
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h
index f3b0b4181508..9b0ce451286e 100644
--- a/include/asm-mips/mipsregs.h
+++ b/include/asm-mips/mipsregs.h
@@ -8,7 +8,7 @@
8 * Modified for further R[236]000 support by Paul M. Antoine, 1996. 8 * Modified for further R[236]000 support by Paul M. Antoine, 1996.
9 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com 9 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
10 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. 10 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
11 * Copyright (C) 2003 Maciej W. Rozycki 11 * Copyright (C) 2003, 2004 Maciej W. Rozycki
12 */ 12 */
13#ifndef _ASM_MIPSREGS_H 13#ifndef _ASM_MIPSREGS_H
14#define _ASM_MIPSREGS_H 14#define _ASM_MIPSREGS_H
@@ -478,6 +478,51 @@
478#define MIPS_CONF_M (_ULCAST_(1) << 31) 478#define MIPS_CONF_M (_ULCAST_(1) << 31)
479 479
480/* 480/*
481 * Bits in the MIPS32/64 PRA coprocessor 0 config registers 1 and above.
482 */
483#define MIPS_CONF1_FP (_ULCAST_(1) << 0)
484#define MIPS_CONF1_EP (_ULCAST_(1) << 1)
485#define MIPS_CONF1_CA (_ULCAST_(1) << 2)
486#define MIPS_CONF1_WR (_ULCAST_(1) << 3)
487#define MIPS_CONF1_PC (_ULCAST_(1) << 4)
488#define MIPS_CONF1_MD (_ULCAST_(1) << 5)
489#define MIPS_CONF1_C2 (_ULCAST_(1) << 6)
490#define MIPS_CONF1_DA (_ULCAST_(7) << 7)
491#define MIPS_CONF1_DL (_ULCAST_(7) << 10)
492#define MIPS_CONF1_DS (_ULCAST_(7) << 13)
493#define MIPS_CONF1_IA (_ULCAST_(7) << 16)
494#define MIPS_CONF1_IL (_ULCAST_(7) << 19)
495#define MIPS_CONF1_IS (_ULCAST_(7) << 22)
496#define MIPS_CONF1_TLBS (_ULCAST_(63)<< 25)
497
498#define MIPS_CONF2_SA (_ULCAST_(15)<< 0)
499#define MIPS_CONF2_SL (_ULCAST_(15)<< 4)
500#define MIPS_CONF2_SS (_ULCAST_(15)<< 8)
501#define MIPS_CONF2_SU (_ULCAST_(15)<< 12)
502#define MIPS_CONF2_TA (_ULCAST_(15)<< 16)
503#define MIPS_CONF2_TL (_ULCAST_(15)<< 20)
504#define MIPS_CONF2_TS (_ULCAST_(15)<< 24)
505#define MIPS_CONF2_TU (_ULCAST_(7) << 28)
506
507#define MIPS_CONF3_TL (_ULCAST_(1) << 0)
508#define MIPS_CONF3_SM (_ULCAST_(1) << 1)
509#define MIPS_CONF3_SP (_ULCAST_(1) << 4)
510#define MIPS_CONF3_VINT (_ULCAST_(1) << 5)
511#define MIPS_CONF3_VEIC (_ULCAST_(1) << 6)
512#define MIPS_CONF3_LPA (_ULCAST_(1) << 7)
513
514/*
515 * Bits in the MIPS32/64 coprocessor 1 (FPU) revision register.
516 */
517#define MIPS_FPIR_S (_ULCAST_(1) << 16)
518#define MIPS_FPIR_D (_ULCAST_(1) << 17)
519#define MIPS_FPIR_PS (_ULCAST_(1) << 18)
520#define MIPS_FPIR_3D (_ULCAST_(1) << 19)
521#define MIPS_FPIR_W (_ULCAST_(1) << 20)
522#define MIPS_FPIR_L (_ULCAST_(1) << 21)
523#define MIPS_FPIR_F64 (_ULCAST_(1) << 22)
524
525/*
481 * R10000 performance counter definitions. 526 * R10000 performance counter definitions.
482 * 527 *
483 * FIXME: The R10000 performance counter opens a nice way to implement CPU 528 * FIXME: The R10000 performance counter opens a nice way to implement CPU