diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2007-09-05 02:59:34 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:06 -0400 |
commit | 2f56cfdd812a17623483d3dfa3370a2e6282b245 (patch) | |
tree | 624e2bfccf0b0ee02cd94343acdf5d3364cb002e /include/asm-mips/fw | |
parent | df78b5c8faa72b3c04f82faab126de93af178348 (diff) |
[MIPS] Move ARC code into arch/mips/fw/arc
Move the ARC code to arch/mips/fw/arc from arch/mips/arc.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/fw')
-rw-r--r-- | include/asm-mips/fw/arc/hinv.h | 175 | ||||
-rw-r--r-- | include/asm-mips/fw/arc/types.h | 86 |
2 files changed, 261 insertions, 0 deletions
diff --git a/include/asm-mips/fw/arc/hinv.h b/include/asm-mips/fw/arc/hinv.h new file mode 100644 index 000000000000..e6ff4add04e2 --- /dev/null +++ b/include/asm-mips/fw/arc/hinv.h | |||
@@ -0,0 +1,175 @@ | |||
1 | /* | ||
2 | * ARCS hardware/memory inventory/configuration and system ID definitions. | ||
3 | */ | ||
4 | #ifndef _ASM_ARC_HINV_H | ||
5 | #define _ASM_ARC_HINV_H | ||
6 | |||
7 | #include <asm/sgidefs.h> | ||
8 | #include <asm/fw/arc/types.h> | ||
9 | |||
10 | /* configuration query defines */ | ||
11 | typedef enum configclass { | ||
12 | SystemClass, | ||
13 | ProcessorClass, | ||
14 | CacheClass, | ||
15 | #ifndef _NT_PROM | ||
16 | MemoryClass, | ||
17 | AdapterClass, | ||
18 | ControllerClass, | ||
19 | PeripheralClass | ||
20 | #else /* _NT_PROM */ | ||
21 | AdapterClass, | ||
22 | ControllerClass, | ||
23 | PeripheralClass, | ||
24 | MemoryClass | ||
25 | #endif /* _NT_PROM */ | ||
26 | } CONFIGCLASS; | ||
27 | |||
28 | typedef enum configtype { | ||
29 | ARC, | ||
30 | CPU, | ||
31 | FPU, | ||
32 | PrimaryICache, | ||
33 | PrimaryDCache, | ||
34 | SecondaryICache, | ||
35 | SecondaryDCache, | ||
36 | SecondaryCache, | ||
37 | #ifndef _NT_PROM | ||
38 | Memory, | ||
39 | #endif | ||
40 | EISAAdapter, | ||
41 | TCAdapter, | ||
42 | SCSIAdapter, | ||
43 | DTIAdapter, | ||
44 | MultiFunctionAdapter, | ||
45 | DiskController, | ||
46 | TapeController, | ||
47 | CDROMController, | ||
48 | WORMController, | ||
49 | SerialController, | ||
50 | NetworkController, | ||
51 | DisplayController, | ||
52 | ParallelController, | ||
53 | PointerController, | ||
54 | KeyboardController, | ||
55 | AudioController, | ||
56 | OtherController, | ||
57 | DiskPeripheral, | ||
58 | FloppyDiskPeripheral, | ||
59 | TapePeripheral, | ||
60 | ModemPeripheral, | ||
61 | MonitorPeripheral, | ||
62 | PrinterPeripheral, | ||
63 | PointerPeripheral, | ||
64 | KeyboardPeripheral, | ||
65 | TerminalPeripheral, | ||
66 | LinePeripheral, | ||
67 | NetworkPeripheral, | ||
68 | #ifdef _NT_PROM | ||
69 | Memory, | ||
70 | #endif | ||
71 | OtherPeripheral, | ||
72 | |||
73 | /* new stuff for IP30 */ | ||
74 | /* added without moving anything */ | ||
75 | /* except ANONYMOUS. */ | ||
76 | |||
77 | XTalkAdapter, | ||
78 | PCIAdapter, | ||
79 | GIOAdapter, | ||
80 | TPUAdapter, | ||
81 | |||
82 | Anonymous | ||
83 | } CONFIGTYPE; | ||
84 | |||
85 | typedef enum { | ||
86 | Failed = 1, | ||
87 | ReadOnly = 2, | ||
88 | Removable = 4, | ||
89 | ConsoleIn = 8, | ||
90 | ConsoleOut = 16, | ||
91 | Input = 32, | ||
92 | Output = 64 | ||
93 | } IDENTIFIERFLAG; | ||
94 | |||
95 | #ifndef NULL /* for GetChild(NULL); */ | ||
96 | #define NULL 0 | ||
97 | #endif | ||
98 | |||
99 | union key_u { | ||
100 | struct { | ||
101 | #ifdef _MIPSEB | ||
102 | unsigned char c_bsize; /* block size in lines */ | ||
103 | unsigned char c_lsize; /* line size in bytes/tag */ | ||
104 | unsigned short c_size; /* cache size in 4K pages */ | ||
105 | #else /* _MIPSEL */ | ||
106 | unsigned short c_size; /* cache size in 4K pages */ | ||
107 | unsigned char c_lsize; /* line size in bytes/tag */ | ||
108 | unsigned char c_bsize; /* block size in lines */ | ||
109 | #endif /* _MIPSEL */ | ||
110 | } cache; | ||
111 | ULONG FullKey; | ||
112 | }; | ||
113 | |||
114 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | ||
115 | #define SGI_ARCS_VERS 64 /* sgi 64-bit version */ | ||
116 | #define SGI_ARCS_REV 0 /* rev .00 */ | ||
117 | #else | ||
118 | #define SGI_ARCS_VERS 1 /* first version */ | ||
119 | #define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */ | ||
120 | #endif | ||
121 | |||
122 | typedef struct component { | ||
123 | CONFIGCLASS Class; | ||
124 | CONFIGTYPE Type; | ||
125 | IDENTIFIERFLAG Flags; | ||
126 | USHORT Version; | ||
127 | USHORT Revision; | ||
128 | ULONG Key; | ||
129 | ULONG AffinityMask; | ||
130 | ULONG ConfigurationDataSize; | ||
131 | ULONG IdentifierLength; | ||
132 | char *Identifier; | ||
133 | } COMPONENT; | ||
134 | |||
135 | /* internal structure that holds pathname parsing data */ | ||
136 | struct cfgdata { | ||
137 | char *name; /* full name */ | ||
138 | int minlen; /* minimum length to match */ | ||
139 | CONFIGTYPE type; /* type of token */ | ||
140 | }; | ||
141 | |||
142 | /* System ID */ | ||
143 | typedef struct systemid { | ||
144 | CHAR VendorId[8]; | ||
145 | CHAR ProductId[8]; | ||
146 | } SYSTEMID; | ||
147 | |||
148 | /* memory query functions */ | ||
149 | typedef enum memorytype { | ||
150 | ExceptionBlock, | ||
151 | SPBPage, /* ARCS == SystemParameterBlock */ | ||
152 | #ifndef _NT_PROM | ||
153 | FreeContiguous, | ||
154 | FreeMemory, | ||
155 | BadMemory, | ||
156 | LoadedProgram, | ||
157 | FirmwareTemporary, | ||
158 | FirmwarePermanent | ||
159 | #else /* _NT_PROM */ | ||
160 | FreeMemory, | ||
161 | BadMemory, | ||
162 | LoadedProgram, | ||
163 | FirmwareTemporary, | ||
164 | FirmwarePermanent, | ||
165 | FreeContiguous | ||
166 | #endif /* _NT_PROM */ | ||
167 | } MEMORYTYPE; | ||
168 | |||
169 | typedef struct memorydescriptor { | ||
170 | MEMORYTYPE Type; | ||
171 | LONG BasePage; | ||
172 | LONG PageCount; | ||
173 | } MEMORYDESCRIPTOR; | ||
174 | |||
175 | #endif /* _ASM_ARC_HINV_H */ | ||
diff --git a/include/asm-mips/fw/arc/types.h b/include/asm-mips/fw/arc/types.h new file mode 100644 index 000000000000..b9adcd6f0860 --- /dev/null +++ b/include/asm-mips/fw/arc/types.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright 1999 Ralf Baechle (ralf@gnu.org) | ||
7 | * Copyright 1999 Silicon Graphics, Inc. | ||
8 | */ | ||
9 | #ifndef _ASM_ARC_TYPES_H | ||
10 | #define _ASM_ARC_TYPES_H | ||
11 | |||
12 | |||
13 | #ifdef CONFIG_ARC32 | ||
14 | |||
15 | typedef char CHAR; | ||
16 | typedef short SHORT; | ||
17 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); | ||
18 | typedef long LONG __attribute__ ((__mode__ (__SI__))); | ||
19 | typedef unsigned char UCHAR; | ||
20 | typedef unsigned short USHORT; | ||
21 | typedef unsigned long ULONG __attribute__ ((__mode__ (__SI__))); | ||
22 | typedef void VOID; | ||
23 | |||
24 | /* The pointer types. Note that we're using a 64-bit compiler but all | ||
25 | pointer in the ARC structures are only 32-bit, so we need some disgusting | ||
26 | workarounds. Keep your vomit bag handy. */ | ||
27 | typedef LONG _PCHAR; | ||
28 | typedef LONG _PSHORT; | ||
29 | typedef LONG _PLARGE_INTEGER; | ||
30 | typedef LONG _PLONG; | ||
31 | typedef LONG _PUCHAR; | ||
32 | typedef LONG _PUSHORT; | ||
33 | typedef LONG _PULONG; | ||
34 | typedef LONG _PVOID; | ||
35 | |||
36 | #endif /* CONFIG_ARC32 */ | ||
37 | |||
38 | #ifdef CONFIG_ARC64 | ||
39 | |||
40 | typedef char CHAR; | ||
41 | typedef short SHORT; | ||
42 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); | ||
43 | typedef long LONG __attribute__ ((__mode__ (__DI__))); | ||
44 | typedef unsigned char UCHAR; | ||
45 | typedef unsigned short USHORT; | ||
46 | typedef unsigned long ULONG __attribute__ ((__mode__ (__DI__))); | ||
47 | typedef void VOID; | ||
48 | |||
49 | /* The pointer types. We're 64-bit and the firmware is also 64-bit, so | ||
50 | live is sane ... */ | ||
51 | typedef CHAR *_PCHAR; | ||
52 | typedef SHORT *_PSHORT; | ||
53 | typedef LARGE_INTEGER *_PLARGE_INTEGER; | ||
54 | typedef LONG *_PLONG; | ||
55 | typedef UCHAR *_PUCHAR; | ||
56 | typedef USHORT *_PUSHORT; | ||
57 | typedef ULONG *_PULONG; | ||
58 | typedef VOID *_PVOID; | ||
59 | |||
60 | #endif /* CONFIG_ARC64 */ | ||
61 | |||
62 | typedef CHAR *PCHAR; | ||
63 | typedef SHORT *PSHORT; | ||
64 | typedef LARGE_INTEGER *PLARGE_INTEGER; | ||
65 | typedef LONG *PLONG; | ||
66 | typedef UCHAR *PUCHAR; | ||
67 | typedef USHORT *PUSHORT; | ||
68 | typedef ULONG *PULONG; | ||
69 | typedef VOID *PVOID; | ||
70 | |||
71 | /* | ||
72 | * Return type of ArcGetDisplayStatus() | ||
73 | */ | ||
74 | typedef struct { | ||
75 | USHORT CursorXPosition; | ||
76 | USHORT CursorYPosition; | ||
77 | USHORT CursorMaxXPosition; | ||
78 | USHORT CursorMaxYPosition; | ||
79 | USHORT ForegroundColor; | ||
80 | USHORT BackgroundColor; | ||
81 | UCHAR HighIntensity; | ||
82 | UCHAR Underscored; | ||
83 | UCHAR ReverseVideo; | ||
84 | } DISPLAY_STATUS; | ||
85 | |||
86 | #endif /* _ASM_ARC_TYPES_H */ | ||