summaryrefslogtreecommitdiff
path: root/src/mainboard/msi/ms9282
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2010-11-21 14:41:07 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2010-11-21 14:41:07 +0000
commit5244e1ba63e5f3ea12066734bfb0d864a8f1f11d (patch)
treee389268c9bb473c457df4e7ab1de60922e0c7adf /src/mainboard/msi/ms9282
parent8cda9699d4a2fea8ed2c5e4a7e66e8e1e0f831df (diff)
downloadcoreboot-5244e1ba63e5f3ea12066734bfb0d864a8f1f11d.tar.xz
Convert more boards to use mptable_write_buses.
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6106 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/msi/ms9282')
-rw-r--r--src/mainboard/msi/ms9282/get_bus_conf.c18
-rw-r--r--src/mainboard/msi/ms9282/mb_sysconf.h3
-rw-r--r--src/mainboard/msi/ms9282/mptable.c22
3 files changed, 9 insertions, 34 deletions
diff --git a/src/mainboard/msi/ms9282/get_bus_conf.c b/src/mainboard/msi/ms9282/get_bus_conf.c
index 5b4ee487c1..833b29b711 100644
--- a/src/mainboard/msi/ms9282/get_bus_conf.c
+++ b/src/mainboard/msi/ms9282/get_bus_conf.c
@@ -75,7 +75,7 @@ void get_bus_conf(void)
struct mb_sysconf_t *m;
device_t dev;
- int i, j;
+ int i;
if(get_bus_conf_done==1) return; //do it only once
@@ -96,8 +96,6 @@ void get_bus_conf(void)
sysconf.sbdn = (sysconf.hcdn[0] & 0xff); // first byte of first chain
- m->bus_type[0] = 1; //pci
-
m->bus_mcp55[0] = (sysconf.pci1234[0] >> 16) & 0xff;
/* MCP55 */
@@ -119,20 +117,6 @@ void get_bus_conf(void)
}
}
- for(i=0; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
-
- unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
- unsigned busn_max = (sysconf.pci1234[i] >> 24) & 0xff;
- for (j = busn; j <= busn_max; j++)
- m->bus_type[j] = 1;
- if(m->bus_isa <= busn_max)
- m->bus_isa = busn_max + 1;
- printk(BIOS_DEBUG, "i=%d bus range: [%x, %x] bus_isa=%x\n",i, busn, busn_max, m->bus_isa);
- }
-
-
-
/*I/O APICs: APIC ID Version State Address*/
#if CONFIG_LOGICAL_CPUS==1
apicid_base = get_apicid_base(1);
diff --git a/src/mainboard/msi/ms9282/mb_sysconf.h b/src/mainboard/msi/ms9282/mb_sysconf.h
index 71770203ec..6d0ee75d3e 100644
--- a/src/mainboard/msi/ms9282/mb_sysconf.h
+++ b/src/mainboard/msi/ms9282/mb_sysconf.h
@@ -26,11 +26,8 @@
#define MB_SYSCONF_H
struct mb_sysconf_t {
- unsigned char bus_isa;
unsigned char bus_mcp55[8]; //1
unsigned apicid_mcp55;
- unsigned bus_type[256];
-
};
#endif
diff --git a/src/mainboard/msi/ms9282/mptable.c b/src/mainboard/msi/ms9282/mptable.c
index d800932e7f..391101276f 100644
--- a/src/mainboard/msi/ms9282/mptable.c
+++ b/src/mainboard/msi/ms9282/mptable.c
@@ -36,7 +36,7 @@ static void *smp_write_config_table(void *v)
struct mb_sysconf_t *m;
unsigned sbdn;
- int i,j;
+ int i, j, bus_isa;
mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN);
@@ -44,17 +44,11 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
- get_bus_conf();
- sbdn = sysconf.sbdn;
- m = sysconf.mb;
+ get_bus_conf();
+ sbdn = sysconf.sbdn;
+ m = sysconf.mb;
-/*Bus: Bus ID Type*/
- /* define bus and isa numbers */
- for(j= 0; j < 256 ; j++) {
- if(m->bus_type[j])
- smp_write_bus(mc, j, "PCI ");
- }
- smp_write_bus(mc, m->bus_isa, "ISA ");
+ mptable_write_buses(mc, NULL, &bus_isa);
/*I/O APICs: APIC ID Version State Address*/
{
@@ -83,7 +77,7 @@ static void *smp_write_config_table(void *v)
}
- mptable_add_isa_interrupts(mc, m->bus_isa, m->apicid_mcp55, 0);
+ mptable_add_isa_interrupts(mc, bus_isa, m->apicid_mcp55, 0);
//SMBUS
smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, m->bus_mcp55[0], ((sbdn+1)<<2)|1, m->apicid_mcp55, 0xa);
@@ -121,8 +115,8 @@ static void *smp_write_config_table(void *v)
}
/*Local Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN#*/
- smp_write_lintsrc(mc, mp_ExtINT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x0, MP_APIC_ALL, 0x0);
- smp_write_lintsrc(mc, mp_NMI, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x0, MP_APIC_ALL, 0x1);
+ 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);
/* There is no extension information... */
/* Compute the checksums */