aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4a (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-07-23usb: m66592-udc platform data on_chip supportMagnus Damm1-1/+7
Convert the m66592-udc driver to use the on_chip flag from platform data to enable on chip behaviour instead of relying on CONFIG_SUPERH_BUILT_IN_M66592 ugliness. This makes the code cleaner and also allows us to support both external and internal m66592 with the same kernel. It also makes the Kconfig part more future proof since we with this patch can add support for new processors with on-chip m66592 without modifying the Kconfig. The patch adds a m66592 header file for platform data and ties in platform data to the existing m66592 devices. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-07-20Merge branches 'sh/hwblk' and 'sh/platform-updates'Paul Mundt6-57/+180
2009-07-20usb: r8a66597-hcd platform data on_chip supportMagnus Damm2-2/+2
Convert the r8a66597-hcd driver to use the on_chip flag from platform data to enable on chip behaviour instead of relying on CONFIG_SUPERH_ON_CHIP_R8A66597 ugliness. This makes the code cleaner and also allows us to support both external and internal r8a66597 with the same kernel. It also makes the Kconfig part more future proof since we with this patch can add support for new processors with on-chip r8a66597 without modifying the Kconfig. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-07-20sh: hwblk support for sh7723Magnus Damm3-53/+176
This patch adds hwblk support for the sh7723 processor. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-07-20sh: Add support for multiple hwblk countersMagnus Damm1-2/+2
Extend the SuperH hwblk code to support more than one counter. Contains ground work for the future Runtime PM implementation. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-07-05sh: hwblk for sh7722Magnus Damm3-29/+139
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-23sh: SH7786 SMP support.Paul Mundt2-23/+12
SH7786 is roughly identical to SH-X3 proto SMP, though there are only 2 CPUs. This just wraps in to the existing SH-X3 SMP code with some minor changes for SH7786, including wiring up the IPIs properly, enabling IRQ_PER_CPU, and so forth. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-17Merge branches 'sh/pci-express-integration', 'sh/rsk-updates', 'sh/platform-updates' and 'sh/perf_counter'Paul Mundt2-5/+14
2009-06-17sh: add platform data for r8a66597-hcd in setup-sh7723Yoshihiro Shimoda1-2/+7
and remove redundant parameter for r8a66597-hcd. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-17sh: add platform data for r8a66597-hcd in setup-sh7366Yoshihiro Shimoda1-3/+7
and remove redundant parameter for r8a66597-hcd. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-14cpumask: Use accessors for cpu_*_mask: shRusty Russell1-3/+2
Use the accessors rather than frobbing bits directly (the new versions are const). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11sh: sh7724: Add JPU supportKuninori Morimoto1-0/+31
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Acked-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11sh: sh7724: INTC setting updateKuninori Morimoto1-89/+82
This patch follows Rev 0.50 manual Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> 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 Damm3-42/+213
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 Damm3-33/+213
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 Damm3-81/+248
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 Damm3-57/+224
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-06-11sh: rework mode pin codeMagnus Damm1-1/+1
This patch reworks the mode pin code to keep the pin definitions in one place. The mode pins values are now the value of the bit instead of bit number. With this patch in place the sh7785 header file contains mode pin comments. The sh7785 clock code and the sh7785lcr board code are updated to reflect the new shared mode pins. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-02sh: sh7723: L2 cache initialization.Kuninori Morimoto1-0/+10
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-02sh: sh7724: L2 cache initialization.Kuninori Morimoto1-0/+9
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-01sh: hook up shared div4 clock code to sh7785Magnus Damm1-159/+48
Hook up the shared 4-bit divisor clock code to sh7785. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-01sh: hook up shared mstp32 clock code to sh7785Magnus Damm1-55/+25
Hook up the shared 32-bit module stop bit code to sh7785. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-01sh: sh7785 pll configuration from mode pinMagnus Damm1-6/+6
This patch modifies the sh7785 clock code to use the MODE4 value to switch between 72x and 36x PLL multiplication. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-26Merge branch 'sh/clkfwk'Paul Mundt18-509/+544
2009-05-26sh: use shared frequency tables on sh7785Magnus Damm1-65/+12
This patch converts the sh7785 clock code to make use of clk_rate_table_build() and clk_rate_table_round(). The ->build_rate_table() callback is removed, the table building is instead handled in ->recalc(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-26sh: add pll_clk to sh7785Magnus Damm1-15/+33
This patch converts the sh7785 pll implementation from the all-in-one code in frqmr_recalc() and frqmr_build_rate_table() to a separate struct clk. This allows us to remove the processor specific multiplier and use generic rate table functions. 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-14sh: intc tables for sh7770Magnus Damm1-0/+246
This patch adds INTC tables for sh7770, thanks goes to Paul for the first prototype version. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-14sh: clkfwk: Add MSTP bits to SH7785 clock framework.Paul Mundt2-6/+75
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>
2009-05-13sh: clkfwk: rate table construction and rounding for SH7785.Paul Mundt1-13/+96
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>
2009-05-13sh: clkfwk: Update SH7785 for refactored clock framework.Paul Mundt1-101/+102
This updates the SH7785 CPU code as well as the SH7785LCR board support code for making use of the newly refactored clock framework. Support for the legacy CPG clocks is dropped at this point, with the extal frequency fed in from the board code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-13sh: clkfwk: Rework legacy CPG clock handling.Paul Mundt6-5/+22
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-13sh: clkfwk: module_clk -> peripheral_clk rename.Paul Mundt6-45/+45
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>
2009-05-12Merge branch 'master' into sh/clkfwkPaul Mundt5-0/+895
2009-05-12sh: TMU platform data for sh7724Magnus Damm1-0/+195
This patch adds TMU platform data for sh7724. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-12sh: TMU platform data for sh7366Magnus Damm1-0/+98
This patch adds TMU platform data for sh7366. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-12sh: TMU platform data for sh7343Magnus Damm1-0/+98
This patch adds TMU platform data for sh7343. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-12sh: TMU platform data for sh7770Magnus Damm1-0/+300
This patch adds TMU platform data for sh7770. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-12sh: TMU platform data for sh7763Magnus Damm1-0/+204
This patch adds TMU platform data for sh7763. Both clockevent and clocksource support is enabled. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-12sh: clkfwk: Use arch_clk_init() for on-chip clock registration.Paul Mundt5-10/+5
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>
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: Tidy up on-chip clock registration and rate propagation.Paul Mundt5-64/+15
This tidies up the set_rate hack that the on-chip clocks were abusing to trigger rate propagation, which is now handled generically. Additionally, now that CLK_ENABLE_ON_INIT is wired up where it needs to be for these clocks, the clk_enable() can go away. In some cases this was bumping up the refcount higher than it should have been. 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 Mundt6-209/+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: Consolidate the ALWAYS_ENABLED / NEEDS_INIT mess.Paul Mundt5-8/+8
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>
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 Mundt2-12/+2
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 Mundt7-70/+65
This is prep work for cleaning up some of the rate propagation bits. Trivial conversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>