aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4a/clock-sh7722.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-11sh: get rid of div6 clock namesMagnus Damm1-1/+1
Get rid of div6 clock names on sh7343/sh7366/sh7722/sh7723/sh7724 Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11sh: tie in div6 clocks using clkdevMagnus Damm1-3/+8
Use clkdev for div6 lookup on SH-Mobile processors: sh7343/sh7366/sh7722/sh7723/sh7724 Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11sh: get rid of hwblk clock namesMagnus Damm1-30/+25
Remove the clock name from sh7722/sh7723/sh7724 hwblk clocks. Lookup is handled by clkdev. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11sh: tie in hwblk clocks using clkdevMagnus Damm1-1/+24
Use clkdev for lookup of hwblk clocks on sh7722/sh7723/sh7724. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11sh: scif and tmu clkdev changesMagnus Damm1-3/+40
Modify sh7722/sh7723/sh7724 to use clkdev for TMU and SCIF clock lookups. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11sh: hwblk index reworkMagnus Damm1-2/+2
Rework the sh7722/sh7723/sh7724 hwblk code to use the hwblk id as index in the mstp clock array. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: sh7722 clock string death.Paul Mundt1-2/+2
Kills off clock string usage, using the new function clock definition instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-10serial: sh-sci: clkdev updates for MSTP gating.Paul Mundt1-3/+3
This fixes up some of the I/D/F clock ambiguity in the sh-sci driver. The interface clock in most cases just wraps back to the peripheral clock, while the function clock wraps in to the MSTP bits. As the logic was somewhat inverted, this cleans that up, and also enables all CPUs with SCI MSTP bits to match function clocks through clkdev lookup. As a result, this gets rid of the clk string abuse on the sh side, and the clock string will be killed off once the ARM code has had a chance to sync up. This also enables MSTP gating on CPUs like 7786 which had never wired it up before. Impacted CPUs are primarily all SH-Mobiles, SH7785, and SH7786. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-22sh: introduce struct clk_div4_tableMagnus Damm1-1/+5
This patch introduces struct clk_div4_table. The structure will be used to keep div4 specific data, and is with this patch replacing the struct clk_div_mult_table pointer arg used by the sh_clk_div4_register() functions. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-19sh: support SIU sourcing from external clock on sh7722Guennadi Liakhovetski1-4/+21
Implement .set_rate() for all SH "div4 clocks," .enable(), .disable(), and .set_parent() for those, that support them. This allows, among other uses, reparenting of SIU clocks to the external source, and enabling and disabling of the IrDA clock on sh7722. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-08-23sh: drop static UIO clocks for sh7722, sh7723 and sh7724Magnus Damm1-3/+3
The Runtime PM patch for UIO driver implements coarse grained dynamic power management for UIO devices. With that patch in place we can get rid of the static clock configuration. Which in turn makes it possible for cpuidle to enter deeper sleep. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-08-04sh: clean up MSTPCRn register definitionsMagnus Damm1-3/+0
This patch removes the unused MSTPCRn register definitions from the SuperH Mobile code for sh7722, sh7723 and sh7724. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-07-05sh: hwblk for sh7722Magnus Damm1-28/+32
This patch contains the sh7722 specific hwblk implementation. Hwblk ids are added to the processor specific header file, module stop bits and areas are kept track of as hwblks, clocks are converted to make use of the shared hwblk code. Code to determine allowed sleep modes is also added. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11sh: sh7722 clock framework rewriteMagnus Damm1-659/+137
This patch rewrites the sh7722 clock framework code. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. While at it, now when all SuperH Mobile processors are converted, fix CONFIG_SH_CLK_CPG_LEGACY to depend on CONFIG_ARCH_SHMOBILE. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11sh: sh7366 clock framework rewriteMagnus Damm1-41/+1
This patch rewrites the sh7366 clock framework code. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11sh: sh7343 clock framework rewriteMagnus Damm1-32/+1
This patch rewrites the sh7343 clock framework code. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11sh: sh7724 clock framework rewrite V3Magnus Damm1-80/+5
This patch contains V3 of the sh7724 clock framework rewrite. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and fll are supported as input clocks to the pll. The div6 clocks are fed through a divide-by-3 block. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11sh: sh7723 clock framework rewrite V2Magnus Damm1-56/+1
This patch contains V2 of the sh7723 clock framework rewrite. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-22sh: clkfwk: beyond ARRAY_SIZE of onchip_ops for sh7722.Roel Kluin1-1/+1
Do not go beyond ARRAY_SIZE of onchip_ops Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-22sh: clkfwk branch compile fix for clock-sh7722Magnus Damm1-1/+1
Fix clkfwk branch compile error in clock-sh7722.c. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-13sh: clkfwk: Rework legacy CPG clock handling.Paul Mundt1-0/+2
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>
2009-05-12sh: clkfwk: Kill off clk_recalc_rate().Paul Mundt1-1/+1
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>
2009-05-12sh: clkfwk: Fix up the clk_enable() error path.Paul Mundt1-5/+6
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>
2009-05-12sh: clkfwk: Convert SH-Mobile CPUs to use CLK_ENABLE_ON_INIT.Paul Mundt1-182/+183
Kill off all of the clk_always_enabled leftovers and use the new flag directly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-12sh: clkfwk: refactor rate propagation.Paul Mundt1-7/+1
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>
2009-05-12sh: clkfwk: Add a followparent_recalc() helper.Paul Mundt1-6/+1
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>
2009-05-12sh: clkfwk: Make recalc return an unsigned long.Paul Mundt1-18/+13
This is prep work for cleaning up some of the rate propagation bits. Trivial conversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16sh: Add support for SH7724 (SH-Mobile R2R) CPU subtype.Kuninori Morimoto1-12/+100
This implements initial support for the SH-Mobile R2R CPU. Based on Rev 0.11 of the initial SH7724 hardware manual. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: propagate r_clkMagnus Damm1-0/+2
Make sure the 32 KHz r_clk rate gets propagated correctly. Without this fix the clocks for RTC, CMT, KEYSC and RWDT are stuck at 0 Hz. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: remove old sh_mobile mstpc clocksMagnus Damm1-52/+0
Remove the old sh_mobile mstpcr clocks. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: sh_mobile mstpcr clocks for sh7366Magnus Damm1-0/+40
Add sh7366 mstpcr bits and information about their parent clocks. The datasheet is pretty clear about the clocks on this device. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: sh_mobile mstpcr clocks for sh7343Magnus Damm1-0/+24
Add sh7343 mstpcr bits and information about their parent clocks. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: sh_mobile mstpcr clocks for sh7723Magnus Damm1-0/+50
Add sh7723 mstpcr bits and information about their parent clocks. The datasheet is pretty clear about the clocks on this device. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: sh_mobile mstpcr clocks for sh7722Magnus Damm1-0/+25
Add sh7722 mstpcr bits and information about their parent clocks. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: new sh_mobile mstpcr clocks base codeMagnus Damm1-4/+41
Add base code to handle new mstpcr clocks. Make sure clock rates propagate. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: use arch_flags for sh_mobile mstpcr clock bitsMagnus Damm1-42/+30
Use arch_flags to keep track of register and flag number. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22sh: sh_mobile clock divider index fixMagnus Damm1-10/+10
Use divider index value instead of divider value. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-07-28sh: Merge sh7343 and sh7722 clock codeMagnus Damm1-30/+40
This code makes sh7343 share the sh7722 clock code. Instead of just using the good and very old sh7343 clock implmentation, switch to the new MSTPCR enabled clock code. SIU clocks are disabled on sh7343 for now. With this change all SuperH Mobile devices now use the same clock code. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-07-28sh: Add SuperH Mobile MSTPCR bits to clock frameworkMagnus Damm1-0/+116
Handle module stop clock bits in MSTPCRn through the clock framework. The clocks are named after the bits in the data sheet. The association between bit number and hardware block is processor specific. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-07-28sh: Use arch_flags to simplify sh7722 siu clock codeMagnus Damm1-38/+9
Make use of arch_flags to simplify the SIU clock code. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14sh: add support for sh7366 processorMagnus Damm1-1/+9
This patch adds sh7366 cpu supports. Just the most basic things like interrupt controller, clocks and serial port are included at this point. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: Support rate rounding for SH7722 FRQCR clocks.Paul Mundt1-0/+15
Now that the round_rate() op is supported, hook it up on SH7722 for the FRQCR (CPU, PCLK, etc.) clocks. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-21sh: Fix clock multiplier on SH7722.dmitry pervushin1-12/+22
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>
2007-05-07sh: SH7722 clock framework support.dmitry pervushin1-0/+600
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>