-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 101792 b: refs/heads/master c: 98384c6 h: refs/heads/master v: v3
- Loading branch information
Kumar Gala
committed
Jul 14, 2008
1 parent
66aa8a7
commit d1a74fa
Showing
7 changed files
with
87 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: a5d28c8e64ff0bc77d38d9c19c6d8163e4c0ffaa | ||
refs/heads/master: 98384c6cdd1fd593f399b6f879bae2cae70aad48 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* Copyright 2008 Freescale Semiconductor, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
*/ | ||
|
||
#include <linux/stddef.h> | ||
#include <linux/kernel.h> | ||
#include <linux/interrupt.h> | ||
#include <linux/of_platform.h> | ||
|
||
#include <asm/system.h> | ||
#include <asm/mpic.h> | ||
#include <asm/i8259.h> | ||
|
||
#ifdef CONFIG_PPC_I8259 | ||
static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) | ||
{ | ||
unsigned int cascade_irq = i8259_irq(); | ||
if (cascade_irq != NO_IRQ) | ||
generic_handle_irq(cascade_irq); | ||
desc->chip->eoi(irq); | ||
} | ||
#endif /* CONFIG_PPC_I8259 */ | ||
|
||
void __init mpc86xx_init_irq(void) | ||
{ | ||
struct mpic *mpic; | ||
struct device_node *np; | ||
struct resource res; | ||
#ifdef CONFIG_PPC_I8259 | ||
struct device_node *cascade_node = NULL; | ||
int cascade_irq; | ||
#endif | ||
|
||
/* Determine PIC address. */ | ||
np = of_find_node_by_type(NULL, "open-pic"); | ||
if (np == NULL) | ||
return; | ||
of_address_to_resource(np, 0, &res); | ||
|
||
mpic = mpic_alloc(np, res.start, | ||
MPIC_PRIMARY | MPIC_WANTS_RESET | | ||
MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS, | ||
0, 256, " MPIC "); | ||
of_node_put(np); | ||
BUG_ON(mpic == NULL); | ||
|
||
mpic_init(mpic); | ||
|
||
#ifdef CONFIG_PPC_I8259 | ||
/* Initialize i8259 controller */ | ||
for_each_node_by_type(np, "interrupt-controller") | ||
if (of_device_is_compatible(np, "chrp,iic")) { | ||
cascade_node = np; | ||
break; | ||
} | ||
|
||
if (cascade_node == NULL) { | ||
printk(KERN_DEBUG "Could not find i8259 PIC\n"); | ||
return; | ||
} | ||
|
||
cascade_irq = irq_of_parse_and_map(cascade_node, 0); | ||
if (cascade_irq == NO_IRQ) { | ||
printk(KERN_ERR "Failed to map cascade interrupt\n"); | ||
return; | ||
} | ||
|
||
i8259_init(cascade_node, 0); | ||
of_node_put(cascade_node); | ||
|
||
set_irq_chained_handler(cascade_irq, mpc86xx_8259_cascade); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters