x86: dtb: Add support for PCI devices backed by dtb nodes

x86_of_pci_init() does two things:

- it provides a generic irq enable and disable function. enable queries
  the device tree for the interrupt information, calls ->xlate on the
  irq host and updates the pci->irq information for the device.

- it walks through PCI bus(es) in the device tree and adds its children
  (device) nodes to appropriate pci_dev nodes in kernel. So the dtb
  node information is available at probe time of the PCI device.

Adding a PCI bus based on the information in the device tree is
currently not supported. Right now direct access via ioports is used.

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Tested-by: Dirk Brandewie <[email protected]>
Acked-by: Grant Likely <[email protected]>
Cc: [email protected]
Cc: [email protected]
LKML-Reference: <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
Sebastian Andrzej Siewior 2011-02-22 21:07:42 +01:00 • committed by Thomas Gleixner
commit 96e0a0797e
4 changed files with 99 additions and 1 deletions

View file

@ -71,7 +71,7 @@ config OF_MDIO
config OF_PCI
def_tristate PCI
depends on PCI && (PPC || MICROBLAZE)
depends on PCI && (PPC || MICROBLAZE || X86)
help
OpenFirmware PCI bus accessors

View file

@ -1,5 +1,6 @@
#include <linux/kernel.h>
#include <linux/of_pci.h>
#include <linux/of_irq.h>
#include <asm/prom.h>
/**