aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-16 17:28:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-16 17:28:10 -0700
commit4c5811bf463b0ef82fabbd1708f8bb2d753aeb18 (patch)
treeff37d31217c3804ca05de21a55a9b5ca1ca818b2 /arch/powerpc/include
parentMerge branch 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl (diff)
parenttty: serial: altera_jtaguart: Add device tree support (diff)
downloadlinux-dev-4c5811bf463b0ef82fabbd1708f8bb2d753aeb18.tar.xz
linux-dev-4c5811bf463b0ef82fabbd1708f8bb2d753aeb18.zip
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits) tty: serial: altera_jtaguart: Add device tree support tty: serial: altera_uart: Add devicetree support dt: eliminate of_platform_driver shim code dt: Eliminate of_platform_{,un}register_driver dt/serial: Eliminate users of of_platform_{,un}register_driver dt/usb: Eliminate users of of_platform_{,un}register_driver dt/video: Eliminate users of of_platform_{,un}register_driver dt/net: Eliminate users of of_platform_{,un}register_driver dt/sound: Eliminate users of of_platform_{,un}register_driver dt/spi: Eliminate users of of_platform_{,un}register_driver dt: uartlite: merge platform and of_platform driver bindings dt: xilinx_hwicap: merge platform and of_platform driver bindings ipmi: convert OF driver to platform driver leds/leds-gpio: merge platform_driver with of_platform_driver dt/sparc: Eliminate users of of_platform_{,un}register_driver dt/powerpc: Eliminate users of of_platform_{,un}register_driver dt/powerpc: move of_bus_type infrastructure to ibmebus drivercore/dt: add a match table pointer to struct device dt: Typo fix. altera_ps2: Add devicetree support ...
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/pci-bridge.h27
-rw-r--r--arch/powerpc/include/asm/pci.h2
2 files changed, 6 insertions, 23 deletions
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index edeb80fdd2c3..5e156e034fe2 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -164,13 +164,13 @@ extern void setup_indirect_pci(struct pci_controller* hose,
resource_size_t cfg_addr,
resource_size_t cfg_data, u32 flags);
-#ifndef CONFIG_PPC64
-
static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus)
{
return bus->sysdata;
}
+#ifndef CONFIG_PPC64
+
static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus)
{
struct pci_controller *host;
@@ -228,19 +228,10 @@ extern void * update_dn_pci_info(struct device_node *dn, void *data);
/* Get a device_node from a pci_dev. This code must be fast except
* in the case where the sysdata is incorrect and needs to be fixed
- * up (this will only happen once).
- * In this case the sysdata will have been inherited from a PCI host
- * bridge or a PCI-PCI bridge further up the tree, so it will point
- * to a valid struct pci_dn, just not the one we want.
- */
+ * up (this will only happen once). */
static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev)
{
- struct device_node *dn = dev->sysdata;
- struct pci_dn *pdn = dn->data;
-
- if (pdn && pdn->devfn == dev->devfn && pdn->busno == dev->bus->number)
- return dn; /* fast path. sysdata is good */
- return fetch_dev_dn(dev);
+ return dev->dev.of_node ? dev->dev.of_node : fetch_dev_dn(dev);
}
static inline int pci_device_from_OF_node(struct device_node *np,
@@ -258,7 +249,7 @@ static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus)
if (bus->self)
return pci_device_to_OF_node(bus->self);
else
- return bus->sysdata; /* Must be root bus (PHB) */
+ return bus->dev.of_node; /* Must be root bus (PHB) */
}
/** Find the bus corresponding to the indicated device node */
@@ -270,14 +261,6 @@ extern void pcibios_remove_pci_devices(struct pci_bus *bus);
/** Discover new pci devices under this bus, and add them */
extern void pcibios_add_pci_devices(struct pci_bus *bus);
-static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus)
-{
- struct device_node *busdn = bus->sysdata;
-
- BUG_ON(busdn == NULL);
- return PCI_DN(busdn)->phb;
-}
-
extern void isa_bridge_find_early(struct pci_controller *hose);
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index a20a9ad2258b..7d7790954e02 100644
--- a/arch/powerpc/include/asm/pci.h
+++ b/arch/powerpc/include/asm/pci.h
@@ -201,7 +201,7 @@ extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
extern void pcibios_setup_bus_devices(struct pci_bus *bus);
extern void pcibios_setup_bus_self(struct pci_bus *bus);
extern void pcibios_setup_phb_io_space(struct pci_controller *hose);
-extern void pcibios_scan_phb(struct pci_controller *hose, void *sysdata);
+extern void pcibios_scan_phb(struct pci_controller *hose);
#endif /* __KERNEL__ */
#endif /* __ASM_POWERPC_PCI_H */