summaryrefslogtreecommitdiff
path: root/src/mainboard/broadcom/blast/get_bus_conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/broadcom/blast/get_bus_conf.c')
-rw-r--r--src/mainboard/broadcom/blast/get_bus_conf.c46
1 files changed, 25 insertions, 21 deletions
diff --git a/src/mainboard/broadcom/blast/get_bus_conf.c b/src/mainboard/broadcom/blast/get_bus_conf.c
index 44a9fc018e..95f9d12175 100644
--- a/src/mainboard/broadcom/blast/get_bus_conf.c
+++ b/src/mainboard/broadcom/blast/get_bus_conf.c
@@ -7,10 +7,22 @@
#include <cpu/amd/dualcore.h>
#endif
-unsigned sblk;
-unsigned pci1234[] =
+#include <cpu/amd/amdk8_sysconf.h>
+
+
+// Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
+//busnum is default
+unsigned char bus_isa = 10;
+unsigned char bus_bcm5780[7];
+unsigned char bus_bcm5785_0 = 1;
+unsigned char bus_bcm5785_1 = 8;
+unsigned char bus_bcm5785_1_1 = 9;
+unsigned apicid_bcm5785[3];
+
+
+unsigned pci1234x[] =
{ //Here you only need to set value in pci1234 for HT-IO that could be installed or not
- //You may need to preset pci1234 for HTIO board, please refer to src/northbridge/amd/amdk8/get_sblk_pci1234.c for detail
+ //You may need to preset pci1234 for HTIO board, please refer to src/northbridge/amd/amdk8/get_sblk_pci1234.c for detail
0x0000ff0,
// 0x0000ff0,
// 0x0000ff0,
@@ -20,9 +32,7 @@ unsigned pci1234[] =
// 0x0000ff0,
// 0x0000ff0
};
-unsigned hc_possible_num;
-unsigned sbdn;
-unsigned hcdn[] =
+unsigned hcdnx[] =
{ //HT Chain device num, actually it is unit id base of every ht device in chain, assume every chain only have 4 ht device at most
0x20202020,
// 0x20202020,
@@ -33,16 +43,6 @@ unsigned hcdn[] =
// 0x20202020,
// 0x20202020,
};
-
-// Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
-//busnum is default
-unsigned char bus_isa = 10;
-unsigned char bus_bcm5780[7];
-unsigned char bus_bcm5785_0 = 1;
-unsigned char bus_bcm5785_1 = 8;
-unsigned char bus_bcm5785_1_1 = 9;
-unsigned apicid_bcm5785[3];
-
unsigned sbdn2;
extern void get_sblk_pci1234(void);
@@ -61,18 +61,22 @@ void get_bus_conf(void)
get_bus_conf_done = 1;
- hc_possible_num = sizeof(pci1234)/sizeof(pci1234[0]);
+ sysconf.hc_possible_num = sizeof(pci1234x)/sizeof(pci1234x[0]);
+ for(i=0;i<sysconf.hc_possible_num; i++) {
+ sysconf.pci1234[i] = pci1234x[i];
+ sysconf.hcdn[i] = hcdnx[i];
+ }
get_sblk_pci1234();
- sbdn = (hcdn[0] >> 8) & 0xff;
- sbdn2 = hcdn[0] & 0xff; // bcm5780
+ sysconf.sbdn = (sysconf.hcdn[0] >> 8) & 0xff;
+ sbdn2 = sysconf.hcdn[0] & 0xff; // bcm5780
- bus_bcm5785_0 = (pci1234[0] >> 16) & 0xff;
+ bus_bcm5785_0 = (sysconf.pci1234[0] >> 16) & 0xff;
bus_bcm5780[0] = bus_bcm5785_0;
/* bcm5785 */
- dev = dev_find_slot(bus_bcm5785_0, PCI_DEVFN(sbdn,0));
+ dev = dev_find_slot(bus_bcm5785_0, PCI_DEVFN(sysconf.sbdn,0));
if (dev) {
bus_bcm5785_1 = pci_read_config8(dev, PCI_SECONDARY_BUS);
dev = dev_find_slot(bus_bcm5785_1, PCI_DEVFN(0x0d,0));