diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-09-15 10:02:24 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-09-15 11:55:47 -0400 |
commit | 7d80335e29701e9c2cc55ec0ea79afe6351aa20b (patch) | |
tree | 073607658e52b0553db5bda6eb1c2858346d4025 /arch | |
parent | 0f391f189eae2c479122dc934d8ffdcbe4257cfe (diff) |
ARM: at91: Give the PIT irq as an argument of at91sam926x_pit_init
This allows to remove the dependency of the timer driver on mach/hardware.h and
having an hardcoded interrupt number in the driver itself.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-at91/at91sam9260.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam926x_time.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/generic.h | 2 |
7 files changed, 8 insertions, 10 deletions
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index b61a255d4141..aab1f969a7c3 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -442,7 +442,7 @@ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
442 | 442 | ||
443 | static void __init at91sam9260_init_time(void) | 443 | static void __init at91sam9260_init_time(void) |
444 | { | 444 | { |
445 | at91sam926x_pit_init(); | 445 | at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); |
446 | } | 446 | } |
447 | 447 | ||
448 | AT91_SOC_START(at91sam9260) | 448 | AT91_SOC_START(at91sam9260) |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index badf20c2cd67..a8bd35963332 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -401,7 +401,7 @@ static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
401 | 401 | ||
402 | static void __init at91sam9261_init_time(void) | 402 | static void __init at91sam9261_init_time(void) |
403 | { | 403 | { |
404 | at91sam926x_pit_init(); | 404 | at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); |
405 | } | 405 | } |
406 | 406 | ||
407 | AT91_SOC_START(at91sam9261) | 407 | AT91_SOC_START(at91sam9261) |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index ebb413e7f653..fbff228cc63e 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -424,7 +424,7 @@ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
424 | 424 | ||
425 | static void __init at91sam9263_init_time(void) | 425 | static void __init at91sam9263_init_time(void) |
426 | { | 426 | { |
427 | at91sam926x_pit_init(); | 427 | at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); |
428 | } | 428 | } |
429 | 429 | ||
430 | AT91_SOC_START(at91sam9263) | 430 | AT91_SOC_START(at91sam9263) |
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c index 9abb289dce72..d5289098b3df 100644 --- a/arch/arm/mach-at91/at91sam926x_time.c +++ b/arch/arm/mach-at91/at91sam926x_time.c | |||
@@ -22,8 +22,6 @@ | |||
22 | #include <linux/of_irq.h> | 22 | #include <linux/of_irq.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | 24 | ||
25 | #include <mach/hardware.h> | ||
26 | |||
27 | #define AT91_PIT_MR 0x00 /* Mode Register */ | 25 | #define AT91_PIT_MR 0x00 /* Mode Register */ |
28 | #define AT91_PIT_PITIEN BIT(25) /* Timer Interrupt Enable */ | 26 | #define AT91_PIT_PITIEN BIT(25) /* Timer Interrupt Enable */ |
29 | #define AT91_PIT_PITEN BIT(24) /* Timer Enabled */ | 27 | #define AT91_PIT_PITEN BIT(24) /* Timer Enabled */ |
@@ -267,7 +265,7 @@ CLOCKSOURCE_OF_DECLARE(at91sam926x_pit, "atmel,at91sam9260-pit", | |||
267 | 265 | ||
268 | static void __iomem *pit_base_addr; | 266 | static void __iomem *pit_base_addr; |
269 | 267 | ||
270 | void __init at91sam926x_pit_init(void) | 268 | void __init at91sam926x_pit_init(int irq) |
271 | { | 269 | { |
272 | struct pit_data *data; | 270 | struct pit_data *data; |
273 | 271 | ||
@@ -281,7 +279,7 @@ void __init at91sam926x_pit_init(void) | |||
281 | if (IS_ERR(data->mck)) | 279 | if (IS_ERR(data->mck)) |
282 | panic(pr_fmt("Unable to get mck clk\n")); | 280 | panic(pr_fmt("Unable to get mck clk\n")); |
283 | 281 | ||
284 | data->irq = NR_IRQS_LEGACY + AT91_ID_SYS; | 282 | data->irq = irq; |
285 | 283 | ||
286 | at91sam926x_pit_common_init(data); | 284 | at91sam926x_pit_common_init(data); |
287 | } | 285 | } |
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index f725814c556d..405427ec05f8 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -479,7 +479,7 @@ static unsigned int at91sam9g45_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
479 | 479 | ||
480 | static void __init at91sam9g45_init_time(void) | 480 | static void __init at91sam9g45_init_time(void) |
481 | { | 481 | { |
482 | at91sam926x_pit_init(); | 482 | at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); |
483 | } | 483 | } |
484 | 484 | ||
485 | AT91_SOC_START(at91sam9g45) | 485 | AT91_SOC_START(at91sam9g45) |
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 361b4a6e7651..f553e4ea034b 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -412,7 +412,7 @@ static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
412 | 412 | ||
413 | static void __init at91sam9rl_init_time(void) | 413 | static void __init at91sam9rl_init_time(void) |
414 | { | 414 | { |
415 | at91sam926x_pit_init(); | 415 | at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); |
416 | } | 416 | } |
417 | 417 | ||
418 | AT91_SOC_START(at91sam9rl) | 418 | AT91_SOC_START(at91sam9rl) |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index fb99dabab8f7..189d7c7e7f60 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -48,7 +48,7 @@ extern void __init at91_init_time(void); | |||
48 | extern void at91rm9200_ioremap_st(u32 addr); | 48 | extern void at91rm9200_ioremap_st(u32 addr); |
49 | extern void at91rm9200_timer_init(void); | 49 | extern void at91rm9200_timer_init(void); |
50 | extern void at91sam926x_ioremap_pit(u32 addr); | 50 | extern void at91sam926x_ioremap_pit(u32 addr); |
51 | extern void at91sam926x_pit_init(void); | 51 | extern void at91sam926x_pit_init(int irq); |
52 | extern void at91x40_timer_init(void); | 52 | extern void at91x40_timer_init(void); |
53 | 53 | ||
54 | /* Clocks */ | 54 | /* Clocks */ |