atkbdcreg.h (331722) | atkbdcreg.h (343158) |
---|---|
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 * | 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 $ | 30 * $FreeBSD: stable/11/sys/dev/atkbdc/atkbdcreg.h 343158 2019-01-18 21:12:00Z wulf $ |
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 | 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_MUX 0x0090 53#define KBDC_FORCE_AUX_OUTPUT 0x00d3 |
|
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) | 54#define KBDC_WRITE_TO_AUX 0x00d4 55#define KBDC_DISABLE_AUX_PORT 0x00a7 56#define KBDC_ENABLE_AUX_PORT 0x00a8 57#define KBDC_TEST_AUX_PORT 0x00a9 58#define KBDC_DIAGNOSE 0x00aa 59#define KBDC_TEST_KBD_PORT 0x00ab 60#define KBDC_DISABLE_KBD_PORT 0x00ad 61#define KBDC_ENABLE_KBD_PORT 0x00ae --- 142 unchanged lines hidden (view full) --- 204 kqueue kbd; /* keyboard data queue */ 205 kqueue aux; /* auxiliary data queue */ 206 int retry; 207 int quirks; /* controller doesn't like deactivate */ 208#define KBDC_QUIRK_KEEP_ACTIVATED (1 << 0) 209#define KBDC_QUIRK_IGNORE_PROBE_RESULT (1 << 1) 210#define KBDC_QUIRK_RESET_AFTER_PROBE (1 << 2) 211#define KBDC_QUIRK_SETLEDS_ON_INIT (1 << 3) |
212 int aux_mux_enabled; /* active PS/2 multiplexing is enabled */ 213 int aux_mux_port; /* current aux mux port */ |
|
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 | 214} atkbdc_softc_t; 215 216enum kbdc_device_ivar { 217 KBDC_IVAR_VENDORID, 218 KBDC_IVAR_SERIAL, 219 KBDC_IVAR_LOGICALID, 220 KBDC_IVAR_COMPATID, 221}; 222 223typedef caddr_t KBDC; 224 225#define KBDC_RID_KBD 0 226#define KBDC_RID_AUX 1 227 |
228#define KBDC_AUX_MUX_NUM_PORTS 4 229 |
|
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 | 230/* function prototypes */ 231 232atkbdc_softc_t *atkbdc_get_softc(int unit); 233int atkbdc_probe_unit(int unit, struct resource *port0, struct resource *port1); 234int atkbdc_attach_unit(int unit, atkbdc_softc_t *sc, struct resource *port0, 235 struct resource *port1); 236int atkbdc_configure(void); 237 --- 29 unchanged lines hidden (view full) --- 267int test_aux_port(KBDC kbdc); 268 269int kbdc_get_device_mask(KBDC kbdc); 270void kbdc_set_device_mask(KBDC kbdc, int mask); 271 272int get_controller_command_byte(KBDC kbdc); 273int set_controller_command_byte(KBDC kbdc, int command, int flag); 274 |
275int set_active_aux_mux_port(KBDC p, int port); 276int enable_aux_mux(KBDC p); 277int disable_aux_mux(KBDC p); 278int aux_mux_is_enabled(KBDC p); 279 |
|
269#endif /* _KERNEL */ 270 271#endif /* !_DEV_ATKBDC_ATKBDCREG_H_ */ | 280#endif /* _KERNEL */ 281 282#endif /* !_DEV_ATKBDC_ATKBDCREG_H_ */ |