ARM: PRIMA2: mv timer to timer-prima2 as we will add timer-marco
Marco timer has different timer IP with prima2, so rename the current timer to timer-prima2 so that we can add timer-marco. at the same time, if we don't find prima2 timer node in dt, don't panic the system as we will make prima2 and marco use same kernel image. Signed-off-by: Barry Song <Baohua.Song@csr.com>
This commit is contained in:
parent
ea38960fb6
commit
0d5983a62a
|
@ -1,4 +1,3 @@
|
||||||
obj-y := timer.o
|
|
||||||
obj-y += rstc.o
|
obj-y += rstc.o
|
||||||
obj-y += common.o
|
obj-y += common.o
|
||||||
obj-y += rtciobrg.o
|
obj-y += rtciobrg.o
|
||||||
|
@ -6,3 +5,4 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o
|
||||||
obj-$(CONFIG_CACHE_L2X0) += l2x0.o
|
obj-$(CONFIG_CACHE_L2X0) += l2x0.o
|
||||||
obj-$(CONFIG_SUSPEND) += pm.o sleep.o
|
obj-$(CONFIG_SUSPEND) += pm.o sleep.o
|
||||||
obj-$(CONFIG_SIRF_IRQ) += irq.o
|
obj-$(CONFIG_SIRF_IRQ) += irq.o
|
||||||
|
obj-$(CONFIG_ARCH_PRIMA2) += timer-prima2.o
|
||||||
|
|
|
@ -40,7 +40,7 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
|
||||||
/* Maintainer: Barry Song <baohua.song@csr.com> */
|
/* Maintainer: Barry Song <baohua.song@csr.com> */
|
||||||
.map_io = sirfsoc_map_lluart,
|
.map_io = sirfsoc_map_lluart,
|
||||||
.init_irq = sirfsoc_of_irq_init,
|
.init_irq = sirfsoc_of_irq_init,
|
||||||
.init_time = sirfsoc_timer_init,
|
.init_time = sirfsoc_prima2_timer_init,
|
||||||
.dma_zone_size = SZ_256M,
|
.dma_zone_size = SZ_256M,
|
||||||
.init_machine = sirfsoc_mach_init,
|
.init_machine = sirfsoc_mach_init,
|
||||||
.init_late = sirfsoc_init_late,
|
.init_late = sirfsoc_init_late,
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <asm/mach/time.h>
|
#include <asm/mach/time.h>
|
||||||
|
|
||||||
extern void sirfsoc_timer_init(void);
|
extern void sirfsoc_prima2_timer_init(void);
|
||||||
|
|
||||||
extern void __init sirfsoc_of_irq_init(void);
|
extern void __init sirfsoc_of_irq_init(void);
|
||||||
extern void __init sirfsoc_of_clk_init(void);
|
extern void __init sirfsoc_of_clk_init(void);
|
||||||
|
|
|
@ -187,7 +187,7 @@ static void __init sirfsoc_clockevent_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize the kernel jiffy timer source */
|
/* initialize the kernel jiffy timer source */
|
||||||
void __init sirfsoc_timer_init(void)
|
void __init sirfsoc_prima2_timer_init(void)
|
||||||
{
|
{
|
||||||
unsigned long rate;
|
unsigned long rate;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
|
@ -226,14 +226,14 @@ static struct of_device_id timer_ids[] = {
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init sirfsoc_of_timer_map(void)
|
static void __init sirfsoc_of_timer_map(void)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
const unsigned int *intspec;
|
const unsigned int *intspec;
|
||||||
|
|
||||||
np = of_find_matching_node(NULL, timer_ids);
|
np = of_find_matching_node(NULL, timer_ids);
|
||||||
if (!np)
|
if (!np)
|
||||||
panic("unable to find compatible timer node in dtb\n");
|
return;
|
||||||
sirfsoc_timer_base = of_iomap(np, 0);
|
sirfsoc_timer_base = of_iomap(np, 0);
|
||||||
if (!sirfsoc_timer_base)
|
if (!sirfsoc_timer_base)
|
||||||
panic("unable to map timer cpu registers\n");
|
panic("unable to map timer cpu registers\n");
|
Loading…
Reference in a new issue