[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4543438.UYNY2cLhNF@phil>
Date: Wed, 14 Jan 2015 18:45:38 +0100
From: Heiko Stübner <heiko@...ech.de>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: tglx@...utronix.de, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH] clockevents: rockchip: Add rockchip timer for rk3288
Hi Daniel,
Am Mittwoch, 14. Januar 2015, 17:10:24 schrieb Daniel Lezcano:
> On 01/13/2015 12:20 AM, Heiko Stübner wrote:
> >> +- clock-frequency: the frequency the timer is running
> >> +
> >> +Example:
> >> + timer: timer@...10000 {
> >> + compatible = "rockchip,rk3288-timer";
> >> + reg = <0xff810000 0x20>;
> >> + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
> >> + clock-frequency = <24000000>;
> >
> > wouldn't it make sense to use the actual supplying clock?
> >
> > For the timer you want to use it is just the non-gateable &xin24m, but the
> > timers in the other block (timer0-5) actually do have gateable clocks.
> >
> > Similarly there is a pclk_timer supplying at least one of the two actual
> > blocks. I'll try to inquire how the blocks are actually supplied.
>
> Ok, are you suggesting I should use another timer so we can gate it for
> power efficiency ?
As you want a timer that is running during suspend, I think the one you're
using right now is the correct one ... the others (timer0-5) are in the cpu-
domain instead of the alive-domain
My intention was more to not have a clock-frequency property, but to simply
use the correct cock frequency.
clocks = <&xin24m>, <&cru PCLK_TIMER>;
clock-names = "timer", "pclk";
[same binding as dw_apb_timer]
rockchip_timer.c:
tclk = of_clk_get_by_name(np, "timer");
clk_prepare_enable(tclk);
bc_timer.freq = clk_get_rate(tclk);
etc...
essentially like db_apb_timer_of.c does it :-)
We currently don't implement the gates Jack mentioned, but as they're open
anyway we can just use xin24m directly for now.
And the pclk should probably be enabled too, as with 3.19-rc it gets disabled
when unused.
Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists