diff options
Diffstat (limited to 'src/mainboard/asus')
-rw-r--r-- | src/mainboard/asus/m4a785-m/get_bus_conf.c | 23 | ||||
-rw-r--r-- | src/mainboard/asus/m4a785-m/mptable.c | 11 |
2 files changed, 3 insertions, 31 deletions
diff --git a/src/mainboard/asus/m4a785-m/get_bus_conf.c b/src/mainboard/asus/m4a785-m/get_bus_conf.c index 672f9e9efb..b169775456 100644 --- a/src/mainboard/asus/m4a785-m/get_bus_conf.c +++ b/src/mainboard/asus/m4a785-m/get_bus_conf.c @@ -32,7 +32,6 @@ /* Global variables for MB layouts and these will be shared by irqtable mptable * and acpi_tables busnum is default. */ -u8 bus_isa; u8 bus_rs780[11]; u8 bus_sb700[2]; u32 apicid_sb700; @@ -54,8 +53,6 @@ u32 hcdnx[] = { 0x20202020, }; -u32 bus_type[256]; - u32 sbdn_rs780; u32 sbdn_sb700; @@ -67,7 +64,7 @@ void get_bus_conf(void) { u32 apicid_base; device_t dev; - int i, j; + int i; if (get_bus_conf_done == 1) return; /* do it only once */ @@ -92,25 +89,13 @@ void get_bus_conf(void) bus_rs780[i] = 0; } - for (i = 0; i < 256; i++) { - bus_type[i] = 0; /* default ISA bus. */ - } - - bus_type[0] = 1; /* pci */ - bus_rs780[0] = (sysconf.pci1234[0] >> 16) & 0xff; bus_sb700[0] = bus_rs780[0]; - bus_type[bus_rs780[0]] = 1; - /* sb700 */ dev = dev_find_slot(bus_sb700[0], PCI_DEVFN(sbdn_sb700 + 0x14, 4)); if (dev) { bus_sb700[1] = pci_read_config8(dev, PCI_SECONDARY_BUS); - bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS); - bus_isa++; - for (j = bus_sb700[1]; j < bus_isa; j++) - bus_type[j] = 1; } /* rs780 */ @@ -118,16 +103,10 @@ void get_bus_conf(void) dev = dev_find_slot(bus_rs780[0], PCI_DEVFN(sbdn_rs780 + i, 0)); if (dev) { bus_rs780[i] = pci_read_config8(dev, PCI_SECONDARY_BUS); - if(255 != bus_rs780[i]) { - bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS); - bus_isa++; - bus_type[bus_rs780[i]] = 1; /* PCI bus. */ - } } } /* I/O APICs: APIC ID Version State Address */ - bus_isa = 10; #if CONFIG_LOGICAL_CPUS==1 apicid_base = get_apicid_base(1); #else diff --git a/src/mainboard/asus/m4a785-m/mptable.c b/src/mainboard/asus/m4a785-m/mptable.c index 6cfe88e3bf..a81350e0b3 100644 --- a/src/mainboard/asus/m4a785-m/mptable.c +++ b/src/mainboard/asus/m4a785-m/mptable.c @@ -25,20 +25,18 @@ #include <stdint.h> #include <cpu/amd/amdfam10_sysconf.h> -extern u8 bus_isa; extern u8 bus_rs780[11]; extern u8 bus_sb700[2]; extern u32 apicid_sb700; -extern u32 bus_type[256]; extern u32 sbdn_rs780; extern u32 sbdn_sb700; static void *smp_write_config_table(void *v) { struct mp_config_table *mc; - int j; + int bus_isa; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); @@ -48,12 +46,7 @@ static void *smp_write_config_table(void *v) get_bus_conf(); - /* Bus: Bus ID Type */ - /* define bus and isa numbers */ - for (j = 0; j < bus_isa; j++) { - smp_write_bus(mc, j, (char *)"PCI "); - } - smp_write_bus(mc, bus_isa, (char *)"ISA "); + mptable_write_buses(mc, NULL, &bus_isa); /* I/O APICs: APIC ID Version State Address */ { |