aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 10:38:02 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 10:38:02 -0700
commit3aed77bc84013fced136977b7cc17fff60eddf7a (patch)
tree75ee4060f58f033deb16771a303fb55dd370b6f9 /drivers
parent0b968d23610d65a46299347b141a687e207bd294 (diff)
parentb2ad7b5e8115582cdf5bbda065aa516c24d62c21 (diff)
downloadlinux-3aed77bc84013fced136977b7cc17fff60eddf7a.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/hotplug/rpadlpar_core.c20
-rw-r--r--drivers/pci/hotplug/rpaphp_pci.c8
-rw-r--r--drivers/video/offb.c2
3 files changed, 18 insertions, 12 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
index 4ada15111af084..ad1017da8656c3 100644
--- a/drivers/pci/hotplug/rpadlpar_core.c
+++ b/drivers/pci/hotplug/rpadlpar_core.c
@@ -134,7 +134,8 @@ static void rpadlpar_claim_one_bus(struct pci_bus *b)
static int pci_add_secondary_bus(struct device_node *dn,
struct pci_dev *bridge_dev)
{
- struct pci_controller *hose = dn->phb;
+ struct pci_dn *pdn = dn->data;
+ struct pci_controller *hose = pdn->phb;
struct pci_bus *child;
u8 sec_busno;
@@ -159,7 +160,7 @@ static int pci_add_secondary_bus(struct device_node *dn,
if (hose->last_busno < child->number)
hose->last_busno = child->number;
- dn->bussubno = child->number;
+ pdn->bussubno = child->number;
/* ioremap() for child bus, which may or may not succeed */
remap_bus_range(child);
@@ -183,11 +184,12 @@ static struct pci_dev *dlpar_find_new_dev(struct pci_bus *parent,
static struct pci_dev *dlpar_pci_add_bus(struct device_node *dn)
{
- struct pci_controller *hose = dn->phb;
+ struct pci_dn *pdn = dn->data;
+ struct pci_controller *hose = pdn->phb;
struct pci_dev *dev = NULL;
/* Scan phb bus for EADS device, adding new one to bus->devices */
- if (!pci_scan_single_device(hose->bus, dn->devfn)) {
+ if (!pci_scan_single_device(hose->bus, pdn->devfn)) {
printk(KERN_ERR "%s: found no device on bus\n", __FUNCTION__);
return NULL;
}
@@ -269,6 +271,7 @@ static int dlpar_remove_root_bus(struct pci_controller *phb)
static int dlpar_remove_phb(char *drc_name, struct device_node *dn)
{
struct slot *slot;
+ struct pci_dn *pdn;
int rc = 0;
if (!rpaphp_find_pci_bus(dn))
@@ -285,12 +288,13 @@ static int dlpar_remove_phb(char *drc_name, struct device_node *dn)
}
}
- BUG_ON(!dn->phb);
- rc = dlpar_remove_root_bus(dn->phb);
+ pdn = dn->data;
+ BUG_ON(!pdn || !pdn->phb);
+ rc = dlpar_remove_root_bus(pdn->phb);
if (rc < 0)
return rc;
- dn->phb = NULL;
+ pdn->phb = NULL;
return 0;
}
@@ -299,7 +303,7 @@ static int dlpar_add_phb(char *drc_name, struct device_node *dn)
{
struct pci_controller *phb;
- if (dn->phb) {
+ if (PCI_DN(dn)->phb) {
/* PHB already exists */
return -EINVAL;
}
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index 17a0279ebcb9fa..49e4d10a6488ea 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -51,10 +51,12 @@ static struct pci_bus *find_bus_among_children(struct pci_bus *bus,
struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn)
{
- if (!dn->phb || !dn->phb->bus)
+ struct pci_dn *pdn = dn->data;
+
+ if (!pdn || !pdn->phb || !pdn->phb->bus)
return NULL;
- return find_bus_among_children(dn->phb->bus, dn);
+ return find_bus_among_children(pdn->phb->bus, dn);
}
EXPORT_SYMBOL_GPL(rpaphp_find_pci_bus);
@@ -229,7 +231,7 @@ rpaphp_pci_config_slot(struct pci_bus *bus)
if (!dn || !dn->child)
return NULL;
- slotno = PCI_SLOT(dn->child->devfn);
+ slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
/* pci_scan_slot should find all children */
num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index 42a6591e863f8a..611922c0b22fbb 100644
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -363,7 +363,7 @@ static void __init offb_init_nodriver(struct device_node *dp)
address = (u_long) dp->addrs[i].address;
#ifdef CONFIG_PPC64
- address += dp->phb->pci_mem_offset;
+ address += ((struct pci_dn *)dp->data)->phb->pci_mem_offset;
#endif
/* kludge for valkyrie */