ARM: plat-nomadik: pass IRQ to timer driver
In order to convert the MTU timer to work with sparse IRQ we need to pass the IRQ used when initializing instead of just letting it rely on a special name being used in the IRQ header file. Cc: Alessandro Rubini <rubini@unipv.it> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
b7a5bcd5cd
commit
0813069d03
|
@ -29,7 +29,6 @@
|
||||||
#include <asm/sizes.h>
|
#include <asm/sizes.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
#include <asm/mach/irq.h>
|
|
||||||
#include <asm/mach/flash.h>
|
#include <asm/mach/flash.h>
|
||||||
#include <asm/mach/time.h>
|
#include <asm/mach/time.h>
|
||||||
|
|
||||||
|
@ -37,6 +36,7 @@
|
||||||
|
|
||||||
#include <linux/platform_data/mtd-nomadik-nand.h>
|
#include <linux/platform_data/mtd-nomadik-nand.h>
|
||||||
#include <mach/fsmc.h>
|
#include <mach/fsmc.h>
|
||||||
|
#include <mach/irqs.h>
|
||||||
|
|
||||||
#include "cpu-8815.h"
|
#include "cpu-8815.h"
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ static void __init nomadik_timer_init(void)
|
||||||
src_cr |= SRC_CR_INIT_VAL;
|
src_cr |= SRC_CR_INIT_VAL;
|
||||||
writel(src_cr, io_p2v(NOMADIK_SRC_BASE));
|
writel(src_cr, io_p2v(NOMADIK_SRC_BASE));
|
||||||
|
|
||||||
nmdk_timer_init(io_p2v(NOMADIK_MTU0_BASE));
|
nmdk_timer_init(io_p2v(NOMADIK_MTU0_BASE), IRQ_MTU0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sys_timer nomadik_timer = {
|
static struct sys_timer nomadik_timer = {
|
||||||
|
|
|
@ -96,7 +96,7 @@ dt_fail:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
nmdk_timer_init(mtu_timer_base);
|
nmdk_timer_init(mtu_timer_base, IRQ_MTU0);
|
||||||
clksrc_dbx500_prcmu_init(prcmu_timer_base);
|
clksrc_dbx500_prcmu_init(prcmu_timer_base);
|
||||||
ux500_twd_init();
|
ux500_twd_init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __PLAT_MTU_H
|
#ifndef __PLAT_MTU_H
|
||||||
#define __PLAT_MTU_H
|
#define __PLAT_MTU_H
|
||||||
|
|
||||||
void nmdk_timer_init(void __iomem *base);
|
void nmdk_timer_init(void __iomem *base, int irq);
|
||||||
void nmdk_clkevt_reset(void);
|
void nmdk_clkevt_reset(void);
|
||||||
void nmdk_clksrc_reset(void);
|
void nmdk_clksrc_reset(void);
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ void nmdk_clksrc_reset(void)
|
||||||
mtu_base + MTU_CR(0));
|
mtu_base + MTU_CR(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init nmdk_timer_init(void __iomem *base)
|
void __init nmdk_timer_init(void __iomem *base, int irq)
|
||||||
{
|
{
|
||||||
unsigned long rate;
|
unsigned long rate;
|
||||||
struct clk *clk0;
|
struct clk *clk0;
|
||||||
|
@ -217,7 +217,7 @@ void __init nmdk_timer_init(void __iomem *base)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Timer 1 is used for events, register irq and clockevents */
|
/* Timer 1 is used for events, register irq and clockevents */
|
||||||
setup_irq(IRQ_MTU0, &nmdk_timer_irq);
|
setup_irq(irq, &nmdk_timer_irq);
|
||||||
nmdk_clkevt.cpumask = cpumask_of(0);
|
nmdk_clkevt.cpumask = cpumask_of(0);
|
||||||
clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU);
|
clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue