Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Support for the configuration register space at port I/O locations
0004  * 0x22 and 0x23 variously used by PC architectures, e.g. the MP Spec,
0005  * Cyrix CPUs, numerous chipsets.
0006  */
0007 #ifndef _ASM_X86_PC_CONF_REG_H
0008 #define _ASM_X86_PC_CONF_REG_H
0009 
0010 #include <linux/io.h>
0011 #include <linux/spinlock.h>
0012 #include <linux/types.h>
0013 
0014 #define PC_CONF_INDEX       0x22
0015 #define PC_CONF_DATA        0x23
0016 
0017 #define PC_CONF_MPS_IMCR    0x70
0018 
0019 extern raw_spinlock_t pc_conf_lock;
0020 
0021 static inline u8 pc_conf_get(u8 reg)
0022 {
0023     outb(reg, PC_CONF_INDEX);
0024     return inb(PC_CONF_DATA);
0025 }
0026 
0027 static inline void pc_conf_set(u8 reg, u8 data)
0028 {
0029     outb(reg, PC_CONF_INDEX);
0030     outb(data, PC_CONF_DATA);
0031 }
0032 
0033 #endif /* _ASM_X86_PC_CONF_REG_H */