pc-conf-reg.h 723 B

123456789101112131415161718192021222324252627282930313233
  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. #include <linux/io.h>
  10. #include <linux/spinlock.h>
  11. #include <linux/types.h>
  12. #define PC_CONF_INDEX 0x22
  13. #define PC_CONF_DATA 0x23
  14. #define PC_CONF_MPS_IMCR 0x70
  15. extern raw_spinlock_t pc_conf_lock;
  16. static inline u8 pc_conf_get(u8 reg)
  17. {
  18. outb(reg, PC_CONF_INDEX);
  19. return inb(PC_CONF_DATA);
  20. }
  21. static inline void pc_conf_set(u8 reg, u8 data)
  22. {
  23. outb(reg, PC_CONF_INDEX);
  24. outb(data, PC_CONF_DATA);
  25. }
  26. #endif /* _ASM_X86_PC_CONF_REG_H */