kernel-ark/drivers/pci
David S. Miller 085ae41f66 [PATCH] Make sparc64 use setup-res.c
There were three changes necessary in order to allow
sparc64 to use setup-res.c:

1) Sparc64 roots the PCI I/O and MEM address space using
   parent resources contained in the PCI controller structure.
   I'm actually surprised no other platforms do this, especially
   ones like Alpha and PPC{,64}.  These resources get linked into the
   iomem/ioport tree when PCI controllers are probed.

   So the hierarchy looks like this:

   iomem --|
	   PCI controller 1 MEM space --|
				        device 1
					device 2
					etc.
	   PCI controller 2 MEM space --|
				        ...
   ioport --|
            PCI controller 1 IO space --|
					...
            PCI controller 2 IO space --|
					...

   You get the idea.  The drivers/pci/setup-res.c code allocates
   using plain iomem_space and ioport_space as the root, so that
   wouldn't work with the above setup.

   So I added a pcibios_select_root() that is used to handle this.
   It uses the PCI controller struct's io_space and mem_space on
   sparc64, and io{port,mem}_resource on every other platform to
   keep current behavior.

2) quirk_io_region() is buggy.  It takes in raw BUS view addresses
   and tries to use them as a PCI resource.

   pci_claim_resource() expects the resource to be fully formed when
   it gets called.  The sparc64 implementation would do the translation
   but that's absolutely wrong, because if the same resource gets
   released then re-claimed we'll adjust things twice.

   So I fixed up quirk_io_region() to do the proper pcibios_bus_to_resource()
   conversion before passing it on to pci_claim_resource().

3) I was mistakedly __init'ing the function methods the PCI controller
   drivers provide on sparc64 to implement some parts of these
   routines.  This was, of course, easy to fix.

So we end up with the following, and that nasty SPARC64 makefile
ifdef in drivers/pci/Makefile is finally zapped.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 14:57:25 -07:00
..
hotplug [PATCH] PCI Hotplug: use bus_slot number for name 2005-09-08 14:57:24 -07:00
pcie [PATCH] pm: more u32 vs. pm_message_t fixes 2005-07-07 18:23:43 -07:00
access.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bus.c pci: make bus resource start address override minimum IO address 2005-08-02 14:55:40 -07:00
hotplug.c [PATCH] PCI: Remove newline from pci MODALIAS variable 2005-07-01 13:35:51 -07:00
Kconfig [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
Makefile [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
msi.c [PATCH] x86/x86_64: deferred handling of writes to /proc/irqxx/smp_affinity 2005-09-07 16:57:15 -07:00
msi.h [PATCH] x86/x86_64: deferred handling of writes to /proc/irqxx/smp_affinity 2005-09-07 16:57:15 -07:00
pci-acpi.c [ACPI] gut acpi_pci_choose_state() to avoid conflict 2005-07-11 23:54:14 -04:00
pci-driver.c [PATCH] PCI: Run PCI driver initialization on local node 2005-09-08 14:57:23 -07:00
pci-sysfs.c [PATCH] PCI: fix-pci-mmap-on-ppc-and-ppc64.patch 2005-06-27 21:52:45 -07:00
pci.c [PATCH] PCI: restore BAR values after D3hot->D0 for devices that need it 2005-09-08 14:57:24 -07:00
pci.h [PATCH] PCI: fix quirk-6700-fix.patch 2005-08-16 21:06:24 -07:00
probe.c [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
proc.c [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
quirks.c [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
remove.c [PATCH] acpi bridge hotadd: Make the PCI remove routines safe for failed hot-plug 2005-06-27 21:52:41 -07:00
rom.c [PATCH] Fix PCI ROM mapping 2005-09-01 10:50:29 -07:00
search.c [IA64] hotplug/ia64: SN Hotplug Driver - pci_find_next_bus export 2005-07-06 15:28:40 -07:00
setup-bus.c [PATCH] x86: pci_assign_unassigned_resources() update 2005-08-30 11:14:48 -07:00
setup-irq.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup-res.c [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
syscall.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00