From patchwork Tue Oct 5 19:01:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: use mptable_write_buses() for msi/ms7135 Date: Tue, 05 Oct 2010 19:01:07 -0000 From: Jonathan A. Kollasch X-Patchwork-Id: 2046 Message-Id: <20101005190107.GE12447@tarantulon.kollasch.net> To: coreboot@coreboot.org Use mptable_write_buses(). Remove unhelpful comment. Signed-off-by: Jonathan Kollasch Acked-by: Peter Stuge --- Index: src/mainboard/msi/ms7135/mptable.c =================================================================== --- src/mainboard/msi/ms7135/mptable.c (revision 5914) +++ src/mainboard/msi/ms7135/mptable.c (working copy) @@ -30,23 +30,20 @@ #include -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) { static const char sig[4] = "PCMP"; static const char oem[8] = "COREBOOT"; static const char productid[12] = "MS7135 "; struct mp_config_table *mc; + int bus_isa; unsigned sbdn; - int bus_num; + get_bus_conf(); + sbdn = sysconf.sbdn; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); memset(mc, 0, sizeof(*mc)); @@ -66,19 +63,8 @@ mc->reserved = 0; smp_write_processors(mc); + mptable_write_buses(mc, NULL, &bus_isa); - 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 "); - - /* I/O APICs: APIC ID Version State Address*/ { device_t dev; @@ -98,7 +84,6 @@ /* copied from stock bios */ /*0x01800500,0x1800d509,0x00520d08*/ - /* if this register is what i think it is ... */ dword = 0x08d0d218; pci_write_config32(dev, 0x7c, dword);