ARM: mmp: fix timer_init calls

The change to passing the timer frequency as a function argument
was a good idea, but caused a build failure for one user that
was missed in the update:

arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer':
arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration]

Change that as well to fix the build error, and rename the
function to put it into a proper namespace and make it clearer
what is actually going on.

I saw that the high 6500000 HZ frequency was previously only
set with CONFIG_MMP2, but is now also used with MMP (pxa910),
so I'm changing that back here. Please make sure that the
frequencies are all correct now.

Fixes: f36797ee43 ("ARM: mmp/mmp2: dt: enable the clock")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Arnd Bergmann 2018-12-10 21:43:01 +01:00 committed by Olof Johansson
parent c8730395ea
commit 12d3a30db4
5 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
#include <linux/reboot.h> #include <linux/reboot.h>
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
extern void timer_init(int irq, unsigned long rate); extern void mmp_timer_init(int irq, unsigned long rate);
extern void __init mmp_map_io(void); extern void __init mmp_map_io(void);
extern void mmp_restart(enum reboot_mode, const char *); extern void mmp_restart(enum reboot_mode, const char *);

View File

@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1); clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
__raw_writel(clk_rst, APBC_TIMERS); __raw_writel(clk_rst, APBC_TIMERS);
timer_init(IRQ_MMP2_TIMER1, 6500000); mmp_timer_init(IRQ_MMP2_TIMER1, 6500000);
} }
/* on-chip devices */ /* on-chip devices */

View File

@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
/* 3.25MHz, bus/functional clock enabled, release reset */ /* 3.25MHz, bus/functional clock enabled, release reset */
__raw_writel(TIMER_CLK_RST, APBC_TIMERS); __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
timer_init(IRQ_PXA168_TIMER1, 6500000); mmp_timer_init(IRQ_PXA168_TIMER1, 3250000);
} }
void pxa168_clear_keypad_wakeup(void) void pxa168_clear_keypad_wakeup(void)

View File

@ -116,7 +116,7 @@ void __init pxa910_timer_init(void)
__raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS); __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
__raw_writel(TIMER_CLK_RST, APBC_TIMERS); __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
timer_init(IRQ_PXA910_AP1_TIMER1); mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000);
} }
/* on-chip devices */ /* on-chip devices */

View File

@ -184,7 +184,7 @@ static struct irqaction timer_irq = {
.dev_id = &ckevt, .dev_id = &ckevt,
}; };
void __init timer_init(int irq, unsigned long rate) void __init mmp_timer_init(int irq, unsigned long rate)
{ {
timer_config(); timer_config();
@ -239,7 +239,7 @@ void __init mmp_dt_init_timer(void)
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
timer_init(irq, rate); mmp_timer_init(irq, rate);
return; return;
out: out:
pr_err("Failed to get timer from device tree with error:%d\n", ret); pr_err("Failed to get timer from device tree with error:%d\n", ret);