1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for the configuration register space at port I/O locations
4  * 0x22 and 0x23 variously used by PC architectures, e.g. the MP Spec,
5  * Cyrix CPUs, numerous chipsets.
6  */
7 #ifndef _ASM_X86_PC_CONF_REG_H
8 #define _ASM_X86_PC_CONF_REG_H
9 
10 #include <linux/io.h>
11 #include <linux/spinlock.h>
12 #include <linux/types.h>
13 
14 #define PC_CONF_INDEX		0x22
15 #define PC_CONF_DATA		0x23
16 
17 #define PC_CONF_MPS_IMCR	0x70
18 
19 extern raw_spinlock_t pc_conf_lock;
20 
pc_conf_get(u8 reg)21 static inline u8 pc_conf_get(u8 reg)
22 {
23 	outb(reg, PC_CONF_INDEX);
24 	return inb(PC_CONF_DATA);
25 }
26 
pc_conf_set(u8 reg,u8 data)27 static inline void pc_conf_set(u8 reg, u8 data)
28 {
29 	outb(reg, PC_CONF_INDEX);
30 	outb(data, PC_CONF_DATA);
31 }
32 
33 #endif /* _ASM_X86_PC_CONF_REG_H */
34