summaryrefslogtreecommitdiff
path: root/arch/sh/kernel/cpu/clock.c
Commit message (Collapse)AuthorAgeFilesLines
* sh: clkfwk: Safer resume from hibernation.Francesco VIRLINZI2009-03-161-1/+3
| | | | | | | | | | 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>
* sh: clkfwk: Add resume from hibernation support.Francesco VIRLINZI2009-03-111-0/+64
| | | | | | | | 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>
* sh: clkfwk: add clk_set_parent/clk_get_parentFrancesco VIRLINZI2009-03-111-0/+29
| | | | | | | | 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>
* sh: Fix clock framework compiler warnings.Paul Mundt2008-12-221-1/+1
| | | | | | | | | | 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>
* sh: enable and disable clocks recursivelyMagnus Damm2008-12-221-0/+10
| | | | | | | 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>
* sh: fixup many sparse errors.Paul Mundt2008-09-081-2/+3
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Show all clocks and their state in /proc/clocksMagnus Damm2008-07-281-9/+5
| | | | | | | | 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>
* sh/kernel/ cleanupsAdrian Bunk2008-07-281-4/+2
| | | | | | | | | | | | | | | | | 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>
* sh: clkfwk: Support multi-level clock propagation.Stuart Menefy2007-09-281-0/+2
| | | | | | | | 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>
* sh: Implement clk_round_rate() in the clock framework.Paul Mundt2007-07-201-0/+16
| | | | | | | | 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>
* sh: Fix clock multiplier on SH7722.dmitry pervushin2007-05-211-0/+7
| | | | | | | | 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>
* sh: Move clock reporting to its own proc entry.Paul Mundt2007-05-071-31/+45
| | | | | | | 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>
* sh: SH7722 clock framework support.dmitry pervushin2007-05-071-4/+24
| | | | | | | 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>
* sh: Clock framework tidying.Paul Mundt2006-12-061-2/+25
| | | | | | | | 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>
* sh: sem2mutex conversion for clock framework.Paul Mundt2006-09-271-8/+9
| | | | | | Simple sem2mutex conversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Various cosmetic cleanups.Paul Mundt2006-09-271-1/+1
| | | | | | | | 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>
* [PATCH] sh: Make peripheral clock frequency setting mandatoryPaul Mundt2006-02-011-12/+1
| | | | | | | | | | 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>
* [PATCH] sh: Simplistic clock frameworkPaul Mundt2006-01-161-0/+287
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>