AMD get_bus_conf(): Drop bus_type array

Only ever used as lvalue, so no point creating the array.

Change-Id: I6699dfae9377a895e9bc4a52579d00ddcfa60a9f
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/6277
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Rudolf Marek <r.marek@assembler.cz>
This commit is contained in:
Kyösti Mälkki 2014-07-15 14:38:51 +03:00 committed by Rudolf Marek
parent c4561e24bb
commit 53584fa32f
60 changed files with 25 additions and 337 deletions

View File

@ -56,7 +56,6 @@ u32 hcdnx[] = {
0x20202020,
};
u32 bus_type[256];
u32 sbdn_rs780;
u32 sbdn_sb800;
@ -69,7 +68,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,16 +91,11 @@ 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_sb800[0] = bus_rs780[0];
bus_type[bus_rs780[0]] = 1;
/* sb800 */
dev = dev_find_slot(bus_sb800[0], PCI_DEVFN(sbdn_sb800 + 0x14, 4));
@ -109,8 +103,6 @@ void get_bus_conf(void)
bus_sb800[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -121,8 +113,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* rs780 */
for (i = 1; i < ARRAY_SIZE(bus_rs780); i++) {
@ -132,7 +122,6 @@ void get_bus_conf(void)
if(255 != bus_rs780[i]) {
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
bus_type[bus_rs780[i]] = 1; /* PCI bus. */
}
}
}

View File

@ -37,7 +37,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -30,7 +30,6 @@ extern int bus_isa;
extern u8 bus_rs780[11];
extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_rs780;
extern u32 sbdn_sb800;

View File

@ -53,7 +53,6 @@ u32 hcdnx[] = {
0x20202020,
};
u32 bus_type[256];
u32 sbdn_rs780;
u32 sbdn_sb800;
@ -66,7 +65,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 */
@ -90,25 +89,16 @@ 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_sb800[0] = bus_rs780[0];
bus_type[bus_rs780[0]] = 1;
/* sb800 */
dev = dev_find_slot(bus_sb800[0], PCI_DEVFN(sbdn_sb800 + 0x14, 4));
if (dev) {
bus_sb800[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -119,8 +109,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* rs780 */
for (i = 1; i < ARRAY_SIZE(bus_rs780); i++) {
@ -130,7 +118,6 @@ void get_bus_conf(void)
if(255 != bus_rs780[i]) {
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
bus_type[bus_rs780[i]] = 1; /* PCI bus. */
}
}
}

View File

@ -37,7 +37,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -30,7 +30,6 @@ extern int bus_isa;
extern u8 bus_rs780[11];
extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_rs780;
extern u32 sbdn_sb800;

View File

@ -51,15 +51,13 @@ u32 hcdnx[] = {
0x20202020,
};
u32 bus_type[256];
u32 sbdn_sb700;
u32 sbdn_rd890;
void get_bus_conf(void)
{
device_t dev;
int i, j;
int i;
printk(BIOS_DEBUG, "Mainboard - Get_bus_conf.c - get_bus_conf - Start.\n");
@ -72,12 +70,6 @@ void get_bus_conf(void)
bus_rd890[i] = 0;
}
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_rd890[0] = (pci1234x[0] >> 16) & 0xff;
bus_sb700[0] = bus_rd890[0];
@ -92,8 +84,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb700[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
/* rd890 */
@ -104,7 +94,6 @@ void get_bus_conf(void)
if(255 != bus_rd890[i]) {
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
bus_type[bus_rd890[i]] = 1; /* PCI bus. */
}
}
}

View File

@ -30,7 +30,6 @@
extern u8 bus_rd890[14];
extern u8 bus_sb700[2];
extern u32 bus_type[256];
extern u32 sbdn_rd890;
extern u32 sbdn_sb700;

View File

@ -43,7 +43,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_sb800;
void get_bus_conf(void)
@ -51,18 +50,13 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_sb800[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sb800[0] = (pci1234x[0] >> 16) & 0xff;
@ -75,8 +69,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -88,9 +80,6 @@ void get_bus_conf(void)
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;
apicid_base = CONFIG_MAX_CPUS;

View File

@ -31,7 +31,6 @@ extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_sb800;
u8 intr_data[] = {

View File

@ -38,7 +38,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -45,7 +45,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_yangtze;
@ -55,7 +54,7 @@ void get_bus_conf(void)
u32 value;
device_t dev;
int i, j;
int i;
dev = dev_find_slot(0, PCI_DEVFN(0, 0)); /* clear IoapicSbFeatureEn */
@ -72,11 +71,6 @@ void get_bus_conf(void)
memset(bus_yangtze, 0, sizeof(bus_yangtze));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_yangtze[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_yangtze[0] = (pci1234x[0] >> 16) & 0xff;
@ -89,8 +83,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_yangtze[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -101,8 +93,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_yangtze[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;

View File

@ -31,7 +31,6 @@
#define IO_APIC_ID CONFIG_MAX_CPUS
extern u8 bus_yangtze[6];
extern u32 bus_type[256];
extern u32 sbdn_yangtze;
extern u32 apicid_yangtze;

View File

@ -45,7 +45,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_hudson;
@ -54,7 +53,7 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
@ -62,11 +61,7 @@ void get_bus_conf(void)
memset(bus_hudson, 0, sizeof(bus_hudson));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_hudson[0] = (pci1234x[0] >> 16) & 0xff;
@ -78,8 +73,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_hudson[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -90,8 +83,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_hudson[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;

View File

@ -31,7 +31,6 @@
#define IO_APIC_ID CONFIG_MAX_CPUS
extern u8 bus_hudson[6];
extern u32 bus_type[256];
extern u32 sbdn_hudson;
extern u32 apicid_hudson;

View File

@ -45,7 +45,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_sb800;
void get_bus_conf(void)
@ -53,19 +52,13 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_sb800[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sb800[0] = (pci1234x[0] >> 16) & 0xff;
@ -77,8 +70,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -90,9 +81,6 @@ void get_bus_conf(void)
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;

View File

@ -35,7 +35,6 @@ extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 apicver_sb800;
extern u32 bus_type[256];
extern u32 sbdn_sb800;
static void *smp_write_config_table(void *v)

View File

@ -43,7 +43,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_sb800;
void get_bus_conf(void)
@ -51,19 +50,13 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_sb800[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sb800[0] = (pci1234x[0] >> 16) & 0xff;
@ -78,8 +71,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -90,8 +81,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */

View File

@ -31,7 +31,6 @@ extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_sb800;
u8 intr_data[] = {

View File

@ -45,7 +45,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_hudson;
@ -54,17 +53,12 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_hudson = 0;
memset(bus_hudson, 0, sizeof(bus_hudson));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_hudson[0] = (pci1234x[0] >> 16) & 0xff;
@ -76,8 +70,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_hudson[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -88,8 +80,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_hudson[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;

View File

@ -31,7 +31,6 @@
#define IO_APIC_ID CONFIG_MAX_CPUS
extern u8 bus_hudson[6];
extern u32 bus_type[256];
extern u32 sbdn_hudson;
extern u32 apicid_hudson;

View File

@ -38,7 +38,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -49,14 +49,13 @@ u32 hcdnx[] = {
0x20202020,
};
u32 bus_type[256];
u32 sbdn_sb900;
void get_bus_conf(void)
{
device_t dev;
int i, j;
int i;
printk(BIOS_DEBUG, "Mainboard - %s - %s - Start.\n", __FILE__, __func__);
@ -64,11 +63,6 @@ void get_bus_conf(void)
memset(bus_sb900, 0, sizeof(bus_sb900));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_sb900[0] = (pci1234x[0] >> 16) & 0xff;
@ -79,8 +73,6 @@ void get_bus_conf(void)
bus_sb900[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb900[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -93,8 +85,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sb900[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;

View File

@ -33,7 +33,6 @@
extern u8 bus_sb900[6];
extern u32 bus_type[256];
extern u32 sbdn_sb900;
u32 apicid_sb900;

View File

@ -43,7 +43,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_sb800;
void get_bus_conf(void)
@ -51,19 +50,15 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_sb800[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sb800[0] = (pci1234x[0] >> 16) & 0xff;
@ -78,8 +73,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -90,8 +83,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */

View File

@ -31,7 +31,6 @@ extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_sb800;
u8 intr_data[] = {

View File

@ -43,7 +43,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_sb800;
void get_bus_conf(void)
@ -51,35 +50,24 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_sb800[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sb800[0] = (pci1234x[0] >> 16) & 0xff;
/* sb800 */
dev = dev_find_slot(bus_sb800[0], PCI_DEVFN(sbdn_sb800 + 0x14, 4));
if (dev) {
bus_sb800[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -90,8 +78,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */

View File

@ -32,7 +32,6 @@ extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_sb800;
u8 intr_data[] = {

View File

@ -42,7 +42,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_yangtze;
void get_bus_conf(void)
@ -51,7 +50,7 @@ void get_bus_conf(void)
u32 value;
device_t dev;
int i, j;
int i;
dev = dev_find_slot(0, PCI_DEVFN(0, 0)); /* clear IoapicSbFeatureEn */
pci_write_config32(dev, 0xF8, 0);
@ -67,11 +66,6 @@ void get_bus_conf(void)
memset(bus_yangtze, 0, sizeof(bus_yangtze));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_yangtze[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_yangtze[0] = (pci1234x[0] >> 16) & 0xff;
@ -84,8 +78,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_yangtze[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -96,8 +88,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_yangtze[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;

View File

@ -31,7 +31,6 @@
#define IO_APIC_ID CONFIG_MAX_CPUS
extern u8 bus_yangtze[6];
extern u32 bus_type[256];
extern u32 sbdn_yangtze;
extern u32 apicid_yangtze;

View File

@ -43,7 +43,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_hudson;
void get_bus_conf(void)
@ -51,17 +50,13 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_hudson = 0;
memset(bus_hudson, 0, sizeof(bus_hudson));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_hudson[0] = (pci1234x[0] >> 16) & 0xff;
@ -73,8 +68,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_hudson[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -85,8 +78,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_hudson[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;

View File

@ -30,7 +30,6 @@
#define IO_APIC_ID CONFIG_MAX_CPUS
extern u8 bus_hudson[6];
extern u32 bus_type[256];
extern u32 sbdn_hudson;
extern u32 apicid_hudson;

View File

@ -38,7 +38,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -38,7 +38,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -53,7 +53,6 @@ u32 hcdnx[] = {
0x20202020,
};
u32 bus_type[256];
u32 sbdn_rs780;
u32 sbdn_sb800;
@ -66,7 +65,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 */
@ -90,16 +89,10 @@ 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_sb800[0] = bus_rs780[0];
bus_type[bus_rs780[0]] = 1;
/* sb800 */
dev = dev_find_slot(bus_sb800[0], PCI_DEVFN(sbdn_sb800 + 0x14, 4));
@ -107,8 +100,6 @@ void get_bus_conf(void)
bus_sb800[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -119,8 +110,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* rs780 */
for (i = 1; i < ARRAY_SIZE(bus_rs780); i++) {
@ -130,7 +119,6 @@ void get_bus_conf(void)
if(255 != bus_rs780[i]) {
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
bus_type[bus_rs780[i]] = 1; /* PCI bus. */
}
}
}

View File

@ -37,7 +37,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -30,7 +30,6 @@ extern int bus_isa;
extern u8 bus_rs780[11];
extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_rs780;
extern u32 sbdn_sb800;

View File

@ -56,7 +56,6 @@ u32 hcdnx[] = {
0x20202020,
};
u32 bus_type[256];
u32 sbdn_rs780;
u32 sbdn_sb800;
@ -69,7 +68,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 */
@ -93,16 +92,10 @@ 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_sb800[0] = bus_rs780[0];
bus_type[bus_rs780[0]] = 1;
/* sb800 */
dev = dev_find_slot(bus_sb800[0], PCI_DEVFN(sbdn_sb800 + 0x14, 4));
@ -110,8 +103,6 @@ void get_bus_conf(void)
bus_sb800[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -122,8 +113,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* rs780 */
for (i = 1; i < ARRAY_SIZE(bus_rs780); i++) {
@ -133,7 +122,6 @@ void get_bus_conf(void)
if(255 != bus_rs780[i]) {
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
bus_type[bus_rs780[i]] = 1; /* PCI bus. */
}
}
}

View File

@ -37,7 +37,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -30,7 +30,6 @@ extern int bus_isa;
extern u8 bus_rs780[11];
extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_rs780;
extern u32 sbdn_sb800;

View File

@ -38,7 +38,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -44,7 +44,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_sb800;
@ -53,17 +52,13 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_sb800[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sb800[0] = (pci1234x[0] >> 16) & 0xff;
@ -76,8 +71,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -89,10 +82,6 @@ void get_bus_conf(void)
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;
apicid_base = CONFIG_MAX_CPUS;

View File

@ -32,7 +32,6 @@ extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_sb800;
u8 intr_data[] = {

View File

@ -44,7 +44,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_hudson;
@ -53,18 +52,12 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_hudson = 0;
memset(bus_hudson, 0, sizeof(bus_hudson));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_hudson[0] = (pci1234x[0] >> 16) & 0xff;
/* Hudson */
@ -75,8 +68,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_hudson[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -87,8 +78,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_hudson[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;

View File

@ -31,7 +31,6 @@
#define IO_APIC_ID CONFIG_MAX_CPUS
extern u8 bus_hudson[6];
extern u32 bus_type[256];
extern u32 sbdn_hudson;
extern u32 apicid_hudson;

View File

@ -38,7 +38,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -46,7 +46,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_sb800;
@ -55,18 +54,12 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_sb800[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sb800[0] = (pci1234x[0] >> 16) & 0xff;
@ -78,8 +71,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -91,10 +82,6 @@ void get_bus_conf(void)
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;
apicid_base = CONFIG_MAX_CPUS;

View File

@ -37,7 +37,6 @@ extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 apicver_sb800;
extern u32 bus_type[256];
extern u32 sbdn_sb800;
static void *smp_write_config_table(void *v)

View File

@ -43,7 +43,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_sb800;
@ -52,17 +51,12 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_sb800[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sb800[0] = (pci1234x[0] >> 16) & 0xff;
@ -75,8 +69,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -88,10 +80,6 @@ void get_bus_conf(void)
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;
apicid_base = CONFIG_MAX_CPUS;

View File

@ -31,7 +31,6 @@ extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_sb800;
u8 intr_data[] = {

View File

@ -43,7 +43,6 @@ u32 pci1234x[] = {
0x0000ff0,
};
u32 bus_type[256];
u32 sbdn_sb800;
void get_bus_conf(void)
@ -51,18 +50,12 @@ void get_bus_conf(void)
u32 apicid_base;
device_t dev;
int i, j;
int i;
sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800));
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
// bus_sb800[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sb800[0] = (pci1234x[0] >> 16) & 0xff;
@ -74,8 +67,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sb800[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
for (i = 0; i < 4; i++) {
@ -87,10 +78,6 @@ void get_bus_conf(void)
}
}
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
/* I/O APICs: APIC ID Version State Address */
bus_isa = 10;
apicid_base = CONFIG_MAX_CPUS;

View File

@ -31,7 +31,6 @@ extern u8 bus_sb800[6];
extern u32 apicid_sb800;
extern u32 bus_type[256];
extern u32 sbdn_sb800;
u8 intr_data[] = {

View File

@ -35,7 +35,6 @@ u8 bus_sp5100[2];
u8 bus_sr5650[14];
u32 bus_type[256];
u32 sbdn_sr5650;
u32 sbdn_sp5100;
@ -43,7 +42,7 @@ u32 sbdn_sp5100;
void get_bus_conf(void)
{
device_t dev;
int i, j;
int i;
sbdn_sp5100 = 0;
@ -54,11 +53,6 @@ void get_bus_conf(void)
bus_sr5650[i] = 0;
}
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_sr5650[0] = 0;
bus_sp5100[0] = bus_sr5650[0];
@ -71,8 +65,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sp5100[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
/* sr5650 */
@ -83,7 +75,6 @@ void get_bus_conf(void)
if(255 != bus_sr5650[i]) {
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
bus_type[bus_sr5650[i]] = 1; /* PCI bus. */
}
}
}
@ -97,8 +88,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sp5100[2]; j < bus_isa; j++)
bus_type[j] = 1;
*/

View File

@ -30,7 +30,6 @@
extern u8 bus_sr5650[14];
extern u8 bus_sp5100[2];
extern u32 bus_type[256];
extern u32 sbdn_sr5650;
extern u32 sbdn_sp5100;
extern int bus_isa;

View File

@ -35,7 +35,6 @@ u8 bus_sp5100[2];
u8 bus_sr5650[14];
u32 bus_type[256];
u32 sbdn_sr5650;
u32 sbdn_sp5100;
@ -43,7 +42,7 @@ u32 sbdn_sp5100;
void get_bus_conf(void)
{
device_t dev;
int i, j;
int i;
sbdn_sp5100 = 0;
@ -54,11 +53,6 @@ void get_bus_conf(void)
bus_sr5650[i] = 0;
}
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_sr5650[0] = 0;
bus_sp5100[0] = bus_sr5650[0];
@ -71,8 +65,6 @@ void get_bus_conf(void)
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sp5100[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
/* sr5650 */
@ -83,7 +75,6 @@ void get_bus_conf(void)
if(255 != bus_sr5650[i]) {
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
bus_type[bus_sr5650[i]] = 1; /* PCI bus. */
}
}
}
@ -97,8 +88,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sp5100[2]; j < bus_isa; j++)
bus_type[j] = 1;
*/

View File

@ -30,7 +30,6 @@
extern u8 bus_sr5650[14];
extern u8 bus_sp5100[2];
extern u32 bus_type[256];
extern u32 sbdn_sr5650;
extern u32 sbdn_sp5100;
extern int bus_isa;

View File

@ -54,7 +54,6 @@ u32 hcdnx[] = {
0x20202020,
};
u32 bus_type[256];
u32 sbdn_sr5650;
u32 sbdn_sp5100;
@ -67,7 +66,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,16 +91,10 @@ void get_bus_conf(void)
bus_sr5650[i] = 0;
}
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_sr5650[0] = (sysconf.pci1234[0] >> 16) & 0xff;
bus_sp5100[0] = bus_sr5650[0];
bus_type[bus_sr5650[0]] = 1;
/* sp5100 */
dev = dev_find_slot(bus_sp5100[0], PCI_DEVFN(sbdn_sp5100 + 0x14, 4));
@ -109,8 +102,6 @@ void get_bus_conf(void)
bus_sp5100[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sp5100[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
/* sr5650 */
@ -121,7 +112,6 @@ void get_bus_conf(void)
if(255 != bus_sr5650[i]) {
bus_isa = pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
bus_type[bus_sr5650[i]] = 1; /* PCI bus. */
}
}
}

View File

@ -38,7 +38,6 @@ struct mb_sysconf_t {
u32 sbdn3;
u32 sbdn3a[31];
u32 sbdn5[31];
u32 bus_type[256];
};
#endif

View File

@ -34,7 +34,6 @@ u8 bus_sp5100[2];
u8 bus_sr5650[14];
u32 bus_type[256];
u32 sbdn_sr5650;
u32 sbdn_sp5100;
@ -44,7 +43,7 @@ void get_bus_conf(void);
void get_bus_conf(void)
{
device_t dev;
int i, j;
int i;
sbdn_sp5100 = 0;
@ -55,11 +54,6 @@ void get_bus_conf(void)
bus_sr5650[i] = 0;
}
for (i = 0; i < 256; i++) {
bus_type[i] = 0; /* default ISA bus. */
}
bus_type[0] = 1; /* pci */
bus_sr5650[0] = 0;
bus_sp5100[0] = bus_sr5650[0];
@ -72,8 +66,6 @@ void get_bus_conf(void)
bus_isa = (int)pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
for (j = bus_sp5100[1]; j < bus_isa; j++)
bus_type[j] = 1;
}
/* sr5650 */
@ -84,7 +76,6 @@ void get_bus_conf(void)
if(255 != bus_sr5650[i]) {
bus_isa = (int)pci_read_config8(dev, PCI_SUBORDINATE_BUS);
bus_isa++;
bus_type[bus_sr5650[i]] = 1; /* PCI bus. */
}
}
}
@ -98,8 +89,6 @@ void get_bus_conf(void)
bus_isa++;
}
}
for (j = bus_sp5100[2]; j < bus_isa; j++)
bus_type[j] = 1;
*/

View File

@ -30,7 +30,6 @@
extern u8 bus_sr5650[14];
extern u8 bus_sp5100[2];
extern u32 bus_type[256];
extern u32 sbdn_sr5650;
extern u32 sbdn_sp5100;
extern int bus_isa;