|
@@ -40,38 +40,40 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus)
|
|
int twister = 0, node = 0;
|
|
int twister = 0, node = 0;
|
|
int i, bus, num_buses;
|
|
int i, bus, num_buses;
|
|
|
|
|
|
- for(i = 0; i < rio_table_hdr->num_rio_dev; i++){
|
|
|
|
- if (rio_devs[i]->node_id == rio_devs[wpeg_num]->owner_id){
|
|
|
|
|
|
+ for (i = 0; i < rio_table_hdr->num_rio_dev; i++) {
|
|
|
|
+ if (rio_devs[i]->node_id == rio_devs[wpeg_num]->owner_id) {
|
|
twister = rio_devs[i]->owner_id;
|
|
twister = rio_devs[i]->owner_id;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (i == rio_table_hdr->num_rio_dev){
|
|
|
|
|
|
+ if (i == rio_table_hdr->num_rio_dev) {
|
|
printk(KERN_ERR "%s: Couldn't find owner Cyclone for Winnipeg!\n", __FUNCTION__);
|
|
printk(KERN_ERR "%s: Couldn't find owner Cyclone for Winnipeg!\n", __FUNCTION__);
|
|
return last_bus;
|
|
return last_bus;
|
|
}
|
|
}
|
|
|
|
|
|
- for(i = 0; i < rio_table_hdr->num_scal_dev; i++){
|
|
|
|
- if (scal_devs[i]->node_id == twister){
|
|
|
|
|
|
+ for (i = 0; i < rio_table_hdr->num_scal_dev; i++) {
|
|
|
|
+ if (scal_devs[i]->node_id == twister) {
|
|
node = scal_devs[i]->node_id;
|
|
node = scal_devs[i]->node_id;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (i == rio_table_hdr->num_scal_dev){
|
|
|
|
|
|
+ if (i == rio_table_hdr->num_scal_dev) {
|
|
printk(KERN_ERR "%s: Couldn't find owner Twister for Cyclone!\n", __FUNCTION__);
|
|
printk(KERN_ERR "%s: Couldn't find owner Twister for Cyclone!\n", __FUNCTION__);
|
|
return last_bus;
|
|
return last_bus;
|
|
}
|
|
}
|
|
|
|
|
|
- switch (rio_devs[wpeg_num]->type){
|
|
|
|
|
|
+ switch (rio_devs[wpeg_num]->type) {
|
|
case CompatWPEG:
|
|
case CompatWPEG:
|
|
- /* The Compatibility Winnipeg controls the 2 legacy buses,
|
|
|
|
|
|
+ /*
|
|
|
|
+ * The Compatibility Winnipeg controls the 2 legacy buses,
|
|
* the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case
|
|
* the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case
|
|
* a PCI-PCI bridge card is used in either slot: total 5 buses.
|
|
* a PCI-PCI bridge card is used in either slot: total 5 buses.
|
|
*/
|
|
*/
|
|
num_buses = 5;
|
|
num_buses = 5;
|
|
break;
|
|
break;
|
|
case AltWPEG:
|
|
case AltWPEG:
|
|
- /* The Alternate Winnipeg controls the 2 133MHz buses [1 slot
|
|
|
|
|
|
+ /*
|
|
|
|
+ * The Alternate Winnipeg controls the 2 133MHz buses [1 slot
|
|
* each], their 2 "extra" buses, the 100MHz bus [2 slots] and
|
|
* each], their 2 "extra" buses, the 100MHz bus [2 slots] and
|
|
* the "extra" buses for each of those slots: total 7 buses.
|
|
* the "extra" buses for each of those slots: total 7 buses.
|
|
*/
|
|
*/
|
|
@@ -79,7 +81,8 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus)
|
|
break;
|
|
break;
|
|
case LookOutAWPEG:
|
|
case LookOutAWPEG:
|
|
case LookOutBWPEG:
|
|
case LookOutBWPEG:
|
|
- /* A Lookout Winnipeg controls 3 100MHz buses [2 slots each]
|
|
|
|
|
|
+ /*
|
|
|
|
+ * A Lookout Winnipeg controls 3 100MHz buses [2 slots each]
|
|
* & the "extra" buses for each of those slots: total 9 buses.
|
|
* & the "extra" buses for each of those slots: total 9 buses.
|
|
*/
|
|
*/
|
|
num_buses = 9;
|
|
num_buses = 9;
|
|
@@ -89,7 +92,7 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus)
|
|
return last_bus;
|
|
return last_bus;
|
|
}
|
|
}
|
|
|
|
|
|
- for(bus = last_bus; bus < last_bus + num_buses; bus++)
|
|
|
|
|
|
+ for (bus = last_bus; bus < last_bus + num_buses; bus++)
|
|
mp_bus_id_to_node[bus] = node;
|
|
mp_bus_id_to_node[bus] = node;
|
|
return bus;
|
|
return bus;
|
|
}
|
|
}
|
|
@@ -99,12 +102,12 @@ static int __init build_detail_arrays(void)
|
|
unsigned long ptr;
|
|
unsigned long ptr;
|
|
int i, scal_detail_size, rio_detail_size;
|
|
int i, scal_detail_size, rio_detail_size;
|
|
|
|
|
|
- if (rio_table_hdr->num_scal_dev > MAX_NUMNODES){
|
|
|
|
|
|
+ if (rio_table_hdr->num_scal_dev > MAX_NUMNODES) {
|
|
printk(KERN_WARNING "%s: MAX_NUMNODES too low! Defined as %d, but system has %d nodes.\n", __FUNCTION__, MAX_NUMNODES, rio_table_hdr->num_scal_dev);
|
|
printk(KERN_WARNING "%s: MAX_NUMNODES too low! Defined as %d, but system has %d nodes.\n", __FUNCTION__, MAX_NUMNODES, rio_table_hdr->num_scal_dev);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
- switch (rio_table_hdr->version){
|
|
|
|
|
|
+ switch (rio_table_hdr->version) {
|
|
default:
|
|
default:
|
|
printk(KERN_WARNING "%s: Invalid Rio Grande Table Version: %d\n", __FUNCTION__, rio_table_hdr->version);
|
|
printk(KERN_WARNING "%s: Invalid Rio Grande Table Version: %d\n", __FUNCTION__, rio_table_hdr->version);
|
|
return 0;
|
|
return 0;
|
|
@@ -119,10 +122,10 @@ static int __init build_detail_arrays(void)
|
|
}
|
|
}
|
|
|
|
|
|
ptr = (unsigned long)rio_table_hdr + 3;
|
|
ptr = (unsigned long)rio_table_hdr + 3;
|
|
- for(i = 0; i < rio_table_hdr->num_scal_dev; i++, ptr += scal_detail_size)
|
|
|
|
|
|
+ for (i = 0; i < rio_table_hdr->num_scal_dev; i++, ptr += scal_detail_size)
|
|
scal_devs[i] = (struct scal_detail *)ptr;
|
|
scal_devs[i] = (struct scal_detail *)ptr;
|
|
|
|
|
|
- for(i = 0; i < rio_table_hdr->num_rio_dev; i++, ptr += rio_detail_size)
|
|
|
|
|
|
+ for (i = 0; i < rio_table_hdr->num_rio_dev; i++, ptr += rio_detail_size)
|
|
rio_devs[i] = (struct rio_detail *)ptr;
|
|
rio_devs[i] = (struct rio_detail *)ptr;
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
@@ -140,9 +143,9 @@ void __init setup_summit(void)
|
|
|
|
|
|
rio_table_hdr = NULL;
|
|
rio_table_hdr = NULL;
|
|
offset = 0x180;
|
|
offset = 0x180;
|
|
- while (offset){
|
|
|
|
|
|
+ while (offset) {
|
|
/* The block id is stored in the 2nd word */
|
|
/* The block id is stored in the 2nd word */
|
|
- if (*((unsigned short *)(ptr + offset + 2)) == 0x4752){
|
|
|
|
|
|
+ if (*((unsigned short *)(ptr + offset + 2)) == 0x4752) {
|
|
/* set the pointer past the offset & block id */
|
|
/* set the pointer past the offset & block id */
|
|
rio_table_hdr = (struct rio_table_hdr *)(ptr + offset + 4);
|
|
rio_table_hdr = (struct rio_table_hdr *)(ptr + offset + 4);
|
|
break;
|
|
break;
|
|
@@ -150,7 +153,7 @@ void __init setup_summit(void)
|
|
/* The next offset is stored in the 1st word. 0 means no more */
|
|
/* The next offset is stored in the 1st word. 0 means no more */
|
|
offset = *((unsigned short *)(ptr + offset));
|
|
offset = *((unsigned short *)(ptr + offset));
|
|
}
|
|
}
|
|
- if (!rio_table_hdr){
|
|
|
|
|
|
+ if (!rio_table_hdr) {
|
|
printk(KERN_ERR "%s: Unable to locate Rio Grande Table in EBDA - bailing!\n", __FUNCTION__);
|
|
printk(KERN_ERR "%s: Unable to locate Rio Grande Table in EBDA - bailing!\n", __FUNCTION__);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -161,8 +164,8 @@ void __init setup_summit(void)
|
|
/* The first Winnipeg we're looking for has an index of 0 */
|
|
/* The first Winnipeg we're looking for has an index of 0 */
|
|
next_wpeg = 0;
|
|
next_wpeg = 0;
|
|
do {
|
|
do {
|
|
- for(i = 0; i < rio_table_hdr->num_rio_dev; i++){
|
|
|
|
- if (is_WPEG(rio_devs[i]) && rio_devs[i]->WP_index == next_wpeg){
|
|
|
|
|
|
+ for (i = 0; i < rio_table_hdr->num_rio_dev; i++) {
|
|
|
|
+ if (is_WPEG(rio_devs[i]) && rio_devs[i]->WP_index == next_wpeg) {
|
|
/* It's the Winnipeg we're looking for! */
|
|
/* It's the Winnipeg we're looking for! */
|
|
next_bus = setup_pci_node_map_for_wpeg(i, next_bus);
|
|
next_bus = setup_pci_node_map_for_wpeg(i, next_bus);
|
|
next_wpeg++;
|
|
next_wpeg++;
|