diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-01-03 11:38:39 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-01-04 17:20:24 +0000 |
commit | c0b1be0ba1d0c87d9670e695c60eeb6ec901a2d8 (patch) | |
tree | 5441907a48042d21e459c470a5a514527162fa8c /src/mainboard/amd | |
parent | a2cfe9e90001fe11f7c7653c9917ea75dd082333 (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/mainboard/amd')
-rw-r--r-- | src/mainboard/amd/bimini_fam10/get_bus_conf.c | 6 | ||||
-rw-r--r-- | src/mainboard/amd/bimini_fam10/irq_tables.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/bimini_fam10/mptable.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/mahogany_fam10/get_bus_conf.c | 6 | ||||
-rw-r--r-- | src/mainboard/amd/mahogany_fam10/irq_tables.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/mahogany_fam10/mptable.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c | 7 | ||||
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah_fam10/irq_tables.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah_fam10/mptable.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/tilapia_fam10/get_bus_conf.c | 6 | ||||
-rw-r--r-- | src/mainboard/amd/tilapia_fam10/irq_tables.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/tilapia_fam10/mptable.c | 2 |
13 files changed, 0 insertions, 43 deletions
diff --git a/src/mainboard/amd/bimini_fam10/get_bus_conf.c b/src/mainboard/amd/bimini_fam10/get_bus_conf.c index b03567c747..2b25770b3b 100644 --- a/src/mainboard/amd/bimini_fam10/get_bus_conf.c +++ b/src/mainboard/amd/bimini_fam10/get_bus_conf.c @@ -48,18 +48,12 @@ u32 hcdnx[] = { u32 sbdn_rs780; u32 sbdn_sb800; -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/amd/bimini_fam10/irq_tables.c b/src/mainboard/amd/bimini_fam10/irq_tables.c index 1125e1f1b3..3b5faabbcb 100644 --- a/src/mainboard/amd/bimini_fam10/irq_tables.c +++ b/src/mainboard/amd/bimini_fam10/irq_tables.c @@ -53,8 +53,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/bimini_fam10/mptable.c b/src/mainboard/amd/bimini_fam10/mptable.c index 861327aeb8..07df03a349 100644 --- a/src/mainboard/amd/bimini_fam10/mptable.c +++ b/src/mainboard/amd/bimini_fam10/mptable.c @@ -50,8 +50,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/mahogany_fam10/get_bus_conf.c b/src/mainboard/amd/mahogany_fam10/get_bus_conf.c index d7ca975a5d..3c4894085a 100644 --- a/src/mainboard/amd/mahogany_fam10/get_bus_conf.c +++ b/src/mainboard/amd/mahogany_fam10/get_bus_conf.c @@ -48,18 +48,12 @@ u32 hcdnx[] = { u32 sbdn_rs780; u32 sbdn_sb700; -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/amd/mahogany_fam10/irq_tables.c b/src/mainboard/amd/mahogany_fam10/irq_tables.c index aff85b63ee..526be4f4cd 100644 --- a/src/mainboard/amd/mahogany_fam10/irq_tables.c +++ b/src/mainboard/amd/mahogany_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/amd/mahogany_fam10/mptable.c b/src/mainboard/amd/mahogany_fam10/mptable.c index 458c6146bc..e2b28900fa 100644 --- a/src/mainboard/amd/mahogany_fam10/mptable.c +++ b/src/mainboard/amd/mahogany_fam10/mptable.c @@ -39,8 +39,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/serengeti_cheetah_fam10/acpi_tables.c b/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c index bf8ef2a824..3b3ad5b9f3 100644 --- a/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c +++ b/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c @@ -129,8 +129,6 @@ unsigned long mainboard_write_acpi_tables(struct device *device, int i; - get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */ - /* same htio, but different possition? We may have to copy, * change HCIN, and recalculate the checknum and add_table */ diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c b/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c index 2a83d43a61..279a14658a 100644 --- a/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c +++ b/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c @@ -57,8 +57,6 @@ static unsigned hcdnx[] = { -static u32 get_bus_conf_done = 0; - static u32 get_hcid(u32 i) { u32 id = 0; @@ -92,11 +90,6 @@ void get_bus_conf(void) int i, j; struct mb_sysconf_t *m; - 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/amd/serengeti_cheetah_fam10/irq_tables.c b/src/mainboard/amd/serengeti_cheetah_fam10/irq_tables.c index 1ca7f3dc9b..4ce52854b3 100644 --- a/src/mainboard/amd/serengeti_cheetah_fam10/irq_tables.c +++ b/src/mainboard/amd/serengeti_cheetah_fam10/irq_tables.c @@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr) struct mb_sysconf_t *m; - get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */ - m = sysconf.mb; /* Align the table to be 16 byte aligned. */ diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c b/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c index fb9473f008..1ab3ad2e6d 100644 --- a/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c +++ b/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c @@ -36,8 +36,6 @@ static void *smp_write_config_table(void *v) smp_write_processors(mc); - get_bus_conf(); - m = sysconf.mb; mptable_write_buses(mc, NULL, &bus_isa); diff --git a/src/mainboard/amd/tilapia_fam10/get_bus_conf.c b/src/mainboard/amd/tilapia_fam10/get_bus_conf.c index d7ca975a5d..3c4894085a 100644 --- a/src/mainboard/amd/tilapia_fam10/get_bus_conf.c +++ b/src/mainboard/amd/tilapia_fam10/get_bus_conf.c @@ -48,18 +48,12 @@ u32 hcdnx[] = { u32 sbdn_rs780; u32 sbdn_sb700; -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/amd/tilapia_fam10/irq_tables.c b/src/mainboard/amd/tilapia_fam10/irq_tables.c index aff85b63ee..526be4f4cd 100644 --- a/src/mainboard/amd/tilapia_fam10/irq_tables.c +++ b/src/mainboard/amd/tilapia_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/amd/tilapia_fam10/mptable.c b/src/mainboard/amd/tilapia_fam10/mptable.c index 458c6146bc..e2b28900fa 100644 --- a/src/mainboard/amd/tilapia_fam10/mptable.c +++ b/src/mainboard/amd/tilapia_fam10/mptable.c @@ -39,8 +39,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 */ |