1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #ifndef SOC_INTEL_COMMON_BLOCK_P2SBLIB_H 4 #define SOC_INTEL_COMMON_BLOCK_P2SBLIB_H 5 6 #include <stdint.h> 7 8 /* P2SB generic configuration register */ 9 #define P2SBC 0xe0 10 #define P2SBC_HIDE_BIT (1 << 0) 11 12 void p2sb_dev_enable_bar(pci_devfn_t dev, uint64_t bar); 13 bool p2sb_dev_is_hidden(pci_devfn_t dev); 14 void p2sb_dev_unhide(pci_devfn_t dev); 15 void p2sb_dev_hide(pci_devfn_t dev); 16 uint32_t p2sb_dev_sbi_read(pci_devfn_t dev, uint8_t pid, uint16_t reg); 17 void p2sb_dev_sbi_write(pci_devfn_t dev, uint8_t pid, uint16_t reg, uint32_t val); 18 19 #endif /* SOC_INTEL_COMMON_BLOCK_P2SBLIB_H */ 20