1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SH_CPU_SH5_IRQ_H
3 #define __ASM_SH_CPU_SH5_IRQ_H
6 * include/asm-sh/cpu-sh5/irq.h
8 * Copyright (C) 2000, 2001 Paolo Alberelli
13 * Encoded IRQs are not considered worth to be supported.
14 * Main reason is that there's no per-encoded-interrupt
15 * enable/disable mechanism (as there was in SH3/4).
16 * An all enabled/all disabled is worth only if there's
17 * a cascaded IC to disable/enable/ack on. Until such
18 * IC is available there's no such support.
20 * Presumably Encoded IRQs may use extra IRQs beyond 64,
21 * below. Some logic must be added to cope with IRQ_IRL?
22 * in an exclusive way.
24 * Priorities are set at Platform level, when IRQ_IRL0-3
25 * are set to 0 Encoding is allowed. Otherwise it's not
29 /* Independent IRQs */
69 #define NR_INTC_IRQS 64
71 #ifdef CONFIG_SH_CAYMAN
72 #define NR_EXT_IRQS 32
73 #define START_EXT_IRQS 64
75 /* PCI bus 2 uses encoded external interrupts on the Cayman board */
76 #define IRQ_P2INTA (START_EXT_IRQS + (3*8) + 0)
77 #define IRQ_P2INTB (START_EXT_IRQS + (3*8) + 1)
78 #define IRQ_P2INTC (START_EXT_IRQS + (3*8) + 2)
79 #define IRQ_P2INTD (START_EXT_IRQS + (3*8) + 3)
81 #define I8042_KBD_IRQ (START_EXT_IRQS + 2)
82 #define I8042_AUX_IRQ (START_EXT_IRQS + 6)
84 #define IRQ_CFCARD (START_EXT_IRQS + 7)
85 #define IRQ_PCMCIA (0)
91 /* Default IRQs, fixed */
92 #define TIMER_IRQ IRQ_TUNI0
93 #define RTC_IRQ IRQ_CUI
95 /* Default Priorities, Platform may choose differently */
96 #define NO_PRIORITY 0 /* Disabled */
97 #define TIMER_PRIORITY 2
98 #define RTC_PRIORITY TIMER_PRIORITY
99 #define SCIF_PRIORITY 3
100 #define INTD_PRIORITY 3
101 #define IRL3_PRIORITY 4
102 #define INTC_PRIORITY 6
103 #define IRL2_PRIORITY 7
104 #define INTB_PRIORITY 9
105 #define IRL1_PRIORITY 10
106 #define INTA_PRIORITY 12
107 #define IRL0_PRIORITY 13
108 #define TOP_PRIORITY 15
110 extern int intc_evt_to_irq
[(0xE20/0x20)+1];
111 extern int platform_int_priority
[NR_INTC_IRQS
];
113 #endif /* __ASM_SH_CPU_SH5_IRQ_H */