summaryrefslogtreecommitdiff
path: root/src/mainboard/asus
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/mainboard/asus
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/mainboard/asus')
-rw-r--r--src/mainboard/asus/kcma-d8/get_bus_conf.c6
-rw-r--r--src/mainboard/asus/kcma-d8/irq_tables.c2
-rw-r--r--src/mainboard/asus/kcma-d8/mptable.c2
-rw-r--r--src/mainboard/asus/kfsn4-dre/get_bus_conf.c6
-rw-r--r--src/mainboard/asus/kfsn4-dre/irq_tables.c4
-rw-r--r--src/mainboard/asus/kfsn4-dre/mptable.c1
-rw-r--r--src/mainboard/asus/kgpe-d16/get_bus_conf.c6
-rw-r--r--src/mainboard/asus/kgpe-d16/irq_tables.c2
-rw-r--r--src/mainboard/asus/kgpe-d16/mptable.c2
-rw-r--r--src/mainboard/asus/m4a78-em/get_bus_conf.c6
-rw-r--r--src/mainboard/asus/m4a78-em/mptable.c2
-rw-r--r--src/mainboard/asus/m4a785-m/get_bus_conf.c6
-rw-r--r--src/mainboard/asus/m4a785-m/mptable.c2
-rw-r--r--src/mainboard/asus/m5a88-v/get_bus_conf.c6
-rw-r--r--src/mainboard/asus/m5a88-v/irq_tables.c2
-rw-r--r--src/mainboard/asus/m5a88-v/mptable.c2
16 files changed, 0 insertions, 57 deletions
diff --git a/src/mainboard/asus/kcma-d8/get_bus_conf.c b/src/mainboard/asus/kcma-d8/get_bus_conf.c
index 7f1da1b8cb..c6cce56095 100644
--- a/src/mainboard/asus/kcma-d8/get_bus_conf.c
+++ b/src/mainboard/asus/kcma-d8/get_bus_conf.c
@@ -50,18 +50,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/asus/kcma-d8/irq_tables.c b/src/mainboard/asus/kcma-d8/irq_tables.c
index 2ff8a7ad7a..f5e005a627 100644
--- a/src/mainboard/asus/kcma-d8/irq_tables.c
+++ b/src/mainboard/asus/kcma-d8/irq_tables.c
@@ -75,8 +75,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/kcma-d8/mptable.c b/src/mainboard/asus/kcma-d8/mptable.c
index 5caadc70f3..786f0b3746 100644
--- a/src/mainboard/asus/kcma-d8/mptable.c
+++ b/src/mainboard/asus/kcma-d8/mptable.c
@@ -44,8 +44,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf();
-
if (IS_ENABLED(CONFIG_ENABLE_APIC_EXT_ID) && (CONFIG_APIC_ID_OFFSET > 0))
apicid_sp5100 = 0x0;
else
diff --git a/src/mainboard/asus/kfsn4-dre/get_bus_conf.c b/src/mainboard/asus/kfsn4-dre/get_bus_conf.c
index 180f6292c7..4971314d7a 100644
--- a/src/mainboard/asus/kfsn4-dre/get_bus_conf.c
+++ b/src/mainboard/asus/kfsn4-dre/get_bus_conf.c
@@ -60,18 +60,12 @@ static unsigned hcdnx[] = {
0x20202020, 0x20202020,
};
-static unsigned get_bus_conf_done = 0;
-
void get_bus_conf(void)
{
unsigned apicid_base, sbdn;
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++) {
diff --git a/src/mainboard/asus/kfsn4-dre/irq_tables.c b/src/mainboard/asus/kfsn4-dre/irq_tables.c
index 139b400a0a..a5dc9658dd 100644
--- a/src/mainboard/asus/kfsn4-dre/irq_tables.c
+++ b/src/mainboard/asus/kfsn4-dre/irq_tables.c
@@ -68,10 +68,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t *v, sum = 0;
int i;
- /* get_bus_conf() will find out all bus num and APIC that share with
- * mptable.c and mptable.c.
- */
- get_bus_conf();
sbdn = sysconf.sbdn;
/* Align the table to be 16 byte aligned. */
diff --git a/src/mainboard/asus/kfsn4-dre/mptable.c b/src/mainboard/asus/kfsn4-dre/mptable.c
index 4109306378..387baa4f25 100644
--- a/src/mainboard/asus/kfsn4-dre/mptable.c
+++ b/src/mainboard/asus/kfsn4-dre/mptable.c
@@ -43,7 +43,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf();
sbdn = sysconf.sbdn;
mptable_write_buses(mc, NULL, &bus_isa);
diff --git a/src/mainboard/asus/kgpe-d16/get_bus_conf.c b/src/mainboard/asus/kgpe-d16/get_bus_conf.c
index 7f1da1b8cb..c6cce56095 100644
--- a/src/mainboard/asus/kgpe-d16/get_bus_conf.c
+++ b/src/mainboard/asus/kgpe-d16/get_bus_conf.c
@@ -50,18 +50,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/asus/kgpe-d16/irq_tables.c b/src/mainboard/asus/kgpe-d16/irq_tables.c
index 2ff8a7ad7a..f5e005a627 100644
--- a/src/mainboard/asus/kgpe-d16/irq_tables.c
+++ b/src/mainboard/asus/kgpe-d16/irq_tables.c
@@ -75,8 +75,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/kgpe-d16/mptable.c b/src/mainboard/asus/kgpe-d16/mptable.c
index bf468807f0..706a66bcbb 100644
--- a/src/mainboard/asus/kgpe-d16/mptable.c
+++ b/src/mainboard/asus/kgpe-d16/mptable.c
@@ -44,8 +44,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf();
-
if (IS_ENABLED(CONFIG_ENABLE_APIC_EXT_ID) && (CONFIG_APIC_ID_OFFSET > 0))
apicid_sp5100 = 0x0;
else
diff --git a/src/mainboard/asus/m4a78-em/get_bus_conf.c b/src/mainboard/asus/m4a78-em/get_bus_conf.c
index d7ca975a5d..3c4894085a 100644
--- a/src/mainboard/asus/m4a78-em/get_bus_conf.c
+++ b/src/mainboard/asus/m4a78-em/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/asus/m4a78-em/mptable.c b/src/mainboard/asus/m4a78-em/mptable.c
index 458c6146bc..e2b28900fa 100644
--- a/src/mainboard/asus/m4a78-em/mptable.c
+++ b/src/mainboard/asus/m4a78-em/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/asus/m4a785-m/get_bus_conf.c b/src/mainboard/asus/m4a785-m/get_bus_conf.c
index d7ca975a5d..3c4894085a 100644
--- a/src/mainboard/asus/m4a785-m/get_bus_conf.c
+++ b/src/mainboard/asus/m4a785-m/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/asus/m4a785-m/mptable.c b/src/mainboard/asus/m4a785-m/mptable.c
index 458c6146bc..e2b28900fa 100644
--- a/src/mainboard/asus/m4a785-m/mptable.c
+++ b/src/mainboard/asus/m4a785-m/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/asus/m5a88-v/get_bus_conf.c b/src/mainboard/asus/m5a88-v/get_bus_conf.c
index c7268c6030..ce663a52b2 100644
--- a/src/mainboard/asus/m5a88-v/get_bus_conf.c
+++ b/src/mainboard/asus/m5a88-v/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/asus/m5a88-v/irq_tables.c b/src/mainboard/asus/m5a88-v/irq_tables.c
index fc5edca3e0..b0b8af88eb 100644
--- a/src/mainboard/asus/m5a88-v/irq_tables.c
+++ b/src/mainboard/asus/m5a88-v/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/asus/m5a88-v/mptable.c b/src/mainboard/asus/m5a88-v/mptable.c
index a5a6b4e825..1d6adc6409 100644
--- a/src/mainboard/asus/m5a88-v/mptable.c
+++ b/src/mainboard/asus/m5a88-v/mptable.c
@@ -49,8 +49,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 */