aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/boards/renesas/r7780rp/irq-r7780mp.c2
-rw-r--r--arch/sh/boards/renesas/r7780rp/irq-r7780rp.c2
-rw-r--r--arch/sh/boards/renesas/r7780rp/irq-r7785rp.c2
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c24
-rw-r--r--include/asm-sh/r7780rp.h4
5 files changed, 7 insertions, 27 deletions
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c b/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c
index 68f0ad1b637d..ae1cfcb29700 100644
--- a/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c
+++ b/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c
@@ -62,7 +62,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = {
62static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors, 62static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors,
63 NULL, mask_registers, NULL, NULL); 63 NULL, mask_registers, NULL, NULL);
64 64
65unsigned char * __init highlander_init_irq_r7780mp(void) 65unsigned char * __init highlander_plat_irq_setup(void)
66{ 66{
67 if ((ctrl_inw(0xa4000700) & 0xf000) == 0x2000) { 67 if ((ctrl_inw(0xa4000700) & 0xf000) == 0x2000) {
68 printk(KERN_INFO "Using r7780mp interrupt controller.\n"); 68 printk(KERN_INFO "Using r7780mp interrupt controller.\n");
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c
index bd34048ed0e1..9d3921fe27c0 100644
--- a/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c
+++ b/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c
@@ -55,7 +55,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = {
55static DECLARE_INTC_DESC(intc_desc, "r7780rp", vectors, 55static DECLARE_INTC_DESC(intc_desc, "r7780rp", vectors,
56 NULL, mask_registers, NULL, NULL); 56 NULL, mask_registers, NULL, NULL);
57 57
58unsigned char * __init highlander_init_irq_r7780rp(void) 58unsigned char * __init highlander_plat_irq_setup(void)
59{ 59{
60 if (ctrl_inw(0xa5000600)) { 60 if (ctrl_inw(0xa5000600)) {
61 printk(KERN_INFO "Using r7780rp interrupt controller.\n"); 61 printk(KERN_INFO "Using r7780rp interrupt controller.\n");
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
index bf7ec107fbc6..896c045aa39d 100644
--- a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
+++ b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
@@ -64,7 +64,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = {
64static DECLARE_INTC_DESC(intc_desc, "r7785rp", vectors, 64static DECLARE_INTC_DESC(intc_desc, "r7785rp", vectors,
65 NULL, mask_registers, NULL, NULL); 65 NULL, mask_registers, NULL, NULL);
66 66
67unsigned char * __init highlander_init_irq_r7785rp(void) 67unsigned char * __init highlander_plat_irq_setup(void)
68{ 68{
69 if ((ctrl_inw(0xa4000158) & 0xf000) != 0x1000) 69 if ((ctrl_inw(0xa4000158) & 0xf000) != 0x1000)
70 return NULL; 70 return NULL;
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index ac0a96522e45..bc79afb6fc4c 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -316,7 +316,7 @@ static void __init highlander_setup(char **cmdline_p)
316 316
317static unsigned char irl2irq[HL_NR_IRL]; 317static unsigned char irl2irq[HL_NR_IRL];
318 318
319int highlander_irq_demux(int irq) 319static int highlander_irq_demux(int irq)
320{ 320{
321 if (irq >= HL_NR_IRL || !irl2irq[irq]) 321 if (irq >= HL_NR_IRL || !irl2irq[irq])
322 return irq; 322 return irq;
@@ -324,27 +324,9 @@ int highlander_irq_demux(int irq)
324 return irl2irq[irq]; 324 return irl2irq[irq];
325} 325}
326 326
327void __init highlander_init_irq(void) 327static void __init highlander_init_irq(void)
328{ 328{
329 unsigned char *ucp = NULL; 329 unsigned char *ucp = highlander_plat_irq_setup();
330
331 do {
332#ifdef CONFIG_SH_R7780MP
333 ucp = highlander_init_irq_r7780mp();
334 if (ucp)
335 break;
336#endif
337#ifdef CONFIG_SH_R7785RP
338 ucp = highlander_init_irq_r7785rp();
339 if (ucp)
340 break;
341#endif
342#ifdef CONFIG_SH_R7780RP
343 ucp = highlander_init_irq_r7780rp();
344 if (ucp)
345 break;
346#endif
347 } while (0);
348 330
349 if (ucp) { 331 if (ucp) {
350 plat_irq_setup_pins(IRQ_MODE_IRL3210); 332 plat_irq_setup_pins(IRQ_MODE_IRL3210);
diff --git a/include/asm-sh/r7780rp.h b/include/asm-sh/r7780rp.h
index a33838f23a6d..306f7359f7d4 100644
--- a/include/asm-sh/r7780rp.h
+++ b/include/asm-sh/r7780rp.h
@@ -193,8 +193,6 @@
193#define IRQ_SCIF0 (HL_FPGA_IRQ_BASE + 15) 193#define IRQ_SCIF0 (HL_FPGA_IRQ_BASE + 15)
194#define IRQ_SCIF1 (HL_FPGA_IRQ_BASE + 16) 194#define IRQ_SCIF1 (HL_FPGA_IRQ_BASE + 16)
195 195
196unsigned char *highlander_init_irq_r7780mp(void); 196unsigned char *highlander_plat_irq_setup(void);
197unsigned char *highlander_init_irq_r7780rp(void);
198unsigned char *highlander_init_irq_r7785rp(void);
199 197
200#endif /* __ASM_SH_RENESAS_R7780RP */ 198#endif /* __ASM_SH_RENESAS_R7780RP */