diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-11-11 01:24:51 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 00:00:04 -0500 |
commit | f90bb153b1493719d18b4529a46ebfe43220ea6c (patch) | |
tree | 0d19d85be3f9603b9b3c5dc16aa45185ce8f9bc1 /arch/powerpc/kernel | |
parent | 34ba8a5cd0b0d57f7775023e6e3fec473a7291cc (diff) |
[POWERPC] Make pci_read_irq_line the default
This patch reworks the way IRQs are fixed up on PCI for arch powerpc.
It makes pci_read_irq_line() called by default in the PCI code for
devices that are probed, and add an optional per-device fixup in
ppc_md for platforms that really need to correct what they obtain
from pci_read_irq_line().
It also removes ppc_md.irq_bus_setup which was only used by pSeries
and should not be needed anymore.
I've also removed the pSeries s7a workaround as it can't work with
the current interrupt code anyway. I'm trying to get one of these
machines working so I can test a proper fix for that problem.
I also haven't updated the old-style fixup code from 85xx_cds.c
because it's actually buggy :) It assigns pci_dev->irq hard coded
numbers which is no good with the new IRQ mapping code. It should
at least use irq_create_mapping(NULL, hard_coded_number); and possibly
also set_irq_type() to set them as level low.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 10 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 8 |
2 files changed, 16 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 0d9ff72e2852..853ecef81780 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/bootmem.h> | 13 | #include <linux/bootmem.h> |
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/list.h> | ||
15 | 16 | ||
16 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
@@ -1338,6 +1339,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) | |||
1338 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; | 1339 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; |
1339 | unsigned long io_offset; | 1340 | unsigned long io_offset; |
1340 | struct resource *res; | 1341 | struct resource *res; |
1342 | struct pci_dev *dev; | ||
1341 | int i; | 1343 | int i; |
1342 | 1344 | ||
1343 | io_offset = (unsigned long)hose->io_base_virt - isa_io_base; | 1345 | io_offset = (unsigned long)hose->io_base_virt - isa_io_base; |
@@ -1390,8 +1392,16 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) | |||
1390 | } | 1392 | } |
1391 | } | 1393 | } |
1392 | 1394 | ||
1395 | /* Platform specific bus fixups */ | ||
1393 | if (ppc_md.pcibios_fixup_bus) | 1396 | if (ppc_md.pcibios_fixup_bus) |
1394 | ppc_md.pcibios_fixup_bus(bus); | 1397 | ppc_md.pcibios_fixup_bus(bus); |
1398 | |||
1399 | /* Read default IRQs and fixup if necessary */ | ||
1400 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
1401 | pci_read_irq_line(dev); | ||
1402 | if (ppc_md.pci_irq_fixup) | ||
1403 | ppc_md.pci_irq_fixup(dev); | ||
1404 | } | ||
1395 | } | 1405 | } |
1396 | 1406 | ||
1397 | char __init *pcibios_setup(char *str) | 1407 | char __init *pcibios_setup(char *str) |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 80ae9ea15cdc..9a6bb80a8cd4 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -1215,8 +1215,12 @@ static void __devinit do_bus_setup(struct pci_bus *bus) | |||
1215 | list_for_each_entry(dev, &bus->devices, bus_list) | 1215 | list_for_each_entry(dev, &bus->devices, bus_list) |
1216 | ppc_md.iommu_dev_setup(dev); | 1216 | ppc_md.iommu_dev_setup(dev); |
1217 | 1217 | ||
1218 | if (ppc_md.irq_bus_setup) | 1218 | /* Read default IRQs and fixup if necessary */ |
1219 | ppc_md.irq_bus_setup(bus); | 1219 | list_for_each_entry(dev, &bus->devices, bus_list) { |
1220 | pci_read_irq_line(dev); | ||
1221 | if (ppc_md.pci_irq_fixup) | ||
1222 | ppc_md.pci_irq_fixup(dev); | ||
1223 | } | ||
1220 | } | 1224 | } |
1221 | 1225 | ||
1222 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 1226 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) |