[PATCH 2/6] clocksource: orion: add DT support

Sascha Hauer s.hauer at pengutronix.de
Sat Jun 29 04:49:53 EDT 2013


On Fri, Jun 28, 2013 at 08:25:43PM +0200, Sebastian Hesselbarth wrote:
> This adds device tree support to orion timer and also converts clk_get
> to clk_lookup to find TCLK without device name reference.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
> ---
> Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> Cc: barebox at lists.infradead.org
> ---
>  drivers/clocksource/orion.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/clocksource/orion.c b/drivers/clocksource/orion.c
> index e3db845..ed71fa4 100644
> --- a/drivers/clocksource/orion.c
> +++ b/drivers/clocksource/orion.c
> @@ -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_lookup("tclk");

Please don't do this. I don't know how it is done in the kernel
for orion atm, but you could for example help yourself with
clkdev_add_physbase until the clocks can be properly looked up from
the devicetree.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list