diff options
author | Magnus Damm <damm@igel.co.jp> | 2007-08-03 01:27:20 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-09-20 22:57:48 -0400 |
commit | 48180cab3adf4cb290c28b70e44e958b7fb8a5b0 (patch) | |
tree | 2cf6000e98f680a8ed9631626d2ce7e9525b55d2 /arch/sh/boards/renesas | |
parent | 51da64264b8d59a1e5fceebd94a975690b70b086 (diff) |
sh: intc - convert voyagergx code
This patch converts the sh-specific voyagergx interrupt code to make use
of intc. A lot of "interesting" old cruft gets replaced with intc tables
and some simple demux code.
- All interrupt sources in the sm501 data sheet are now in the header.
- The number and order of IRQ values are disconnected from register bits.
- Interrupt sources now start from IRQ 200.
- set_irq_chained_handler() is now used to hook up the demux function.
In the future it would probably make sense to move the interrupt demuxer
into into the mfd driver, but this is probably a nice step in the right
direction until that happens.
Tested on a R2D-1 board using the serial port hooked up to the sm501.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/renesas')
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/irq.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/setup.c | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c index 0bae9041aceb..b97c25de3a41 100644 --- a/arch/sh/boards/renesas/rts7751r2d/irq.c +++ b/arch/sh/boards/renesas/rts7751r2d/irq.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <asm/voyagergx.h> | ||
16 | #include <asm/rts7751r2d.h> | 17 | #include <asm/rts7751r2d.h> |
17 | 18 | ||
18 | #if defined(CONFIG_RTS7751R2D_REV11) | 19 | #if defined(CONFIG_RTS7751R2D_REV11) |
@@ -21,9 +22,6 @@ static int mask_pos[] = {11, 9, 8, 12, 10, 6, 5, 4, 7, 14, 13, 0, 0, 0, 0}; | |||
21 | static int mask_pos[] = {6, 11, 9, 8, 12, 10, 5, 4, 7, 14, 13, 0, 0, 0, 0}; | 22 | static int mask_pos[] = {6, 11, 9, 8, 12, 10, 5, 4, 7, 14, 13, 0, 0, 0, 0}; |
22 | #endif | 23 | #endif |
23 | 24 | ||
24 | extern int voyagergx_irq_demux(int irq); | ||
25 | extern void setup_voyagergx_irq(void); | ||
26 | |||
27 | static void enable_rts7751r2d_irq(unsigned int irq) | 25 | static void enable_rts7751r2d_irq(unsigned int irq) |
28 | { | 26 | { |
29 | /* Set priority in IPR back to original value */ | 27 | /* Set priority in IPR back to original value */ |
@@ -39,7 +37,7 @@ static void disable_rts7751r2d_irq(unsigned int irq) | |||
39 | 37 | ||
40 | int rts7751r2d_irq_demux(int irq) | 38 | int rts7751r2d_irq_demux(int irq) |
41 | { | 39 | { |
42 | return voyagergx_irq_demux(irq); | 40 | return irq; |
43 | } | 41 | } |
44 | 42 | ||
45 | static struct irq_chip rts7751r2d_irq_chip __read_mostly = { | 43 | static struct irq_chip rts7751r2d_irq_chip __read_mostly = { |
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index 6f7029d33241..4d1bbd30e52b 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -82,7 +82,7 @@ static struct plat_serial8250_port uart_platform_data[] = { | |||
82 | .membase = (void __iomem *)VOYAGER_UART_BASE, | 82 | .membase = (void __iomem *)VOYAGER_UART_BASE, |
83 | .mapbase = VOYAGER_UART_BASE, | 83 | .mapbase = VOYAGER_UART_BASE, |
84 | .iotype = UPIO_MEM, | 84 | .iotype = UPIO_MEM, |
85 | .irq = VOYAGER_UART0_IRQ, | 85 | .irq = IRQ_SM501_U0, |
86 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | 86 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, |
87 | .regshift = 2, | 87 | .regshift = 2, |
88 | .uartclk = (9600 * 16), | 88 | .uartclk = (9600 * 16), |
@@ -125,7 +125,7 @@ static struct resource sm501_resources[] = { | |||
125 | .flags = IORESOURCE_MEM, | 125 | .flags = IORESOURCE_MEM, |
126 | }, | 126 | }, |
127 | [2] = { | 127 | [2] = { |
128 | .start = 32, | 128 | .start = IRQ_SM501_CV, |
129 | .flags = IORESOURCE_IRQ, | 129 | .flags = IORESOURCE_IRQ, |
130 | }, | 130 | }, |
131 | }; | 131 | }; |
@@ -187,7 +187,6 @@ static void __init rts7751r2d_setup(char **cmdline_p) | |||
187 | static struct sh_machine_vector mv_rts7751r2d __initmv = { | 187 | static struct sh_machine_vector mv_rts7751r2d __initmv = { |
188 | .mv_name = "RTS7751R2D", | 188 | .mv_name = "RTS7751R2D", |
189 | .mv_setup = rts7751r2d_setup, | 189 | .mv_setup = rts7751r2d_setup, |
190 | .mv_nr_irqs = 72, | ||
191 | 190 | ||
192 | .mv_init_irq = init_rts7751r2d_IRQ, | 191 | .mv_init_irq = init_rts7751r2d_IRQ, |
193 | .mv_irq_demux = rts7751r2d_irq_demux, | 192 | .mv_irq_demux = rts7751r2d_irq_demux, |