blob: d774af0d3b1de92d65d416fca0df37f2269648ba [file] [log] [blame]
Felix Heldd8bbc6c2023-07-14 19:05:36 +02001/* 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 Held69ffebf2023-07-24 21:31:44 +02009#define SMN_IOHC_MISC_BASE_13B1 0x13b10000
Felix Held4ff1d632023-08-23 22:25:41 +020010#define SMN_IOHC_MISC_BASE_13C1 0x13c10000
11#define SMN_IOHC_MISC_BASE_13D1 0x13d10000
12#define SMN_IOHC_MISC_BASE_13E1 0x13e10000
Felix Held69ffebf2023-07-24 21:31:44 +020013
Felix Heldd8bbc6c2023-07-14 19:05:36 +020014#define NON_PCI_RES_IDX_AUTO 0
15
16struct 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 Helde4594f12024-01-30 22:04:34 +010023void read_non_pci_resources(struct device *domain, unsigned long *idx);
Felix Heldd8bbc6c2023-07-14 19:05:36 +020024
25uint32_t get_iohc_misc_smn_base(struct device *domain);
26const struct non_pci_mmio_reg *get_iohc_non_pci_mmio_regs(size_t *count);
27
Felix Heldb0ab5452023-08-11 22:24:00 +020028signed int get_iohc_fabric_id(struct device *domain);
29
Felix Held6b248a22023-07-26 16:42:46 +020030void read_fsp_resources(struct device *dev, unsigned int *idx);
31
Felix Heldd8bbc6c2023-07-14 19:05:36 +020032#endif /* AMD_BLOCK_ROOT_COMPLEX_H */