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 |
Felix Held | 4ff1d63 | 2023-08-23 22:25:41 +0200 | [diff] [blame] | 10 | #define SMN_IOHC_MISC_BASE_13C1 0x13c10000 |
| 11 | #define SMN_IOHC_MISC_BASE_13D1 0x13d10000 |
| 12 | #define SMN_IOHC_MISC_BASE_13E1 0x13e10000 |
Felix Held | 69ffebf | 2023-07-24 21:31:44 +0200 | [diff] [blame] | 13 | |
Felix Held | d8bbc6c | 2023-07-14 19:05:36 +0200 | [diff] [blame] | 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 | |
Felix Held | e4594f1 | 2024-01-30 22:04:34 +0100 | [diff] [blame^] | 23 | void read_non_pci_resources(struct device *domain, unsigned long *idx); |
Felix Held | d8bbc6c | 2023-07-14 19:05:36 +0200 | [diff] [blame] | 24 | |
| 25 | uint32_t get_iohc_misc_smn_base(struct device *domain); |
| 26 | const struct non_pci_mmio_reg *get_iohc_non_pci_mmio_regs(size_t *count); |
| 27 | |
Felix Held | b0ab545 | 2023-08-11 22:24:00 +0200 | [diff] [blame] | 28 | signed int get_iohc_fabric_id(struct device *domain); |
| 29 | |
Felix Held | 6b248a2 | 2023-07-26 16:42:46 +0200 | [diff] [blame] | 30 | void read_fsp_resources(struct device *dev, unsigned int *idx); |
| 31 | |
Felix Held | d8bbc6c | 2023-07-14 19:05:36 +0200 | [diff] [blame] | 32 | #endif /* AMD_BLOCK_ROOT_COMPLEX_H */ |