-
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: 91191 b: refs/heads/master c: 01eb569 h: refs/heads/master i: 91189: 04039f3 91187: b5fbbf3 91183: e6f7a40 v: v3
- Loading branch information
Lennert Buytenhek
authored and
Nicolas Pitre
committed
Mar 27, 2008
1 parent
9587355
commit f9698bf
Showing
5 changed files
with
85 additions
and
35 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: 69b02f6a9639af89c099d06d5f2c4c66a1b03ebf | ||
refs/heads/master: 01eb569823792ab83b2810fcb31fa38560b08951 |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# Makefile for the linux kernel. | ||
# | ||
|
||
obj-y := | ||
obj-y := irq.o | ||
obj-m := | ||
obj-n := | ||
obj- := |
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,64 @@ | ||
/* | ||
* arch/arm/plat-orion/irq.c | ||
* | ||
* Marvell Orion SoC IRQ handling. | ||
* | ||
* This file is licensed under the terms of the GNU General Public | ||
* License version 2. This program is licensed "as is" without any | ||
* warranty of any kind, whether express or implied. | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/init.h> | ||
#include <linux/irq.h> | ||
#include <linux/io.h> | ||
#include <asm/plat-orion/irq.h> | ||
|
||
static void orion_irq_mask(u32 irq) | ||
{ | ||
void __iomem *maskaddr = get_irq_chip_data(irq); | ||
u32 mask; | ||
|
||
mask = readl(maskaddr); | ||
mask &= ~(1 << (irq & 31)); | ||
writel(mask, maskaddr); | ||
} | ||
|
||
static void orion_irq_unmask(u32 irq) | ||
{ | ||
void __iomem *maskaddr = get_irq_chip_data(irq); | ||
u32 mask; | ||
|
||
mask = readl(maskaddr); | ||
mask |= 1 << (irq & 31); | ||
writel(mask, maskaddr); | ||
} | ||
|
||
static struct irq_chip orion_irq_chip = { | ||
.name = "orion_irq", | ||
.ack = orion_irq_mask, | ||
.mask = orion_irq_mask, | ||
.unmask = orion_irq_unmask, | ||
}; | ||
|
||
void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) | ||
{ | ||
unsigned int i; | ||
|
||
/* | ||
* Mask all interrupts initially. | ||
*/ | ||
writel(0, maskaddr); | ||
|
||
/* | ||
* Register IRQ sources. | ||
*/ | ||
for (i = 0; i < 32; i++) { | ||
unsigned int irq = irq_start + i; | ||
|
||
set_irq_chip(irq, &orion_irq_chip); | ||
set_irq_chip_data(irq, maskaddr); | ||
set_irq_handler(irq, handle_level_irq); | ||
set_irq_flags(irq, IRQF_VALID); | ||
} | ||
} |
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,17 @@ | ||
/* | ||
* include/asm-arm/plat-orion/irq.h | ||
* | ||
* Marvell Orion SoC IRQ handling. | ||
* | ||
* This file is licensed under the terms of the GNU General Public | ||
* License version 2. This program is licensed "as is" without any | ||
* warranty of any kind, whether express or implied. | ||
*/ | ||
|
||
#ifndef __ASM_PLAT_ORION_IRQ_H | ||
#define __ASM_PLAT_ORION_IRQ_H | ||
|
||
void orion_irq_init(unsigned int irq_start, void __iomem *maskaddr); | ||
|
||
|
||
#endif |