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/platforms/embedded6xx | |
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/platforms/embedded6xx')
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index bdb475c65cba..c6113c39009e 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -89,7 +89,7 @@ u8 find_slot_by_devfn(unsigned int *interrupt_map, unsigned int devfn) | |||
89 | /* | 89 | /* |
90 | * Scans the interrupt map for pci device | 90 | * Scans the interrupt map for pci device |
91 | */ | 91 | */ |
92 | void mpc7448_hpc2_fixup_irq(struct pci_dev *dev) | 92 | void __devinit mpc7448_hpc2_fixup_irq(struct pci_dev *dev) |
93 | { | 93 | { |
94 | struct pci_controller *hose; | 94 | struct pci_controller *hose; |
95 | struct device_node *node; | 95 | struct device_node *node; |
@@ -117,19 +117,13 @@ void mpc7448_hpc2_fixup_irq(struct pci_dev *dev) | |||
117 | pin = 1; | 117 | pin = 1; |
118 | pin--; | 118 | pin--; |
119 | dev->irq = interrupt[slot*4*7 + pin*7 + 5]; | 119 | dev->irq = interrupt[slot*4*7 + pin*7 + 5]; |
120 | |||
121 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); | ||
122 | |||
120 | DBG("TSI_PCI: dev->irq = 0x%x\n", dev->irq); | 123 | DBG("TSI_PCI: dev->irq = 0x%x\n", dev->irq); |
121 | } | 124 | } |
122 | /* temporary pci irq map fixup*/ | 125 | /* temporary pci irq map fixup*/ |
123 | 126 | ||
124 | void __init mpc7448_hpc2_pcibios_fixup(void) | ||
125 | { | ||
126 | struct pci_dev *dev = NULL; | ||
127 | for_each_pci_dev(dev) { | ||
128 | mpc7448_hpc2_fixup_irq(dev); | ||
129 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); | ||
130 | } | ||
131 | } | ||
132 | |||
133 | static void __init mpc7448_hpc2_setup_arch(void) | 127 | static void __init mpc7448_hpc2_setup_arch(void) |
134 | { | 128 | { |
135 | struct device_node *cpu; | 129 | struct device_node *cpu; |
@@ -300,7 +294,7 @@ define_machine(mpc7448_hpc2){ | |||
300 | .init_IRQ = mpc7448_hpc2_init_IRQ, | 294 | .init_IRQ = mpc7448_hpc2_init_IRQ, |
301 | .show_cpuinfo = mpc7448_hpc2_show_cpuinfo, | 295 | .show_cpuinfo = mpc7448_hpc2_show_cpuinfo, |
302 | .get_irq = mpic_get_irq, | 296 | .get_irq = mpic_get_irq, |
303 | .pcibios_fixup = mpc7448_hpc2_pcibios_fixup, | 297 | .pci_irq_fixup = mpc7448_hpc2_fixup_irq, |
304 | .restart = mpc7448_hpc2_restart, | 298 | .restart = mpc7448_hpc2_restart, |
305 | .calibrate_decr = generic_calibrate_decr, | 299 | .calibrate_decr = generic_calibrate_decr, |
306 | .machine_check_exception= mpc7448_machine_check_exception, | 300 | .machine_check_exception= mpc7448_machine_check_exception, |