Age | Commit message (Collapse) | Author | Files | Lines |
|
The clock type mix is a kind of clock combines "div" and "mux".
This kind of clock can not allow to change div first then
mux or change mux first or div.
The reason is
1. Some clock has frequency change bit. Each time want to change
the frequency, there are some operations based on this bit, and
these operations are time-cost.
Seperating div and mux change will make the process longer, and
waste more time.
2. Seperting the div and mux may generate middle clock that the
peripharals do not support. It may make the peripharals hang.
There are three kinds of this type of clock in all SOCes.
1. The clock has bit to trigger the frequency change.
2. Same as #1, but the operations for the bit is different
3. Do not have frequency change bit.
So this type of clock has implemented the callbacks
->determine_rate
->set_rate_and_parent
These callbacks can help to change the div and mux together.
Signed-off-by: Chao Xie <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|
|
Move the definition of structure of mmp_clk_frac to
clk.h.
So device tree support can use this structure.
Signed-off-by: Chao Xie <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|
|
For the clk-frac, we need to make sure that the initial
clock rate is one item of the table.
If it is not, we use the first item in the table by default.
Signed-off-by: Chao Xie <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|
|
The register used by clk-frac may be shared with
other clocks.
So it needs to use spin lock to protect the register
access.
Signed-off-by: Chao Xie <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|
|
The structures defined for clk-frac will be used out side
of clk-frac.c.
To avoid conflicts, add prefix "mmp" for these structures'
name.
Signed-off-by: Chao Xie <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|
|
The orignal code will use the bigger rate between
"previous rate" and "current rate" when caculate the
rate.
In fact, hardware cares about the closest one.
So choose the closer rate between "previous rate" and
"current rate".
Signed-off-by: Chao Xie <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
|
|
The formula is numerator/denominator = Fin / (Fout * factor)
So
Fout = Fin * denominator / (numerator * factor).
Current clk_factor_round_rate and clk_factor_recalc_rate use
wrong formula. This patch will fix them.
Signed-off-by: Chao Xie <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
|
|
The code has typo when calculate denominator. It should use
den_mask instead of num_mask.
Signed-off-by: Chao Xie <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
|
|
Add a CLK_SET_RATE_NO_REPARENT clock flag, which will prevent muxes
being reparented during clk_set_rate.
To avoid breaking existing platforms, all callers of clk_register_mux()
are adjusted to pass the new flag. Platform maintainers are encouraged
to remove the flag if they wish to allow mux reparenting on set_rate.
Signed-off-by: James Hogan <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Cc: Mike Turquette <[email protected]>
Cc: Russell King <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Haojian Zhuang <[email protected]>
Cc: Chao Xie <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: "Emilio López" <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Prashant Gaikwad <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Peter De Schrijver <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Andrew Chew <[email protected]>
Cc: Doug Anderson <[email protected]>
Cc: Heiko Stuebner <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Thomas Abraham <[email protected]>
Cc: Tomasz Figa <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Tested-by: Haojian Zhuang <[email protected]>
Acked-by: Stephen Warren <[email protected]> [tegra]
Acked-by: Maxime Ripard <[email protected]> [sunxi]
Acked-by: Sören Brinkmann <[email protected]> [Zynq]
Signed-off-by: Mike Turquette <[email protected]>
|
|
Avoid to use cpu_is_xxx() in pxa gpio driver. Use platform_device_id
to identify the difference.
Signed-off-by: Haojian Zhuang <[email protected]>
Acked-by: Linus Walleij <[email protected]>
|
|
Initialize the clocks for mmp2
Signed-off-by: Chao Xie <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
|
|
Initialize the clocks for pxa910
Signed-off-by: Chao Xie <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
|
|
Initialize the clocks for pxa168
Signed-off-by: Chao Xie <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
|
|
add mmp specific clocks including apbc cloks, apmu clocks,
and pll2, fraction clocks
Signed-off-by: Chao Xie <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
|