aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/pci-ioda.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/powernv/pci-ioda.c')
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 425c2b29794..f31162cfdaa 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -9,7 +9,7 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#define DEBUG 12#undef DEBUG
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/pci.h> 15#include <linux/pci.h>
@@ -467,14 +467,13 @@ static void __devinit pnv_ioda_update_resources(struct pci_bus *bus)
467 struct pci_bus *cbus; 467 struct pci_bus *cbus;
468 struct pci_dev *cdev; 468 struct pci_dev *cdev;
469 unsigned int i; 469 unsigned int i;
470 u16 cmd;
471 470
472 /* Clear all device enables */ 471 /* We used to clear all device enables here. However it looks like
473 list_for_each_entry(cdev, &bus->devices, bus_list) { 472 * clearing MEM enable causes Obsidian (IPR SCS) to go bonkers,
474 pci_read_config_word(cdev, PCI_COMMAND, &cmd); 473 * and shoot fatal errors to the PHB which in turns fences itself
475 cmd &= ~(PCI_COMMAND_IO|PCI_COMMAND_MEMORY|PCI_COMMAND_MASTER); 474 * and we can't recover from that ... yet. So for now, let's leave
476 pci_write_config_word(cdev, PCI_COMMAND, cmd); 475 * the enables as-is and hope for the best.
477 } 476 */
478 477
479 /* Check if bus resources fit in our IO or M32 range */ 478 /* Check if bus resources fit in our IO or M32 range */
480 for (i = 0; bus->self && (i < 2); i++) { 479 for (i = 0; bus->self && (i < 2); i++) {
@@ -618,7 +617,7 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb,
618 struct pci_dn *pdn = pnv_ioda_get_pdn(parent); 617 struct pci_dn *pdn = pnv_ioda_get_pdn(parent);
619 if (pdn && pdn->pe_number != IODA_INVALID_PE) { 618 if (pdn && pdn->pe_number != IODA_INVALID_PE) {
620 rc = opal_pci_set_peltv(phb->opal_id, pdn->pe_number, 619 rc = opal_pci_set_peltv(phb->opal_id, pdn->pe_number,
621 pe->pe_number, 1); 620 pe->pe_number, OPAL_ADD_PE_TO_DOMAIN);
622 /* XXX What to do in case of error ? */ 621 /* XXX What to do in case of error ? */
623 } 622 }
624 parent = parent->bus->self; 623 parent = parent->bus->self;
@@ -638,7 +637,7 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb,
638 pe->mve_number = -1; 637 pe->mve_number = -1;
639 } else { 638 } else {
640 rc = opal_pci_set_mve_enable(phb->opal_id, 639 rc = opal_pci_set_mve_enable(phb->opal_id,
641 pe->mve_number, 1); 640 pe->mve_number, OPAL_ENABLE_MVE);
642 if (rc) { 641 if (rc) {
643 pe_err(pe, "OPAL error %ld enabling MVE %d\n", 642 pe_err(pe, "OPAL error %ld enabling MVE %d\n",
644 rc, pe->mve_number); 643 rc, pe->mve_number);
@@ -1187,6 +1186,12 @@ void __init pnv_pci_init_ioda1_phb(struct device_node *np)
1187 phb->opal_id = phb_id; 1186 phb->opal_id = phb_id;
1188 phb->type = PNV_PHB_IODA1; 1187 phb->type = PNV_PHB_IODA1;
1189 1188
1189 /* Detect specific models for error handling */
1190 if (of_device_is_compatible(np, "ibm,p7ioc-pciex"))
1191 phb->model = PNV_PHB_MODEL_P7IOC;
1192 else
1193 phb->model = PNV_PHB_MODEL_UNKNOWN;
1194
1190 /* We parse "ranges" now since we need to deduce the register base 1195 /* We parse "ranges" now since we need to deduce the register base
1191 * from the IO base 1196 * from the IO base
1192 */ 1197 */