Patrick Georgi ([email protected]) just uploaded a new patch set to 
gerrit, which you can find at http://review.coreboot.org/242

-gerrit

commit 84628e8a3e0f67d638d62af7910ebaab8f85e855
Author: Patrick Georgi <[email protected]>
Date:   Thu Oct 6 14:34:22 2011 +0200

    siemens/sitemp_g1p1: Get rid of bus_isa and bus_type
    
    Each variable is essentially unused or incorrect.
    
    Change-Id: I4d2a10c9b45306ac6e6026a31765d3b912fd855c
    Signed-off-by: Patrick Georgi <[email protected]>
---
 src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c |   23 +---------------------
 src/mainboard/siemens/sitemp_g1p1/irq_tables.c   |    1 -
 src/mainboard/siemens/sitemp_g1p1/mptable.c      |   14 ++++--------
 3 files changed, 6 insertions(+), 32 deletions(-)

diff --git a/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c 
b/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c
index 24b9f28..2b0fca7 100644
--- a/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c
+++ b/src/mainboard/siemens/sitemp_g1p1/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_rs690[8];
 u8 bus_sb600[2];
 u32 apicid_sb600;
@@ -54,8 +53,6 @@ u32 hcdnx[] = {
        0x20202020,
 };
 
-u32 bus_type[256];
-
 u32 sbdn_rs690;
 u32 sbdn_sb600;
 
@@ -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_rs690[i] = 0;
        }
 
-       for (i = 0; i < 256; i++) {
-               bus_type[i] = 0; /* default ISA bus. */
-       }
-
-       bus_type[0] = 1;        /* pci */
-
        bus_rs690[0] = (sysconf.pci1234[0] >> 16) & 0xff;
        bus_sb600[0] = bus_rs690[0];
 
-       bus_type[bus_rs690[0]] = 1;
-
        /* sb600 */
        dev = dev_find_slot(bus_sb600[0], PCI_DEVFN(sbdn_sb600 + 0x14, 4));
        if (dev) {
                bus_sb600[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
-               bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
-               bus_isa++;
-               for (j = bus_sb600[1]; j < bus_isa; j++)
-                       bus_type[j] = 1;
        }
 
        /* rs690 */
@@ -118,16 +103,10 @@ void get_bus_conf(void)
                dev = dev_find_slot(bus_rs690[0], PCI_DEVFN(sbdn_rs690 + i, 0));
                if (dev) {
                        bus_rs690[i] = pci_read_config8(dev, PCI_SECONDARY_BUS);
-                       if(255 != bus_rs690[i]) {
-                               bus_isa = pci_read_config8(dev, 
PCI_SUBORDINATE_BUS);
-                               bus_isa++;
-                               bus_type[bus_rs690[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/siemens/sitemp_g1p1/irq_tables.c 
b/src/mainboard/siemens/sitemp_g1p1/irq_tables.c
index 63b532d..b2a9668 100644
--- a/src/mainboard/siemens/sitemp_g1p1/irq_tables.c
+++ b/src/mainboard/siemens/sitemp_g1p1/irq_tables.c
@@ -68,7 +68,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 
bus, u8 devfn,
        pirq_info->slot = slot;
        pirq_info->rfu = rfu;
 }
-extern u8 bus_isa;
 extern u8 bus_rs690[8];
 extern u8 bus_sb600[2];
 extern unsigned long sbdn_sb600;
diff --git a/src/mainboard/siemens/sitemp_g1p1/mptable.c 
b/src/mainboard/siemens/sitemp_g1p1/mptable.c
index df2f77b..d5b18ec 100644
--- a/src/mainboard/siemens/sitemp_g1p1/mptable.c
+++ b/src/mainboard/siemens/sitemp_g1p1/mptable.c
@@ -26,13 +26,11 @@
 
 #include <cpu/amd/amdk8_sysconf.h>
 
-extern u8 bus_isa;
 extern u8 bus_rs690[8];
 extern u8 bus_sb600[2];
 
 extern u32 apicid_sb600;
 
-extern u32 bus_type[256];
 extern u32 sbdn_rs690;
 extern u32 sbdn_sb600;
 
@@ -46,12 +44,9 @@ static void *smp_write_config_table(void *v)
        smp_write_processors(mc);
 
        get_bus_conf();
-       printk(BIOS_DEBUG, "%s: bus_isa=%d, apic_id=0x%x\n", __func__, bus_isa, 
apicid_sb600);
+       printk(BIOS_DEBUG, "%s: apic_id=0x%x\n", __func__, apicid_sb600);
 
        mptable_write_buses(mc, NULL, &isa_bus);
-       if (isa_bus != bus_isa) {
-               printk(BIOS_ERR, "ISA bus numbering schemes differ! Please fix 
mptable.c\n");
-       }
        /* I/O APICs:   APIC ID Version State   Address */
        {
                device_t dev;
@@ -63,10 +58,11 @@ static void *smp_write_config_table(void *v)
                        smp_write_ioapic(mc, apicid_sb600, 0x20, res->base);
                }
        }
-       mptable_add_isa_interrupts(mc, bus_isa, apicid_sb600, 0);
+       mptable_add_isa_interrupts(mc, isa_bus, apicid_sb600, 0);
+
        /* I/O Ints:    Type    Polarity    Trigger     Bus ID   IRQ    APIC ID 
PIN# */
-       smp_write_lintsrc(mc, mp_ExtINT, 
MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, bus_isa, 0x0, MP_APIC_ALL, 0x0);
-       smp_write_lintsrc(mc, mp_NMI, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, 
bus_isa, 0x0, MP_APIC_ALL, 0x1);
+       smp_write_lintsrc(mc, mp_ExtINT, 
MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, isa_bus, 0x0, MP_APIC_ALL, 0x0);
+       smp_write_lintsrc(mc, mp_NMI, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, 
isa_bus, 0x0, MP_APIC_ALL, 0x1);
 
        /* Compute the checksums */
        mc->mpe_checksum =

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to