1 /* SPDX-License-Identifier: GPL-2.0-only */
7 * Copyright (c) 1999-2002 Vojtech Pavlik
11 * Arch-dependent inline functions and defines.
14 #if defined(CONFIG_MACH_JAZZ)
15 #include "i8042-jazzio.h"
16 #elif defined(CONFIG_SGI_HAS_I8042)
17 #include "i8042-ip22io.h"
18 #elif defined(CONFIG_SNI_RM)
19 #include "i8042-snirm.h"
20 #elif defined(CONFIG_PPC)
21 #include "i8042-ppcio.h"
22 #elif defined(CONFIG_SPARC)
23 #include "i8042-sparcio.h"
24 #elif defined(CONFIG_X86) || defined(CONFIG_IA64)
25 #include "i8042-x86ia64io.h"
26 #elif defined(CONFIG_UNICORE32)
27 #include "i8042-unicore32io.h"
33 * This is in 50us units, the time we wait for the i8042 to react. This
34 * has to be long enough for the i8042 itself to timeout on sending a byte
35 * to a non-existent mouse.
38 #define I8042_CTL_TIMEOUT 10000
44 #define I8042_RET_CTL_TEST 0x55
47 * Expected maximum internal i8042 buffer size. This is used for flushing
51 #define I8042_BUFFER_SIZE 16
54 * Number of AUX ports on controllers supporting active multiplexing
58 #define I8042_NUM_MUX_PORTS 4
65 static unsigned long i8042_start_time
;
66 #define dbg_init() do { i8042_start_time = jiffies; } while (0)
67 #define dbg(format, arg...) \
70 printk(KERN_DEBUG KBUILD_MODNAME ": [%d] " format, \
71 (int) (jiffies - i8042_start_time), ##arg); \
74 #define filter_dbg(filter, data, format, args...) \
79 if (!filter || i8042_unmask_kbd_data) \
80 dbg("%02x " format, data, ##args); \
82 dbg("** " format, ##args); \
85 #define dbg_init() do { } while (0)
86 #define dbg(format, arg...) \
89 printk(KERN_DEBUG pr_fmt(format), ##arg); \
92 #define filter_dbg(filter, data, format, args...) do { } while (0)