Angel Pons | 32abdd6 | 2020-04-05 15:47:03 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Aamir Bohra | 3ee54bb | 2018-10-17 11:55:01 +0530 | [diff] [blame] | 2 | |
| 3 | #include <device/device.h> |
| 4 | #include <intelblocks/systemagent.h> |
| 5 | #include <soc/iomap.h> |
| 6 | #include <soc/romstage.h> |
| 7 | #include <soc/systemagent.h> |
| 8 | |
| 9 | void systemagent_early_init(void) |
| 10 | { |
| 11 | static const struct sa_mmio_descriptor soc_fixed_pci_resources[] = { |
| 12 | { MCHBAR, MCH_BASE_ADDRESS, MCH_BASE_SIZE, "MCHBAR" }, |
| 13 | { DMIBAR, DMI_BASE_ADDRESS, DMI_BASE_SIZE, "DMIBAR" }, |
| 14 | { EPBAR, EP_BASE_ADDRESS, EP_BASE_SIZE, "EPBAR" }, |
| 15 | }; |
| 16 | |
| 17 | static const struct sa_mmio_descriptor soc_fixed_mch_resources[] = { |
| 18 | { REGBAR, REG_BASE_ADDRESS, REG_BASE_SIZE, "REGBAR" }, |
| 19 | { EDRAMBAR, EDRAM_BASE_ADDRESS, EDRAM_BASE_SIZE, "EDRAMBAR" }, |
| 20 | }; |
| 21 | |
| 22 | /* Set Fixed MMIO address into PCI configuration space */ |
| 23 | sa_set_pci_bar(soc_fixed_pci_resources, |
| 24 | ARRAY_SIZE(soc_fixed_pci_resources)); |
| 25 | /* Set Fixed MMIO address into MCH base address */ |
| 26 | sa_set_mch_bar(soc_fixed_mch_resources, |
| 27 | ARRAY_SIZE(soc_fixed_mch_resources)); |
| 28 | /* Enable PAM registers */ |
| 29 | enable_pam_region(); |
| 30 | } |