blob: fd75ddffa386bbcc738fcc98c585e7e2b15cb9a7 [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
10
Felix Heldd8bbc6c2023-07-14 19:05:36 +020011#define NON_PCI_RES_IDX_AUTO 0
12
13struct 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
20void read_non_pci_resources(struct device *domain, unsigned int *idx);
21
22uint32_t get_iohc_misc_smn_base(struct device *domain);
23const struct non_pci_mmio_reg *get_iohc_non_pci_mmio_regs(size_t *count);
24
Felix Held6b248a22023-07-26 16:42:46 +020025void read_fsp_resources(struct device *dev, unsigned int *idx);
26
Felix Heldd8bbc6c2023-07-14 19:05:36 +020027#endif /* AMD_BLOCK_ROOT_COMPLEX_H */