diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2010-11-22 14:14:56 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-11-22 14:14:56 +0000 |
commit | 7411eabcdb544205316dfa90e7e708b4b0495074 (patch) | |
tree | a22b31164448d14e5415597fa041cd7bd16416d0 /src/mainboard/asus | |
parent | 394965dd6493943a908a044c5cd3bc3d27e599ec (diff) |
Final set of smp_write_bus -> mptable_write_buses changes.
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6114 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/asus')
-rw-r--r-- | src/mainboard/asus/a8n_e/get_bus_conf.c | 18 | ||||
-rw-r--r-- | src/mainboard/asus/a8n_e/mptable.c | 12 | ||||
-rw-r--r-- | src/mainboard/asus/a8v-e_deluxe/mptable.c | 12 | ||||
-rw-r--r-- | src/mainboard/asus/a8v-e_se/mptable.c | 12 |
4 files changed, 7 insertions, 47 deletions
diff --git a/src/mainboard/asus/a8n_e/get_bus_conf.c b/src/mainboard/asus/a8n_e/get_bus_conf.c index 12c8859208..75741fddc5 100644 --- a/src/mainboard/asus/a8n_e/get_bus_conf.c +++ b/src/mainboard/asus/a8n_e/get_bus_conf.c @@ -38,7 +38,6 @@ * mptable and acpi_tables. */ /* busnum is default */ -unsigned char bus_isa; unsigned char bus_ck804[6]; unsigned apicid_ck804; @@ -59,17 +58,13 @@ unsigned hcdnx[] = { 0x20202020, /* A8N-E has only one ht-chain */ }; -unsigned bus_type[256]; - - - static unsigned get_bus_conf_done = 0; void get_bus_conf(void) { unsigned apicid_base, sbdn; device_t dev; - int i, j; + int i; if (get_bus_conf_done == 1) return; /* Do it only once. */ @@ -91,15 +86,9 @@ void get_bus_conf(void) for (i = 0; i < 6; i++) bus_ck804[i] = 0; - for (i = 0; i < 256; i++) - bus_type[i] = 0; - - bus_type[0] = 1; /* PCI */ bus_ck804[0] = (sysconf.pci1234[0] >> 16) & 0xff; - bus_type[bus_ck804[0]] = 1; - /* CK804 */ dev = dev_find_slot(bus_ck804[0], PCI_DEVFN(sbdn + 0x09, 0)); if (dev) { @@ -119,14 +108,9 @@ void get_bus_conf(void) PCI_DEVFN(sbdn + 0x0b + i - 2, 0)); if (dev) { bus_ck804[i] = pci_read_config8(dev, PCI_SECONDARY_BUS); - bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS); - bus_isa++; - for (j = bus_ck804[i]; j < bus_isa; j++) - bus_type[j] = 1; } else { printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:%02x.0, using defaults\n", bus_ck804[0], sbdn + 0x0b + i - 2); - bus_isa = bus_ck804[i - 1] + 1; } } diff --git a/src/mainboard/asus/a8n_e/mptable.c b/src/mainboard/asus/a8n_e/mptable.c index e3d707fe73..577b7fcae9 100644 --- a/src/mainboard/asus/a8n_e/mptable.c +++ b/src/mainboard/asus/a8n_e/mptable.c @@ -28,16 +28,14 @@ #include <stdint.h> #include <cpu/amd/amdk8_sysconf.h> -extern unsigned char bus_isa; extern unsigned char bus_ck804[6]; extern unsigned apicid_ck804; -extern unsigned bus_type[256]; static void *smp_write_config_table(void *v) { struct mp_config_table *mc; unsigned sbdn; - int bus_num; + int bus_isa; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); @@ -48,13 +46,7 @@ static void *smp_write_config_table(void *v) get_bus_conf(); sbdn = sysconf.sbdn; - /* Bus: Bus ID Type */ - /* Define numbers for PCI and ISA bus. */ - for (bus_num = 0; bus_num < 256; bus_num++) { - if (bus_type[bus_num]) - smp_write_bus(mc, bus_num, "PCI "); - } - smp_write_bus(mc, bus_isa, "ISA "); + mptable_write_buses(mc, NULL, &bus_isa); /* I/O APICs: APIC ID Version State Address */ { diff --git a/src/mainboard/asus/a8v-e_deluxe/mptable.c b/src/mainboard/asus/a8v-e_deluxe/mptable.c index 583fd1e7ac..b985e4d044 100644 --- a/src/mainboard/asus/a8v-e_deluxe/mptable.c +++ b/src/mainboard/asus/a8v-e_deluxe/mptable.c @@ -27,7 +27,7 @@ static void *smp_write_config_table(void *v) { struct mp_config_table *mc; - int bus_isa = 42; + int bus_isa; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); @@ -35,15 +35,7 @@ static void *smp_write_config_table(void *v) smp_write_processors(mc); - /* Bus: Bus ID Type */ - smp_write_bus(mc, 0, "PCI "); - smp_write_bus(mc, 1, "PCI "); - smp_write_bus(mc, 2, "PCI "); - smp_write_bus(mc, 3, "PCI "); - smp_write_bus(mc, 4, "PCI "); - smp_write_bus(mc, 5, "PCI "); - smp_write_bus(mc, 6, "PCI "); - smp_write_bus(mc, bus_isa, "ISA "); + mptable_write_buses(mc, NULL, &bus_isa); /* I/O APICs: APIC ID Version State Address */ smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, IO_APIC_ADDR); diff --git a/src/mainboard/asus/a8v-e_se/mptable.c b/src/mainboard/asus/a8v-e_se/mptable.c index bb3fab4582..4deb7db473 100644 --- a/src/mainboard/asus/a8v-e_se/mptable.c +++ b/src/mainboard/asus/a8v-e_se/mptable.c @@ -27,7 +27,7 @@ static void *smp_write_config_table(void *v) { struct mp_config_table *mc; - int bus_isa = 42; + int bus_isa; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); @@ -35,15 +35,7 @@ static void *smp_write_config_table(void *v) smp_write_processors(mc); - /* Bus: Bus ID Type */ - smp_write_bus(mc, 0, "PCI "); - smp_write_bus(mc, 1, "PCI "); - smp_write_bus(mc, 2, "PCI "); - smp_write_bus(mc, 3, "PCI "); - smp_write_bus(mc, 4, "PCI "); - smp_write_bus(mc, 5, "PCI "); - smp_write_bus(mc, 6, "PCI "); - smp_write_bus(mc, bus_isa, "ISA "); + mptable_write_buses(mc, NULL, &bus_isa); /* I/O APICs: APIC ID Version State Address */ smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, IO_APIC_ADDR); |