clocksource: orion: lookup clock by physbase
This converts Kirkwood and Dove SoC init to register tclk alias for timer by physbase instead of name. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
edf543d93e
commit
6e40610d51
|
@ -114,7 +114,7 @@ static int dove_init_clocks(void)
|
|||
}
|
||||
|
||||
tclk = clk_fixed("tclk", rate);
|
||||
return clk_register_clkdev(tclk, NULL, "orion-timer");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dove_init_soc(void)
|
||||
|
@ -123,6 +123,7 @@ static int dove_init_soc(void)
|
|||
|
||||
dove_remap_mc_regs();
|
||||
dove_init_clocks();
|
||||
clkdev_add_physbase(tclk, (unsigned int)DOVE_TIMER_BASE, NULL);
|
||||
add_generic_device("orion-timer", DEVICE_ID_SINGLE, NULL,
|
||||
(unsigned int)DOVE_TIMER_BASE, 0x30,
|
||||
IORESOURCE_MEM, NULL);
|
||||
|
|
|
@ -78,7 +78,7 @@ static int kirkwood_init_clocks(void)
|
|||
rate = 200000000;
|
||||
|
||||
tclk = clk_fixed("tclk", rate);
|
||||
return clk_register_clkdev(tclk, NULL, "orion-timer");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kirkwood_init_soc(void)
|
||||
|
@ -86,6 +86,7 @@ static int kirkwood_init_soc(void)
|
|||
unsigned long phys_base, phys_size;
|
||||
|
||||
kirkwood_init_clocks();
|
||||
clkdev_add_physbase(tclk, (unsigned int)KIRKWOOD_TIMER_BASE, NULL);
|
||||
add_generic_device("orion-timer", DEVICE_ID_SINGLE, NULL,
|
||||
(unsigned int)KIRKWOOD_TIMER_BASE, 0x30,
|
||||
IORESOURCE_MEM, NULL);
|
||||
|
|
|
@ -49,7 +49,7 @@ static int orion_timer_probe(struct device_d *dev)
|
|||
uint32_t val;
|
||||
|
||||
timer_base = dev_request_mem_region(dev, 0);
|
||||
tclk = clk_get(dev, "tclk");
|
||||
tclk = clk_get(dev, NULL);
|
||||
|
||||
/* setup TIMER0 as free-running clock source */
|
||||
__raw_writel(~0, timer_base + TIMER0_VAL);
|
||||
|
|
Loading…
Reference in New Issue