Commit Graph
6 Commits
Author SHA1 Message Date
Tomeu Vizoso 1c8e600440 clk: Add rate constraints to clocks
Adds a way for clock consumers to set maximum and minimum rates. This
can be used for thermal drivers to set minimum rates, or by misc.
drivers to set maximum rates to assure a minimum performance level.

Changes the signature of the determine_rate callback by adding the
parameters min_rate and max_rate.

Signed-off-by: Tomeu Vizoso <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
[[email protected]: set req_rate in __clk_init]
Signed-off-by: Michael Turquette <[email protected]>
[[email protected]: min/max rate for sun6i_ahb1_clk_determine_rate
                        migrated clk-private.h changes to clk.c]
2015-02-02 14:23:42 -08:00
Tomeu Vizoso 646cafc6aa clk: Change clk_ops->determine_rate to return a clk_hw as the best parent
This is in preparation for clock providers to not have to deal with struct clk.

Signed-off-by: Tomeu Vizoso <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
2014-12-03 16:21:37 -08:00
Jean-Jacques Hiblot 141c71dd2c clk: at91: optimization of the set_rate callback
Signed-off-by: Boris BREZILLON <[email protected]>
Signed-off-by: Jean-Jacques Hiblot <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
2014-03-19 15:22:02 -07:00
Jean-Jacques Hiblot cce6db80a0 clk: at91: fix programmable clk irq handling
The PCKRDY bit is not set until the system clock is enabled.
This patch moves the management of the ready status in the system clock
driver.

Signed-off-by: Boris BREZILLON <[email protected]>
Signed-off-by: Jean-Jacques Hiblot <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
2014-03-19 15:21:56 -07:00
Boris BREZILLON 419f612932 clk: at91: replace prog clk round_rate with determine_rate
Implement the determine_rate callback to choose the best parent clk that
fulfills the requested rate.

Signed-off-by: Boris BREZILLON <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
2014-03-19 15:21:39 -07:00
Boris BREZILLON 1f22f8bb64 clk: at91: add PMC programmable clocks
This patch adds new at91 programmable clocks implementation using common clk
framework.
A programmable clock is a clock which can be exported on a given pin to clock
external devices.
Each programmable clock is given an id (from 0 to 8).
The number of available programmable clocks depends on the SoC you're using.
Programmable clock driver only implements the clock setting (clock rate and
parent setting). It must be chained to a system clock in order to
enable/disable the generated clock.
The PCKX pins used to output the clock signals must be assigned to the
appropriate peripheral (see atmel's datasheets).

Signed-off-by: Boris BREZILLON <[email protected]>
Acked-by: Mike Turquette <[email protected]>
Signed-off-by: Nicolas Ferre <[email protected]>
2013-12-02 15:31:24 +01:00