Age | Commit message (Collapse) | Author | Files | Lines |
|
of_clk_set_defaults uses the type 'bool', but clk-conf.h does not
include its definition.
This results in a compile error when only clk-conf.h is used.
Signed-off-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Init data marked const should be annotated with __initconst for
correctness and not __initdata. This also fixes LTO builds that
otherwise fail with section mismatch errors.
Signed-off-by: Nicolas Pitre <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
[[email protected]: Dropped hunks that moved const char *
arrays to const char * const]
Signed-off-by: Stephen Boyd <[email protected]>
|
|
The structure is xin24m -> pll -> pll-mux (xin24m,pll,xin32k). The pll
does have an init callback to make sure the boot-selected frequency is
using the expected pll settings and resets the same frequency using
the values provided in the driver if necessary.
The setting itself also involves remuxing the pll-mux temporarily to
the xin24m source to let the new pll rate settle. Until now this worked
flawlessly, even when it had the flaw of accessing the mux settings
before the mux actually got registered.
With the recent clock-core conversions this flaw became apparent in
null pointer dereference in
[<c03fc400>] (clk_hw_get_num_parents) from [<c0400df0>] (clk_mux_get_parent+0x14/0xc8)
[<c0400ddc>] (clk_mux_get_parent) from [<c040246c>] (rockchip_rk3066_pll_set_rate+0xd8/0x320)
So to fix that, simply register the pll-mux before the pll, so that
it will be fully initialized when the pll clock executes its init-
callback and possibly touches the pll-mux clock.
Signed-off-by: Heiko Stuebner <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|
|
These Ux500 clocks have been around for years and were never
properly documented. Add the proper binding documentation.
Cc: Ulf Hansson <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Acked-by: Michael Turquette <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
The base addresses for the Ux500 PRCC controllers are hardcoded,
let's move them to the clock node in the device tree and delete
the constants.
Cc: Ulf Hansson <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Acked-by: Olof Johansson <[email protected]>
Acked-by: Michael Turquette <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
__clk_set_parent_after() actually used the second argument then we
could put this duplicate logic in there and call it with a different
order of arguments in the success vs. error paths in this function.
Cc: Mike Turquette <[email protected]>
Suggested-by: Stephen Boyd <[email protected]>
Signed-off-by: Dong Aisheng <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Use the provider based method to get a clock's name so that we
can get rid of the clk member in struct clk_hw one day. Mostly
converted with the following coccinelle script.
@@
struct clk_hw *E;
@@
-__clk_get_name(E->clk)
+clk_hw_get_name(E)
Acked-by: Heiko Stuebner <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Tomasz Figa <[email protected]>
Cc: Peter De Schrijver <[email protected]>
Cc: Prashant Gaikwad <[email protected]>
Cc: Stephen Warren <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Cc: Tero Kristo <[email protected]>
Cc: Ulf Hansson <[email protected]>
Acked-by: Sebastian Hesselbarth <[email protected]>
Acked-by: Andrew Bresticker <[email protected]>
Cc: Ezequiel Garcia <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Kevin Cernekee <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Cc: Ulrich Hecht <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We don't modify the clk_hw argument in these functions, so it's
safe to mark it as const.
Signed-off-by: Stephen Boyd <[email protected]>
|
|
On Hi6220, there have some clocks which can use mailbox channel to send
messages to power controller to change frequency; this includes CPU, GPU
and DDR clocks.
For dynamic frequency scaling, firstly need write the frequency value to
SRAM region, and then send message to mailbox to trigger power controller
to handle this requirement. This driver will use syscon APIs to pass SRAM
memory region and use common mailbox APIs for channels accessing.
This init driver will support cpu frequency change firstly.
Signed-off-by: Leo Yan <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Document the new compatible for stub clock driver which is used for CPU
and DDR's dynamic frequency scaling.
Signed-off-by: Leo Yan <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Document "hisilicon,hi6220-sramctrl" for SRAM controller.
Signed-off-by: Leo Yan <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
PLL VCO frequency is given by Fvco = Fref * 2 * NF / NR
in integer-N mode, or by Fvco = Fref * SSN / NR in Spread
Spectrum (fractional-N) mode. Thus fix the missing part
of NR
Signed-off-by: Guo Zeng <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
bit4 thcpum_cpudiv4_clken r/w
thcpum_cpudiv4_clk clock enable (default: 1)
Root clock CPU_CLK must be enabled for this clock to be enabled
bit3 coresight_tpiu_clken r/w
coresight_tpiu_clk clock enable (default: 0)
Root clock TPIU_CLK must be enabled for this clock to be enabled
Signed-off-by: Guo Zeng <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Signed-off-by: Yibo Cai <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
I cannot believe that I spend quite a lot time in finding this bug.
It seems a pitfall people tend to fall in.
In "int64 = int32 * int32", conversion from 32-bits to 64-bits comes
after the multiplication. So this statement may not work as expected.
Signed-off-by: Yibo Cai <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
this patch makes mux clks can be referenced by device drivers.
Signed-off-by: Guo Zeng <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Signed-off-by: Guo Zeng <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
The debug base clock can be bypassed from the main PLL to the OSC1 clock.
The bypass register is the staysoc1(0x10) register that is in the clock
manager.
This patch adds the option to get the correct parent for the debug base
clock.
Signed-off-by: Dinh Nguyen <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
This code is unused and not coming back. Let's kill it off.
Cc: Ulf Hansson <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Remove these APIs now that we've converted all users to the
replacement struct clk_hw based versions.
Signed-off-by: Stephen Boyd <[email protected]>
|
|
This driver uses __clk_get_name() when it's dealing with struct
clk_hw pointers. Use the simpler form so that we can get rid of
the clk member in struct clk_hw one day.
Acked-by: Sebastian Hesselbarth <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Cc: Wentao Xu <[email protected]>
Cc: Rob Clark <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API. This code is
calling the consumer APIs to change the parent to a 1 MHz fixed
rate clock for each of the clocks that the driver provides. Move
to using the assigned-clock-parents DT property for this instead.
Because this is an ABI break, detect if the property is missing
and fall back to setting the parent explicitly before the clocks
are registered.
Acked-by: Pawel Moll <[email protected]>
Cc: Linus Walleij <[email protected]>
Tested-by: Sudeep Holla <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Signed-off-by: Pawel Moll <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Acked-by: Tero Kristo <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Cc: Tomeu Vizoso <[email protected]>
Cc: Thierry Reding <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Cc: Maxime Ripard <[email protected]>
Cc: "Emilio López" <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Cc: Barry Song <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Cc: Chanwoo Choi <[email protected]>
Acked-by: Sylwester Nawrocki <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Kukjin Kim <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Reviewed-by: Heiko Stuebner <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Cc: Daniel Thompson <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs. This also
removes a clk_get() in this driver that can just as easily use
of_clk_get_parent_name() instead.
Cc: Gregory CLEMENT <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Cc: Chao Xie <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Reviewed-by: Alex Elder <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Acked-by: Boris Brezillon <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Cc: Manuel Lauss <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Linux-MIPS <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
We're removing struct clk from the clk provider API, so switch to
clk_get_rate() and clk_hw_get_rate() here appropriately.
Acked-by: Tero Kristo <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
This code is never called with a basic clock type, so the check
here is not doing anything useful and is blocking the removal of
__clk_get_flags(). Remove the check so we can delete the
__clk_get_flags() API.
Acked-by: Tero Kristo <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Mostly converted with the following snippet:
@@
struct clk_hw *E;
@@
-__clk_get_flags(E->clk)
+clk_hw_get_flags(E)
Acked-by: Tero Kristo <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Max Filippov <[email protected]>
Acked-by: Sebastian Hesselbarth <[email protected]>
Cc: Daniel Thompson <[email protected]>
Cc: Coquelin <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Mostly converted with the following semantic patch:
@@
struct clk_hw *E;
@@
-__clk_get_num_parents(E->clk)
+clk_hw_get_num_parents(E)
Acked-by: Boris Brezillon <[email protected]>
Cc: Chao Xie <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Javier Martinez Canillas <[email protected]>
Cc: Tomasz Figa <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: "Emilio López" <[email protected]>
Acked-by: Tero Kristo <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Acked-by: Sylwester Nawrocki <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
|
|
clk providers shouldn't need to use the consumer APIs (clk.h).
Add provider APIs to replace the __clk_*() APIs that take a
struct clk_hw as their first argument instead of a struct clk.
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Neither spdif_src nor spdif_pll exists, judging by the vendor kernel in
both cases spdif_pre was meant. This brings the naming in line and
hierachy in line with that of sclk_i2s0.
Also allow sclk_spdif and spdif_frac to change their parents rate as
that the upstream dividers are purely there to feed sclk_spdif
Signed-off-by: Sjoerd Simons <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|
|
Nothing uses it, and I can't find any evidence that anything ever has.
Its role is now filled by the core clock in the firmware driver.
Signed-off-by: Eric Anholt <[email protected]>
Acked-by: Stephen Warren <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|
|
While children of orphan clocks are not carried in the orphan-list itself,
they're nevertheless orphans in their own right as they also don't have an
input-rate available. To ease tracking if a clock is an orphan or has an
orphan in its parent path introduce an orphan field into struct clk and
update it and the fields in child-clocks when a clock gets added or removed
from the orphan-list.
Suggested-by: Stephen Boyd <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Cc: Boris Brezillon <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Max Filippov <[email protected]>
Cc: [email protected]
Cc: Zhangfei Gao <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Chao Xie <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Stefan Wahren <[email protected]>
Cc: Andrew Bresticker <[email protected]>
Cc: Robert Jarzmik <[email protected]>
Cc: Georgi Djakov <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Barry Song <[email protected]>
Cc: Dinh Nguyen <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Gabriel FERNANDEZ <[email protected]>
Cc: [email protected]
Cc: Peter De Schrijver <[email protected]>
Cc: Tero Kristo <[email protected]>
Cc: Ulf Hansson <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Michal Simek <[email protected]>
[[email protected]: s/clk/core/ in new function]
Signed-off-by: Stephen Boyd <[email protected]>
|
|
The gates were handled with a common piece of framework that was
registering all gates array, that was not using the CLK_OF_DECLARE logic,
and was not using clock-indices but some private masks that were pretty
much equivalent.
Move this code in a new driver that handles all the gates array and solves
both these issues.
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
[[email protected]: Include clk.h for consumer API usage]
Signed-off-by: Stephen Boyd <[email protected]>
|
|
Wrap the clock-indices to match the wrapping of the clock-output-names in
order to make it easier to match indices to names.
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|
|
The A23 and A33 gates have a non continuous set of clock IDs that are
valid. Add the clock-indices property to the DT to express this.
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
|