From ef40ca57ebd4de746eafaa1e5a1cae035337f285 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Thu, 19 Jun 2014 22:19:20 +0300 Subject: AGESA: Call get_bus_conf() just once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of calling get_bus_conf() three times from write_tables() and executing it once, just make one call before entering write_tables(). Change-Id: I818e37128cb0fb5eaded3c1e00b6b146c1267647 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/6133 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- src/mainboard/amd/torpedo/acpi_tables.c | 2 -- src/mainboard/amd/torpedo/get_bus_conf.c | 8 -------- src/mainboard/amd/torpedo/irq_tables.c | 4 ---- src/mainboard/amd/torpedo/mptable.c | 2 -- 4 files changed, 16 deletions(-) (limited to 'src/mainboard/amd/torpedo') diff --git a/src/mainboard/amd/torpedo/acpi_tables.c b/src/mainboard/amd/torpedo/acpi_tables.c index c3595630c6..b916bce898 100644 --- a/src/mainboard/amd/torpedo/acpi_tables.c +++ b/src/mainboard/amd/torpedo/acpi_tables.c @@ -121,8 +121,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *ssdt; acpi_hest_t *hest; - get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */ - /* Align ACPI tables to 16 bytes */ start = ALIGN(start, 16); current = start; diff --git a/src/mainboard/amd/torpedo/get_bus_conf.c b/src/mainboard/amd/torpedo/get_bus_conf.c index 5404941c10..36613f706c 100644 --- a/src/mainboard/amd/torpedo/get_bus_conf.c +++ b/src/mainboard/amd/torpedo/get_bus_conf.c @@ -54,19 +54,11 @@ u32 bus_type[256]; u32 sbdn_sb900; - -static u32 get_bus_conf_done = 0; - void get_bus_conf(void) { device_t dev; int i, j; - if (get_bus_conf_done == 1) - return; /* do it only once */ - - get_bus_conf_done = 1; - printk(BIOS_DEBUG, "Mainboard - %s - %s - Start.\n", __FILE__, __func__); sbdn_sb900 = 0; diff --git a/src/mainboard/amd/torpedo/irq_tables.c b/src/mainboard/amd/torpedo/irq_tables.c index 302780284f..53cf6fa9c0 100644 --- a/src/mainboard/amd/torpedo/irq_tables.c +++ b/src/mainboard/amd/torpedo/irq_tables.c @@ -60,10 +60,6 @@ unsigned long write_pirq_routing_table(unsigned long addr) u8 sum = 0; int i; - - get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */ - - /* Align the table to be 16 byte aligned. */ addr += 15; addr &= ~15; diff --git a/src/mainboard/amd/torpedo/mptable.c b/src/mainboard/amd/torpedo/mptable.c index 24e48d119c..ae00cf76fd 100644 --- a/src/mainboard/amd/torpedo/mptable.c +++ b/src/mainboard/amd/torpedo/mptable.c @@ -104,8 +104,6 @@ static void *smp_write_config_table(void *v) cpu_flag, cpu_features, cpu_feature_flags ); - get_bus_conf(); - //mptable_write_buses(mc, NULL, &bus_isa); my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 1, "PCI "); -- cgit v1.2.3