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>
This commit is contained in:
Maxime Ripard 2014-09-15 16:02:24 +02:00 коммит произвёл Nicolas Ferre
Родитель 0f391f189e
Коммит 7d80335e29
7 изменённых файлов: 8 добавлений и 10 удалений

Просмотреть файл

@ -442,7 +442,7 @@ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = {
static void __init at91sam9260_init_time(void)
{
at91sam926x_pit_init();
at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS);
}
AT91_SOC_START(at91sam9260)

Просмотреть файл

@ -401,7 +401,7 @@ static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = {
static void __init at91sam9261_init_time(void)
{
at91sam926x_pit_init();
at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS);
}
AT91_SOC_START(at91sam9261)

Просмотреть файл

@ -424,7 +424,7 @@ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = {
static void __init at91sam9263_init_time(void)
{
at91sam926x_pit_init();
at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS);
}
AT91_SOC_START(at91sam9263)

Просмотреть файл

@ -22,8 +22,6 @@
#include <linux/of_irq.h>
#include <linux/slab.h>
#include <mach/hardware.h>
#define AT91_PIT_MR 0x00 /* Mode Register */
#define AT91_PIT_PITIEN BIT(25) /* Timer Interrupt Enable */
#define AT91_PIT_PITEN BIT(24) /* Timer Enabled */
@ -267,7 +265,7 @@ CLOCKSOURCE_OF_DECLARE(at91sam926x_pit, "atmel,at91sam9260-pit",
static void __iomem *pit_base_addr;
void __init at91sam926x_pit_init(void)
void __init at91sam926x_pit_init(int irq)
{
struct pit_data *data;
@ -281,7 +279,7 @@ void __init at91sam926x_pit_init(void)
if (IS_ERR(data->mck))
panic(pr_fmt("Unable to get mck clk\n"));
data->irq = NR_IRQS_LEGACY + AT91_ID_SYS;
data->irq = irq;
at91sam926x_pit_common_init(data);
}

Просмотреть файл

@ -479,7 +479,7 @@ static unsigned int at91sam9g45_default_irq_priority[NR_AIC_IRQS] __initdata = {
static void __init at91sam9g45_init_time(void)
{
at91sam926x_pit_init();
at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS);
}
AT91_SOC_START(at91sam9g45)

Просмотреть файл

@ -412,7 +412,7 @@ static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = {
static void __init at91sam9rl_init_time(void)
{
at91sam926x_pit_init();
at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS);
}
AT91_SOC_START(at91sam9rl)

Просмотреть файл

@ -48,7 +48,7 @@ extern void __init at91_init_time(void);
extern void at91rm9200_ioremap_st(u32 addr);
extern void at91rm9200_timer_init(void);
extern void at91sam926x_ioremap_pit(u32 addr);
extern void at91sam926x_pit_init(void);
extern void at91sam926x_pit_init(int irq);
extern void at91x40_timer_init(void);
/* Clocks */