Debian Codegraph @

src/soc/amd/common/block/include/amdblocks/root_complex.h

raw symbols SCIP
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 IOHC_MMIO_EN BIT(0)
15
16 #define NON_PCI_RES_IDX_AUTO 0
17
18 struct domain_iohc_info {
19 uint16_t fabric_id;
20 uint32_t misc_smn_base;
21 };
22
23 struct non_pci_mmio_reg {
24 uint32_t iohc_misc_offset;
25 uint64_t mask;
26 uint64_t size;
27 unsigned long res_idx; /* Use NON_PCI_RES_IDX_AUTO or a specific resource index */
28 };
29
30 void read_non_pci_resources(struct device *domain, unsigned long *idx);
31
32 void read_soc_memmap_resources(struct device *domain, unsigned long *idx);
33
34 uint32_t get_iohc_misc_smn_base(struct device *domain);
35 const struct domain_iohc_info *get_iohc_info(size_t *count);
36 const struct non_pci_mmio_reg *get_iohc_non_pci_mmio_regs(size_t *count);
37
38 signed int get_iohc_fabric_id(struct device *domain);
39
40 void read_fsp_resources(struct device *dev, unsigned long *idx);
41
42 void amd_pci_domain_init(struct device *domain);
43
44 #endif /* AMD_BLOCK_ROOT_COMPLEX_H */