diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 21:42:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 21:42:23 -0500 |
commit | d27ba47e7e8c466c18983a1779d611f82d6a354f (patch) | |
tree | 2870d82516be16e0cae63e1f7e84bd855bb34a23 /include | |
parent | e3d8b77bc7a89d190ee895d0570af10c026e5086 (diff) | |
parent | dd3e2dcf3408843ed35501c28626f389b30be756 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-m68k/kbio.h | 1 | ||||
-rw-r--r-- | include/asm-m68k/vuid_event.h | 4 | ||||
-rw-r--r-- | include/asm-sparc/audioio.h | 234 | ||||
-rw-r--r-- | include/asm-sparc/kbio.h | 56 | ||||
-rw-r--r-- | include/asm-sparc/termios.h | 9 | ||||
-rw-r--r-- | include/asm-sparc/vuid_event.h | 41 | ||||
-rw-r--r-- | include/asm-sparc64/audioio.h | 234 | ||||
-rw-r--r-- | include/asm-sparc64/ebus.h | 1 | ||||
-rw-r--r-- | include/asm-sparc64/kbio.h | 56 | ||||
-rw-r--r-- | include/asm-sparc64/mmu_context.h | 46 | ||||
-rw-r--r-- | include/asm-sparc64/termios.h | 9 | ||||
-rw-r--r-- | include/asm-sparc64/tlb.h | 14 | ||||
-rw-r--r-- | include/asm-sparc64/vuid_event.h | 40 |
13 files changed, 30 insertions, 715 deletions
diff --git a/include/asm-m68k/kbio.h b/include/asm-m68k/kbio.h deleted file mode 100644 index e1fbf8fba3e8..000000000000 --- a/include/asm-m68k/kbio.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-sparc/kbio.h> | ||
diff --git a/include/asm-m68k/vuid_event.h b/include/asm-m68k/vuid_event.h deleted file mode 100644 index 52ecb521a395..000000000000 --- a/include/asm-m68k/vuid_event.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _M68K_VUID_EVENT_H | ||
2 | #define _M68K_VUID_EVENT_H | ||
3 | #include <asm-sparc/vuid_event.h> | ||
4 | #endif | ||
diff --git a/include/asm-sparc/audioio.h b/include/asm-sparc/audioio.h deleted file mode 100644 index cf16173f521b..000000000000 --- a/include/asm-sparc/audioio.h +++ /dev/null | |||
@@ -1,234 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sparc/audioio.h | ||
3 | * | ||
4 | * Sparc Audio Midlayer | ||
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu) | ||
6 | */ | ||
7 | |||
8 | #ifndef _AUDIOIO_H_ | ||
9 | #define _AUDIOIO_H_ | ||
10 | |||
11 | /* | ||
12 | * SunOS/Solaris /dev/audio interface | ||
13 | */ | ||
14 | |||
15 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/time.h> | ||
18 | #include <linux/ioctl.h> | ||
19 | #endif | ||
20 | |||
21 | /* | ||
22 | * This structure contains state information for audio device IO streams. | ||
23 | */ | ||
24 | typedef struct audio_prinfo { | ||
25 | /* | ||
26 | * The following values describe the audio data encoding. | ||
27 | */ | ||
28 | unsigned int sample_rate; /* samples per second */ | ||
29 | unsigned int channels; /* number of interleaved channels */ | ||
30 | unsigned int precision; /* bit-width of each sample */ | ||
31 | unsigned int encoding; /* data encoding method */ | ||
32 | |||
33 | /* | ||
34 | * The following values control audio device configuration | ||
35 | */ | ||
36 | unsigned int gain; /* gain level: 0 - 255 */ | ||
37 | unsigned int port; /* selected I/O port (see below) */ | ||
38 | unsigned int avail_ports; /* available I/O ports (see below) */ | ||
39 | unsigned int _xxx[2]; /* Reserved for future use */ | ||
40 | |||
41 | unsigned int buffer_size; /* I/O buffer size */ | ||
42 | |||
43 | /* | ||
44 | * The following values describe driver state | ||
45 | */ | ||
46 | unsigned int samples; /* number of samples converted */ | ||
47 | unsigned int eof; /* End Of File counter (play only) */ | ||
48 | |||
49 | unsigned char pause; /* non-zero for pause, zero to resume */ | ||
50 | unsigned char error; /* non-zero if overflow/underflow */ | ||
51 | unsigned char waiting; /* non-zero if a process wants access */ | ||
52 | unsigned char balance; /* stereo channel balance */ | ||
53 | |||
54 | unsigned short minordev; | ||
55 | |||
56 | /* | ||
57 | * The following values are read-only state flags | ||
58 | */ | ||
59 | unsigned char open; /* non-zero if open access permitted */ | ||
60 | unsigned char active; /* non-zero if I/O is active */ | ||
61 | } audio_prinfo_t; | ||
62 | |||
63 | |||
64 | /* | ||
65 | * This structure describes the current state of the audio device. | ||
66 | */ | ||
67 | typedef struct audio_info { | ||
68 | /* | ||
69 | * Per-stream information | ||
70 | */ | ||
71 | audio_prinfo_t play; /* output status information */ | ||
72 | audio_prinfo_t record; /* input status information */ | ||
73 | |||
74 | /* | ||
75 | * Per-unit/channel information | ||
76 | */ | ||
77 | unsigned int monitor_gain; /* input to output mix: 0 - 255 */ | ||
78 | unsigned char output_muted; /* non-zero if output is muted */ | ||
79 | unsigned char _xxx[3]; /* Reserved for future use */ | ||
80 | unsigned int _yyy[3]; /* Reserved for future use */ | ||
81 | } audio_info_t; | ||
82 | |||
83 | |||
84 | /* | ||
85 | * Audio encoding types | ||
86 | */ | ||
87 | #define AUDIO_ENCODING_NONE (0) /* no encoding assigned */ | ||
88 | #define AUDIO_ENCODING_ULAW (1) /* u-law encoding */ | ||
89 | #define AUDIO_ENCODING_ALAW (2) /* A-law encoding */ | ||
90 | #define AUDIO_ENCODING_LINEAR (3) /* Linear PCM encoding */ | ||
91 | #define AUDIO_ENCODING_FLOAT (4) /* IEEE float (-1. <-> +1.) */ | ||
92 | #define AUDIO_ENCODING_DVI (104) /* DVI ADPCM */ | ||
93 | #define AUDIO_ENCODING_LINEAR8 (105) /* 8 bit UNSIGNED */ | ||
94 | #define AUDIO_ENCODING_LINEARLE (106) /* Linear PCM LE encoding */ | ||
95 | |||
96 | /* | ||
97 | * These ranges apply to record, play, and monitor gain values | ||
98 | */ | ||
99 | #define AUDIO_MIN_GAIN (0) /* minimum gain value */ | ||
100 | #define AUDIO_MAX_GAIN (255) /* maximum gain value */ | ||
101 | |||
102 | /* | ||
103 | * These values apply to the balance field to adjust channel gain values | ||
104 | */ | ||
105 | #define AUDIO_LEFT_BALANCE (0) /* left channel only */ | ||
106 | #define AUDIO_MID_BALANCE (32) /* equal left/right channel */ | ||
107 | #define AUDIO_RIGHT_BALANCE (64) /* right channel only */ | ||
108 | #define AUDIO_BALANCE_SHIFT (3) | ||
109 | |||
110 | /* | ||
111 | * Generic minimum/maximum limits for number of channels, both modes | ||
112 | */ | ||
113 | #define AUDIO_MIN_PLAY_CHANNELS (1) | ||
114 | #define AUDIO_MAX_PLAY_CHANNELS (4) | ||
115 | #define AUDIO_MIN_REC_CHANNELS (1) | ||
116 | #define AUDIO_MAX_REC_CHANNELS (4) | ||
117 | |||
118 | /* | ||
119 | * Generic minimum/maximum limits for sample precision | ||
120 | */ | ||
121 | #define AUDIO_MIN_PLAY_PRECISION (8) | ||
122 | #define AUDIO_MAX_PLAY_PRECISION (32) | ||
123 | #define AUDIO_MIN_REC_PRECISION (8) | ||
124 | #define AUDIO_MAX_REC_PRECISION (32) | ||
125 | |||
126 | /* | ||
127 | * Define some convenient names for typical audio ports | ||
128 | */ | ||
129 | /* | ||
130 | * output ports (several may be enabled simultaneously) | ||
131 | */ | ||
132 | #define AUDIO_SPEAKER 0x01 /* output to built-in speaker */ | ||
133 | #define AUDIO_HEADPHONE 0x02 /* output to headphone jack */ | ||
134 | #define AUDIO_LINE_OUT 0x04 /* output to line out */ | ||
135 | |||
136 | /* | ||
137 | * input ports (usually only one at a time) | ||
138 | */ | ||
139 | #define AUDIO_MICROPHONE 0x01 /* input from microphone */ | ||
140 | #define AUDIO_LINE_IN 0x02 /* input from line in */ | ||
141 | #define AUDIO_CD 0x04 /* input from on-board CD inputs */ | ||
142 | #define AUDIO_INTERNAL_CD_IN AUDIO_CD /* input from internal CDROM */ | ||
143 | #define AUDIO_ANALOG_LOOPBACK 0x40 /* input from output */ | ||
144 | |||
145 | |||
146 | /* | ||
147 | * This macro initializes an audio_info structure to 'harmless' values. | ||
148 | * Note that (~0) might not be a harmless value for a flag that was | ||
149 | * a signed int. | ||
150 | */ | ||
151 | #define AUDIO_INITINFO(i) { \ | ||
152 | unsigned int *__x__; \ | ||
153 | for (__x__ = (unsigned int *)(i); \ | ||
154 | (char *) __x__ < (((char *)(i)) + sizeof (audio_info_t)); \ | ||
155 | *__x__++ = ~0); \ | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * These allow testing for what the user wants to set | ||
160 | */ | ||
161 | #define AUD_INITVALUE (~0) | ||
162 | #define Modify(X) ((unsigned int)(X) != AUD_INITVALUE) | ||
163 | #define Modifys(X) ((X) != (unsigned short)AUD_INITVALUE) | ||
164 | #define Modifyc(X) ((X) != (unsigned char)AUD_INITVALUE) | ||
165 | |||
166 | /* | ||
167 | * Parameter for the AUDIO_GETDEV ioctl to determine current | ||
168 | * audio devices. | ||
169 | */ | ||
170 | #define MAX_AUDIO_DEV_LEN (16) | ||
171 | typedef struct audio_device { | ||
172 | char name[MAX_AUDIO_DEV_LEN]; | ||
173 | char version[MAX_AUDIO_DEV_LEN]; | ||
174 | char config[MAX_AUDIO_DEV_LEN]; | ||
175 | } audio_device_t; | ||
176 | |||
177 | |||
178 | /* | ||
179 | * Ioctl calls for the audio device. | ||
180 | */ | ||
181 | |||
182 | /* | ||
183 | * AUDIO_GETINFO retrieves the current state of the audio device. | ||
184 | * | ||
185 | * AUDIO_SETINFO copies all fields of the audio_info structure whose | ||
186 | * values are not set to the initialized value (-1) to the device state. | ||
187 | * It performs an implicit AUDIO_GETINFO to return the new state of the | ||
188 | * device. Note that the record.samples and play.samples fields are set | ||
189 | * to the last value before the AUDIO_SETINFO took effect. This allows | ||
190 | * an application to reset the counters while atomically retrieving the | ||
191 | * last value. | ||
192 | * | ||
193 | * AUDIO_DRAIN suspends the calling process until the write buffers are | ||
194 | * empty. | ||
195 | * | ||
196 | * AUDIO_GETDEV returns a structure of type audio_device_t which contains | ||
197 | * three strings. The string "name" is a short identifying string (for | ||
198 | * example, the SBus Fcode name string), the string "version" identifies | ||
199 | * the current version of the device, and the "config" string identifies | ||
200 | * the specific configuration of the audio stream. All fields are | ||
201 | * device-dependent -- see the device specific manual pages for details. | ||
202 | * | ||
203 | * AUDIO_GETDEV_SUNOS returns a number which is an audio device defined | ||
204 | * herein (making it not too portable) | ||
205 | * | ||
206 | * AUDIO_FLUSH stops all playback and recording, clears all queued buffers, | ||
207 | * resets error counters, and restarts recording and playback as appropriate | ||
208 | * for the current sampling mode. | ||
209 | */ | ||
210 | #define AUDIO_GETINFO _IOR('A', 1, audio_info_t) | ||
211 | #define AUDIO_SETINFO _IOWR('A', 2, audio_info_t) | ||
212 | #define AUDIO_DRAIN _IO('A', 3) | ||
213 | #define AUDIO_GETDEV _IOR('A', 4, audio_device_t) | ||
214 | #define AUDIO_GETDEV_SUNOS _IOR('A', 4, int) | ||
215 | #define AUDIO_FLUSH _IO('A', 5) | ||
216 | |||
217 | /* Define possible audio hardware configurations for | ||
218 | * old SunOS-style AUDIO_GETDEV ioctl */ | ||
219 | #define AUDIO_DEV_UNKNOWN (0) /* not defined */ | ||
220 | #define AUDIO_DEV_AMD (1) /* audioamd device */ | ||
221 | #define AUDIO_DEV_SPEAKERBOX (2) /* dbri device with speakerbox */ | ||
222 | #define AUDIO_DEV_CODEC (3) /* dbri device (internal speaker) */ | ||
223 | #define AUDIO_DEV_CS4231 (5) /* cs4231 device */ | ||
224 | |||
225 | /* | ||
226 | * The following ioctl sets the audio device into an internal loopback mode, | ||
227 | * if the hardware supports this. The argument is TRUE to set loopback, | ||
228 | * FALSE to reset to normal operation. If the hardware does not support | ||
229 | * internal loopback, the ioctl should fail with EINVAL. | ||
230 | * Causes ADC data to be digitally mixed in and sent to the DAC. | ||
231 | */ | ||
232 | #define AUDIO_DIAG_LOOPBACK _IOW('A', 101, int) | ||
233 | |||
234 | #endif /* _AUDIOIO_H_ */ | ||
diff --git a/include/asm-sparc/kbio.h b/include/asm-sparc/kbio.h deleted file mode 100644 index 3cf496bdf399..000000000000 --- a/include/asm-sparc/kbio.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #ifndef __LINUX_KBIO_H | ||
2 | #define __LINUX_KBIO_H | ||
3 | |||
4 | /* Return keyboard type */ | ||
5 | #define KIOCTYPE _IOR('k', 9, int) | ||
6 | /* Return Keyboard layout */ | ||
7 | #define KIOCLAYOUT _IOR('k', 20, int) | ||
8 | |||
9 | enum { | ||
10 | TR_NONE, | ||
11 | TR_ASCII, /* keyboard is in regular state */ | ||
12 | TR_EVENT, /* keystrokes sent as firm events */ | ||
13 | TR_UNTRANS_EVENT /* EVENT+up and down+no translation */ | ||
14 | }; | ||
15 | |||
16 | /* Return the current keyboard translation */ | ||
17 | #define KIOCGTRANS _IOR('k', 5, int) | ||
18 | /* Set the keyboard translation */ | ||
19 | #define KIOCTRANS _IOW('k', 0, int) | ||
20 | |||
21 | /* Send a keyboard command */ | ||
22 | #define KIOCCMD _IOW('k', 8, int) | ||
23 | |||
24 | /* Return if keystrokes are being sent to /dev/kbd */ | ||
25 | |||
26 | /* Set routing of keystrokes to /dev/kbd */ | ||
27 | #define KIOCSDIRECT _IOW('k', 10, int) | ||
28 | |||
29 | /* Set keyboard leds */ | ||
30 | #define KIOCSLED _IOW('k', 14, unsigned char) | ||
31 | |||
32 | /* Get keyboard leds */ | ||
33 | #define KIOCGLED _IOR('k', 15, unsigned char) | ||
34 | |||
35 | /* Used by KIOC[GS]RATE */ | ||
36 | struct kbd_rate { | ||
37 | unsigned char delay; /* Delay in Hz before first repeat. */ | ||
38 | unsigned char rate; /* In characters per second (0..50). */ | ||
39 | }; | ||
40 | |||
41 | /* Set keyboard rate */ | ||
42 | #define KIOCSRATE _IOW('k', 40, struct kbd_rate) | ||
43 | |||
44 | /* Get keyboard rate */ | ||
45 | #define KIOCGRATE _IOW('k', 41, struct kbd_rate) | ||
46 | |||
47 | /* Top bit records if the key is up or down */ | ||
48 | #define KBD_UP 0x80 | ||
49 | |||
50 | /* Usable information */ | ||
51 | #define KBD_KEYMASK 0x7f | ||
52 | |||
53 | /* All keys up */ | ||
54 | #define KBD_IDLE 0x75 | ||
55 | |||
56 | #endif /* __LINUX_KBIO_H */ | ||
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h index 0a8ad4cac125..d05f83c80989 100644 --- a/include/asm-sparc/termios.h +++ b/include/asm-sparc/termios.h | |||
@@ -38,15 +38,6 @@ struct sunos_ttysize { | |||
38 | int st_columns; /* Columns on the terminal */ | 38 | int st_columns; /* Columns on the terminal */ |
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* Used for packet mode */ | ||
42 | #define TIOCPKT_DATA 0 | ||
43 | #define TIOCPKT_FLUSHREAD 1 | ||
44 | #define TIOCPKT_FLUSHWRITE 2 | ||
45 | #define TIOCPKT_STOP 4 | ||
46 | #define TIOCPKT_START 8 | ||
47 | #define TIOCPKT_NOSTOP 16 | ||
48 | #define TIOCPKT_DOSTOP 32 | ||
49 | |||
50 | struct winsize { | 41 | struct winsize { |
51 | unsigned short ws_row; | 42 | unsigned short ws_row; |
52 | unsigned short ws_col; | 43 | unsigned short ws_col; |
diff --git a/include/asm-sparc/vuid_event.h b/include/asm-sparc/vuid_event.h deleted file mode 100644 index 7781e9f2fdd3..000000000000 --- a/include/asm-sparc/vuid_event.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* SunOS Virtual User Input Device (VUID) compatibility */ | ||
2 | |||
3 | |||
4 | typedef struct firm_event { | ||
5 | unsigned short id; /* tag for this event */ | ||
6 | unsigned char pair_type; /* unused by X11 */ | ||
7 | unsigned char pair; /* unused by X11 */ | ||
8 | int value; /* VKEY_UP, VKEY_DOWN or delta */ | ||
9 | struct timeval time; | ||
10 | } Firm_event; | ||
11 | |||
12 | enum { | ||
13 | FE_PAIR_NONE, | ||
14 | FE_PAIR_SET, | ||
15 | FE_PAIR_DELTA, | ||
16 | FE_PAIR_ABSOLUTE | ||
17 | }; | ||
18 | |||
19 | /* VUID stream formats */ | ||
20 | #define VUID_NATIVE 0 /* Native byte stream format */ | ||
21 | #define VUID_FIRM_EVENT 1 /* send firm_event structures */ | ||
22 | |||
23 | /* ioctls */ | ||
24 | /* Set input device byte stream format (any of VUID_{NATIVE,FIRM_EVENT}) */ | ||
25 | #define VUIDSFORMAT _IOW('v', 1, int) | ||
26 | /* Retrieve input device byte stream format */ | ||
27 | #define VUIDGFORMAT _IOR('v', 2, int) | ||
28 | |||
29 | /* Possible tag values */ | ||
30 | /* mouse buttons: */ | ||
31 | #define MS_LEFT 0x7f20 | ||
32 | #define MS_MIDDLE 0x7f21 | ||
33 | #define MS_RIGHT 0x7f22 | ||
34 | /* motion: */ | ||
35 | #define LOC_X_DELTA 0x7f80 | ||
36 | #define LOC_Y_DELTA 0x7f81 | ||
37 | #define LOC_X_ABSOLUTE 0x7f82 /* X compat, unsupported */ | ||
38 | #define LOC_Y_ABSOLUTE 0x7f83 /* X compat, unsupported */ | ||
39 | |||
40 | #define VKEY_UP 0 | ||
41 | #define VKEY_DOWN 1 | ||
diff --git a/include/asm-sparc64/audioio.h b/include/asm-sparc64/audioio.h deleted file mode 100644 index cf16173f521b..000000000000 --- a/include/asm-sparc64/audioio.h +++ /dev/null | |||
@@ -1,234 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sparc/audioio.h | ||
3 | * | ||
4 | * Sparc Audio Midlayer | ||
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu) | ||
6 | */ | ||
7 | |||
8 | #ifndef _AUDIOIO_H_ | ||
9 | #define _AUDIOIO_H_ | ||
10 | |||
11 | /* | ||
12 | * SunOS/Solaris /dev/audio interface | ||
13 | */ | ||
14 | |||
15 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/time.h> | ||
18 | #include <linux/ioctl.h> | ||
19 | #endif | ||
20 | |||
21 | /* | ||
22 | * This structure contains state information for audio device IO streams. | ||
23 | */ | ||
24 | typedef struct audio_prinfo { | ||
25 | /* | ||
26 | * The following values describe the audio data encoding. | ||
27 | */ | ||
28 | unsigned int sample_rate; /* samples per second */ | ||
29 | unsigned int channels; /* number of interleaved channels */ | ||
30 | unsigned int precision; /* bit-width of each sample */ | ||
31 | unsigned int encoding; /* data encoding method */ | ||
32 | |||
33 | /* | ||
34 | * The following values control audio device configuration | ||
35 | */ | ||
36 | unsigned int gain; /* gain level: 0 - 255 */ | ||
37 | unsigned int port; /* selected I/O port (see below) */ | ||
38 | unsigned int avail_ports; /* available I/O ports (see below) */ | ||
39 | unsigned int _xxx[2]; /* Reserved for future use */ | ||
40 | |||
41 | unsigned int buffer_size; /* I/O buffer size */ | ||
42 | |||
43 | /* | ||
44 | * The following values describe driver state | ||
45 | */ | ||
46 | unsigned int samples; /* number of samples converted */ | ||
47 | unsigned int eof; /* End Of File counter (play only) */ | ||
48 | |||
49 | unsigned char pause; /* non-zero for pause, zero to resume */ | ||
50 | unsigned char error; /* non-zero if overflow/underflow */ | ||
51 | unsigned char waiting; /* non-zero if a process wants access */ | ||
52 | unsigned char balance; /* stereo channel balance */ | ||
53 | |||
54 | unsigned short minordev; | ||
55 | |||
56 | /* | ||
57 | * The following values are read-only state flags | ||
58 | */ | ||
59 | unsigned char open; /* non-zero if open access permitted */ | ||
60 | unsigned char active; /* non-zero if I/O is active */ | ||
61 | } audio_prinfo_t; | ||
62 | |||
63 | |||
64 | /* | ||
65 | * This structure describes the current state of the audio device. | ||
66 | */ | ||
67 | typedef struct audio_info { | ||
68 | /* | ||
69 | * Per-stream information | ||
70 | */ | ||
71 | audio_prinfo_t play; /* output status information */ | ||
72 | audio_prinfo_t record; /* input status information */ | ||
73 | |||
74 | /* | ||
75 | * Per-unit/channel information | ||
76 | */ | ||
77 | unsigned int monitor_gain; /* input to output mix: 0 - 255 */ | ||
78 | unsigned char output_muted; /* non-zero if output is muted */ | ||
79 | unsigned char _xxx[3]; /* Reserved for future use */ | ||
80 | unsigned int _yyy[3]; /* Reserved for future use */ | ||
81 | } audio_info_t; | ||
82 | |||
83 | |||
84 | /* | ||
85 | * Audio encoding types | ||
86 | */ | ||
87 | #define AUDIO_ENCODING_NONE (0) /* no encoding assigned */ | ||
88 | #define AUDIO_ENCODING_ULAW (1) /* u-law encoding */ | ||
89 | #define AUDIO_ENCODING_ALAW (2) /* A-law encoding */ | ||
90 | #define AUDIO_ENCODING_LINEAR (3) /* Linear PCM encoding */ | ||
91 | #define AUDIO_ENCODING_FLOAT (4) /* IEEE float (-1. <-> +1.) */ | ||
92 | #define AUDIO_ENCODING_DVI (104) /* DVI ADPCM */ | ||
93 | #define AUDIO_ENCODING_LINEAR8 (105) /* 8 bit UNSIGNED */ | ||
94 | #define AUDIO_ENCODING_LINEARLE (106) /* Linear PCM LE encoding */ | ||
95 | |||
96 | /* | ||
97 | * These ranges apply to record, play, and monitor gain values | ||
98 | */ | ||
99 | #define AUDIO_MIN_GAIN (0) /* minimum gain value */ | ||
100 | #define AUDIO_MAX_GAIN (255) /* maximum gain value */ | ||
101 | |||
102 | /* | ||
103 | * These values apply to the balance field to adjust channel gain values | ||
104 | */ | ||
105 | #define AUDIO_LEFT_BALANCE (0) /* left channel only */ | ||
106 | #define AUDIO_MID_BALANCE (32) /* equal left/right channel */ | ||
107 | #define AUDIO_RIGHT_BALANCE (64) /* right channel only */ | ||
108 | #define AUDIO_BALANCE_SHIFT (3) | ||
109 | |||
110 | /* | ||
111 | * Generic minimum/maximum limits for number of channels, both modes | ||
112 | */ | ||
113 | #define AUDIO_MIN_PLAY_CHANNELS (1) | ||
114 | #define AUDIO_MAX_PLAY_CHANNELS (4) | ||
115 | #define AUDIO_MIN_REC_CHANNELS (1) | ||
116 | #define AUDIO_MAX_REC_CHANNELS (4) | ||
117 | |||
118 | /* | ||
119 | * Generic minimum/maximum limits for sample precision | ||
120 | */ | ||
121 | #define AUDIO_MIN_PLAY_PRECISION (8) | ||
122 | #define AUDIO_MAX_PLAY_PRECISION (32) | ||
123 | #define AUDIO_MIN_REC_PRECISION (8) | ||
124 | #define AUDIO_MAX_REC_PRECISION (32) | ||
125 | |||
126 | /* | ||
127 | * Define some convenient names for typical audio ports | ||
128 | */ | ||
129 | /* | ||
130 | * output ports (several may be enabled simultaneously) | ||
131 | */ | ||
132 | #define AUDIO_SPEAKER 0x01 /* output to built-in speaker */ | ||
133 | #define AUDIO_HEADPHONE 0x02 /* output to headphone jack */ | ||
134 | #define AUDIO_LINE_OUT 0x04 /* output to line out */ | ||
135 | |||
136 | /* | ||
137 | * input ports (usually only one at a time) | ||
138 | */ | ||
139 | #define AUDIO_MICROPHONE 0x01 /* input from microphone */ | ||
140 | #define AUDIO_LINE_IN 0x02 /* input from line in */ | ||
141 | #define AUDIO_CD 0x04 /* input from on-board CD inputs */ | ||
142 | #define AUDIO_INTERNAL_CD_IN AUDIO_CD /* input from internal CDROM */ | ||
143 | #define AUDIO_ANALOG_LOOPBACK 0x40 /* input from output */ | ||
144 | |||
145 | |||
146 | /* | ||
147 | * This macro initializes an audio_info structure to 'harmless' values. | ||
148 | * Note that (~0) might not be a harmless value for a flag that was | ||
149 | * a signed int. | ||
150 | */ | ||
151 | #define AUDIO_INITINFO(i) { \ | ||
152 | unsigned int *__x__; \ | ||
153 | for (__x__ = (unsigned int *)(i); \ | ||
154 | (char *) __x__ < (((char *)(i)) + sizeof (audio_info_t)); \ | ||
155 | *__x__++ = ~0); \ | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * These allow testing for what the user wants to set | ||
160 | */ | ||
161 | #define AUD_INITVALUE (~0) | ||
162 | #define Modify(X) ((unsigned int)(X) != AUD_INITVALUE) | ||
163 | #define Modifys(X) ((X) != (unsigned short)AUD_INITVALUE) | ||
164 | #define Modifyc(X) ((X) != (unsigned char)AUD_INITVALUE) | ||
165 | |||
166 | /* | ||
167 | * Parameter for the AUDIO_GETDEV ioctl to determine current | ||
168 | * audio devices. | ||
169 | */ | ||
170 | #define MAX_AUDIO_DEV_LEN (16) | ||
171 | typedef struct audio_device { | ||
172 | char name[MAX_AUDIO_DEV_LEN]; | ||
173 | char version[MAX_AUDIO_DEV_LEN]; | ||
174 | char config[MAX_AUDIO_DEV_LEN]; | ||
175 | } audio_device_t; | ||
176 | |||
177 | |||
178 | /* | ||
179 | * Ioctl calls for the audio device. | ||
180 | */ | ||
181 | |||
182 | /* | ||
183 | * AUDIO_GETINFO retrieves the current state of the audio device. | ||
184 | * | ||
185 | * AUDIO_SETINFO copies all fields of the audio_info structure whose | ||
186 | * values are not set to the initialized value (-1) to the device state. | ||
187 | * It performs an implicit AUDIO_GETINFO to return the new state of the | ||
188 | * device. Note that the record.samples and play.samples fields are set | ||
189 | * to the last value before the AUDIO_SETINFO took effect. This allows | ||
190 | * an application to reset the counters while atomically retrieving the | ||
191 | * last value. | ||
192 | * | ||
193 | * AUDIO_DRAIN suspends the calling process until the write buffers are | ||
194 | * empty. | ||
195 | * | ||
196 | * AUDIO_GETDEV returns a structure of type audio_device_t which contains | ||
197 | * three strings. The string "name" is a short identifying string (for | ||
198 | * example, the SBus Fcode name string), the string "version" identifies | ||
199 | * the current version of the device, and the "config" string identifies | ||
200 | * the specific configuration of the audio stream. All fields are | ||
201 | * device-dependent -- see the device specific manual pages for details. | ||
202 | * | ||
203 | * AUDIO_GETDEV_SUNOS returns a number which is an audio device defined | ||
204 | * herein (making it not too portable) | ||
205 | * | ||
206 | * AUDIO_FLUSH stops all playback and recording, clears all queued buffers, | ||
207 | * resets error counters, and restarts recording and playback as appropriate | ||
208 | * for the current sampling mode. | ||
209 | */ | ||
210 | #define AUDIO_GETINFO _IOR('A', 1, audio_info_t) | ||
211 | #define AUDIO_SETINFO _IOWR('A', 2, audio_info_t) | ||
212 | #define AUDIO_DRAIN _IO('A', 3) | ||
213 | #define AUDIO_GETDEV _IOR('A', 4, audio_device_t) | ||
214 | #define AUDIO_GETDEV_SUNOS _IOR('A', 4, int) | ||
215 | #define AUDIO_FLUSH _IO('A', 5) | ||
216 | |||
217 | /* Define possible audio hardware configurations for | ||
218 | * old SunOS-style AUDIO_GETDEV ioctl */ | ||
219 | #define AUDIO_DEV_UNKNOWN (0) /* not defined */ | ||
220 | #define AUDIO_DEV_AMD (1) /* audioamd device */ | ||
221 | #define AUDIO_DEV_SPEAKERBOX (2) /* dbri device with speakerbox */ | ||
222 | #define AUDIO_DEV_CODEC (3) /* dbri device (internal speaker) */ | ||
223 | #define AUDIO_DEV_CS4231 (5) /* cs4231 device */ | ||
224 | |||
225 | /* | ||
226 | * The following ioctl sets the audio device into an internal loopback mode, | ||
227 | * if the hardware supports this. The argument is TRUE to set loopback, | ||
228 | * FALSE to reset to normal operation. If the hardware does not support | ||
229 | * internal loopback, the ioctl should fail with EINVAL. | ||
230 | * Causes ADC data to be digitally mixed in and sent to the DAC. | ||
231 | */ | ||
232 | #define AUDIO_DIAG_LOOPBACK _IOW('A', 101, int) | ||
233 | |||
234 | #endif /* _AUDIOIO_H_ */ | ||
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h index 543e4e500a72..7a408a030f52 100644 --- a/include/asm-sparc64/ebus.h +++ b/include/asm-sparc64/ebus.h | |||
@@ -79,6 +79,7 @@ extern int ebus_dma_request(struct ebus_dma_info *p, dma_addr_t bus_addr, | |||
79 | size_t len); | 79 | size_t len); |
80 | extern void ebus_dma_prepare(struct ebus_dma_info *p, int write); | 80 | extern void ebus_dma_prepare(struct ebus_dma_info *p, int write); |
81 | extern unsigned int ebus_dma_residue(struct ebus_dma_info *p); | 81 | extern unsigned int ebus_dma_residue(struct ebus_dma_info *p); |
82 | extern unsigned int ebus_dma_addr(struct ebus_dma_info *p); | ||
82 | extern void ebus_dma_enable(struct ebus_dma_info *p, int on); | 83 | extern void ebus_dma_enable(struct ebus_dma_info *p, int on); |
83 | 84 | ||
84 | extern struct linux_ebus *ebus_chain; | 85 | extern struct linux_ebus *ebus_chain; |
diff --git a/include/asm-sparc64/kbio.h b/include/asm-sparc64/kbio.h deleted file mode 100644 index 3cf496bdf399..000000000000 --- a/include/asm-sparc64/kbio.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #ifndef __LINUX_KBIO_H | ||
2 | #define __LINUX_KBIO_H | ||
3 | |||
4 | /* Return keyboard type */ | ||
5 | #define KIOCTYPE _IOR('k', 9, int) | ||
6 | /* Return Keyboard layout */ | ||
7 | #define KIOCLAYOUT _IOR('k', 20, int) | ||
8 | |||
9 | enum { | ||
10 | TR_NONE, | ||
11 | TR_ASCII, /* keyboard is in regular state */ | ||
12 | TR_EVENT, /* keystrokes sent as firm events */ | ||
13 | TR_UNTRANS_EVENT /* EVENT+up and down+no translation */ | ||
14 | }; | ||
15 | |||
16 | /* Return the current keyboard translation */ | ||
17 | #define KIOCGTRANS _IOR('k', 5, int) | ||
18 | /* Set the keyboard translation */ | ||
19 | #define KIOCTRANS _IOW('k', 0, int) | ||
20 | |||
21 | /* Send a keyboard command */ | ||
22 | #define KIOCCMD _IOW('k', 8, int) | ||
23 | |||
24 | /* Return if keystrokes are being sent to /dev/kbd */ | ||
25 | |||
26 | /* Set routing of keystrokes to /dev/kbd */ | ||
27 | #define KIOCSDIRECT _IOW('k', 10, int) | ||
28 | |||
29 | /* Set keyboard leds */ | ||
30 | #define KIOCSLED _IOW('k', 14, unsigned char) | ||
31 | |||
32 | /* Get keyboard leds */ | ||
33 | #define KIOCGLED _IOR('k', 15, unsigned char) | ||
34 | |||
35 | /* Used by KIOC[GS]RATE */ | ||
36 | struct kbd_rate { | ||
37 | unsigned char delay; /* Delay in Hz before first repeat. */ | ||
38 | unsigned char rate; /* In characters per second (0..50). */ | ||
39 | }; | ||
40 | |||
41 | /* Set keyboard rate */ | ||
42 | #define KIOCSRATE _IOW('k', 40, struct kbd_rate) | ||
43 | |||
44 | /* Get keyboard rate */ | ||
45 | #define KIOCGRATE _IOW('k', 41, struct kbd_rate) | ||
46 | |||
47 | /* Top bit records if the key is up or down */ | ||
48 | #define KBD_UP 0x80 | ||
49 | |||
50 | /* Usable information */ | ||
51 | #define KBD_KEYMASK 0x7f | ||
52 | |||
53 | /* All keys up */ | ||
54 | #define KBD_IDLE 0x75 | ||
55 | |||
56 | #endif /* __LINUX_KBIO_H */ | ||
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 87c43c67866e..08ba72d7722c 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h | |||
@@ -87,37 +87,35 @@ extern void __flush_tlb_mm(unsigned long, unsigned long); | |||
87 | static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk) | 87 | static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk) |
88 | { | 88 | { |
89 | unsigned long ctx_valid; | 89 | unsigned long ctx_valid; |
90 | int cpu; | ||
90 | 91 | ||
92 | /* Note: page_table_lock is used here to serialize switch_mm | ||
93 | * and activate_mm, and their calls to get_new_mmu_context. | ||
94 | * This use of page_table_lock is unrelated to its other uses. | ||
95 | */ | ||
91 | spin_lock(&mm->page_table_lock); | 96 | spin_lock(&mm->page_table_lock); |
92 | if (CTX_VALID(mm->context)) | 97 | ctx_valid = CTX_VALID(mm->context); |
93 | ctx_valid = 1; | 98 | if (!ctx_valid) |
94 | else | 99 | get_new_mmu_context(mm); |
95 | ctx_valid = 0; | 100 | spin_unlock(&mm->page_table_lock); |
96 | 101 | ||
97 | if (!ctx_valid || (old_mm != mm)) { | 102 | if (!ctx_valid || (old_mm != mm)) { |
98 | if (!ctx_valid) | ||
99 | get_new_mmu_context(mm); | ||
100 | |||
101 | load_secondary_context(mm); | 103 | load_secondary_context(mm); |
102 | reload_tlbmiss_state(tsk, mm); | 104 | reload_tlbmiss_state(tsk, mm); |
103 | } | 105 | } |
104 | 106 | ||
105 | { | 107 | /* Even if (mm == old_mm) we _must_ check |
106 | int cpu = smp_processor_id(); | 108 | * the cpu_vm_mask. If we do not we could |
107 | 109 | * corrupt the TLB state because of how | |
108 | /* Even if (mm == old_mm) we _must_ check | 110 | * smp_flush_tlb_{page,range,mm} on sparc64 |
109 | * the cpu_vm_mask. If we do not we could | 111 | * and lazy tlb switches work. -DaveM |
110 | * corrupt the TLB state because of how | 112 | */ |
111 | * smp_flush_tlb_{page,range,mm} on sparc64 | 113 | cpu = smp_processor_id(); |
112 | * and lazy tlb switches work. -DaveM | 114 | if (!ctx_valid || !cpu_isset(cpu, mm->cpu_vm_mask)) { |
113 | */ | 115 | cpu_set(cpu, mm->cpu_vm_mask); |
114 | if (!ctx_valid || !cpu_isset(cpu, mm->cpu_vm_mask)) { | 116 | __flush_tlb_mm(CTX_HWBITS(mm->context), |
115 | cpu_set(cpu, mm->cpu_vm_mask); | 117 | SECONDARY_CONTEXT); |
116 | __flush_tlb_mm(CTX_HWBITS(mm->context), | ||
117 | SECONDARY_CONTEXT); | ||
118 | } | ||
119 | } | 118 | } |
120 | spin_unlock(&mm->page_table_lock); | ||
121 | } | 119 | } |
122 | 120 | ||
123 | #define deactivate_mm(tsk,mm) do { } while (0) | 121 | #define deactivate_mm(tsk,mm) do { } while (0) |
@@ -127,6 +125,10 @@ static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm | |||
127 | { | 125 | { |
128 | int cpu; | 126 | int cpu; |
129 | 127 | ||
128 | /* Note: page_table_lock is used here to serialize switch_mm | ||
129 | * and activate_mm, and their calls to get_new_mmu_context. | ||
130 | * This use of page_table_lock is unrelated to its other uses. | ||
131 | */ | ||
130 | spin_lock(&mm->page_table_lock); | 132 | spin_lock(&mm->page_table_lock); |
131 | if (!CTX_VALID(mm->context)) | 133 | if (!CTX_VALID(mm->context)) |
132 | get_new_mmu_context(mm); | 134 | get_new_mmu_context(mm); |
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h index 9777a9cca88a..ee26a071c677 100644 --- a/include/asm-sparc64/termios.h +++ b/include/asm-sparc64/termios.h | |||
@@ -38,15 +38,6 @@ struct sunos_ttysize { | |||
38 | int st_columns; /* Columns on the terminal */ | 38 | int st_columns; /* Columns on the terminal */ |
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* Used for packet mode */ | ||
42 | #define TIOCPKT_DATA 0 | ||
43 | #define TIOCPKT_FLUSHREAD 1 | ||
44 | #define TIOCPKT_FLUSHWRITE 2 | ||
45 | #define TIOCPKT_STOP 4 | ||
46 | #define TIOCPKT_START 8 | ||
47 | #define TIOCPKT_NOSTOP 16 | ||
48 | #define TIOCPKT_DOSTOP 32 | ||
49 | |||
50 | struct winsize { | 41 | struct winsize { |
51 | unsigned short ws_row; | 42 | unsigned short ws_row; |
52 | unsigned short ws_col; | 43 | unsigned short ws_col; |
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h index 66138d959df5..61c01882b562 100644 --- a/include/asm-sparc64/tlb.h +++ b/include/asm-sparc64/tlb.h | |||
@@ -58,11 +58,9 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, unsigned i | |||
58 | static inline void tlb_flush_mmu(struct mmu_gather *mp) | 58 | static inline void tlb_flush_mmu(struct mmu_gather *mp) |
59 | { | 59 | { |
60 | if (mp->need_flush) { | 60 | if (mp->need_flush) { |
61 | free_pages_and_swap_cache(mp->pages, mp->pages_nr); | ||
62 | mp->pages_nr = 0; | ||
61 | mp->need_flush = 0; | 63 | mp->need_flush = 0; |
62 | if (!tlb_fast_mode(mp)) { | ||
63 | free_pages_and_swap_cache(mp->pages, mp->pages_nr); | ||
64 | mp->pages_nr = 0; | ||
65 | } | ||
66 | } | 64 | } |
67 | 65 | ||
68 | } | 66 | } |
@@ -78,11 +76,9 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un | |||
78 | { | 76 | { |
79 | tlb_flush_mmu(mp); | 77 | tlb_flush_mmu(mp); |
80 | 78 | ||
81 | if (mp->fullmm) { | 79 | if (mp->fullmm) |
82 | if (CTX_VALID(mp->mm->context)) | ||
83 | do_flush_tlb_mm(mp->mm); | ||
84 | mp->fullmm = 0; | 80 | mp->fullmm = 0; |
85 | } else | 81 | else |
86 | flush_tlb_pending(); | 82 | flush_tlb_pending(); |
87 | 83 | ||
88 | /* keep the page table cache within bounds */ | 84 | /* keep the page table cache within bounds */ |
@@ -93,11 +89,11 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un | |||
93 | 89 | ||
94 | static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page) | 90 | static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page) |
95 | { | 91 | { |
96 | mp->need_flush = 1; | ||
97 | if (tlb_fast_mode(mp)) { | 92 | if (tlb_fast_mode(mp)) { |
98 | free_page_and_swap_cache(page); | 93 | free_page_and_swap_cache(page); |
99 | return; | 94 | return; |
100 | } | 95 | } |
96 | mp->need_flush = 1; | ||
101 | mp->pages[mp->pages_nr++] = page; | 97 | mp->pages[mp->pages_nr++] = page; |
102 | if (mp->pages_nr >= FREE_PTE_NR) | 98 | if (mp->pages_nr >= FREE_PTE_NR) |
103 | tlb_flush_mmu(mp); | 99 | tlb_flush_mmu(mp); |
diff --git a/include/asm-sparc64/vuid_event.h b/include/asm-sparc64/vuid_event.h deleted file mode 100644 index 9ef4d17ad08f..000000000000 --- a/include/asm-sparc64/vuid_event.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* SunOS Virtual User Input Device (VUID) compatibility */ | ||
2 | |||
3 | typedef struct firm_event { | ||
4 | unsigned short id; /* tag for this event */ | ||
5 | unsigned char pair_type; /* unused by X11 */ | ||
6 | unsigned char pair; /* unused by X11 */ | ||
7 | int value; /* VKEY_UP, VKEY_DOWN or delta */ | ||
8 | struct timeval time; | ||
9 | } Firm_event; | ||
10 | |||
11 | enum { | ||
12 | FE_PAIR_NONE, | ||
13 | FE_PAIR_SET, | ||
14 | FE_PAIR_DELTA, | ||
15 | FE_PAIR_ABSOLUTE | ||
16 | }; | ||
17 | |||
18 | /* VUID stream formats */ | ||
19 | #define VUID_NATIVE 0 /* Native byte stream format */ | ||
20 | #define VUID_FIRM_EVENT 1 /* send firm_event structures */ | ||
21 | |||
22 | /* ioctls */ | ||
23 | /* Set input device byte stream format (any of VUID_{NATIVE,FIRM_EVENT}) */ | ||
24 | #define VUIDSFORMAT _IOW('v', 1, int) | ||
25 | /* Retrieve input device byte stream format */ | ||
26 | #define VUIDGFORMAT _IOR('v', 2, int) | ||
27 | |||
28 | /* Possible tag values */ | ||
29 | /* mouse buttons: */ | ||
30 | #define MS_LEFT 0x7f20 | ||
31 | #define MS_MIDDLE 0x7f21 | ||
32 | #define MS_RIGHT 0x7f22 | ||
33 | /* motion: */ | ||
34 | #define LOC_X_DELTA 0x7f80 | ||
35 | #define LOC_Y_DELTA 0x7f81 | ||
36 | #define LOC_X_ABSOLUTE 0x7f82 /* X compat, unsupported */ | ||
37 | #define LOC_Y_ABSOLUTE 0x7f83 /* X compat, unsupported */ | ||
38 | |||
39 | #define VKEY_UP 0 | ||
40 | #define VKEY_DOWN 1 | ||