Re: [PATCH] clockevents: rockchip: Add rockchip timer for rk3288

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@ff810000 {
> >> +		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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux