Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6133
-gerrit
commit 42b0d0fdadebf695102ce2d896b5537d5054ded2 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Thu Jun 19 22:19:20 2014 +0300
AGESA: Call get_bus_conf() just once
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 kyosti.malkki@gmail.com --- src/cpu/amd/agesa/amd_late_init.c | 3 +++ src/mainboard/amd/dinar/acpi_tables.c | 2 -- src/mainboard/amd/dinar/get_bus_conf.c | 10 ---------- src/mainboard/amd/dinar/irq_tables.c | 4 ---- src/mainboard/amd/dinar/mptable.c | 1 - src/mainboard/amd/inagua/acpi_tables.c | 2 -- src/mainboard/amd/inagua/get_bus_conf.c | 7 ------- src/mainboard/amd/inagua/irq_tables.c | 4 ---- src/mainboard/amd/inagua/mptable.c | 2 -- src/mainboard/amd/olivehill/acpi_tables.c | 2 -- src/mainboard/amd/olivehill/get_bus_conf.c | 5 ----- src/mainboard/amd/olivehill/irq_tables.c | 2 -- src/mainboard/amd/olivehill/mptable.c | 2 -- src/mainboard/amd/parmer/acpi_tables.c | 2 -- src/mainboard/amd/parmer/get_bus_conf.c | 5 ----- src/mainboard/amd/parmer/irq_tables.c | 2 -- src/mainboard/amd/parmer/mptable.c | 2 -- src/mainboard/amd/persimmon/acpi_tables.c | 2 -- src/mainboard/amd/persimmon/get_bus_conf.c | 6 ------ src/mainboard/amd/persimmon/irq_tables.c | 4 ---- src/mainboard/amd/persimmon/mptable.c | 3 --- src/mainboard/amd/south_station/acpi_tables.c | 2 -- src/mainboard/amd/south_station/get_bus_conf.c | 7 ------- src/mainboard/amd/south_station/irq_tables.c | 4 ---- src/mainboard/amd/south_station/mptable.c | 2 -- src/mainboard/amd/thatcher/acpi_tables.c | 2 -- src/mainboard/amd/thatcher/get_bus_conf.c | 7 ------- src/mainboard/amd/thatcher/irq_tables.c | 2 -- src/mainboard/amd/thatcher/mptable.c | 2 -- 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 -- src/mainboard/amd/union_station/acpi_tables.c | 2 -- src/mainboard/amd/union_station/get_bus_conf.c | 7 ------- src/mainboard/amd/union_station/irq_tables.c | 4 ---- src/mainboard/amd/union_station/mptable.c | 2 -- src/mainboard/asrock/e350m1/acpi_tables.c | 2 -- src/mainboard/asrock/e350m1/get_bus_conf.c | 7 ------- src/mainboard/asrock/e350m1/irq_tables.c | 4 ---- src/mainboard/asrock/e350m1/mptable.c | 2 -- src/mainboard/asrock/imb-a180/acpi_tables.c | 2 -- src/mainboard/asrock/imb-a180/get_bus_conf.c | 7 ------- src/mainboard/asrock/imb-a180/irq_tables.c | 2 -- src/mainboard/asrock/imb-a180/mptable.c | 2 -- src/mainboard/asus/f2a85-m/acpi_tables.c | 2 -- src/mainboard/asus/f2a85-m/get_bus_conf.c | 8 -------- src/mainboard/asus/f2a85-m/irq_tables.c | 2 -- src/mainboard/asus/f2a85-m/mptable.c | 2 -- src/mainboard/gizmosphere/gizmo/acpi_tables.c | 2 -- src/mainboard/gizmosphere/gizmo/get_bus_conf.c | 6 ------ src/mainboard/gizmosphere/gizmo/irq_tables.c | 4 ---- src/mainboard/gizmosphere/gizmo/mptable.c | 2 -- src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c | 2 -- src/mainboard/hp/pavilion_m6_1035dx/get_bus_conf.c | 7 ------- src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c | 2 -- src/mainboard/hp/pavilion_m6_1035dx/mptable.c | 2 -- src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c | 2 -- src/mainboard/jetway/nf81-t56n-lf/get_bus_conf.c | 9 --------- src/mainboard/jetway/nf81-t56n-lf/irq_tables.c | 6 ------ src/mainboard/jetway/nf81-t56n-lf/mptable.c | 3 --- src/mainboard/lippert/frontrunner-af/acpi_tables.c | 2 -- src/mainboard/lippert/frontrunner-af/get_bus_conf.c | 6 ------ src/mainboard/lippert/frontrunner-af/irq_tables.c | 4 ---- src/mainboard/lippert/frontrunner-af/mptable.c | 2 -- src/mainboard/lippert/toucan-af/acpi_tables.c | 2 -- src/mainboard/lippert/toucan-af/get_bus_conf.c | 7 ------- src/mainboard/lippert/toucan-af/irq_tables.c | 4 ---- src/mainboard/lippert/toucan-af/mptable.c | 2 -- src/mainboard/supermicro/h8qgi/acpi_tables.c | 2 -- src/mainboard/supermicro/h8qgi/get_bus_conf.c | 8 -------- src/mainboard/supermicro/h8qgi/irq_tables.c | 4 ---- src/mainboard/supermicro/h8qgi/mptable.c | 1 - src/mainboard/supermicro/h8scm/acpi_tables.c | 2 -- src/mainboard/supermicro/h8scm/get_bus_conf.c | 8 -------- src/mainboard/supermicro/h8scm/irq_tables.c | 2 -- src/mainboard/supermicro/h8scm/mptable.c | 1 - src/mainboard/tyan/s8226/acpi_tables.c | 2 -- src/mainboard/tyan/s8226/get_bus_conf.c | 6 ------ src/mainboard/tyan/s8226/irq_tables.c | 4 ---- src/mainboard/tyan/s8226/mptable.c | 1 - 81 files changed, 3 insertions(+), 287 deletions(-)
diff --git a/src/cpu/amd/agesa/amd_late_init.c b/src/cpu/amd/agesa/amd_late_init.c index e08b159..8bce364 100644 --- a/src/cpu/amd/agesa/amd_late_init.c +++ b/src/cpu/amd/agesa/amd_late_init.c @@ -36,6 +36,9 @@ static void agesawrapper_post_device(void *unused) printk(BIOS_DEBUG, "agesawrapper_amdinitlate failed: %x \n", status); }
+ /* Preparation for write_tables(). */ + get_bus_conf(); + if (!acpi_s3_resume_allowed()) return;
diff --git a/src/mainboard/amd/dinar/acpi_tables.c b/src/mainboard/amd/dinar/acpi_tables.c index 117e00c..7df02b6 100644 --- a/src/mainboard/amd/dinar/acpi_tables.c +++ b/src/mainboard/amd/dinar/acpi_tables.c @@ -173,8 +173,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/dinar/get_bus_conf.c b/src/mainboard/amd/dinar/get_bus_conf.c index a4d627b..e93ca84 100644 --- a/src/mainboard/amd/dinar/get_bus_conf.c +++ b/src/mainboard/amd/dinar/get_bus_conf.c @@ -59,21 +59,11 @@ u32 bus_type[256]; u32 sbdn_sb700; u32 sbdn_rd890;
-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 - Get_bus_conf.c - get_bus_conf - Start.\n");
sbdn_sb700 = 0; diff --git a/src/mainboard/amd/dinar/irq_tables.c b/src/mainboard/amd/dinar/irq_tables.c index 0bf66bb..e4f70ef 100644 --- a/src/mainboard/amd/dinar/irq_tables.c +++ b/src/mainboard/amd/dinar/irq_tables.c @@ -58,10 +58,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/dinar/mptable.c b/src/mainboard/amd/dinar/mptable.c index 5f9e83b..65304e1 100644 --- a/src/mainboard/amd/dinar/mptable.c +++ b/src/mainboard/amd/dinar/mptable.c @@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v) mptable_init(mc, LOCAL_APIC_ADDR);
smp_write_processors(mc); - get_bus_conf(); mptable_write_buses(mc, NULL, &bus_isa);
/* diff --git a/src/mainboard/amd/inagua/acpi_tables.c b/src/mainboard/amd/inagua/acpi_tables.c index 53a2666..6d4f0e7 100644 --- a/src/mainboard/amd/inagua/acpi_tables.c +++ b/src/mainboard/amd/inagua/acpi_tables.c @@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/inagua/get_bus_conf.c b/src/mainboard/amd/inagua/get_bus_conf.c index 8ab41d1..ac72b48 100644 --- a/src/mainboard/amd/inagua/get_bus_conf.c +++ b/src/mainboard/amd/inagua/get_bus_conf.c @@ -49,9 +49,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_sb800;
-static u32 get_bus_conf_done = 0; - - void get_bus_conf(void) { u32 apicid_base; @@ -59,10 +56,6 @@ 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;
sbdn_sb800 = 0;
diff --git a/src/mainboard/amd/inagua/irq_tables.c b/src/mainboard/amd/inagua/irq_tables.c index 85f85ef..1669e7a 100644 --- a/src/mainboard/amd/inagua/irq_tables.c +++ b/src/mainboard/amd/inagua/irq_tables.c @@ -59,10 +59,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/inagua/mptable.c b/src/mainboard/amd/inagua/mptable.c index 7352205..d2f8506 100644 --- a/src/mainboard/amd/inagua/mptable.c +++ b/src/mainboard/amd/inagua/mptable.c @@ -60,8 +60,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */ diff --git a/src/mainboard/amd/olivehill/acpi_tables.c b/src/mainboard/amd/olivehill/acpi_tables.c index 03e68ab..2decab7 100644 --- a/src/mainboard/amd/olivehill/acpi_tables.c +++ b/src/mainboard/amd/olivehill/acpi_tables.c @@ -138,8 +138,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *ivrs; 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/olivehill/get_bus_conf.c b/src/mainboard/amd/olivehill/get_bus_conf.c index 3addc97..f1643a4 100644 --- a/src/mainboard/amd/olivehill/get_bus_conf.c +++ b/src/mainboard/amd/olivehill/get_bus_conf.c @@ -48,7 +48,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_yangtze;
-static u32 get_bus_conf_done = 0;
void get_bus_conf(void) { @@ -58,10 +57,6 @@ 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;
dev = dev_find_slot(0, PCI_DEVFN(0, 0)); /* clear IoapicSbFeatureEn */ pci_write_config32(dev, 0xF8, 0); diff --git a/src/mainboard/amd/olivehill/irq_tables.c b/src/mainboard/amd/olivehill/irq_tables.c index 2eff4e0..b89d9c7 100644 --- a/src/mainboard/amd/olivehill/irq_tables.c +++ b/src/mainboard/amd/olivehill/irq_tables.c @@ -57,8 +57,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/olivehill/mptable.c b/src/mainboard/amd/olivehill/mptable.c index adf3b6c..3ccb910 100644 --- a/src/mainboard/amd/olivehill/mptable.c +++ b/src/mainboard/amd/olivehill/mptable.c @@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - //mptable_write_buses(mc, NULL, &bus_isa); my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 1, "PCI "); diff --git a/src/mainboard/amd/parmer/acpi_tables.c b/src/mainboard/amd/parmer/acpi_tables.c index f03ca6f..d36e7ee 100644 --- a/src/mainboard/amd/parmer/acpi_tables.c +++ b/src/mainboard/amd/parmer/acpi_tables.c @@ -134,8 +134,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *ivrs; 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/parmer/get_bus_conf.c b/src/mainboard/amd/parmer/get_bus_conf.c index ce5276f..4c4777f 100644 --- a/src/mainboard/amd/parmer/get_bus_conf.c +++ b/src/mainboard/amd/parmer/get_bus_conf.c @@ -48,7 +48,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_hudson;
-static u32 get_bus_conf_done = 0;
void get_bus_conf(void) { @@ -57,10 +56,6 @@ 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;
sbdn_hudson = 0; diff --git a/src/mainboard/amd/parmer/irq_tables.c b/src/mainboard/amd/parmer/irq_tables.c index d5339ad..a54998e 100644 --- a/src/mainboard/amd/parmer/irq_tables.c +++ b/src/mainboard/amd/parmer/irq_tables.c @@ -57,8 +57,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/parmer/mptable.c b/src/mainboard/amd/parmer/mptable.c index 3484289..0980063 100644 --- a/src/mainboard/amd/parmer/mptable.c +++ b/src/mainboard/amd/parmer/mptable.c @@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - //mptable_write_buses(mc, NULL, &bus_isa); my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 1, "PCI "); diff --git a/src/mainboard/amd/persimmon/acpi_tables.c b/src/mainboard/amd/persimmon/acpi_tables.c index 53a2666..6d4f0e7 100644 --- a/src/mainboard/amd/persimmon/acpi_tables.c +++ b/src/mainboard/amd/persimmon/acpi_tables.c @@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/persimmon/get_bus_conf.c b/src/mainboard/amd/persimmon/get_bus_conf.c index 15b1989..c8369e1 100644 --- a/src/mainboard/amd/persimmon/get_bus_conf.c +++ b/src/mainboard/amd/persimmon/get_bus_conf.c @@ -51,8 +51,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_sb800;
-static u32 get_bus_conf_done = 0; - void get_bus_conf(void) { u32 apicid_base; @@ -60,10 +58,6 @@ 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;
sbdn_sb800 = 0;
diff --git a/src/mainboard/amd/persimmon/irq_tables.c b/src/mainboard/amd/persimmon/irq_tables.c index b9577cf..0999b7e 100644 --- a/src/mainboard/amd/persimmon/irq_tables.c +++ b/src/mainboard/amd/persimmon/irq_tables.c @@ -59,10 +59,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/persimmon/mptable.c b/src/mainboard/amd/persimmon/mptable.c index 8639617..cc5eac2 100644 --- a/src/mainboard/amd/persimmon/mptable.c +++ b/src/mainboard/amd/persimmon/mptable.c @@ -56,9 +56,6 @@ static void *smp_write_config_table(void *v) */ smp_write_processors(mc);
- /* Get Bus Configuration */ - get_bus_conf(); - /* * Type 1: Bus Entries: * Bus ID, Bus Type diff --git a/src/mainboard/amd/south_station/acpi_tables.c b/src/mainboard/amd/south_station/acpi_tables.c index 53a2666..6d4f0e7 100644 --- a/src/mainboard/amd/south_station/acpi_tables.c +++ b/src/mainboard/amd/south_station/acpi_tables.c @@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/south_station/get_bus_conf.c b/src/mainboard/amd/south_station/get_bus_conf.c index 6a3d232..7eedcba8 100644 --- a/src/mainboard/amd/south_station/get_bus_conf.c +++ b/src/mainboard/amd/south_station/get_bus_conf.c @@ -49,9 +49,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_sb800;
-static u32 get_bus_conf_done = 0; - - void get_bus_conf(void) { u32 apicid_base; @@ -59,10 +56,6 @@ 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;
sbdn_sb800 = 0;
diff --git a/src/mainboard/amd/south_station/irq_tables.c b/src/mainboard/amd/south_station/irq_tables.c index b9577cf..0999b7e 100644 --- a/src/mainboard/amd/south_station/irq_tables.c +++ b/src/mainboard/amd/south_station/irq_tables.c @@ -59,10 +59,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/south_station/mptable.c b/src/mainboard/amd/south_station/mptable.c index e9175d8..f266b4f 100644 --- a/src/mainboard/amd/south_station/mptable.c +++ b/src/mainboard/amd/south_station/mptable.c @@ -56,8 +56,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */ diff --git a/src/mainboard/amd/thatcher/acpi_tables.c b/src/mainboard/amd/thatcher/acpi_tables.c index f03ca6f..d36e7ee 100644 --- a/src/mainboard/amd/thatcher/acpi_tables.c +++ b/src/mainboard/amd/thatcher/acpi_tables.c @@ -134,8 +134,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *ivrs; 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/thatcher/get_bus_conf.c b/src/mainboard/amd/thatcher/get_bus_conf.c index ce5276f..d4a5654 100644 --- a/src/mainboard/amd/thatcher/get_bus_conf.c +++ b/src/mainboard/amd/thatcher/get_bus_conf.c @@ -48,7 +48,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_hudson;
-static u32 get_bus_conf_done = 0;
void get_bus_conf(void) { @@ -57,12 +56,6 @@ 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; - - sbdn_hudson = 0;
memset(bus_hudson, 0, sizeof(bus_hudson)); diff --git a/src/mainboard/amd/thatcher/irq_tables.c b/src/mainboard/amd/thatcher/irq_tables.c index d5339ad..a54998e 100644 --- a/src/mainboard/amd/thatcher/irq_tables.c +++ b/src/mainboard/amd/thatcher/irq_tables.c @@ -57,8 +57,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/thatcher/mptable.c b/src/mainboard/amd/thatcher/mptable.c index 3213395..3269089 100644 --- a/src/mainboard/amd/thatcher/mptable.c +++ b/src/mainboard/amd/thatcher/mptable.c @@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - //mptable_write_buses(mc, NULL, &bus_isa); my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 1, "PCI "); diff --git a/src/mainboard/amd/torpedo/acpi_tables.c b/src/mainboard/amd/torpedo/acpi_tables.c index ad0bc96..00e25ad 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 5404941..36613f7 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 1a26f1c..c61e9fd 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 24e48d1..ae00cf7 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 "); diff --git a/src/mainboard/amd/union_station/acpi_tables.c b/src/mainboard/amd/union_station/acpi_tables.c index 53a2666..6d4f0e7 100644 --- a/src/mainboard/amd/union_station/acpi_tables.c +++ b/src/mainboard/amd/union_station/acpi_tables.c @@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/union_station/get_bus_conf.c b/src/mainboard/amd/union_station/get_bus_conf.c index 6a3d232..7eedcba8 100644 --- a/src/mainboard/amd/union_station/get_bus_conf.c +++ b/src/mainboard/amd/union_station/get_bus_conf.c @@ -49,9 +49,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_sb800;
-static u32 get_bus_conf_done = 0; - - void get_bus_conf(void) { u32 apicid_base; @@ -59,10 +56,6 @@ 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;
sbdn_sb800 = 0;
diff --git a/src/mainboard/amd/union_station/irq_tables.c b/src/mainboard/amd/union_station/irq_tables.c index b9577cf..0999b7e 100644 --- a/src/mainboard/amd/union_station/irq_tables.c +++ b/src/mainboard/amd/union_station/irq_tables.c @@ -59,10 +59,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/union_station/mptable.c b/src/mainboard/amd/union_station/mptable.c index e9175d8..f266b4f 100644 --- a/src/mainboard/amd/union_station/mptable.c +++ b/src/mainboard/amd/union_station/mptable.c @@ -56,8 +56,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */ diff --git a/src/mainboard/asrock/e350m1/acpi_tables.c b/src/mainboard/asrock/e350m1/acpi_tables.c index c2f90b5..19cb5df 100644 --- a/src/mainboard/asrock/e350m1/acpi_tables.c +++ b/src/mainboard/asrock/e350m1/acpi_tables.c @@ -132,8 +132,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/asrock/e350m1/get_bus_conf.c b/src/mainboard/asrock/e350m1/get_bus_conf.c index 6a3d232..7eedcba8 100644 --- a/src/mainboard/asrock/e350m1/get_bus_conf.c +++ b/src/mainboard/asrock/e350m1/get_bus_conf.c @@ -49,9 +49,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_sb800;
-static u32 get_bus_conf_done = 0; - - void get_bus_conf(void) { u32 apicid_base; @@ -59,10 +56,6 @@ 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;
sbdn_sb800 = 0;
diff --git a/src/mainboard/asrock/e350m1/irq_tables.c b/src/mainboard/asrock/e350m1/irq_tables.c index b9577cf..0999b7e 100644 --- a/src/mainboard/asrock/e350m1/irq_tables.c +++ b/src/mainboard/asrock/e350m1/irq_tables.c @@ -59,10 +59,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/asrock/e350m1/mptable.c b/src/mainboard/asrock/e350m1/mptable.c index 6444be5..3402da1 100644 --- a/src/mainboard/asrock/e350m1/mptable.c +++ b/src/mainboard/asrock/e350m1/mptable.c @@ -57,8 +57,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */ diff --git a/src/mainboard/asrock/imb-a180/acpi_tables.c b/src/mainboard/asrock/imb-a180/acpi_tables.c index b070304..b4b84a9 100644 --- a/src/mainboard/asrock/imb-a180/acpi_tables.c +++ b/src/mainboard/asrock/imb-a180/acpi_tables.c @@ -138,8 +138,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *ivrs; 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/asrock/imb-a180/get_bus_conf.c b/src/mainboard/asrock/imb-a180/get_bus_conf.c index 226d57d..eecffb5 100644 --- a/src/mainboard/asrock/imb-a180/get_bus_conf.c +++ b/src/mainboard/asrock/imb-a180/get_bus_conf.c @@ -45,8 +45,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_yangtze;
-static u32 get_bus_conf_done = 0; - void get_bus_conf(void) { u32 apicid_base; @@ -55,11 +53,6 @@ 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; - dev = dev_find_slot(0, PCI_DEVFN(0, 0)); /* clear IoapicSbFeatureEn */ pci_write_config32(dev, 0xF8, 0); pci_write_config32(dev, 0xFC, 5); /* TODO: move it to dsdt.asl */ diff --git a/src/mainboard/asrock/imb-a180/irq_tables.c b/src/mainboard/asrock/imb-a180/irq_tables.c index 9eb3649..ab1b1ff 100644 --- a/src/mainboard/asrock/imb-a180/irq_tables.c +++ b/src/mainboard/asrock/imb-a180/irq_tables.c @@ -57,8 +57,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/asrock/imb-a180/mptable.c b/src/mainboard/asrock/imb-a180/mptable.c index 3e2b076..bfad50d 100644 --- a/src/mainboard/asrock/imb-a180/mptable.c +++ b/src/mainboard/asrock/imb-a180/mptable.c @@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - //mptable_write_buses(mc, NULL, &bus_isa); my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 1, "PCI "); diff --git a/src/mainboard/asus/f2a85-m/acpi_tables.c b/src/mainboard/asus/f2a85-m/acpi_tables.c index 2d3f5e5..3e8137d 100644 --- a/src/mainboard/asus/f2a85-m/acpi_tables.c +++ b/src/mainboard/asus/f2a85-m/acpi_tables.c @@ -131,8 +131,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *ivrs; 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/asus/f2a85-m/get_bus_conf.c b/src/mainboard/asus/f2a85-m/get_bus_conf.c index 5d5922b..08e5795 100644 --- a/src/mainboard/asus/f2a85-m/get_bus_conf.c +++ b/src/mainboard/asus/f2a85-m/get_bus_conf.c @@ -46,8 +46,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_hudson;
-static u32 get_bus_conf_done = 0; - void get_bus_conf(void) { u32 apicid_base; @@ -55,12 +53,6 @@ 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; - - sbdn_hudson = 0;
memset(bus_hudson, 0, sizeof(bus_hudson)); diff --git a/src/mainboard/asus/f2a85-m/irq_tables.c b/src/mainboard/asus/f2a85-m/irq_tables.c index a7552e8..48e98b1 100644 --- a/src/mainboard/asus/f2a85-m/irq_tables.c +++ b/src/mainboard/asus/f2a85-m/irq_tables.c @@ -56,8 +56,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/asus/f2a85-m/mptable.c b/src/mainboard/asus/f2a85-m/mptable.c index 5056b08..25778ca 100644 --- a/src/mainboard/asus/f2a85-m/mptable.c +++ b/src/mainboard/asus/f2a85-m/mptable.c @@ -83,8 +83,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - //mptable_write_buses(mc, NULL, &bus_isa); my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 1, "PCI "); diff --git a/src/mainboard/gizmosphere/gizmo/acpi_tables.c b/src/mainboard/gizmosphere/gizmo/acpi_tables.c index 1fd4516..6f28737 100755 --- a/src/mainboard/gizmosphere/gizmo/acpi_tables.c +++ b/src/mainboard/gizmosphere/gizmo/acpi_tables.c @@ -134,8 +134,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/gizmosphere/gizmo/get_bus_conf.c b/src/mainboard/gizmosphere/gizmo/get_bus_conf.c index 3b43d9d..ca20a0c 100755 --- a/src/mainboard/gizmosphere/gizmo/get_bus_conf.c +++ b/src/mainboard/gizmosphere/gizmo/get_bus_conf.c @@ -50,7 +50,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_sb800;
-static u32 get_bus_conf_done = 0;
void get_bus_conf(void) { @@ -59,11 +58,6 @@ 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; - sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800)); diff --git a/src/mainboard/gizmosphere/gizmo/irq_tables.c b/src/mainboard/gizmosphere/gizmo/irq_tables.c index dd62ed8..09fb4e2 100755 --- a/src/mainboard/gizmosphere/gizmo/irq_tables.c +++ b/src/mainboard/gizmosphere/gizmo/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/gizmosphere/gizmo/mptable.c b/src/mainboard/gizmosphere/gizmo/mptable.c index 6dfd11d..c56060e 100755 --- a/src/mainboard/gizmosphere/gizmo/mptable.c +++ b/src/mainboard/gizmosphere/gizmo/mptable.c @@ -57,8 +57,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */ diff --git a/src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c b/src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c index 1538571..6e9d556 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c +++ b/src/mainboard/hp/pavilion_m6_1035dx/acpi_tables.c @@ -131,8 +131,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *ivrs; 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/hp/pavilion_m6_1035dx/get_bus_conf.c b/src/mainboard/hp/pavilion_m6_1035dx/get_bus_conf.c index 34afc17..78193eb 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/get_bus_conf.c +++ b/src/mainboard/hp/pavilion_m6_1035dx/get_bus_conf.c @@ -47,7 +47,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_hudson;
-static u32 get_bus_conf_done = 0;
void get_bus_conf(void) { @@ -56,12 +55,6 @@ 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; - - sbdn_hudson = 0;
memset(bus_hudson, 0, sizeof(bus_hudson)); diff --git a/src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c b/src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c index dfa5d8f..cd83aac 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c +++ b/src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c @@ -56,8 +56,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/hp/pavilion_m6_1035dx/mptable.c b/src/mainboard/hp/pavilion_m6_1035dx/mptable.c index 2d7646a..d90a453 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/mptable.c +++ b/src/mainboard/hp/pavilion_m6_1035dx/mptable.c @@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - //mptable_write_buses(mc, NULL, &bus_isa); my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 1, "PCI "); diff --git a/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c b/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c index 63cdb52..5d4388e 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c +++ b/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c @@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/jetway/nf81-t56n-lf/get_bus_conf.c b/src/mainboard/jetway/nf81-t56n-lf/get_bus_conf.c index 69a86ab..43aa984 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/get_bus_conf.c +++ b/src/mainboard/jetway/nf81-t56n-lf/get_bus_conf.c @@ -52,7 +52,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_sb800;
-static u32 get_bus_conf_done = 0;
void get_bus_conf(void) { @@ -61,14 +60,6 @@ void get_bus_conf(void) device_t dev; int i, j;
- /* Be sure func is called exactly once */ - if (get_bus_conf_done == 1) - return; - - get_bus_conf_done = 1; - - - sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800)); diff --git a/src/mainboard/jetway/nf81-t56n-lf/irq_tables.c b/src/mainboard/jetway/nf81-t56n-lf/irq_tables.c index 259034b..36d104d 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/irq_tables.c +++ b/src/mainboard/jetway/nf81-t56n-lf/irq_tables.c @@ -58,12 +58,6 @@ unsigned long write_pirq_routing_table(unsigned long addr) u8 sum = 0; int i;
- /* Find all Bus num and APIC's that are share with - * mptable.c and acpi_tables.c - */ - get_bus_conf(); - - /* Align table on 16 byte boundary. */ addr += 15; addr &= ~15; diff --git a/src/mainboard/jetway/nf81-t56n-lf/mptable.c b/src/mainboard/jetway/nf81-t56n-lf/mptable.c index a97810c..70d57a7 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/mptable.c +++ b/src/mainboard/jetway/nf81-t56n-lf/mptable.c @@ -58,9 +58,6 @@ static void *smp_write_config_table(void *v) */ smp_write_processors(mc);
- /* Get Bus Configuration */ - get_bus_conf(); - /* * Type 1: Bus Entries: * Bus ID, Bus Type diff --git a/src/mainboard/lippert/frontrunner-af/acpi_tables.c b/src/mainboard/lippert/frontrunner-af/acpi_tables.c index 53a2666..6d4f0e7 100644 --- a/src/mainboard/lippert/frontrunner-af/acpi_tables.c +++ b/src/mainboard/lippert/frontrunner-af/acpi_tables.c @@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/lippert/frontrunner-af/get_bus_conf.c b/src/mainboard/lippert/frontrunner-af/get_bus_conf.c index 1e7fca4..bddcee1 100644 --- a/src/mainboard/lippert/frontrunner-af/get_bus_conf.c +++ b/src/mainboard/lippert/frontrunner-af/get_bus_conf.c @@ -49,7 +49,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_sb800;
-static u32 get_bus_conf_done = 0;
void get_bus_conf(void) { @@ -58,11 +57,6 @@ 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; - sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800)); diff --git a/src/mainboard/lippert/frontrunner-af/irq_tables.c b/src/mainboard/lippert/frontrunner-af/irq_tables.c index b9577cf..0999b7e 100644 --- a/src/mainboard/lippert/frontrunner-af/irq_tables.c +++ b/src/mainboard/lippert/frontrunner-af/irq_tables.c @@ -59,10 +59,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/lippert/frontrunner-af/mptable.c b/src/mainboard/lippert/frontrunner-af/mptable.c index 6b8aaa6..498ae58 100644 --- a/src/mainboard/lippert/frontrunner-af/mptable.c +++ b/src/mainboard/lippert/frontrunner-af/mptable.c @@ -56,8 +56,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */ diff --git a/src/mainboard/lippert/toucan-af/acpi_tables.c b/src/mainboard/lippert/toucan-af/acpi_tables.c index 53a2666..6d4f0e7 100644 --- a/src/mainboard/lippert/toucan-af/acpi_tables.c +++ b/src/mainboard/lippert/toucan-af/acpi_tables.c @@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/lippert/toucan-af/get_bus_conf.c b/src/mainboard/lippert/toucan-af/get_bus_conf.c index 1e7fca4..f0de0e5 100644 --- a/src/mainboard/lippert/toucan-af/get_bus_conf.c +++ b/src/mainboard/lippert/toucan-af/get_bus_conf.c @@ -49,8 +49,6 @@ u32 pci1234x[] = { u32 bus_type[256]; u32 sbdn_sb800;
-static u32 get_bus_conf_done = 0; - void get_bus_conf(void) { u32 apicid_base; @@ -58,11 +56,6 @@ 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; - sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800)); diff --git a/src/mainboard/lippert/toucan-af/irq_tables.c b/src/mainboard/lippert/toucan-af/irq_tables.c index b9577cf..0999b7e 100644 --- a/src/mainboard/lippert/toucan-af/irq_tables.c +++ b/src/mainboard/lippert/toucan-af/irq_tables.c @@ -59,10 +59,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/lippert/toucan-af/mptable.c b/src/mainboard/lippert/toucan-af/mptable.c index 6b8aaa6..498ae58 100644 --- a/src/mainboard/lippert/toucan-af/mptable.c +++ b/src/mainboard/lippert/toucan-af/mptable.c @@ -56,8 +56,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf(); - mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */ diff --git a/src/mainboard/supermicro/h8qgi/acpi_tables.c b/src/mainboard/supermicro/h8qgi/acpi_tables.c index 8091d1d..dff3cf1 100644 --- a/src/mainboard/supermicro/h8qgi/acpi_tables.c +++ b/src/mainboard/supermicro/h8qgi/acpi_tables.c @@ -172,8 +172,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *alib; 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/supermicro/h8qgi/get_bus_conf.c b/src/mainboard/supermicro/h8qgi/get_bus_conf.c index 345c75d..7a69a7c 100644 --- a/src/mainboard/supermicro/h8qgi/get_bus_conf.c +++ b/src/mainboard/supermicro/h8qgi/get_bus_conf.c @@ -43,19 +43,11 @@ u32 bus_type[256]; u32 sbdn_sr5650; u32 sbdn_sp5100;
-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; - sbdn_sp5100 = 0;
for (i = 0; i < ARRAY_SIZE(bus_sp5100); i++) { diff --git a/src/mainboard/supermicro/h8qgi/irq_tables.c b/src/mainboard/supermicro/h8qgi/irq_tables.c index d128b4d..3a840ad 100644 --- a/src/mainboard/supermicro/h8qgi/irq_tables.c +++ b/src/mainboard/supermicro/h8qgi/irq_tables.c @@ -59,10 +59,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/supermicro/h8qgi/mptable.c b/src/mainboard/supermicro/h8qgi/mptable.c index 0365ae6..2206b58 100644 --- a/src/mainboard/supermicro/h8qgi/mptable.c +++ b/src/mainboard/supermicro/h8qgi/mptable.c @@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v) mptable_init(mc, LOCAL_APIC_ADDR);
smp_write_processors(mc); - get_bus_conf(); mptable_write_buses(mc, NULL, &bus_isa);
/* diff --git a/src/mainboard/supermicro/h8scm/acpi_tables.c b/src/mainboard/supermicro/h8scm/acpi_tables.c index 3449fdf..57020b3 100644 --- a/src/mainboard/supermicro/h8scm/acpi_tables.c +++ b/src/mainboard/supermicro/h8scm/acpi_tables.c @@ -153,8 +153,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *ssdt2; acpi_header_t *alib;
- 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/supermicro/h8scm/get_bus_conf.c b/src/mainboard/supermicro/h8scm/get_bus_conf.c index 4b51f2a..932e2de 100644 --- a/src/mainboard/supermicro/h8scm/get_bus_conf.c +++ b/src/mainboard/supermicro/h8scm/get_bus_conf.c @@ -43,19 +43,11 @@ u32 bus_type[256]; u32 sbdn_sr5650; u32 sbdn_sp5100;
-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; - sbdn_sp5100 = 0;
for (i = 0; i < 0; i++) { diff --git a/src/mainboard/supermicro/h8scm/irq_tables.c b/src/mainboard/supermicro/h8scm/irq_tables.c index e7ffbaf..6582786 100644 --- a/src/mainboard/supermicro/h8scm/irq_tables.c +++ b/src/mainboard/supermicro/h8scm/irq_tables.c @@ -59,8 +59,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/supermicro/h8scm/mptable.c b/src/mainboard/supermicro/h8scm/mptable.c index 0365ae6..2206b58 100644 --- a/src/mainboard/supermicro/h8scm/mptable.c +++ b/src/mainboard/supermicro/h8scm/mptable.c @@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v) mptable_init(mc, LOCAL_APIC_ADDR);
smp_write_processors(mc); - get_bus_conf(); mptable_write_buses(mc, NULL, &bus_isa);
/* diff --git a/src/mainboard/tyan/s8226/acpi_tables.c b/src/mainboard/tyan/s8226/acpi_tables.c index 5aa1fc7..ab56390 100644 --- a/src/mainboard/tyan/s8226/acpi_tables.c +++ b/src/mainboard/tyan/s8226/acpi_tables.c @@ -153,8 +153,6 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *ssdt2; acpi_header_t *alib;
- 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/tyan/s8226/get_bus_conf.c b/src/mainboard/tyan/s8226/get_bus_conf.c index 5c416c5..508f379 100644 --- a/src/mainboard/tyan/s8226/get_bus_conf.c +++ b/src/mainboard/tyan/s8226/get_bus_conf.c @@ -43,18 +43,12 @@ u32 sbdn_sr5650; u32 sbdn_sp5100;
void get_bus_conf(void); -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; - sbdn_sp5100 = 0;
for (i = 0; i < 0; i++) { diff --git a/src/mainboard/tyan/s8226/irq_tables.c b/src/mainboard/tyan/s8226/irq_tables.c index d128b4d..3a840ad 100644 --- a/src/mainboard/tyan/s8226/irq_tables.c +++ b/src/mainboard/tyan/s8226/irq_tables.c @@ -59,10 +59,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/tyan/s8226/mptable.c b/src/mainboard/tyan/s8226/mptable.c index 0365ae6..2206b58 100644 --- a/src/mainboard/tyan/s8226/mptable.c +++ b/src/mainboard/tyan/s8226/mptable.c @@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v) mptable_init(mc, LOCAL_APIC_ADDR);
smp_write_processors(mc); - get_bus_conf(); mptable_write_buses(mc, NULL, &bus_isa);
/*