-
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.
ARM: mach-shmobile: Run-time IRQ handler for INTCA
Break-out INTC specific IRQ demux code from the file entry-macro-intc.S and register during run-time. Covers sh7367, sh7377 and sh7372. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
- Loading branch information
Magnus Damm
authored and
Paul Mundt
committed
Jan 7, 2011
1 parent
60f1435
commit 863b171
Showing
7 changed files
with
67 additions
and
0 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
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,57 @@ | ||
/* | ||
* ARM Interrupt demux handler using INTC | ||
* | ||
* Copyright (C) 2010 Magnus Damm | ||
* Copyright (C) 2008 Renesas Solutions Corp. | ||
* | ||
* 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 <asm/entry-macro-multi.S> | ||
|
||
#define INTCA_BASE 0xe6980000 | ||
#define INTFLGA_OFFS 0x00000018 /* accept pending interrupt */ | ||
#define INTEVTA_OFFS 0x00000020 /* vector number of accepted interrupt */ | ||
#define INTLVLA_OFFS 0x00000030 /* priority level of accepted interrupt */ | ||
#define INTLVLB_OFFS 0x00000034 /* previous priority level */ | ||
|
||
.macro get_irqnr_preamble, base, tmp | ||
ldr \base, =INTCA_BASE | ||
.endm | ||
|
||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
/* The single INTFLGA read access below results in the following: | ||
* | ||
* 1. INTLVLB is updated with old priority value from INTLVLA | ||
* 2. Highest priority interrupt is accepted | ||
* 3. INTLVLA is updated to contain priority of accepted interrupt | ||
* 4. Accepted interrupt vector is stored in INTFLGA and INTEVTA | ||
*/ | ||
ldr \irqnr, [\base, #INTFLGA_OFFS] | ||
|
||
/* Restore INTLVLA with the value saved in INTLVLB. | ||
* This is required to support interrupt priorities properly. | ||
*/ | ||
ldrb \tmp, [\base, #INTLVLB_OFFS] | ||
strb \tmp, [\base, #INTLVLA_OFFS] | ||
|
||
/* Handle invalid vector number case */ | ||
cmp \irqnr, #0 | ||
beq 1000f | ||
|
||
/* Convert vector to irq number, same as the evt2irq() macro */ | ||
lsr \irqnr, \irqnr, #0x5 | ||
subs \irqnr, \irqnr, #16 | ||
|
||
1000: | ||
.endm | ||
|
||
.macro test_for_ipi, irqnr, irqstat, base, tmp | ||
.endm | ||
|
||
.macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
.endm | ||
|
||
arch_irq_handler shmobile_handle_irq_intc |
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