Deleted Added
sdiff udiff text old ( 331722 ) new ( 343158 )
full compact
1/*-
2 * Copyright (c) 1996-1999
3 * Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 13 unchanged lines hidden (view full) ---

22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * $FreeBSD: stable/11/sys/dev/atkbdc/atkbdcreg.h 331722 2018-03-29 02:50:57Z eadler $
31 * from kbdio.h,v 1.8 1998/09/25 11:55:46 yokota Exp
32 */
33
34#ifndef _DEV_ATKBDC_ATKBDCREG_H_
35#define _DEV_ATKBDC_ATKBDCREG_H_
36
37#include "opt_kbd.h" /* Structures depend on the value if KBDIO_DEBUG */
38

--- 5 unchanged lines hidden (view full) ---

44#define KBD_DATA_PORT 0 /* data port, read/write
45 * also used as keyboard command
46 * and mouse command port
47 */
48
49/* controller commands (sent to KBD_COMMAND_PORT) */
50#define KBDC_SET_COMMAND_BYTE 0x0060
51#define KBDC_GET_COMMAND_BYTE 0x0020
52#define KBDC_WRITE_TO_AUX 0x00d4
53#define KBDC_DISABLE_AUX_PORT 0x00a7
54#define KBDC_ENABLE_AUX_PORT 0x00a8
55#define KBDC_TEST_AUX_PORT 0x00a9
56#define KBDC_DIAGNOSE 0x00aa
57#define KBDC_TEST_KBD_PORT 0x00ab
58#define KBDC_DISABLE_KBD_PORT 0x00ad
59#define KBDC_ENABLE_KBD_PORT 0x00ae

--- 142 unchanged lines hidden (view full) ---

202 kqueue kbd; /* keyboard data queue */
203 kqueue aux; /* auxiliary data queue */
204 int retry;
205 int quirks; /* controller doesn't like deactivate */
206#define KBDC_QUIRK_KEEP_ACTIVATED (1 << 0)
207#define KBDC_QUIRK_IGNORE_PROBE_RESULT (1 << 1)
208#define KBDC_QUIRK_RESET_AFTER_PROBE (1 << 2)
209#define KBDC_QUIRK_SETLEDS_ON_INIT (1 << 3)
210} atkbdc_softc_t;
211
212enum kbdc_device_ivar {
213 KBDC_IVAR_VENDORID,
214 KBDC_IVAR_SERIAL,
215 KBDC_IVAR_LOGICALID,
216 KBDC_IVAR_COMPATID,
217};
218
219typedef caddr_t KBDC;
220
221#define KBDC_RID_KBD 0
222#define KBDC_RID_AUX 1
223
224/* function prototypes */
225
226atkbdc_softc_t *atkbdc_get_softc(int unit);
227int atkbdc_probe_unit(int unit, struct resource *port0, struct resource *port1);
228int atkbdc_attach_unit(int unit, atkbdc_softc_t *sc, struct resource *port0,
229 struct resource *port1);
230int atkbdc_configure(void);
231

--- 29 unchanged lines hidden (view full) ---

261int test_aux_port(KBDC kbdc);
262
263int kbdc_get_device_mask(KBDC kbdc);
264void kbdc_set_device_mask(KBDC kbdc, int mask);
265
266int get_controller_command_byte(KBDC kbdc);
267int set_controller_command_byte(KBDC kbdc, int command, int flag);
268
269#endif /* _KERNEL */
270
271#endif /* !_DEV_ATKBDC_ATKBDCREG_H_ */