aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-02-01 06:06:04 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:20 -0500
commit8d27e08191379b7a3302a33a6efdb8bdfd319c95 (patch)
treedd63b12706e849bdb494b0cdd2f11e60feb9ca91 /include/asm-sh
parent50373c1b7ee9cdd9b8ccaa1b58d13ad43f879908 (diff)
[PATCH] sh: drop maskpos from make_ipr_irq(), remove duplicate irq definitions
Clean up some of the subtype IRQ definitions for IPR IRQ, and consolidate the make_ipr_irq() definitions by dropping maskpos. SH-4A was the only thing interested in the maskpos, and this should be handled through INTC2 rather than IPR. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/irq-sh73180.h36
-rw-r--r--include/asm-sh/irq-sh7780.h23
-rw-r--r--include/asm-sh/irq.h10
3 files changed, 9 insertions, 60 deletions
diff --git a/include/asm-sh/irq-sh73180.h b/include/asm-sh/irq-sh73180.h
index bf2e4310ffac..d705252be260 100644
--- a/include/asm-sh/irq-sh73180.h
+++ b/include/asm-sh/irq-sh73180.h
@@ -25,11 +25,6 @@
25#undef DMA_IPR_POS 25#undef DMA_IPR_POS
26#undef DMA_PRIORITY 26#undef DMA_PRIORITY
27 27
28#undef NR_IRQS
29
30#undef __irq_demux
31#undef irq_demux
32
33#undef INTC_IMCR0 28#undef INTC_IMCR0
34#undef INTC_IMCR1 29#undef INTC_IMCR1
35#undef INTC_IMCR2 30#undef INTC_IMCR2
@@ -229,33 +224,6 @@
229#define SIU_IPR_POS 1 224#define SIU_IPR_POS 1
230#define SIU_PRIORITY 3 225#define SIU_PRIORITY 3
231 226
232
233/* ONCHIP_NR_IRQS */
234#define NR_IRQS 109
235
236/* In a generic kernel, NR_IRQS is an upper bound, and we should use
237 * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value.
238 */
239#define ACTUAL_NR_IRQS NR_IRQS
240
241
242extern void disable_irq(unsigned int);
243extern void disable_irq_nosync(unsigned int);
244extern void enable_irq(unsigned int);
245
246/*
247 * Simple Mask Register Support
248 */
249extern void make_maskreg_irq(unsigned int irq);
250extern unsigned short *irq_mask_register;
251
252/*
253 * Function for "on chip support modules".
254 */
255extern void make_ipr_irq(unsigned int irq, unsigned int addr,
256 int pos, int priority);
257extern void make_imask_irq(unsigned int irq);
258
259#define PORT_PACR 0xA4050100UL 227#define PORT_PACR 0xA4050100UL
260#define PORT_PBCR 0xA4050102UL 228#define PORT_PBCR 0xA4050102UL
261#define PORT_PCCR 0xA4050104UL 229#define PORT_PCCR 0xA4050104UL
@@ -343,8 +311,6 @@ extern void make_imask_irq(unsigned int irq);
343#define IRQ6_PRIORITY 1 311#define IRQ6_PRIORITY 1
344#define IRQ7_PRIORITY 1 312#define IRQ7_PRIORITY 1
345 313
346extern int shmse_irq_demux(int irq); 314int shmse_irq_demux(int irq);
347#define __irq_demux(irq) shmse_irq_demux(irq)
348#define irq_demux(irq) __irq_demux(irq)
349 315
350#endif /* __ASM_SH_IRQ_SH73180_H */ 316#endif /* __ASM_SH_IRQ_SH73180_H */
diff --git a/include/asm-sh/irq-sh7780.h b/include/asm-sh/irq-sh7780.h
index 8c8ca1281084..7f90315cd830 100644
--- a/include/asm-sh/irq-sh7780.h
+++ b/include/asm-sh/irq-sh7780.h
@@ -299,29 +299,6 @@
299#define GPIO_IPR_POS 2 299#define GPIO_IPR_POS 2
300#define GPIO_PRIORITY 3 300#define GPIO_PRIORITY 3
301 301
302/* ONCHIP_NR_IRQS */
303#define NR_IRQS 150 /* 111 + 16 */
304
305/* In a generic kernel, NR_IRQS is an upper bound, and we should use
306 * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value.
307 */
308#define ACTUAL_NR_IRQS NR_IRQS
309
310extern void disable_irq(unsigned int);
311extern void disable_irq_nosync(unsigned int);
312extern void enable_irq(unsigned int);
313
314/*
315 * Simple Mask Register Support
316 */
317extern void make_maskreg_irq(unsigned int irq);
318extern unsigned short *irq_mask_register;
319
320/*
321 * Function for "on chip support modules".
322 */
323extern void make_imask_irq(unsigned int irq);
324
325#define INTC_TMU0_MSK 0 302#define INTC_TMU0_MSK 0
326#define INTC_TMU3_MSK 1 303#define INTC_TMU3_MSK 1
327#define INTC_RTC_MSK 2 304#define INTC_RTC_MSK 2
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h
index 060ec3c27207..42b8394c04ed 100644
--- a/include/asm-sh/irq.h
+++ b/include/asm-sh/irq.h
@@ -245,6 +245,7 @@
245#endif /* ST40STB1 */ 245#endif /* ST40STB1 */
246 246
247#endif /* 775x / SH4-202 / ST40STB1 */ 247#endif /* 775x / SH4-202 / ST40STB1 */
248#endif /* 7780 */
248 249
249/* NR_IRQS is made from three components: 250/* NR_IRQS is made from three components:
250 * 1. ONCHIP_NR_IRQS - number of IRLS + on-chip peripherial modules 251 * 1. ONCHIP_NR_IRQS - number of IRLS + on-chip peripherial modules
@@ -274,8 +275,11 @@
274# define ONCHIP_NR_IRQS 72 275# define ONCHIP_NR_IRQS 72
275#elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) 276#elif defined(CONFIG_CPU_SUBTYPE_ST40STB1)
276# define ONCHIP_NR_IRQS 144 277# define ONCHIP_NR_IRQS 144
277#elif defined(CONFIG_CPU_SUBTYPE_SH7300) 278#elif defined(CONFIG_CPU_SUBTYPE_SH7300) || \
279 defined(CONFIG_CPU_SUBTYPE_SH73180)
278# define ONCHIP_NR_IRQS 109 280# define ONCHIP_NR_IRQS 109
281#elif defined(CONFIG_CPU_SUBTYPE_SH7780)
282# define ONCHIP_NR_IRQS 111
279#elif defined(CONFIG_SH_UNKNOWN) /* Most be last */ 283#elif defined(CONFIG_SH_UNKNOWN) /* Most be last */
280# define ONCHIP_NR_IRQS 144 284# define ONCHIP_NR_IRQS 144
281#endif 285#endif
@@ -306,6 +310,8 @@
306# define OFFCHIP_NR_IRQS 96 310# define OFFCHIP_NR_IRQS 96
307#elif defined (CONFIG_SH_TITAN) 311#elif defined (CONFIG_SH_TITAN)
308# define OFFCHIP_NR_IRQS 4 312# define OFFCHIP_NR_IRQS 4
313#elif defined(CONFIG_SH_R7780RP)
314# define OFFCHIP_NR_IRQS 16
309#elif defined(CONFIG_SH_UNKNOWN) 315#elif defined(CONFIG_SH_UNKNOWN)
310# define OFFCHIP_NR_IRQS 16 /* Must also be last */ 316# define OFFCHIP_NR_IRQS 16 /* Must also be last */
311#else 317#else
@@ -550,7 +556,7 @@ extern int ipr_irq_demux(int irq);
550#define INTC_ICR_IRLM (1<<7) 556#define INTC_ICR_IRLM (1<<7)
551#endif 557#endif
552 558
553#else 559#ifdef CONFIG_CPU_SUBTYPE_SH7780
554#include <asm/irq-sh7780.h> 560#include <asm/irq-sh7780.h>
555#endif 561#endif
556 562