diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2007-08-02 10:36:02 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-08-26 21:16:53 -0400 |
commit | c87abd75b35e8f991ff8ff1510d6fb62612c61fa (patch) | |
tree | de68c4446c35337c47c17253d769bfeee92f80b3 /include/asm-mips/tx4938 | |
parent | 8420fd00e88ef4f6082866aa151bc753b006b3b6 (diff) |
[MIPS] Cleanup TX39/TX49 irq code
Cleanup jmr3927, tx4927 and tx4938 irq codes, using common IRQ_CPU,
I8259 and IRQ_TXX9 irq routines.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/tx4938')
-rw-r--r-- | include/asm-mips/tx4938/rbtx4938.h | 25 | ||||
-rw-r--r-- | include/asm-mips/tx4938/tx4938.h | 41 |
2 files changed, 5 insertions, 61 deletions
diff --git a/include/asm-mips/tx4938/rbtx4938.h b/include/asm-mips/tx4938/rbtx4938.h index 74e7d8061e58..b14acb575be2 100644 --- a/include/asm-mips/tx4938/rbtx4938.h +++ b/include/asm-mips/tx4938/rbtx4938.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
16 | #include <asm/tx4938/tx4938.h> | 16 | #include <asm/tx4938/tx4938.h> |
17 | #include <asm/txx9irq.h> | ||
17 | 18 | ||
18 | /* CS */ | 19 | /* CS */ |
19 | #define RBTX4938_CE0 0x1c000000 /* 64M */ | 20 | #define RBTX4938_CE0 0x1c000000 /* 64M */ |
@@ -123,21 +124,11 @@ | |||
123 | #define RBTX4938_NR_IRQ_IRC 32 /* On-Chip IRC */ | 124 | #define RBTX4938_NR_IRQ_IRC 32 /* On-Chip IRC */ |
124 | #define RBTX4938_NR_IRQ_IOC 8 | 125 | #define RBTX4938_NR_IRQ_IOC 8 |
125 | 126 | ||
126 | #define MI8259_IRQ_ISA_RAW_BEG 0 /* optional backplane i8259 */ | 127 | #define TX4938_IRQ_CP0_BEG MIPS_CPU_IRQ_BASE |
127 | #define MI8259_IRQ_ISA_RAW_END 15 | 128 | #define TX4938_IRQ_CP0_END (MIPS_CPU_IRQ_BASE + 8 - 1) |
128 | #define TX4938_IRQ_CP0_RAW_BEG 0 /* tx4938 cpu built-in cp0 */ | ||
129 | #define TX4938_IRQ_CP0_RAW_END 7 | ||
130 | #define TX4938_IRQ_PIC_RAW_BEG 0 /* tx4938 cpu build-in pic */ | ||
131 | #define TX4938_IRQ_PIC_RAW_END 31 | ||
132 | 129 | ||
133 | #define MI8259_IRQ_ISA_BEG MI8259_IRQ_ISA_RAW_BEG /* 0 */ | 130 | #define TX4938_IRQ_PIC_BEG TXX9_IRQ_BASE |
134 | #define MI8259_IRQ_ISA_END MI8259_IRQ_ISA_RAW_END /* 15 */ | 131 | #define TX4938_IRQ_PIC_END (TXX9_IRQ_BASE + TXx9_MAX_IR - 1) |
135 | |||
136 | #define TX4938_IRQ_CP0_BEG ((MI8259_IRQ_ISA_END+1)+TX4938_IRQ_CP0_RAW_BEG) /* 16 */ | ||
137 | #define TX4938_IRQ_CP0_END ((MI8259_IRQ_ISA_END+1)+TX4938_IRQ_CP0_RAW_END) /* 23 */ | ||
138 | |||
139 | #define TX4938_IRQ_PIC_BEG ((TX4938_IRQ_CP0_END+1)+TX4938_IRQ_PIC_RAW_BEG) /* 24 */ | ||
140 | #define TX4938_IRQ_PIC_END ((TX4938_IRQ_CP0_END+1)+TX4938_IRQ_PIC_RAW_END) /* 55 */ | ||
141 | #define TX4938_IRQ_NEST_EXT_ON_PIC (TX4938_IRQ_PIC_BEG+2) | 132 | #define TX4938_IRQ_NEST_EXT_ON_PIC (TX4938_IRQ_PIC_BEG+2) |
142 | #define TX4938_IRQ_NEST_PIC_ON_CP0 (TX4938_IRQ_CP0_BEG+2) | 133 | #define TX4938_IRQ_NEST_PIC_ON_CP0 (TX4938_IRQ_CP0_BEG+2) |
143 | #define TX4938_IRQ_USER0 (TX4938_IRQ_CP0_BEG+0) | 134 | #define TX4938_IRQ_USER0 (TX4938_IRQ_CP0_BEG+0) |
@@ -192,10 +183,4 @@ | |||
192 | #define RBTX4938_RTL_8019_BASE (RBTX4938_ETHER_ADDR - mips_io_port_base) | 183 | #define RBTX4938_RTL_8019_BASE (RBTX4938_ETHER_ADDR - mips_io_port_base) |
193 | #define RBTX4938_RTL_8019_IRQ (RBTX4938_IRQ_ETHER) | 184 | #define RBTX4938_RTL_8019_IRQ (RBTX4938_IRQ_ETHER) |
194 | 185 | ||
195 | /* IRCR : Int. Control */ | ||
196 | #define TX4938_IRCR_LOW 0x00000000 | ||
197 | #define TX4938_IRCR_HIGH 0x00000001 | ||
198 | #define TX4938_IRCR_DOWN 0x00000002 | ||
199 | #define TX4938_IRCR_UP 0x00000003 | ||
200 | |||
201 | #endif /* __ASM_TX_BOARDS_RBTX4938_H */ | 186 | #endif /* __ASM_TX_BOARDS_RBTX4938_H */ |
diff --git a/include/asm-mips/tx4938/tx4938.h b/include/asm-mips/tx4938/tx4938.h index e25b1a0975cb..afdb19813ca1 100644 --- a/include/asm-mips/tx4938/tx4938.h +++ b/include/asm-mips/tx4938/tx4938.h | |||
@@ -272,20 +272,6 @@ struct tx4938_pio_reg { | |||
272 | volatile unsigned long maskcpu; | 272 | volatile unsigned long maskcpu; |
273 | volatile unsigned long maskext; | 273 | volatile unsigned long maskext; |
274 | }; | 274 | }; |
275 | struct tx4938_irc_reg { | ||
276 | volatile unsigned long cer; | ||
277 | volatile unsigned long cr[2]; | ||
278 | volatile unsigned long unused0; | ||
279 | volatile unsigned long ilr[8]; | ||
280 | volatile unsigned long unused1[4]; | ||
281 | volatile unsigned long imr; | ||
282 | volatile unsigned long unused2[7]; | ||
283 | volatile unsigned long scr; | ||
284 | volatile unsigned long unused3[7]; | ||
285 | volatile unsigned long ssr; | ||
286 | volatile unsigned long unused4[7]; | ||
287 | volatile unsigned long csr; | ||
288 | }; | ||
289 | 275 | ||
290 | struct tx4938_ndfmc_reg { | 276 | struct tx4938_ndfmc_reg { |
291 | endian_def_l2(unused0, dtr); | 277 | endian_def_l2(unused0, dtr); |
@@ -646,39 +632,12 @@ struct tx4938_ccfg_reg { | |||
646 | #define TX4938_DMA_CSR_DESERR 0x00000002 | 632 | #define TX4938_DMA_CSR_DESERR 0x00000002 |
647 | #define TX4938_DMA_CSR_SORERR 0x00000001 | 633 | #define TX4938_DMA_CSR_SORERR 0x00000001 |
648 | 634 | ||
649 | /* TX4938 Interrupt Controller (32-bit registers) */ | ||
650 | #define TX4938_IRC_BASE 0xf510 | ||
651 | #define TX4938_IRC_IRFLAG0 0xf510 | ||
652 | #define TX4938_IRC_IRFLAG1 0xf514 | ||
653 | #define TX4938_IRC_IRPOL 0xf518 | ||
654 | #define TX4938_IRC_IRRCNT 0xf51c | ||
655 | #define TX4938_IRC_IRMASKINT 0xf520 | ||
656 | #define TX4938_IRC_IRMASKEXT 0xf524 | ||
657 | #define TX4938_IRC_IRDEN 0xf600 | ||
658 | #define TX4938_IRC_IRDM0 0xf604 | ||
659 | #define TX4938_IRC_IRDM1 0xf608 | ||
660 | #define TX4938_IRC_IRLVL0 0xf610 | ||
661 | #define TX4938_IRC_IRLVL1 0xf614 | ||
662 | #define TX4938_IRC_IRLVL2 0xf618 | ||
663 | #define TX4938_IRC_IRLVL3 0xf61c | ||
664 | #define TX4938_IRC_IRLVL4 0xf620 | ||
665 | #define TX4938_IRC_IRLVL5 0xf624 | ||
666 | #define TX4938_IRC_IRLVL6 0xf628 | ||
667 | #define TX4938_IRC_IRLVL7 0xf62c | ||
668 | #define TX4938_IRC_IRMSK 0xf640 | ||
669 | #define TX4938_IRC_IREDC 0xf660 | ||
670 | #define TX4938_IRC_IRPND 0xf680 | ||
671 | #define TX4938_IRC_IRCS 0xf6a0 | ||
672 | #define TX4938_IRC_LIMIT 0xf6ff | ||
673 | |||
674 | |||
675 | #ifndef __ASSEMBLY__ | 635 | #ifndef __ASSEMBLY__ |
676 | 636 | ||
677 | #define tx4938_sdramcptr ((struct tx4938_sdramc_reg *)TX4938_SDRAMC_REG) | 637 | #define tx4938_sdramcptr ((struct tx4938_sdramc_reg *)TX4938_SDRAMC_REG) |
678 | #define tx4938_ebuscptr ((struct tx4938_ebusc_reg *)TX4938_EBUSC_REG) | 638 | #define tx4938_ebuscptr ((struct tx4938_ebusc_reg *)TX4938_EBUSC_REG) |
679 | #define tx4938_dmaptr(ch) ((struct tx4938_dma_reg *)TX4938_DMA_REG(ch)) | 639 | #define tx4938_dmaptr(ch) ((struct tx4938_dma_reg *)TX4938_DMA_REG(ch)) |
680 | #define tx4938_ndfmcptr ((struct tx4938_ndfmc_reg *)TX4938_NDFMC_REG) | 640 | #define tx4938_ndfmcptr ((struct tx4938_ndfmc_reg *)TX4938_NDFMC_REG) |
681 | #define tx4938_ircptr ((struct tx4938_irc_reg *)TX4938_IRC_REG) | ||
682 | #define tx4938_pcicptr ((struct tx4938_pcic_reg *)TX4938_PCIC_REG) | 641 | #define tx4938_pcicptr ((struct tx4938_pcic_reg *)TX4938_PCIC_REG) |
683 | #define tx4938_pcic1ptr ((struct tx4938_pcic_reg *)TX4938_PCIC1_REG) | 642 | #define tx4938_pcic1ptr ((struct tx4938_pcic_reg *)TX4938_PCIC1_REG) |
684 | #define tx4938_ccfgptr ((struct tx4938_ccfg_reg *)TX4938_CCFG_REG) | 643 | #define tx4938_ccfgptr ((struct tx4938_ccfg_reg *)TX4938_CCFG_REG) |