linux/arch/powerpc/platforms/powermac
Benjamin Herrenschmidt 98d9f30c82 pci/of: Match PCI devices to OF nodes dynamically
powerpc has two different ways of matching PCI devices to their
corresponding OF node (if any) for historical reasons. The ppc64 one
does a scan looking for matching bus/dev/fn, while the ppc32 one does a
scan looking only for matching dev/fn on each level in order to be
agnostic to busses being renumbered (which Linux does on some
platforms).

This removes both and instead moves the matching code to the PCI core
itself. It's the most logical place to do it: when a pci_dev is created,
we know the parent and thus can do a single level scan for the matching
device_node (if any).

The benefit is that all archs now get the matching for free. There's one
hook the arch might want to provide to match a PHB bus to its device
node. A default weak implementation is provided that looks for the
parent device device node, but it's not entirely reliable on powerpc for
various reasons so powerpc provides its own.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-06-08 09:08:17 +10:00
..
backlight.c [POWERPC] Remove old interface find_devices 2007-04-24 22:09:02 +10:00
bootx_init.c powerpc: Remove trailing space in messages 2010-02-09 13:56:23 +11:00
cache.S
cpufreq_32.c [CPUFREQ] Remove the pm_message_t argument from driver suspend 2011-03-16 17:54:33 -04:00
cpufreq_64.c powerpc/cpumask: Use cpu_online_mask 2010-05-06 17:16:12 +10:00
feature.c powerpc/powermac: Drop unnecessary null test 2010-08-24 15:26:28 +10:00
Kconfig powerpc: Add kconfig for muxed smp ipi support 2011-05-19 15:31:05 +10:00
low_i2c.c Fix common misspellings 2011-03-31 11:26:23 -03:00
Makefile Fix common misspellings 2011-03-31 11:26:23 -03:00
nvram.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pci.c pci/of: Match PCI devices to OF nodes dynamically 2011-06-08 09:08:17 +10:00
pfunc_base.c powerpc: Convert feature_lock to raw_spinlock 2010-02-19 14:52:32 +11:00
pfunc_core.c powerpc/powermac/pfunc_core.c: Add of_node_put to avoid memory leak 2010-09-02 14:07:33 +10:00
pic.c powerpc/pmac: Don't register pmac PIC syscore ops when HW not present 2011-05-31 20:30:20 +09:00
pmac.h powerpc/psurge: Create a irq_host for secondary cpus 2011-05-19 15:31:51 +10:00
setup.c powerpc/pmac/smp: Consolidate 32-bit and 64-bit PowerMac cpu_die in one file 2011-04-01 15:37:21 +11:00
sleep.S powerpc/mm: Introduce MMU features 2008-12-21 14:21:16 +11:00
smp.c powerpc/psurge: Create a irq_host for secondary cpus 2011-05-19 15:31:51 +10:00
time.c of: add 'of_' prefix to machine_is_compatible() 2010-02-09 08:33:00 -07:00
udbg_adb.c [POWERPC] Fix section mismatches in udbg_adb.c 2007-08-17 11:02:06 +10:00
udbg_scc.c of: add 'of_' prefix to machine_is_compatible() 2010-02-09 08:33:00 -07:00