diff options
Diffstat (limited to 'include/asm-sh/irq.h')
-rw-r--r-- | include/asm-sh/irq.h | 137 |
1 files changed, 132 insertions, 5 deletions
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index 611e67cd0627..0e5f365aff70 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -192,7 +192,7 @@ | |||
192 | 192 | ||
193 | #if defined (CONFIG_CPU_SUBTYPE_SH7707) || defined (CONFIG_CPU_SUBTYPE_SH7708) || \ | 193 | #if defined (CONFIG_CPU_SUBTYPE_SH7707) || defined (CONFIG_CPU_SUBTYPE_SH7708) || \ |
194 | defined (CONFIG_CPU_SUBTYPE_SH7709) || defined (CONFIG_CPU_SUBTYPE_SH7750) || \ | 194 | defined (CONFIG_CPU_SUBTYPE_SH7709) || defined (CONFIG_CPU_SUBTYPE_SH7750) || \ |
195 | defined (CONFIG_CPU_SUBTYPE_SH7751) | 195 | defined (CONFIG_CPU_SUBTYPE_SH7751) || defined (CONFIG_CPU_SUBTYPE_SH7706) |
196 | #define SCI_ERI_IRQ 23 | 196 | #define SCI_ERI_IRQ 23 |
197 | #define SCI_RXI_IRQ 24 | 197 | #define SCI_RXI_IRQ 24 |
198 | #define SCI_TXI_IRQ 25 | 198 | #define SCI_TXI_IRQ 25 |
@@ -207,6 +207,7 @@ | |||
207 | #define SCIF0_IPR_POS 3 | 207 | #define SCIF0_IPR_POS 3 |
208 | #define SCIF0_PRIORITY 3 | 208 | #define SCIF0_PRIORITY 3 |
209 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 209 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
210 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | ||
210 | defined(CONFIG_CPU_SUBTYPE_SH7707) || \ | 211 | defined(CONFIG_CPU_SUBTYPE_SH7707) || \ |
211 | defined(CONFIG_CPU_SUBTYPE_SH7709) | 212 | defined(CONFIG_CPU_SUBTYPE_SH7709) |
212 | #define SCIF_ERI_IRQ 56 | 213 | #define SCIF_ERI_IRQ 56 |
@@ -261,9 +262,12 @@ | |||
261 | #elif defined(CONFIG_CPU_SUBTYPE_SH7708) | 262 | #elif defined(CONFIG_CPU_SUBTYPE_SH7708) |
262 | # define ONCHIP_NR_IRQS 32 | 263 | # define ONCHIP_NR_IRQS 32 |
263 | #elif defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 264 | #elif defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
265 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | ||
264 | defined(CONFIG_CPU_SUBTYPE_SH7705) | 266 | defined(CONFIG_CPU_SUBTYPE_SH7705) |
265 | # define ONCHIP_NR_IRQS 64 // Actually 61 | 267 | # define ONCHIP_NR_IRQS 64 // Actually 61 |
266 | # define PINT_NR_IRQS 16 | 268 | # define PINT_NR_IRQS 16 |
269 | #elif defined(CONFIG_CPU_SUBTYPE_SH7710) | ||
270 | # define ONCHIP_NR_IRQS 104 | ||
267 | #elif defined(CONFIG_CPU_SUBTYPE_SH7750) | 271 | #elif defined(CONFIG_CPU_SUBTYPE_SH7750) |
268 | # define ONCHIP_NR_IRQS 48 // Actually 44 | 272 | # define ONCHIP_NR_IRQS 48 // Actually 44 |
269 | #elif defined(CONFIG_CPU_SUBTYPE_SH7751) | 273 | #elif defined(CONFIG_CPU_SUBTYPE_SH7751) |
@@ -275,7 +279,8 @@ | |||
275 | #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) | 279 | #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) |
276 | # define ONCHIP_NR_IRQS 144 | 280 | # define ONCHIP_NR_IRQS 144 |
277 | #elif defined(CONFIG_CPU_SUBTYPE_SH7300) || \ | 281 | #elif defined(CONFIG_CPU_SUBTYPE_SH7300) || \ |
278 | defined(CONFIG_CPU_SUBTYPE_SH73180) | 282 | defined(CONFIG_CPU_SUBTYPE_SH73180) || \ |
283 | defined(CONFIG_CPU_SUBTYPE_SH7343) | ||
279 | # define ONCHIP_NR_IRQS 109 | 284 | # define ONCHIP_NR_IRQS 109 |
280 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) | 285 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) |
281 | # define ONCHIP_NR_IRQS 111 | 286 | # define ONCHIP_NR_IRQS 111 |
@@ -311,6 +316,8 @@ | |||
311 | # define OFFCHIP_NR_IRQS 4 | 316 | # define OFFCHIP_NR_IRQS 4 |
312 | #elif defined(CONFIG_SH_R7780RP) | 317 | #elif defined(CONFIG_SH_R7780RP) |
313 | # define OFFCHIP_NR_IRQS 16 | 318 | # define OFFCHIP_NR_IRQS 16 |
319 | #elif defined(CONFIG_SH_7343_SOLUTION_ENGINE) | ||
320 | # define OFFCHIP_NR_IRQS 12 | ||
314 | #elif defined(CONFIG_SH_UNKNOWN) | 321 | #elif defined(CONFIG_SH_UNKNOWN) |
315 | # define OFFCHIP_NR_IRQS 16 /* Must also be last */ | 322 | # define OFFCHIP_NR_IRQS 16 /* Must also be last */ |
316 | #else | 323 | #else |
@@ -335,6 +342,11 @@ extern void make_maskreg_irq(unsigned int irq); | |||
335 | extern unsigned short *irq_mask_register; | 342 | extern unsigned short *irq_mask_register; |
336 | 343 | ||
337 | /* | 344 | /* |
345 | * PINT IRQs | ||
346 | */ | ||
347 | void init_IRQ_pint(void); | ||
348 | |||
349 | /* | ||
338 | * Function for "on chip support modules". | 350 | * Function for "on chip support modules". |
339 | */ | 351 | */ |
340 | extern void make_ipr_irq(unsigned int irq, unsigned int addr, | 352 | extern void make_ipr_irq(unsigned int irq, unsigned int addr, |
@@ -471,8 +483,10 @@ extern int ipr_irq_demux(int irq); | |||
471 | 483 | ||
472 | #define INTC_ICR 0xfffffee0UL | 484 | #define INTC_ICR 0xfffffee0UL |
473 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 485 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
486 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | ||
474 | defined(CONFIG_CPU_SUBTYPE_SH7707) || \ | 487 | defined(CONFIG_CPU_SUBTYPE_SH7707) || \ |
475 | defined(CONFIG_CPU_SUBTYPE_SH7709) | 488 | defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
489 | defined(CONFIG_CPU_SUBTYPE_SH7710) | ||
476 | #define INTC_IRR0 0xa4000004UL | 490 | #define INTC_IRR0 0xa4000004UL |
477 | #define INTC_IRR1 0xa4000006UL | 491 | #define INTC_IRR1 0xa4000006UL |
478 | #define INTC_IRR2 0xa4000008UL | 492 | #define INTC_IRR2 0xa4000008UL |
@@ -491,8 +505,105 @@ extern int ipr_irq_demux(int irq); | |||
491 | #define INTC_IPRF 0xa4080000UL | 505 | #define INTC_IPRF 0xa4080000UL |
492 | #define INTC_IPRG 0xa4080002UL | 506 | #define INTC_IPRG 0xa4080002UL |
493 | #define INTC_IPRH 0xa4080004UL | 507 | #define INTC_IPRH 0xa4080004UL |
494 | #endif | 508 | #elif defined(CONFIG_CPU_SUBTYPE_SH7710) |
509 | /* Interrupt Controller Registers */ | ||
510 | #undef INTC_IPRA | ||
511 | #undef INTC_IPRB | ||
512 | #define INTC_IPRA 0xA414FEE2UL | ||
513 | #define INTC_IPRB 0xA414FEE4UL | ||
514 | #define INTC_IPRF 0xA4080000UL | ||
515 | #define INTC_IPRG 0xA4080002UL | ||
516 | #define INTC_IPRH 0xA4080004UL | ||
517 | #define INTC_IPRI 0xA4080006UL | ||
518 | |||
519 | #undef INTC_ICR0 | ||
520 | #undef INTC_ICR1 | ||
521 | #define INTC_ICR0 0xA414FEE0UL | ||
522 | #define INTC_ICR1 0xA4140010UL | ||
523 | |||
524 | #define INTC_IRR0 0xa4000004UL | ||
525 | #define INTC_IRR1 0xa4000006UL | ||
526 | #define INTC_IRR2 0xa4000008UL | ||
527 | #define INTC_IRR3 0xa400000AUL | ||
528 | #define INTC_IRR4 0xa400000CUL | ||
529 | #define INTC_IRR5 0xa4080020UL | ||
530 | #define INTC_IRR7 0xa4080024UL | ||
531 | #define INTC_IRR8 0xa4080026UL | ||
532 | |||
533 | /* Interrupt numbers */ | ||
534 | #define TIMER2_IRQ 18 | ||
535 | #define TIMER2_IPR_ADDR INTC_IPRA | ||
536 | #define TIMER2_IPR_POS 1 | ||
537 | #define TIMER2_PRIORITY 2 | ||
538 | |||
539 | /* WDT */ | ||
540 | #define WDT_IRQ 27 | ||
541 | #define WDT_IPR_ADDR INTC_IPRB | ||
542 | #define WDT_IPR_POS 3 | ||
543 | #define WDT_PRIORITY 2 | ||
544 | |||
545 | #define SCIF0_ERI_IRQ 52 | ||
546 | #define SCIF0_RXI_IRQ 53 | ||
547 | #define SCIF0_BRI_IRQ 54 | ||
548 | #define SCIF0_TXI_IRQ 55 | ||
549 | #define SCIF0_IPR_ADDR INTC_IPRE | ||
550 | #define SCIF0_IPR_POS 2 | ||
551 | #define SCIF0_PRIORITY 3 | ||
552 | |||
553 | #define DMTE4_IRQ 76 | ||
554 | #define DMTE5_IRQ 77 | ||
555 | #define DMA2_IPR_ADDR INTC_IPRF | ||
556 | #define DMA2_IPR_POS 2 | ||
557 | #define DMA2_PRIORITY 7 | ||
495 | 558 | ||
559 | #define IPSEC_IRQ 79 | ||
560 | #define IPSEC_IPR_ADDR INTC_IPRF | ||
561 | #define IPSEC_IPR_POS 3 | ||
562 | #define IPSEC_PRIORITY 3 | ||
563 | |||
564 | /* EDMAC */ | ||
565 | #define EDMAC0_IRQ 80 | ||
566 | #define EDMAC0_IPR_ADDR INTC_IPRG | ||
567 | #define EDMAC0_IPR_POS 3 | ||
568 | #define EDMAC0_PRIORITY 3 | ||
569 | |||
570 | #define EDMAC1_IRQ 81 | ||
571 | #define EDMAC1_IPR_ADDR INTC_IPRG | ||
572 | #define EDMAC1_IPR_POS 2 | ||
573 | #define EDMAC1_PRIORITY 3 | ||
574 | |||
575 | #define EDMAC2_IRQ 82 | ||
576 | #define EDMAC2_IPR_ADDR INTC_IPRG | ||
577 | #define EDMAC2_IPR_POS 1 | ||
578 | #define EDMAC2_PRIORITY 3 | ||
579 | |||
580 | /* SIOF */ | ||
581 | #define SIOF0_ERI_IRQ 96 | ||
582 | #define SIOF0_TXI_IRQ 97 | ||
583 | #define SIOF0_RXI_IRQ 98 | ||
584 | #define SIOF0_CCI_IRQ 99 | ||
585 | #define SIOF0_IPR_ADDR INTC_IPRH | ||
586 | #define SIOF0_IPR_POS 0 | ||
587 | #define SIOF0_PRIORITY 7 | ||
588 | |||
589 | #define SIOF1_ERI_IRQ 100 | ||
590 | #define SIOF1_TXI_IRQ 101 | ||
591 | #define SIOF1_RXI_IRQ 102 | ||
592 | #define SIOF1_CCI_IRQ 103 | ||
593 | #define SIOF1_IPR_ADDR INTC_IPRI | ||
594 | #define SIOF1_IPR_POS 1 | ||
595 | #define SIOF1_PRIORITY 7 | ||
596 | #endif /* CONFIG_CPU_SUBTYPE_SH7710 */ | ||
597 | |||
598 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) | ||
599 | #define PORT_PACR 0xa4050100UL | ||
600 | #define PORT_PBCR 0xa4050102UL | ||
601 | #define PORT_PCCR 0xa4050104UL | ||
602 | #define PORT_PETCR 0xa4050106UL | ||
603 | #define PORT_PADR 0xa4050120UL | ||
604 | #define PORT_PBDR 0xa4050122UL | ||
605 | #define PORT_PCDR 0xa4050124UL | ||
606 | #else | ||
496 | #define PORT_PACR 0xa4000100UL | 607 | #define PORT_PACR 0xa4000100UL |
497 | #define PORT_PBCR 0xa4000102UL | 608 | #define PORT_PBCR 0xa4000102UL |
498 | #define PORT_PCCR 0xa4000104UL | 609 | #define PORT_PCCR 0xa4000104UL |
@@ -501,6 +612,7 @@ extern int ipr_irq_demux(int irq); | |||
501 | #define PORT_PBDR 0xa4000122UL | 612 | #define PORT_PBDR 0xa4000122UL |
502 | #define PORT_PCDR 0xa4000124UL | 613 | #define PORT_PCDR 0xa4000124UL |
503 | #define PORT_PFDR 0xa400012aUL | 614 | #define PORT_PFDR 0xa400012aUL |
615 | #endif | ||
504 | 616 | ||
505 | #define IRQ0_IRQ 32 | 617 | #define IRQ0_IRQ 32 |
506 | #define IRQ1_IRQ 33 | 618 | #define IRQ1_IRQ 33 |
@@ -577,7 +689,7 @@ extern int ipr_irq_demux(int irq); | |||
577 | #define NR_INTC2_IRQS 64 | 689 | #define NR_INTC2_IRQS 64 |
578 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) | 690 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) |
579 | #define INTC2_BASE 0xffd40000 | 691 | #define INTC2_BASE 0xffd40000 |
580 | #define INTC2_FIRST_IRQ 22 | 692 | #define INTC2_FIRST_IRQ 21 |
581 | #define INTC2_INTMSK_OFFSET (0x38) | 693 | #define INTC2_INTMSK_OFFSET (0x38) |
582 | #define INTC2_INTMSKCLR_OFFSET (0x3c) | 694 | #define INTC2_INTMSKCLR_OFFSET (0x3c) |
583 | #define NR_INTC2_IRQS 60 | 695 | #define NR_INTC2_IRQS 60 |
@@ -594,6 +706,8 @@ void intc2_add_clear_irq(int irq, int (*fn)(int)); | |||
594 | 706 | ||
595 | #endif | 707 | #endif |
596 | 708 | ||
709 | extern int shmse_irq_demux(int irq); | ||
710 | |||
597 | static inline int generic_irq_demux(int irq) | 711 | static inline int generic_irq_demux(int irq) |
598 | { | 712 | { |
599 | return irq; | 713 | return irq; |
@@ -605,8 +719,21 @@ static inline int generic_irq_demux(int irq) | |||
605 | #define irq_canonicalize(irq) (irq) | 719 | #define irq_canonicalize(irq) (irq) |
606 | #define irq_demux(irq) __irq_demux(sh_mv.mv_irq_demux(irq)) | 720 | #define irq_demux(irq) __irq_demux(sh_mv.mv_irq_demux(irq)) |
607 | 721 | ||
722 | #ifdef CONFIG_4KSTACKS | ||
723 | extern void irq_ctx_init(int cpu); | ||
724 | extern void irq_ctx_exit(int cpu); | ||
725 | # define __ARCH_HAS_DO_SOFTIRQ | ||
726 | #else | ||
727 | # define irq_ctx_init(cpu) do { } while (0) | ||
728 | # define irq_ctx_exit(cpu) do { } while (0) | ||
729 | #endif | ||
730 | |||
608 | #if defined(CONFIG_CPU_SUBTYPE_SH73180) | 731 | #if defined(CONFIG_CPU_SUBTYPE_SH73180) |
609 | #include <asm/irq-sh73180.h> | 732 | #include <asm/irq-sh73180.h> |
610 | #endif | 733 | #endif |
611 | 734 | ||
735 | #if defined(CONFIG_CPU_SUBTYPE_SH7343) | ||
736 | #include <asm/irq-sh7343.h> | ||
737 | #endif | ||
738 | |||
612 | #endif /* __ASM_SH_IRQ_H */ | 739 | #endif /* __ASM_SH_IRQ_H */ |