android_kernel_samsung_msm8976/drivers
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
..
acorn
acpi
atm
base [SCSI] Re-do "final klist fixes" 2005-09-07 18:44:33 -07:00
block Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-09-07 17:31:27 -07:00
bluetooth
cdrom Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-09-07 17:31:27 -07:00
char [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
cpufreq
crypto
dio
eisa
fc4
firmware [PATCH] dcdbas: add Dell Systems Management Base Driver with sysfs support 2005-09-07 16:57:27 -07:00
hwmon [PATCH] hwmon: (3/3) pc87360 driver update 2005-09-05 09:26:55 -07:00
i2c [PATCH] drivers: convert kcalloc to kzalloc 2005-09-07 16:57:46 -07:00
ide Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-09-07 17:31:27 -07:00
ieee1394 [PATCH] provide MODALIAS= enviroment variable to autoload ieee1394 modules via udev 2005-09-07 16:57:41 -07:00
infiniband [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
input [PATCH] Input: Add a new switch event type 2005-09-07 16:57:54 -07:00
isdn [PATCH] -Wundef fixes (hisax) 2005-09-07 17:17:33 -07:00
macintosh [PATCH] swsusp: switch pm_message_t to struct 2005-09-05 00:06:16 -07:00
mca
md [PATCH] kill bio->bi_set 2005-09-07 16:57:20 -07:00
media [PATCH] DVB: lgdt330x check callback fix 2005-09-07 16:58:02 -07:00
message Merge by hand (conflicts in sd.c) 2005-09-06 17:52:54 -05:00
mfd
misc [SERIAL] Update ibmasm driver for death of register_serial&co 2005-09-07 21:37:00 +01:00
mmc [PATCH] mmc: conditional scr sysfs entry 2005-09-07 16:57:52 -07:00
mtd [PATCH] detect soft lockups 2005-09-07 16:57:17 -07:00
net [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
nubus
oprofile
parisc
parport [PATCH] parport: add NetMOS 9805 support 2005-09-07 16:57:28 -07:00
pci [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
pcmcia [PATCH] yenta: make ToPIC95 bridges work with 16bit cards 2005-09-07 16:57:21 -07:00
pnp Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
s390 [PATCH] s390: claw driver fixes 2005-09-06 22:15:20 -04:00
sbus
scsi [PATCH] scan all enabled ports on ata_piix 2005-09-08 05:57:23 -04:00
serial Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
sh
sn
tc
telephony
usb [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
video [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
w1
zorro
Kconfig
Makefile