summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-03 11:38:39 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-04 17:20:24 +0000
commitc0b1be0ba1d0c87d9670e695c60eeb6ec901a2d8 (patch)
tree5441907a48042d21e459c470a5a514527162fa8c /src/northbridge
parenta2cfe9e90001fe11f7c7653c9917ea75dd082333 (diff)
amdfam10 boards: Call get_bus_conf() just once
It has to be called once before PIRQ and MP table generation. Change-Id: I238c6b4810404d320b36d4f6b4a161c1ff11c8d3 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/30630 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/amd/amdfam10/acpi.c4
-rw-r--r--src/northbridge/amd/amdfam10/get_pci1234.c11
2 files changed, 11 insertions, 4 deletions
diff --git a/src/northbridge/amd/amdfam10/acpi.c b/src/northbridge/amd/amdfam10/acpi.c
index eaea725360..dc139adb87 100644
--- a/src/northbridge/amd/amdfam10/acpi.c
+++ b/src/northbridge/amd/amdfam10/acpi.c
@@ -215,8 +215,6 @@ void northbridge_acpi_write_vars(struct device *device)
char pscope[] = "\\_SB.PCI0";
int i;
- get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
-
acpigen_write_scope(pscope);
acpigen_write_name("BUSN");
@@ -333,8 +331,6 @@ unsigned long northbridge_write_acpi_tables(struct device *device,
acpi_srat_t *srat;
acpi_slit_t *slit;
- get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
-
/* SRAT */
current = ALIGN(current, 8);
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
diff --git a/src/northbridge/amd/amdfam10/get_pci1234.c b/src/northbridge/amd/amdfam10/get_pci1234.c
index d9dd2ced8b..71772b3feb 100644
--- a/src/northbridge/amd/amdfam10/get_pci1234.c
+++ b/src/northbridge/amd/amdfam10/get_pci1234.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <bootstate.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@@ -108,3 +109,13 @@ void get_pci1234(void)
sysconf.hcid[i] = 0;
}
}
+
+static void amd_bs_sysconf(void *arg)
+{
+ /* Prepare sysconf structures, which are used to generate IRQ,
+ * MP and ACPI table entries.
+ */
+ get_bus_conf();
+}
+
+BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY, amd_bs_sysconf, NULL);