diff options
author | Magnus Damm <damm@igel.co.jp> | 2007-08-12 02:29:16 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-09-20 22:57:50 -0400 |
commit | 2eeec85638cebcb6fbcb2abfe182a32252f3456d (patch) | |
tree | 3b98f924a5f961d844555794a3564cbc2c3a8be5 /include | |
parent | 73505b445dbb8ad12df468404c4dd5cde9c40c65 (diff) |
sh: intc - convert board specific r2d code
This patch converts the board specific interrupt code for r2d to make
use of intc. While at it we improve the Kconfig to avoid confusion.
- Two sets of interrupt tables exist - one for R2D-1 and one for R2D-PLUS.
- R2D-1 and R2D-PLUS use the same irq constants.
- R2D-1 has AX88796 support, R2D-PLUS does not hook up that IRQ.
- R2D-PLUS has KEY support, R2D-1 does not hook up that IRQ.
- The number and order of IRQ values are disconnected from register bits.
- Interrupt sources now start from IRQ 100.
- The machvec demux function converts from irlm IRQ 0-14 to IRQ 100++.
Tested on R2D-1 and R2D-PLUS boards.
Version 2 adds CONFIG_RTS7751R2D_1 and CONFIG_RTS7751R2D_PLUS together
with intc structured as __initdata.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sh/rts7751r2d.h | 65 |
1 files changed, 30 insertions, 35 deletions
diff --git a/include/asm-sh/rts7751r2d.h b/include/asm-sh/rts7751r2d.h index 5d7800aa31b5..83b9c111f171 100644 --- a/include/asm-sh/rts7751r2d.h +++ b/include/asm-sh/rts7751r2d.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * Renesas Technology Sales RTS7751R2D support | 9 | * Renesas Technology Sales RTS7751R2D support |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /* Box specific addresses. */ | 12 | /* Board specific addresses. */ |
13 | 13 | ||
14 | #define PA_BCR 0xa4000000 /* FPGA */ | 14 | #define PA_BCR 0xa4000000 /* FPGA */ |
15 | #define PA_IRLMON 0xa4000002 /* Interrupt Status control */ | 15 | #define PA_IRLMON 0xa4000002 /* Interrupt Status control */ |
@@ -20,19 +20,19 @@ | |||
20 | #define PA_RTCCE 0xa400000c /* RTC(9701) Enable control */ | 20 | #define PA_RTCCE 0xa400000c /* RTC(9701) Enable control */ |
21 | #define PA_PCICD 0xa400000e /* PCI Extention detect control */ | 21 | #define PA_PCICD 0xa400000e /* PCI Extention detect control */ |
22 | #define PA_VOYAGERRTS 0xa4000020 /* VOYAGER Reset control */ | 22 | #define PA_VOYAGERRTS 0xa4000020 /* VOYAGER Reset control */ |
23 | #if defined(CONFIG_RTS7751R2D_REV11) | 23 | |
24 | #define PA_AXRST 0xa4000022 /* AX_LAN Reset control */ | 24 | #define PA_R2D1_AXRST 0xa4000022 /* AX_LAN Reset control */ |
25 | #define PA_CFRST 0xa4000024 /* CF Reset control */ | 25 | #define PA_R2D1_CFRST 0xa4000024 /* CF Reset control */ |
26 | #define PA_ADMRTS 0xa4000026 /* SD Reset control */ | 26 | #define PA_R2D1_ADMRTS 0xa4000026 /* SD Reset control */ |
27 | #define PA_EXTRST 0xa4000028 /* Extention Reset control */ | 27 | #define PA_R2D1_EXTRST 0xa4000028 /* Extention Reset control */ |
28 | #define PA_CFCDINTCLR 0xa400002a /* CF Insert Interrupt clear */ | 28 | #define PA_R2D1_CFCDINTCLR 0xa400002a /* CF Insert Interrupt clear */ |
29 | #else | 29 | |
30 | #define PA_CFRST 0xa4000022 /* CF Reset control */ | 30 | #define PA_R2DPLUS_CFRST 0xa4000022 /* CF Reset control */ |
31 | #define PA_ADMRTS 0xa4000024 /* SD Reset control */ | 31 | #define PA_R2DPLUS_ADMRTS 0xa4000024 /* SD Reset control */ |
32 | #define PA_EXTRST 0xa4000026 /* Extention Reset control */ | 32 | #define PA_R2DPLUS_EXTRST 0xa4000026 /* Extention Reset control */ |
33 | #define PA_CFCDINTCLR 0xa4000028 /* CF Insert Interrupt clear */ | 33 | #define PA_R2DPLUS_CFCDINTCLR 0xa4000028 /* CF Insert Interrupt clear */ |
34 | #define PA_KEYCTLCLR 0xa400002a /* Key Interrupt clear */ | 34 | #define PA_R2DPLUS_KEYCTLCLR 0xa400002a /* Key Interrupt clear */ |
35 | #endif | 35 | |
36 | #define PA_POWOFF 0xa4000030 /* Board Power OFF control */ | 36 | #define PA_POWOFF 0xa4000030 /* Board Power OFF control */ |
37 | #define PA_VERREG 0xa4000032 /* FPGA Version Register */ | 37 | #define PA_VERREG 0xa4000032 /* FPGA Version Register */ |
38 | #define PA_INPORT 0xa4000034 /* KEY Input Port control */ | 38 | #define PA_INPORT 0xa4000034 /* KEY Input Port control */ |
@@ -46,27 +46,22 @@ | |||
46 | 46 | ||
47 | #define IRLCNTR1 (PA_BCR + 0) /* Interrupt Control Register1 */ | 47 | #define IRLCNTR1 (PA_BCR + 0) /* Interrupt Control Register1 */ |
48 | 48 | ||
49 | #if defined(CONFIG_RTS7751R2D_REV11) | 49 | #define R2D_FPGA_IRQ_BASE 100 |
50 | #define IRQ_PCIETH 0 /* PCI Ethernet IRQ */ | 50 | |
51 | #define IRQ_CFCARD 1 /* CF Card IRQ */ | 51 | #define IRQ_VOYAGER (R2D_FPGA_IRQ_BASE + 0) |
52 | #define IRQ_CFINST 2 /* CF Card Insert IRQ */ | 52 | #define IRQ_EXT (R2D_FPGA_IRQ_BASE + 1) |
53 | #define IRQ_PCMCIA 3 /* PCMCIA IRQ */ | 53 | #define IRQ_TP (R2D_FPGA_IRQ_BASE + 2) |
54 | #define IRQ_VOYAGER 4 /* VOYAGER IRQ */ | 54 | #define IRQ_RTC_T (R2D_FPGA_IRQ_BASE + 3) |
55 | #define IRQ_ONETH 5 /* On board Ethernet IRQ */ | 55 | #define IRQ_RTC_A (R2D_FPGA_IRQ_BASE + 4) |
56 | #else | 56 | #define IRQ_SDCARD (R2D_FPGA_IRQ_BASE + 5) |
57 | #define IRQ_KEYIN 0 /* Key Input IRQ */ | 57 | #define IRQ_CF_CD (R2D_FPGA_IRQ_BASE + 6) |
58 | #define IRQ_PCIETH 1 /* PCI Ethernet IRQ */ | 58 | #define IRQ_CF_IDE (R2D_FPGA_IRQ_BASE + 7) |
59 | #define IRQ_CFCARD 2 /* CF Card IRQ */ | 59 | #define IRQ_AX88796 (R2D_FPGA_IRQ_BASE + 8) |
60 | #define IRQ_CFINST 3 /* CF Card Insert IRQ */ | 60 | #define IRQ_KEY (R2D_FPGA_IRQ_BASE + 9) |
61 | #define IRQ_PCMCIA 4 /* PCMCIA IRQ */ | 61 | #define IRQ_PCI_INTA (R2D_FPGA_IRQ_BASE + 10) |
62 | #define IRQ_VOYAGER 5 /* VOYAGER IRQ */ | 62 | #define IRQ_PCI_INTB (R2D_FPGA_IRQ_BASE + 11) |
63 | #endif | 63 | #define IRQ_PCI_INTC (R2D_FPGA_IRQ_BASE + 12) |
64 | #define IRQ_RTCALM 6 /* RTC Alarm IRQ */ | 64 | #define IRQ_PCI_INTD (R2D_FPGA_IRQ_BASE + 13) |
65 | #define IRQ_RTCTIME 7 /* RTC Timer IRQ */ | ||
66 | #define IRQ_SDCARD 8 /* SD Card IRQ */ | ||
67 | #define IRQ_PCISLOT1 9 /* PCI Slot #1 IRQ */ | ||
68 | #define IRQ_PCISLOT2 10 /* PCI Slot #2 IRQ */ | ||
69 | #define IRQ_EXTENTION 11 /* EXTn IRQ */ | ||
70 | 65 | ||
71 | /* arch/sh/boards/renesas/rts7751r2d/irq.c */ | 66 | /* arch/sh/boards/renesas/rts7751r2d/irq.c */ |
72 | void init_rts7751r2d_IRQ(void); | 67 | void init_rts7751r2d_IRQ(void); |