diff options
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 | ||||
-rw-r--r-- | include/asm-mips/fw/cfe/cfe_api.h | 122 | ||||
-rw-r--r-- | include/asm-mips/fw/cfe/cfe_error.h | 80 |
4 files changed, 0 insertions, 463 deletions
diff --git a/include/asm-mips/fw/arc/hinv.h b/include/asm-mips/fw/arc/hinv.h deleted file mode 100644 index e6ff4add04e2..000000000000 --- a/include/asm-mips/fw/arc/hinv.h +++ /dev/null | |||
@@ -1,175 +0,0 @@ | |||
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 deleted file mode 100644 index b9adcd6f0860..000000000000 --- a/include/asm-mips/fw/arc/types.h +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
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 */ | ||
diff --git a/include/asm-mips/fw/cfe/cfe_api.h b/include/asm-mips/fw/cfe/cfe_api.h deleted file mode 100644 index 0995575db320..000000000000 --- a/include/asm-mips/fw/cfe/cfe_api.h +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001, 2002 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | */ | ||
18 | /* | ||
19 | * Broadcom Common Firmware Environment (CFE) | ||
20 | * | ||
21 | * This file contains declarations for doing callbacks to | ||
22 | * cfe from an application. It should be the only header | ||
23 | * needed by the application to use this library | ||
24 | * | ||
25 | * Authors: Mitch Lichtenberg, Chris Demetriou | ||
26 | */ | ||
27 | #ifndef CFE_API_H | ||
28 | #define CFE_API_H | ||
29 | |||
30 | #include <linux/types.h> | ||
31 | #include <linux/string.h> | ||
32 | |||
33 | typedef long intptr_t; | ||
34 | |||
35 | |||
36 | /* | ||
37 | * Constants | ||
38 | */ | ||
39 | |||
40 | /* Seal indicating CFE's presence, passed to user program. */ | ||
41 | #define CFE_EPTSEAL 0x43464531 | ||
42 | |||
43 | #define CFE_MI_RESERVED 0 /* memory is reserved, do not use */ | ||
44 | #define CFE_MI_AVAILABLE 1 /* memory is available */ | ||
45 | |||
46 | #define CFE_FLG_WARMSTART 0x00000001 | ||
47 | #define CFE_FLG_FULL_ARENA 0x00000001 | ||
48 | #define CFE_FLG_ENV_PERMANENT 0x00000001 | ||
49 | |||
50 | #define CFE_CPU_CMD_START 1 | ||
51 | #define CFE_CPU_CMD_STOP 0 | ||
52 | |||
53 | #define CFE_STDHANDLE_CONSOLE 0 | ||
54 | |||
55 | #define CFE_DEV_NETWORK 1 | ||
56 | #define CFE_DEV_DISK 2 | ||
57 | #define CFE_DEV_FLASH 3 | ||
58 | #define CFE_DEV_SERIAL 4 | ||
59 | #define CFE_DEV_CPU 5 | ||
60 | #define CFE_DEV_NVRAM 6 | ||
61 | #define CFE_DEV_CLOCK 7 | ||
62 | #define CFE_DEV_OTHER 8 | ||
63 | #define CFE_DEV_MASK 0x0F | ||
64 | |||
65 | #define CFE_CACHE_FLUSH_D 1 | ||
66 | #define CFE_CACHE_INVAL_I 2 | ||
67 | #define CFE_CACHE_INVAL_D 4 | ||
68 | #define CFE_CACHE_INVAL_L2 8 | ||
69 | |||
70 | #define CFE_FWI_64BIT 0x00000001 | ||
71 | #define CFE_FWI_32BIT 0x00000002 | ||
72 | #define CFE_FWI_RELOC 0x00000004 | ||
73 | #define CFE_FWI_UNCACHED 0x00000008 | ||
74 | #define CFE_FWI_MULTICPU 0x00000010 | ||
75 | #define CFE_FWI_FUNCSIM 0x00000020 | ||
76 | #define CFE_FWI_RTLSIM 0x00000040 | ||
77 | |||
78 | typedef struct { | ||
79 | int64_t fwi_version; /* major, minor, eco version */ | ||
80 | int64_t fwi_totalmem; /* total installed mem */ | ||
81 | int64_t fwi_flags; /* various flags */ | ||
82 | int64_t fwi_boardid; /* board ID */ | ||
83 | int64_t fwi_bootarea_va; /* VA of boot area */ | ||
84 | int64_t fwi_bootarea_pa; /* PA of boot area */ | ||
85 | int64_t fwi_bootarea_size; /* size of boot area */ | ||
86 | } cfe_fwinfo_t; | ||
87 | |||
88 | |||
89 | /* | ||
90 | * Defines and prototypes for functions which take no arguments. | ||
91 | */ | ||
92 | int64_t cfe_getticks(void); | ||
93 | |||
94 | /* | ||
95 | * Defines and prototypes for the rest of the functions. | ||
96 | */ | ||
97 | int cfe_close(int handle); | ||
98 | int cfe_cpu_start(int cpu, void (*fn) (void), long sp, long gp, long a1); | ||
99 | int cfe_cpu_stop(int cpu); | ||
100 | int cfe_enumenv(int idx, char *name, int namelen, char *val, int vallen); | ||
101 | int cfe_enummem(int idx, int flags, uint64_t * start, uint64_t * length, | ||
102 | uint64_t * type); | ||
103 | int cfe_exit(int warm, int status); | ||
104 | int cfe_flushcache(int flg); | ||
105 | int cfe_getdevinfo(char *name); | ||
106 | int cfe_getenv(char *name, char *dest, int destlen); | ||
107 | int cfe_getfwinfo(cfe_fwinfo_t * info); | ||
108 | int cfe_getstdhandle(int flg); | ||
109 | int cfe_init(uint64_t handle, uint64_t ept); | ||
110 | int cfe_inpstat(int handle); | ||
111 | int cfe_ioctl(int handle, unsigned int ioctlnum, unsigned char *buffer, | ||
112 | int length, int *retlen, uint64_t offset); | ||
113 | int cfe_open(char *name); | ||
114 | int cfe_read(int handle, unsigned char *buffer, int length); | ||
115 | int cfe_readblk(int handle, int64_t offset, unsigned char *buffer, | ||
116 | int length); | ||
117 | int cfe_setenv(char *name, char *val); | ||
118 | int cfe_write(int handle, unsigned char *buffer, int length); | ||
119 | int cfe_writeblk(int handle, int64_t offset, unsigned char *buffer, | ||
120 | int length); | ||
121 | |||
122 | #endif /* CFE_API_H */ | ||
diff --git a/include/asm-mips/fw/cfe/cfe_error.h b/include/asm-mips/fw/cfe/cfe_error.h deleted file mode 100644 index b80374636279..000000000000 --- a/include/asm-mips/fw/cfe/cfe_error.h +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001, 2002 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | */ | ||
18 | |||
19 | /* | ||
20 | * Broadcom Common Firmware Environment (CFE) | ||
21 | * | ||
22 | * CFE's global error code list is here. | ||
23 | * | ||
24 | * Author: Mitch Lichtenberg | ||
25 | */ | ||
26 | |||
27 | #define CFE_OK 0 | ||
28 | #define CFE_ERR -1 /* generic error */ | ||
29 | #define CFE_ERR_INV_COMMAND -2 | ||
30 | #define CFE_ERR_EOF -3 | ||
31 | #define CFE_ERR_IOERR -4 | ||
32 | #define CFE_ERR_NOMEM -5 | ||
33 | #define CFE_ERR_DEVNOTFOUND -6 | ||
34 | #define CFE_ERR_DEVOPEN -7 | ||
35 | #define CFE_ERR_INV_PARAM -8 | ||
36 | #define CFE_ERR_ENVNOTFOUND -9 | ||
37 | #define CFE_ERR_ENVREADONLY -10 | ||
38 | |||
39 | #define CFE_ERR_NOTELF -11 | ||
40 | #define CFE_ERR_NOT32BIT -12 | ||
41 | #define CFE_ERR_WRONGENDIAN -13 | ||
42 | #define CFE_ERR_BADELFVERS -14 | ||
43 | #define CFE_ERR_NOTMIPS -15 | ||
44 | #define CFE_ERR_BADELFFMT -16 | ||
45 | #define CFE_ERR_BADADDR -17 | ||
46 | |||
47 | #define CFE_ERR_FILENOTFOUND -18 | ||
48 | #define CFE_ERR_UNSUPPORTED -19 | ||
49 | |||
50 | #define CFE_ERR_HOSTUNKNOWN -20 | ||
51 | |||
52 | #define CFE_ERR_TIMEOUT -21 | ||
53 | |||
54 | #define CFE_ERR_PROTOCOLERR -22 | ||
55 | |||
56 | #define CFE_ERR_NETDOWN -23 | ||
57 | #define CFE_ERR_NONAMESERVER -24 | ||
58 | |||
59 | #define CFE_ERR_NOHANDLES -25 | ||
60 | #define CFE_ERR_ALREADYBOUND -26 | ||
61 | |||
62 | #define CFE_ERR_CANNOTSET -27 | ||
63 | #define CFE_ERR_NOMORE -28 | ||
64 | #define CFE_ERR_BADFILESYS -29 | ||
65 | #define CFE_ERR_FSNOTAVAIL -30 | ||
66 | |||
67 | #define CFE_ERR_INVBOOTBLOCK -31 | ||
68 | #define CFE_ERR_WRONGDEVTYPE -32 | ||
69 | #define CFE_ERR_BBCHECKSUM -33 | ||
70 | #define CFE_ERR_BOOTPROGCHKSUM -34 | ||
71 | |||
72 | #define CFE_ERR_LDRNOTAVAIL -35 | ||
73 | |||
74 | #define CFE_ERR_NOTREADY -36 | ||
75 | |||
76 | #define CFE_ERR_GETMEM -37 | ||
77 | #define CFE_ERR_SETMEM -38 | ||
78 | |||
79 | #define CFE_ERR_NOTCONN -39 | ||
80 | #define CFE_ERR_ADDRINUSE -40 | ||