08 May, 2019
1 commit
-
- Rewrite how clk parents can be specified to be DT/clkdev based instead
of just string based* clk-parent-rewrite-1:
clk: Cache core in clk_fetch_parent_index() without names
clk: fixed-factor: Initialize clk_init_data on stack
clk: fixed-factor: Let clk framework find parent
clk: Allow parents to be specified via clkspec index
clk: Look for parents with clkdev based clk_lookups
clk: Allow parents to be specified without string names
clk: Add of_clk_hw_register() API for early clk drivers
driver core: Let dev_of_node() accept a NULL dev
clk: Prepare for clk registration API that uses DT nodes
clkdev: Move clk creation outside of 'clocks_mutex'
27 Apr, 2019
1 commit
-
This flag was historically used to indicate that a clk is a "basic" type
of clk like a mux, divider, gate, etc. This never turned out to be very
useful though because it was hard to cleanly split "basic" clks from
other clks in a system. This one flag was a way for type introspection
and it just didn't scale. If anything, it was used by the TI clk driver
to indicate that a clk_hw wasn't contained in the SoC specific clk
structure. We can get rid of this define now that TI is finding those
clks a different way.Cc: Tero Kristo
Cc: Ralf Baechle
Cc: Paul Burton
Cc: James Hogan
Cc:
Cc: Thierry Reding
Cc: Kevin Hilman
Cc:
Cc:
Acked-by: Thierry Reding
Signed-off-by: Stephen Boyd
24 Apr, 2019
1 commit
-
This structure can be full of junk from the stack if we don't initialize
it. The clk framework tests clk_init_data::parent_names for non-NULL and
then considers that as the parent name pointer, but if it's full of junk
then we'll try to deref a bad pointer and oops the system. Let's
initialize the structure so that only clk_init_data::parent_names or
clk_init_data::parent_data is set, and not both.Reported-by: "kernelci.org bot"
Tested-by: Geert Uytterhoeven
Tested-by: Tony Lindgren
Fixes: ecbf3f1795fd ("clk: fixed-factor: Let clk framework find parent")
Signed-off-by: Stephen Boyd
20 Apr, 2019
1 commit
-
Convert this driver to a more modern way of specifying parents now that
we have a way to specify clk parents by DT index. This lets us nicely
avoid a problem where a parent clk name isn't know because the parent
clk hasn't been registered yet.Cc: Miquel Raynal
Cc: Jerome Brunet
Cc: Russell King
Cc: Michael Turquette
Cc: Jeffrey Hugo
Cc: Chen-Yu Tsai
Tested-by: Jeffrey Hugo
Signed-off-by: Stephen Boyd
15 Dec, 2018
1 commit
-
* clk-fixes:
clk: qcom: qcs404: Fix gpll0_out_main parent
clk: zynqmp: Off by one in zynqmp_is_valid_clock()
clk: mmp: Off by one in mmp_clk_add()
clk: mvebu: Off by one bugs in cp110_of_clk_get()
arm64: dts: qcom: sdm845-mtp: Mark protected gcc clocks
clk: zynqmp: handle fixed factor param query error
clk: qcom: gcc: Fix board clock node name
clk: meson: axg: mark fdiv2 and fdiv3 as critical
clk: meson-gxbb: set fclk_div3 as CLK_IS_CRITICAL
clk: fixed-factor: fix of_node_get-put imbalance
12 Dec, 2018
1 commit
-
These are all GPL-2.0 files per the existing license text. Replace the
boiler plate with the tag.Signed-off-by: Stephen Boyd
07 Nov, 2018
1 commit
-
When the fixed factor clock is created by devicetree,
of_clk_add_provider is called. Add a call to
of_clk_del_provider in the remove function to balance
it out.Reported-by: Alan Tull
Fixes: 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")
Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Stephen Boyd
31 Aug, 2018
1 commit
-
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.Cc: Eugeniy Paltsev
Cc: Michael Turquette
Cc: Stephen Boyd
Cc: linux-clk@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Signed-off-by: Rob Herring
Signed-off-by: Stephen Boyd
26 Jul, 2018
1 commit
-
Fixed factor clock has two initializations at of_clk_init() time
and during platform driver probe. Before of_clk_init() call,
node is marked as populated and so its probe never gets called.During of_clk_init() fixed factor clock registration may fail if
any of its parent clock is not registered. In this case, it doesn't
get chance to retry registration from probe. Clear OF_POPULATED
flag if fixed factor clock registration fails so that clock
registration is attempted again from probe.Signed-off-by: Rajan Vaja
Signed-off-by: Stephen Boyd
16 Aug, 2016
1 commit
-
This function is marked __init, so it can't possibly need to be
exported to modules. Remove the marking.Cc: Gregory CLEMENT
Signed-off-by: Stephen Boyd
13 Aug, 2016
1 commit
-
Adds support for fixed-factor clock providers which have not been
enabled via of_clk_init().This is required by Device trees overlays that introduce clocks
providers.Signed-off-by: Ricardo Ribalda Delgado
[sboyd@codeaurora.org: Make new private function static, don't
check clk for NULL when unregistering in driver remove]
Signed-off-by: Stephen Boyd
02 Jul, 2016
1 commit
-
The only way for a fixed factor clock to change its rate would be to change
its parent rate.Since passing blindly CLK_SET_RATE_PARENT might break a lot of platforms
that were relying on the fact that the parent rate wouldn't change,
introduce a compatible-based whitelist that will allow clocks to opt-in
that flag.Signed-off-by: Maxime Ripard
Acked-by: Rob Herring
Signed-off-by: Stephen Boyd
20 Apr, 2016
1 commit
-
Add registration APIs in the clk fixed-factor code to return
struct clk_hw pointers instead of struct clk pointers. This way
we hide the struct clk pointer from providers unless they need to
use consumer facing APIs.Signed-off-by: Stephen Boyd
30 Jan, 2016
2 commits
-
Allow to unregister fixed factor clock.
Signed-off-by: Masahiro Yamada
Signed-off-by: Stephen Boyd -
to_clk_*(_hw) macros have been repeatedly defined in many places.
This patch moves all the to_clk_*(_hw) definitions in the common
clock framework to public header clk-provider.h, and drop the local
definitions.Signed-off-by: Geliang Tang
Signed-off-by: Stephen Boyd
25 Aug, 2015
2 commits
-
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
-
Mostly converted with the following snippet:
@@
struct clk_hw *E;
@@-__clk_get_flags(E->clk)
+clk_hw_get_flags(E)Acked-by: Tero Kristo
Cc: Maxime Ripard
Cc: Max Filippov
Acked-by: Sebastian Hesselbarth
Cc: Daniel Thompson
Cc: Coquelin
Signed-off-by: Stephen Boyd
11 Jun, 2015
1 commit
-
Currently it is not made explicit why clk_fixed_set_rate() can ignore
its arguments and unconditionally return success. Add a comment
to explain this.We also mark the clk_ops table const since it should never be
modified at runtime.Suggested-by: Stephen Boyd
Signed-off-by: Daniel Thompson
Signed-off-by: Stephen Boyd
15 May, 2015
1 commit
-
Printing an error on kmalloc() failures is unnecessary. Remove
the print and use *ptr in sizeof() for future-proof code.Signed-off-by: Stephen Boyd
16 Nov, 2013
1 commit
-
Pull trivial tree updates from Jiri Kosina:
"Usual earth-shaking, news-breaking, rocket science pile from
trivial.git"* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
doc: usb: Fix typo in Documentation/usb/gadget_configs.txt
doc: add missing files to timers/00-INDEX
timekeeping: Fix some trivial typos in comments
mm: Fix some trivial typos in comments
irq: Fix some trivial typos in comments
NUMA: fix typos in Kconfig help text
mm: update 00-INDEX
doc: Documentation/DMA-attributes.txt fix typo
DRM: comment: `halve' -> `half'
Docs: Kconfig: `devlopers' -> `developers'
doc: typo on word accounting in kprobes.c in mutliple architectures
treewide: fix "usefull" typo
treewide: fix "distingush" typo
mm/Kconfig: Grammar s/an/a/
kexec: Typo s/the/then/
Documentation/kvm: Update cpuid documentation for steal time and pv eoi
treewide: Fix common typo in "identify"
__page_to_pfn: Fix typo in comment
Correct some typos for word frequency
clk: fixed-factor: Fix a trivial typo
...
14 Oct, 2013
1 commit
-
Just a trivial print message typo fix.
Signed-off-by: Ezequiel Garcia
Signed-off-by: Jiri Kosina
17 Aug, 2013
1 commit
-
These registration calls may be used by loadable modules. Export them.
Signed-off-by: Mike Turquette
13 Apr, 2013
1 commit
-
Add support for DT "fixed-factor-clock" binding to the common fixed
factor clock support.Signed-off-by: Gregory CLEMENT
Tested-by: Christian Ruppert
Signed-off-by: Mike Turquette
12 Jan, 2013
1 commit
-
clk->rate = parent->rate / div * mult
The formula is OK. But it may overflow while we do operate with
unsigned long. So use do_div instead.Signed-off-by: Haojian Zhuang
Signed-off-by: Mike Turquette
[mturquette@linaro.org: improved $SUBJECT]
12 Jul, 2012
1 commit
-
Most platforms end up using a mix of basic clock types and
some which use clk_hw_foo struct for filling in custom platform
information when the clocks don't fit into basic types supported.In platform code, its useful to know if a clock is using a basic
type or clk_hw_foo, which helps platforms know if they can
safely use to_clk_hw_foo to derive the clk_hw_foo pointer from
clk_hw.Mark all basic clocks with a CLK_IS_BASIC flag.
Signed-off-by: Rajendra Nayak
Signed-off-by: Mike Turquette
09 May, 2012
1 commit
-
Having fixed factors/dividers in hardware is a common pattern, so
add a basic clock type doing this. It basically describes a fixed
factor clock using a nominator and a denominator.Signed-off-by: Sascha Hauer
Reviewed-by: Viresh Kumar
Tested-by: Shawn Guo
[mturquette@linaro.org: constify parent_names in static init macro]
[mturquette@linaro.org: copy/paste bug from mux in static init macro]
[mturquette@linaro.org: fix error handling in clk_register_fixed_factor]
[mturquette@linaro.org: improve division accuracy; thanks to Saravana]
Signed-off-by: Mike Turquette