1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #ifndef AMD_BLOCK_ROOT_COMPLEX_H 4 #define AMD_BLOCK_ROOT_COMPLEX_H 5 6 #include <device/device.h> 7 #include <types.h> 8 9 #define SMN_IOHC_MISC_BASE_13B1 0x13b10000 10 #define SMN_IOHC_MISC_BASE_13C1 0x13c10000 11 #define SMN_IOHC_MISC_BASE_13D1 0x13d10000 12 #define SMN_IOHC_MISC_BASE_13E1 0x13e10000 13 14 #define NON_PCI_RES_IDX_AUTO 0 15 16 struct non_pci_mmio_reg { 17 uint32_t iohc_misc_offset; 18 uint64_t mask; 19 uint64_t size; 20 unsigned long res_idx; /* Use NON_PCI_RES_IDX_AUTO or a specific resource index */ 21 }; 22 23 void read_non_pci_resources(struct device *domain, unsigned long *idx); 24 25 void read_soc_memmap_resources(struct device *domain, unsigned long *idx); 26 27 uint32_t get_iohc_misc_smn_base(struct device *domain); 28 const struct non_pci_mmio_reg *get_iohc_non_pci_mmio_regs(size_t *count); 29 30 signed int get_iohc_fabric_id(struct device *domain); 31 32 void read_fsp_resources(struct device *dev, unsigned long *idx); 33 34 void amd_pci_domain_init(struct device *domain); 35 36 #endif /* AMD_BLOCK_ROOT_COMPLEX_H */ 37