Felix Held | d8bbc6c | 2023-07-14 19:05:36 +0200 | [diff] [blame] | 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 | |
Felix Held | 69ffebf | 2023-07-24 21:31:44 +0200 | [diff] [blame] | 9 | #define SMN_IOHC_MISC_BASE_13B1 0x13b10000 |
| 10 | |
Felix Held | d8bbc6c | 2023-07-14 19:05:36 +0200 | [diff] [blame] | 11 | #define NON_PCI_RES_IDX_AUTO 0 |
| 12 | |
| 13 | struct non_pci_mmio_reg { |
| 14 | uint32_t iohc_misc_offset; |
| 15 | uint64_t mask; |
| 16 | uint64_t size; |
| 17 | unsigned long res_idx; /* Use NON_PCI_RES_IDX_AUTO or a specific resource index */ |
| 18 | }; |
| 19 | |
| 20 | void read_non_pci_resources(struct device *domain, unsigned int *idx); |
| 21 | |
| 22 | uint32_t get_iohc_misc_smn_base(struct device *domain); |
| 23 | const struct non_pci_mmio_reg *get_iohc_non_pci_mmio_regs(size_t *count); |
| 24 | |
Felix Held | 6b248a2 | 2023-07-26 16:42:46 +0200 | [diff] [blame^] | 25 | void read_fsp_resources(struct device *dev, unsigned int *idx); |
| 26 | |
Felix Held | d8bbc6c | 2023-07-14 19:05:36 +0200 | [diff] [blame] | 27 | #endif /* AMD_BLOCK_ROOT_COMPLEX_H */ |