[POWERPC] 85xxCDS: Delay 8259 cascade hookup.

The interrupts of an E100 card inserted in PCI slot 4 may be on at bootup.
The resulting interrupt flood interacts with the 8259 cascade handler and
prevents proper boot up. There is a quirk for the E100 that will disable
the E100's interrupts but to use it, the 8259 cascade hookup must be
delayed until after the quirk has run. This patch delays the 8259 cascade
hookup by registering a device_initcall() which runs after the PCI quirk
for the E100.

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
Randy Vinson 2007-06-14 11:02:54 -07:00 committed by Kumar Gala
parent 637e9e13a1
commit bca03c6bdd
1 changed files with 25 additions and 11 deletions

View File

@ -183,10 +183,6 @@ static void __init mpc85xx_cds_pic_init(void)
struct mpic *mpic; struct mpic *mpic;
struct resource r; struct resource r;
struct device_node *np = NULL; struct device_node *np = NULL;
#if defined(CONFIG_PPC_I8259) && defined(CONFIG_PCI)
struct device_node *cascade_node = NULL;
int cascade_irq;
#endif
np = of_find_node_by_type(np, "open-pic"); np = of_find_node_by_type(np, "open-pic");
@ -210,8 +206,19 @@ static void __init mpc85xx_cds_pic_init(void)
of_node_put(np); of_node_put(np);
mpic_init(mpic); mpic_init(mpic);
}
#if defined(CONFIG_PPC_I8259) && defined(CONFIG_PCI) #if defined(CONFIG_PPC_I8259) && defined(CONFIG_PCI)
static int mpc85xx_cds_8259_attach(void)
{
int ret;
struct device_node *np = NULL;
struct device_node *cascade_node = NULL;
int cascade_irq;
if (!machine_is(mpc85xx_cds))
return 0;
/* Initialize the i8259 controller */ /* Initialize the i8259 controller */
for_each_node_by_type(np, "interrupt-controller") for_each_node_by_type(np, "interrupt-controller")
if (of_device_is_compatible(np, "chrp,iic")) { if (of_device_is_compatible(np, "chrp,iic")) {
@ -221,13 +228,13 @@ static void __init mpc85xx_cds_pic_init(void)
if (cascade_node == NULL) { if (cascade_node == NULL) {
printk(KERN_DEBUG "Could not find i8259 PIC\n"); printk(KERN_DEBUG "Could not find i8259 PIC\n");
return; return -ENODEV;
} }
cascade_irq = irq_of_parse_and_map(cascade_node, 0); cascade_irq = irq_of_parse_and_map(cascade_node, 0);
if (cascade_irq == NO_IRQ) { if (cascade_irq == NO_IRQ) {
printk(KERN_ERR "Failed to map cascade interrupt\n"); printk(KERN_ERR "Failed to map cascade interrupt\n");
return; return -ENXIO;
} }
i8259_init(cascade_node, 0); i8259_init(cascade_node, 0);
@ -239,14 +246,21 @@ static void __init mpc85xx_cds_pic_init(void)
* disabled when the last user of the shared IRQ line frees their * disabled when the last user of the shared IRQ line frees their
* interrupt. * interrupt.
*/ */
if (setup_irq(cascade_irq, &mpc85xxcds_8259_irqaction)) if ((ret = setup_irq(cascade_irq, &mpc85xxcds_8259_irqaction))) {
printk(KERN_ERR "Failed to setup cascade interrupt\n"); printk(KERN_ERR "Failed to setup cascade interrupt\n");
else return ret;
/* Success. Connect our low-level cascade handler. */ }
set_irq_handler(cascade_irq, mpc85xx_8259_cascade_handler);
#endif /* CONFIG_PPC_I8259 */ /* Success. Connect our low-level cascade handler. */
set_irq_handler(cascade_irq, mpc85xx_8259_cascade_handler);
return 0;
} }
device_initcall(mpc85xx_cds_8259_attach);
#endif /* CONFIG_PPC_I8259 */
/* /*
* Setup the architecture * Setup the architecture
*/ */