From c0b1be0ba1d0c87d9670e695c60eeb6ec901a2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 3 Jan 2019 11:38:39 +0200 Subject: amdfam10 boards: Call get_bus_conf() just once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It has to be called once before PIRQ and MP table generation. Change-Id: I238c6b4810404d320b36d4f6b4a161c1ff11c8d3 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/30630 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Angel Pons --- src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c | 6 ------ src/mainboard/supermicro/h8dmr_fam10/irq_tables.c | 1 - src/mainboard/supermicro/h8dmr_fam10/mptable.c | 1 - src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c | 6 ------ src/mainboard/supermicro/h8qme_fam10/irq_tables.c | 1 - src/mainboard/supermicro/h8qme_fam10/mptable.c | 1 - src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c | 6 ------ src/mainboard/supermicro/h8scm_fam10/irq_tables.c | 2 -- src/mainboard/supermicro/h8scm_fam10/mptable.c | 2 -- 9 files changed, 26 deletions(-) (limited to 'src/mainboard/supermicro') diff --git a/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c b/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c index b122073f1b..6ceb21d6f3 100644 --- a/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c +++ b/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c @@ -55,8 +55,6 @@ static unsigned hcdnx[] = { 0x20202020, 0x20202020, }; -static unsigned get_bus_conf_done = 0; - void get_bus_conf(void) { @@ -66,10 +64,6 @@ void get_bus_conf(void) struct device *dev; int i; - if(get_bus_conf_done == 1) return; //do it only once - - get_bus_conf_done = 1; - sysconf.mb = &mb_sysconf; m = sysconf.mb; diff --git a/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c b/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c index 513fd57c58..97245ec292 100644 --- a/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c +++ b/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c @@ -57,7 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr) uint8_t 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 sbdn = sysconf.sbdn; m = sysconf.mb; diff --git a/src/mainboard/supermicro/h8dmr_fam10/mptable.c b/src/mainboard/supermicro/h8dmr_fam10/mptable.c index 52066d0333..16a342069f 100644 --- a/src/mainboard/supermicro/h8dmr_fam10/mptable.c +++ b/src/mainboard/supermicro/h8dmr_fam10/mptable.c @@ -35,7 +35,6 @@ static void *smp_write_config_table(void *v) smp_write_processors(mc); - get_bus_conf(); sbdn = sysconf.sbdn; m = sysconf.mb; diff --git a/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c b/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c index 9643417250..4b24943f5b 100644 --- a/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c +++ b/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c @@ -57,8 +57,6 @@ static unsigned hcdnx[] = { unsigned sbdn3; -static unsigned get_bus_conf_done = 0; - void get_bus_conf(void) { @@ -68,10 +66,6 @@ void get_bus_conf(void) struct device *dev; int i; - if(get_bus_conf_done == 1) return; //do it only once - - get_bus_conf_done = 1; - sysconf.mb = &mb_sysconf; m = sysconf.mb; diff --git a/src/mainboard/supermicro/h8qme_fam10/irq_tables.c b/src/mainboard/supermicro/h8qme_fam10/irq_tables.c index 82023f9b10..b5ea2c2ea1 100644 --- a/src/mainboard/supermicro/h8qme_fam10/irq_tables.c +++ b/src/mainboard/supermicro/h8qme_fam10/irq_tables.c @@ -57,7 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr) uint8_t 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 sbdn = sysconf.sbdn; m = sysconf.mb; diff --git a/src/mainboard/supermicro/h8qme_fam10/mptable.c b/src/mainboard/supermicro/h8qme_fam10/mptable.c index 0d7c22786e..616e6a8898 100644 --- a/src/mainboard/supermicro/h8qme_fam10/mptable.c +++ b/src/mainboard/supermicro/h8qme_fam10/mptable.c @@ -37,7 +37,6 @@ static void *smp_write_config_table(void *v) smp_write_processors(mc); - get_bus_conf(); sbdn = sysconf.sbdn; m = sysconf.mb; diff --git a/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c b/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c index b242a81a1f..cfa646b575 100644 --- a/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c +++ b/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c @@ -49,18 +49,12 @@ u32 hcdnx[] = { u32 sbdn_sr5650; u32 sbdn_sp5100; -static u32 get_bus_conf_done = 0; - void get_bus_conf(void) { u32 apicid_base; struct device *dev; int i; - if (get_bus_conf_done == 1) - return; /* do it only once */ - get_bus_conf_done = 1; - sysconf.hc_possible_num = ARRAY_SIZE(pci1234x); for (i = 0; i < sysconf.hc_possible_num; i++) { sysconf.pci1234[i] = pci1234x[i]; diff --git a/src/mainboard/supermicro/h8scm_fam10/irq_tables.c b/src/mainboard/supermicro/h8scm_fam10/irq_tables.c index aa78b45d67..39c68db66d 100644 --- a/src/mainboard/supermicro/h8scm_fam10/irq_tables.c +++ b/src/mainboard/supermicro/h8scm_fam10/irq_tables.c @@ -54,8 +54,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_fam10/mptable.c b/src/mainboard/supermicro/h8scm_fam10/mptable.c index c8c7119676..db4dea7492 100644 --- a/src/mainboard/supermicro/h8scm_fam10/mptable.c +++ b/src/mainboard/supermicro/h8scm_fam10/mptable.c @@ -41,8 +41,6 @@ static void *smp_write_config_table(void *v) smp_write_processors(mc); - get_bus_conf(); - apicid_sp5100 = 0x20; apicid_sr5650 = apicid_sp5100 + 1; -- cgit v1.2.3