11 Apr, 2013
1 commit
-
Notifiers may return NOTIFY_(OK|DONE|STOP|BAD). The CCF uses an
inconsistent mix of checking against NOTIFY_STOP or NOTIFY_BAD.
This inconsistency leaves errors undetected in some cases:
clk_set_parent() calls __clk_speculate_rates(), which stops when it
hits a NOTIFIER_BAD (STOP is ignored), and passes this value back to the
caller.
clk_set_parent() compares this return value against NOTIFY_STOP only,
ignoring NOTIFY_BAD returns.Use NOTIFY_STOP_MASK to detect a negative notifier return value and
document all four return value options.Signed-off-by: Soren Brinkmann
Signed-off-by: Mike Turquette
31 Jul, 2012
1 commit
-
Many drivers are shared between architectures that may or may not have
HAVE_CLK selected for them. To remove compilation errors for them we
enclose clk_*() calls in these drivers within #ifdef CONFIG_HAVE_CLK,
#endif.This patch removes the need of these CONFIG_HAVE_CLK statements, by
introducing dummy routines when HAVE_CLK is not selected by platforms.
So, definition of these routines will always be available. These calls
will return error for platforms that don't select HAVE_CLK.Signed-off-by: Viresh Kumar
Cc: Wolfram Sang
Cc: Greg Kroah-Hartman
Cc: Jeff Garzik
Cc: Andrew Lunn
Cc: Bhupesh Sharma
Cc: Giuseppe Cavallaro
Cc: Russell King
Cc: Mike Turquette
Cc: Sergei Shtylyov
Cc: viresh kumar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jul, 2012
1 commit
-
Pull common clk framework changes from Michael Turquette:
"This includes a small number of core framework improvments, platform
ports and new DT bindings."Fix up trivial conflicts in drivers/clk/Makefile
* tag 'clk-for-linus' of git://git.linaro.org/people/mturquette/linux: (21 commits)
clk: fix compile for OF && !COMMON_CLK
clk: fix clk_get on of_clk_get_by_name return check
clk: mxs: clk_register_clkdev mx28 usb clocks
clk: add highbank clock support
dt: add clock binding doc to primecell bindings
clk: add DT fixed-clock binding support
clk: add DT clock binding support
ARM: integrator: convert to common clock
clk: add versatile ICST307 driver
ARM: integrator: put symbolic bus names on devices
ARM: u300: convert to common clock
clk: cache parent clocks only for muxes
clk: wm831x: Add initial WM831x clock driver
clk: Constify struct clk_init_data
clk: Add CLK_IS_BASIC flag to identify basic clocks
clk: Add support for rate table based dividers
clk: Add support for power of two type dividers
clk: mxs: imx28: decrease the frequency of ref_io1 for SSP2 and SSP3
clk: mxs: add clkdev lookup for pwm
clk: mxs: Fix the GPMI clock name
...
24 Jul, 2012
1 commit
-
Signed-off-by: Jan-Simon Möller
Cc: Russell King
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jiri Kosina
20 Jul, 2012
2 commits
-
With commit 766e6a4ec602d0c107 (clk: add DT clock binding support),
compiling with OF && !COMMON_CLK is broken.Reported-by: Alexandre Pereira da Silva
Reported-by: Prashant Gaikwad
Signed-off-by: Rob Herring
Signed-off-by: Mike Turquette -
The commit 766e6a4 (clk: add DT clock binding support) plugs device
tree clk lookup of_clk_get_by_name into clk_get, and fall on non-DT
lookup clk_get_sys if DT lookup fails.The return check on of_clk_get_by_name takes (clk != NULL) as a
successful DT lookup. But it's not the case. For any system that
does not define clk lookup in device tree, ERR_PTR(-ENOENT) will be
returned, and consequently, all the client drivers calling clk_get
in their probe functions will fail to probe with error code -ENOENT
returned.Fix the issue by checking of_clk_get_by_name return with !IS_ERR(clk),
and update of_clk_get and of_clk_get_by_name for !CONFIG_OF build
correspondingly.Signed-off-by: Shawn Guo
Acked-by: Rob Herring
Tested-by: Marek Vasut
Tested-by: Lauri Hintsala
Signed-off-by: Mike Turquette
12 Jul, 2012
1 commit
-
Based on work 1st by Ben Herrenschmidt and Jeremy Kerr, then by Grant
Likely, this patch adds support to clk_get to allow drivers to retrieve
clock data from the device tree.Platforms scan for clocks in DT with of_clk_init and a match table, and
the register a provider through of_clk_add_provider. The provider's
clk_src_get function will be called when a device references the
provider's OF node for a clock reference.v6 (Rob Herring):
- Return error values instead of NULL to match clock framework
expectationsv5 (Rob Herring):
- Move from drivers/of into common clock subsystem
- Squashed "dt/clock: add a simple provider get function" and
"dt/clock: add function to get parent clock name"
- Rebase to 3.4-rc1
- Drop CONFIG_OF_CLOCK and just use CONFIG_OF
- Add missing EXPORT_SYMBOL to various functions
- s/clock-output-name/clock-output-names/
- Define that fixed-clock binding is a single outputv4 (Rob Herring):
- Rework for common clk subsystem
- Add of_clk_get_parent_name functionv3: - Clarified documentation
v2: - fixed errant ';' causing compile error
- Editorial fixes from Shawn Guo
- merged in adding lookup to clkdev
- changed property names to match established convention. After
working with the binding a bit it really made more sense to follow the
lead of 'reg', 'gpios' and 'interrupts' by making the input simply
'clocks' & 'clock-names' instead of 'clock-input-*', and to only use
clock-output* for the producer nodes. (Sorry Shawn, this will mean
you need to change some code, but it should be trivial)
- Add ability to inherit clocks from parent nodes by using an empty
'clock-ranges' property. Useful for busses. I could use some feedback
on the new property name, 'clock-ranges' doesn't feel right to me.Signed-off-by: Grant Likely
Signed-off-by: Rob Herring
Reviewed-by: Shawn Guo
Cc: Sascha Hauer
Signed-off-by: Mike Turquette
11 May, 2012
1 commit
-
* depends/rmk/clkdev:
CLKDEV: provide helpers for common clock framework
ARM: 7392/1: CLKDEV: Optimize clk_find()
ARM: 7376/1: clkdev: Implement managed clk_get()
25 Apr, 2012
2 commits
-
Remove trailing whitespace from 2 lines.
Signed-off-by: Rob Herring
-
The comment is inaccurate (it actually ends the CONFIG_COMMON_CLK
section, there's no else) and given that we've just got a single level
of ifdef isn't really needed anyway.Signed-off-by: Mark Brown
Signed-off-by: Mike Turquette
20 Apr, 2012
1 commit
-
Allow clk API users to simplify their cleanup paths by providing a
managed version of clk_get() and clk_put().Signed-off-by: Mark Brown
Signed-off-by: Russell King
17 Mar, 2012
1 commit
-
The common clock framework defines a common struct clk useful across
most platforms as well as an implementation of the clk api that drivers
can use safely for managing clocks.The net result is consolidation of many different struct clk definitions
and platform-specific clock framework implementations.This patch introduces the common struct clk, struct clk_ops and an
implementation of the well-known clock api in include/clk/clk.h.
Platforms may define their own hardware-specific clock structure and
their own clock operation callbacks, so long as it wraps an instance of
struct clk_hw.See Documentation/clk.txt for more details.
This patch is based on the work of Jeremy Kerr, which in turn was based
on the work of Ben Herrenschmidt.Signed-off-by: Mike Turquette
Signed-off-by: Mike Turquette
Reviewed-by: Thomas Gleixner
Tested-by: Andrew Lunn
Reviewed-by: Rob Herring calxeda.com>
Cc: Russell King
Cc: Jeremy Kerr
Cc: Arnd Bergman
Cc: Paul Walmsley
Cc: Shawn Guo
Cc: Sascha Hauer
Cc: Richard Zhao
Cc: Saravana Kannan
Cc: Magnus Damm
Cc: Mark Brown
Cc: Linus Walleij
Cc: Stephen Boyd
Cc: Amit Kucheria
Cc: Deepak Saxena
Cc: Grant Likely
Signed-off-by: Arnd Bergmann
28 Dec, 2011
1 commit
-
It's for migrating to generic clk framework API.
The helper functions help cases clk_enable/clk_disable is used
in non-atomic context.
For example, Call clk_enable in probe and clk_disable in remove.Signed-off-by: Richard Zhao
Signed-off-by: Sascha Hauer
Signed-off-by: Shawn Guo
Cc: Russell King
Acked-by: Marek Vasut
27 Sep, 2011
1 commit
-
As discussed previously, there's the need on some platforms to run some
parts of clk_enable() in contexts which can schedule. The solution
which was agreed upon was to provide clk_prepare() and clk_unprepare()
to contain this parts, while clk_enable() and clk_disable() perform
the atomic part.This patch provides a common definition for clk_prepare() and
clk_unprepare() in linux/clk.h, and provides an upgrade path for
existing implementation and drivers: drivers can start using
clk_prepare() and clk_unprepare() once this patch is merged without
having to wait for platform support. Platforms can then start to
provide these additional functions.Eventually, HAVE_CLK_PREPARE will be removed from the kernel, and
everyone will have to provide these new APIs.Acked-by: Saravana Kannan
Signed-off-by: Russell King
05 Jun, 2009
1 commit
-
This can be used for other arm platforms too as discussed
on the linux-arm-kernel list.Also check the return value with IS_ERR and return PTR_ERR
as suggested by Russell King.Signed-off-by: Tony Lindgren
Signed-off-by: Russell King
27 Mar, 2009
1 commit
-
This adds clk_get_sys to get a clock without the associated struct
device.Signed-off-by: Sascha Hauer
17 Oct, 2008
1 commit
-
clk_get and clk_put may not be used from within interrupt context. Change
comment to this function.Signed-off-by: Alex Raimondi
Signed-off-by: Haavard Skinnemoen
Acked-by: Russell King
Cc: john stultz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Mar, 2006
1 commit
-
include/linux/clk.h is betraying its ARM origins.
Signed-off-by: Todd Poynor
Signed-off-by: Russell King
08 Jan, 2006
1 commit
-
This is needs to be visible to other architectures using the AMBA
bus and peripherals.Signed-off-by: Russell King