#
b0a148f8 |
|
28-Dec-2018 |
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
sh: cpu: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/874lbscswy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Cc: Rich Felker <dalias@libc.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
#
15f0c8f2 |
|
30-Jul-2016 |
Rich Felker <dalias@libc.org> |
sh: use common clock framework with device tree boards Enable common clk framework for DT-based boards and disable code that depends on the legacy sh clk framework when common clk is enabled. Once legacy drivers are converted over, the old code can be removed entirely. Signed-off-by: Rich Felker <dalias@libc.org>
|
#
6d803ba7 |
|
17-Nov-2010 |
Jean-Christop PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
ARM: 6483/1: arm & sh: factorised duplicated clkdev.c factorise some generic infrastructure to assist looking up struct clks for the ARM & SH architecture. as the code is identical at 99% put the arch specific code for allocation as example in asm/clkdev.h Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
#
8b5ee113 |
|
11-May-2010 |
Magnus Damm <damm@opensource.se> |
sh: move sh clock.c contents to drivers/sh/clk. This patch is V2 of the SH clock framework move from arch/sh/kernel/cpu/clock.c to drivers/sh/clk.c. All code except the following functions are moved: clk_init(), clk_get() and clk_put(). The init function is still kept in clock.c since it depends on the SH-specific machvec implementation. The symbols clk_get() and clk_put() already exist in the common ARM clkdev code, those symbols are left in the SH tree to avoid duplicating them for SH-Mobile ARM. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
441c2440 |
|
11-May-2010 |
Magnus Damm <damm@opensource.se> |
sh: remove unused clock lookup Now when all clocks are registered using clkdev, get rid of the special SH-specific clock lookup. Also ditch the unused module ref counting code. This patch syncs the SH behaviour with ARM. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
4f615d57 |
|
10-May-2010 |
Hiroshi DOYU <Hiroshi.DOYU@nokia.com> |
sh: clkfwk: Use debugfs_remove_recursive() for rewinding Rewinding each debugfs entries to unregister if an error happens. Based on the commit ca4caa4e1d45f9542fa54263974d0ef637157b4a Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
d97432f1 |
|
10-May-2010 |
Magnus Damm <damm@opensource.se> |
sh: allow registering clocks without name Modify the SuperH clock code to support struct clk with NULL as name. Such clocks will not be hooked up to debugfs. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
51a5006a |
|
08-Mar-2010 |
Paul Mundt <lethal@linux-sh.org> |
sh: Merge clkdev API updates. This rolls in the remainder of the clkdev API bits from the ARM tree. This can more or less be used verbatim, so we just copy it over and nuke our local version. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
659431fc |
|
18-Jan-2010 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
fix typos "precidence" -> "precedence" in comments This patch was generated by git grep -E -i -l 'precidence' | xargs -r perl -p -i -e 's/precidence/precedence/' Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
#
bc10e875 |
|
30-Jan-2010 |
Marek Skuczynski <mareksk7@gmail.com> |
sh: Fix access to released memory in clk_debugfs_register_one() Signed-off-by: Marek Skuczynski <mareksk7@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
098dee99 |
|
03-Jun-2009 |
Magnus Damm <damm@igel.co.jp> |
sh: add enable()/disable()/set_rate() to div6 code This patch updates the div6 clock helper code to add support for enable(), disable() and set_rate() callbacks. Needed by the camera clock enabling board code on Migo-R. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
61ce5393 |
|
25-May-2009 |
Magnus Damm <damm@igel.co.jp> |
sh: remove clk_ops->build_rate_table() This patch removes the ->build_rate_table() callback, ->recalc() may instead be used for this purpose. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
c94a8574 |
|
25-May-2009 |
Magnus Damm <damm@igel.co.jp> |
sh: add shared clock framework frequency table code Add SuperH-specific clock framework helper functions: - clk_rate_table_build() - build cpufreq table from divisors/multipliers - clk_rate_table_round() - use cpufreq table to find matching frequency Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
549b5e35 |
|
14-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Add MSTP bits to SH7785 clock framework. This plugs in all of the MSTP functions in to the clock framework, and hands them off to the platform devices that want them. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
cedcf336 |
|
13-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Map tree hierarchy in debugfs. This adopts the OMAP clock framework debugfs bits and replaces the aging procfs bits. The procfs clocks entry was primarily a debugging aid, and used to be tied in to cpuinfo before the clock list grew too unweildly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
cc96eace |
|
13-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: rate table construction and rounding for SH7785. This adds support for constructing a rate table by looking at potential divisors for a specified clock. Each FQRMR clock is given its own table. Presently each table is rebuilt when the parent propagates down a new rate, so some more logic needs to be added to do this more intelligently. Additionally, a fairly generic round_rate() implementation is then layered on top of it, which subsequently provides us with cpufreq support. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
253b0887 |
|
13-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Rework legacy CPG clock handling. This moves out the old legacy CPG clocks to their own file, and converts over the existing users. With these clocks going away and each CPU dealing with them on their own, CPUs can gradually move over to the new interface. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
100890c5 |
|
13-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Provide a generic clk_set_rate_ex() path for root clocks. In the case of root clocks (such as clkin oscillators, extal, etc.), the rate information is entirely platform dependent and needs to be lazily set and propagated from the platform code. This provides a method for establishing the rate update on these types of clocks that define no set_rate() op of their own. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
d672fef0 |
|
13-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Handle NULL clkops for root clocks. root clocks may simply be placeholders for rate and ancestry information, and have no real associated operations of their own. Account for this, so we are still able to use these sorts of clocks for rate propagation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
af777ce4 |
|
13-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: module_clk -> peripheral_clk rename. For consistenct naming, and to allow us to fix up some confusion in the SH-Mobile clock framework, amongst other places. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
8be5f1a6 |
|
12-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: Kill off the remnants of the old timer code. Now with all of the TMU users moved over to the new TMU driver, and the old TMU driver killed off, the left-over infrastructure can go along with it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
9fe5ee0e |
|
12-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Use arch_clk_init() for on-chip clock registration. CPUs registering on-chip clocks should be using arch_clk_init() with the new scheme so that the CPUs have the opportunity to establish the topology prior to the initial root clock rate propagation. This ensures that CPUs with on-chip clocks that use CLK_ENABLE_ON_INIT are properly enabled at the initial propagation time, without having to further poke the root clocks. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
f3f8290c |
|
12-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Handle clk_get_sys() returning an ERR_PTR. clk_get() needs to also perform an IS_ERR() check to see whether clk_get_sys() failed or not. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
0dae8957 |
|
11-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Wire up clk_get_sys() support. This stubs in clk_get_sys() from the ARM clkdev implementation. Tentatively conver the clk_get() lookup code to use this, and once the rest of the in-tree users are happy with this, it can replace the fallback lookups. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
007e8363 |
|
11-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Kill off clk_recalc_rate(). The only user for this is the SH-Mobile r_clk, which is now added as a root clock and can be kicked via propagate_rate() as usual. Given that, there is no longer any need for the special clk_recalc_rate(), so we kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
aa87aa34 |
|
11-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Improve the generic clk_set_parent() implementation. This causes the generic clk_set_parent() implementation to be a bit more intelligent. A clk_reparent() is added to move the clock over to the new parent's sibling list, which then allows the generic rate propagation code to succeed. This also becomes a nop if the new and old parents are unchanged. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
ae891a42 |
|
11-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Fix up the clk_enable() error path. There are a couple of instances where a clk_enable() can fail, which the SH-Mobile code presently handles, but doesn't get reported all the way back up. This fixes up the return type so the errors make it all the way down to the drivers. Additionally, we now also error out properly if the parent enable fails. Prep work for aggressively turning off unused clocks on boot. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
4ff29ff8 |
|
11-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Consolidate the ALWAYS_ENABLED / NEEDS_INIT mess. There is no real distinction here in behaviour, either a clock needs to be enabled on initialiation or not. The ALWAYS_ENABLED flag was always intended to only apply to clocks that were physically always on and could simply not be disabled at all from software. Unfortunately over time this was abused and the meaning became a bit blurry. So, we kill off both of all of those paths now, as well as the newer NEEDS_INIT flag, and consolidate on a CLK_ENABLE_ON_INIT. Clocks that need to be enabled on initialization can set this, and it will purposely enable them and bump the refcount up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
b1f6cfe4 |
|
11-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: refactor rate propagation. This resyncs the rate propagation strategy with the scheme used by the OMAP clock framework. Child clocks are tracked on a list under each parent and propagation happens there specifically rather than constantly iterating over the global clock list. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
a02cb230 |
|
11-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Add a followparent_recalc() helper. This adds a followparent_recalc() helper for clocks that just follow the parent's rate. Switch over the few CPUs that use this scheme for some of their clocks. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
b68d8201 |
|
11-May-2009 |
Paul Mundt <lethal@linux-sh.org> |
sh: clkfwk: Make recalc return an unsigned long. This is prep work for cleaning up some of the rate propagation bits. Trivial conversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
4f5ecaa0 |
|
08-May-2009 |
Magnus Damm <damm@igel.co.jp> |
sh: clock framework update, fix count and kill off kref This patch updates the clock framework use count code. With this patch the enable() and disable() callbacks only get called when counting from and to zero. While at it the kref stuff gets replaced with an int. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
b3cacf31 |
|
07-May-2009 |
Magnus Damm <damm@igel.co.jp> |
sh: call clock framework init() callback once Make sure that clk->ops->init() only gets called once in the case of CLK_ALWAYS_ENABLED. Without this patch the init() callback may be called multiple times. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
50cca715 |
|
13-Mar-2009 |
Francesco VIRLINZI <francesco.virlinzi@st.com> |
sh: clkfwk: Safer resume from hibernation. This patch fixes a possible problem in the resume from hibenration. It temporaneally saves the clk->rate on the stack to avoid any possible change during the clk->set_parent(..) call. Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
4a55026f |
|
11-Mar-2009 |
Francesco VIRLINZI <francesco.virlinzi@st.com> |
sh: clkfwk: Add resume from hibernation support. This patch adds PM support to the clock framework. With this, resume from hibernation is properly supported. Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
d680c76e |
|
11-Mar-2009 |
Francesco VIRLINZI <francesco.virlinzi@st.com> |
sh: clkfwk: add clk_set_parent/clk_get_parent This patch adds the clk_set_parent/clk_get_parent routines to the sh clock framework. Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
00e825c6 |
|
17-Nov-2008 |
Paul Mundt <lethal@linux-sh.org> |
sh: Fix clock framework compiler warnings. CC arch/sh/kernel/cpu/clock.o arch/sh/kernel/cpu/clock.c: In function 'clk_disable': arch/sh/kernel/cpu/clock.c:156: warning: 'return' with a value, in function returning void Introduced by ("sh: enable and disable clocks recursively"). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
d12cfac1 |
|
31-Oct-2008 |
Magnus Damm <damm@igel.co.jp> |
sh: enable and disable clocks recursively Recurse and make sure parent clocks get enabled/disabled. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
fa43972f |
|
04-Sep-2008 |
Paul Mundt <lethal@linux-sh.org> |
sh: fixup many sparse errors. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
152fe36e |
|
17-Jul-2008 |
Magnus Damm <damm@igel.co.jp> |
sh: Show all clocks and their state in /proc/clocks Show all clocks in /proc/clocks, and also show if they are enabled or disabled. This is useful to show MSTPCR bits on SuperH Mobile processors. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
4c1cfab1 |
|
17-Jun-2008 |
Adrian Bunk <bunk@kernel.org> |
sh/kernel/ cleanups This patch contains the following cleanups: - make the following needlessly global code static: - cf-enabler.c: cf_init() - cpu/clock.c: __clk_enable() - cpu/clock.c: __clk_disable() - process_32.c: default_idle() - time_32.c: struct clocksource_sh - timers/timer-tmu.c: struct tmu_timer_ops - remove the following unused functions (no CONFIG_BLK_DEV_FD on sh): - process_{32,64}.c: disable_hlt() - process_{32,64}.c: enable_hlt() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
24eb17e0 |
|
27-Sep-2007 |
Stuart Menefy <stuart.menefy@st.com> |
sh: clkfwk: Support multi-level clock propagation. Currently clock propagation only works for one level, but we have some clocks which need to propagate multiple levels, so make this recursive. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
f6991b04 |
|
19-Jul-2007 |
Paul Mundt <lethal@linux-sh.org> |
sh: Implement clk_round_rate() in the clock framework. This is an optional component of the clock framework. However, as we're going to be using this in the cpufreq drivers, add support for it to the framework. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
dfbbbe92 |
|
14-May-2007 |
dmitry pervushin <dimka@nomadgs.com> |
sh: Fix clock multiplier on SH7722. This fixes up the master clock multiplier and initial rate propagation for the SH7722 clocks. Signed-off-by: dmitry pervushin <dimka@nomadgs.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
db62e5bd |
|
25-Apr-2007 |
Paul Mundt <lethal@linux-sh.org> |
sh: Move clock reporting to its own proc entry. Previously this was done in cpuinfo, but with the number of clocks growing, it makes more sense to place this in a different proc entry. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
1929cb34 |
|
23-Apr-2007 |
dmitry pervushin <dimka@nomadgs.com> |
sh: SH7722 clock framework support. This adds support for the SH7722 (MobileR) to the clock framework. Signed-off-by: dmitry pervushin <dimka@nomadgs.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
1d118562 |
|
30-Nov-2006 |
Paul Mundt <lethal@linux-sh.org> |
sh: Clock framework tidying. This syncs up the SH clock framework with the linux/clk.h API, for which there were only some minor changes required, namely the clk_get() dev_id and subsequent callsites. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
237b98f6 |
|
27-Sep-2006 |
Paul Mundt <lethal@linux-sh.org> |
sh: sem2mutex conversion for clock framework. Simple sem2mutex conversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
e4c2cfee |
|
26-Sep-2006 |
Paul Mundt <lethal@linux-sh.org> |
sh: Various cosmetic cleanups. We had quite a bit of whitespace damage, clean most of it up.. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
#
134ed142 |
|
01-Feb-2006 |
Paul Mundt <lethal@linux-sh.org> |
[PATCH] sh: Make peripheral clock frequency setting mandatory Pretty much every subtype does this now anyways, and as we depend on it in a few places being set to something sensible quite early on, it's better for a new subtype to simply set a sensible default. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
#
36ddf31b |
|
16-Jan-2006 |
Paul Mundt <lethal@linux-sh.org> |
[PATCH] sh: Simplistic clock framework This adds a relatively simplistic clock framework for sh. The initial goal behind this is to clean up the arch/sh/kernel/time.c mess and to get the CPU subtype-specific frequency setting and calculation code moved somewhere more sensible. This only deals with the core clocks at the moment, though it's trivial for other drivers to define their own clocks as desired. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Cc: john stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|