Commit 417528a2 authored by Paul Mundt's avatar Paul Mundt

sh: Configurable timer IRQ.

All of the various CPU subtypes currently hardcode TIMER_IRQ,
switch this to a config option in the few places we need this.

This allows further removal of hardcoded IRQ headers..
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 716067f2
...@@ -405,6 +405,13 @@ source "arch/sh/boards/renesas/rts7751r2d/Kconfig" ...@@ -405,6 +405,13 @@ source "arch/sh/boards/renesas/rts7751r2d/Kconfig"
source "arch/sh/boards/renesas/r7780rp/Kconfig" source "arch/sh/boards/renesas/r7780rp/Kconfig"
config SH_TIMER_IRQ
int
default "28" if CPU_SUBTYPE_SH7780
default "86" if CPU_SUBTYPE_SH7619
default "140" if CPU_SUBTYPE_SH7206
default "16"
config SH_PCLK_FREQ config SH_PCLK_FREQ
int "Peripheral clock frequency (in Hz)" int "Peripheral clock frequency (in Hz)"
default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343 default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343
......
...@@ -79,7 +79,7 @@ static int __init sh7780_devices_setup(void) ...@@ -79,7 +79,7 @@ static int __init sh7780_devices_setup(void)
__initcall(sh7780_devices_setup); __initcall(sh7780_devices_setup);
static struct intc2_data intc2_irq_table[] = { static struct intc2_data intc2_irq_table[] = {
{ TIMER_IRQ, 0, 24, 0, INTC_TMU0_MSK, 2 }, { 28, 0, 24, 0, INTC_TMU0_MSK, 2 },
{ 21, 1, 0, 0, INTC_RTC_MSK, TIMER_PRIORITY }, { 21, 1, 0, 0, INTC_RTC_MSK, TIMER_PRIORITY },
{ 22, 1, 1, 0, INTC_RTC_MSK, TIMER_PRIORITY }, { 22, 1, 1, 0, INTC_RTC_MSK, TIMER_PRIORITY },
{ 23, 1, 2, 0, INTC_RTC_MSK, TIMER_PRIORITY }, { 23, 1, 2, 0, INTC_RTC_MSK, TIMER_PRIORITY },
......
...@@ -169,7 +169,7 @@ static int cmt_timer_init(void) ...@@ -169,7 +169,7 @@ static int cmt_timer_init(void)
cmt_clock_enable(); cmt_clock_enable();
setup_irq(TIMER_IRQ, &cmt_irq); setup_irq(CONFIG_SH_TIMER_IRQ, &cmt_irq);
cmt0_clk.parent = clk_get("module_clk"); cmt0_clk.parent = clk_get("module_clk");
......
...@@ -167,7 +167,7 @@ static int mtu2_timer_init(void) ...@@ -167,7 +167,7 @@ static int mtu2_timer_init(void)
u8 tmp; u8 tmp;
unsigned long interval; unsigned long interval;
setup_irq(TIMER_IRQ, &mtu2_irq); setup_irq(CONFIG_SH_TIMER_IRQ, &mtu2_irq);
mtu2_clk1.parent = clk_get("module_clk"); mtu2_clk1.parent = clk_get("module_clk");
......
...@@ -149,7 +149,7 @@ static int tmu_timer_init(void) ...@@ -149,7 +149,7 @@ static int tmu_timer_init(void)
{ {
unsigned long interval; unsigned long interval;
setup_irq(TIMER_IRQ, &tmu_irq); setup_irq(CONFIG_SH_TIMER_IRQ, &tmu_irq);
tmu0_clk.parent = clk_get("module_clk"); tmu0_clk.parent = clk_get("module_clk");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment