summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
Commit message (Collapse)AuthorAgeFilesLines
* sh: Tie sparseirq in to Kconfig.Paul Mundt2009-06-111-5/+2
| | | | | | | | | Now that the dependent patches are merged, we are ready to enable sparseirq support. This simply adds the Kconfig option, and then converts from the _cpu to the _node allocation routines to follow the upstream sparseirq API changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Wire up sys_rt_tgsigqueueinfo.Paul Mundt2009-06-112-0/+2
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix sys_pwritev() syscall table entry for sh32.Paul Mundt2009-06-111-1/+1
| | | | | | | | There was a typo here that had this as sys_writev() instead of sys_pwritev(), fix this up. sh64 got this right, as did the preadv() case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: sh7724: Add JPU supportKuninori Morimoto2009-06-111-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>
* sh: sh7724: INTC setting updateKuninori Morimoto2009-06-111-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>
* sh: sh7722 clock framework rewriteMagnus Damm2009-06-111-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>
* sh: sh7366 clock framework rewriteMagnus Damm2009-06-113-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>
* sh: sh7343 clock framework rewriteMagnus Damm2009-06-113-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>
* sh: sh7724 clock framework rewrite V3Magnus Damm2009-06-113-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>
* sh: sh7723 clock framework rewrite V2Magnus Damm2009-06-113-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>
* sh: add enable()/disable()/set_rate() to div6 codeMagnus Damm2009-06-112-0/+63
| | | | | | | | | | 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>
* sh: rework mode pin codeMagnus Damm2009-06-112-2/+2
| | | | | | | | | | | | | 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>
* sh: clock div6 helper codeMagnus Damm2009-06-111-6/+65
| | | | | | | | | | | | This patch adds div6 clock helper code. The div6 clocks are simply 6-bit divide-by-n modules where n is 1 to 64. Needed for vclk on sh7722, sh7723, sh7343 and sh7366. sh7724 needs this even more for vclk, fclka, fclkb, irdaclk and spuclk. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clock div4 frequency table offset fixMagnus Damm2009-06-111-2/+3
| | | | | | | | | This patch fixes the per clock offset calculation in sh_clk_div4_register(). Without this patch the offset to the frequency table for each clock is incorrect. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: sh7723: L2 cache initialization.Kuninori Morimoto2009-06-021-0/+10
| | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: sh7724: L2 cache initialization.Kuninori Morimoto2009-06-021-0/+9
| | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: add weak l2_cache_init function.Kuninori Morimoto2009-06-021-0/+7
| | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Tidy up SH-4A boot_cpu_data.flags probing.Paul Mundt2009-06-011-46/+15
| | | | | | | | | | | This tidies up the boot_cpu_data.flags probing on SH-4A. All of them have a few things in common, which we can blindly set, rather than having each subtype have to set the same flags. We can also make assumptions about cache ways and the validity of PTEA, so this also kills off CPU_HAS_PTEA as a config option. There was also a bug in the FPU probing, which is now tidied up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Tidy up the optional L2 probing, wire it up for SH7786.Paul Mundt2009-06-011-28/+33
| | | | | | | | | This tidies up the L2 probing, as it may or may not be implemented on a CPU, regardless of whether it is supported. This converts the cvr validity checks from BUG_ON()'s to simply clearing the CPU_HAS_L2_CACHE flag and moving on with life. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: hook up shared div4 clock code to sh7785Magnus Damm2009-06-011-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>
* sh: shared div4 clock codeMagnus Damm2009-06-011-0/+55
| | | | | | | | | | | Add shared code for 4-bit divisor clocks. Processor specific code can use SH_CLK_DIV4() to initialize div4 clocks, and then use sh_clk_div4_register() for registration. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: hook up shared mstp32 clock code to sh7785Magnus Damm2009-06-011-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>
* sh: shared mstp32 clock codeMagnus Damm2009-06-011-0/+35
| | | | | | | | | | | Add shared 32-bit module stop bit clock support. Processor specific code can use SH_CLK_MSTP32() to initialize module stop bit clocks, and then use sh_clk_mstp32() for registration. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: SH7724 has an L2 cache.Kuninori Morimoto2009-06-011-1/+1
| | | | | | | Add the CPU_HAS_L2_CACHE flag to SH7724. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: sh7785 pll configuration from mode pinMagnus Damm2009-06-011-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>
* sh: boot word / mode pin support V2Magnus Damm2009-06-012-0/+13
| | | | | | | | | | | | | | | | Add mode pin support for the SuperH architecture V2. With this patch applied the board code can add their own function to export the cpu mode pin configuration. In most cases this will be a constant bitmap, but boards that allow reading this from a register can instead read out the pin state from hardware. The code warns if a pin is tested but no board specific mode pin function has been provided. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'sh/clkfwk'Paul Mundt2009-05-2647-865/+1137
|\
| * sh: remove clk_ops->build_rate_table()Magnus Damm2009-05-261-2/+0
| | | | | | | | | | | | | | | | 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>
| * sh: use shared frequency tables on sh7785Magnus Damm2009-05-261-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>
| * sh: add shared clock framework frequency table codeMagnus Damm2009-05-261-0/+75
| | | | | | | | | | | | | | | | | | 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>
| * sh: add pll_clk to sh7785Magnus Damm2009-05-261-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>
| * sh: clkfwk: Make clock-cpg usable for non-legacy platforms.Paul Mundt2009-05-222-1/+3
| | | | | | | | | | | | | | | | | | | | | | This adds a new SH_CLK_CPG for parts that have CPG support. SH_CLK_CPG_LEGACY is made to depend on this, and still needs to be set for platforms that want clock-cpg to register the legacy clocks. With this new config item in place, it is now possible to start layering more generic CPG code in place while other platforms transition off of the legacy clocks. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: clkfwk: beyond ARRAY_SIZE of onchip_ops for sh7722.Roel Kluin2009-05-221-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>
| * sh: clkfwk branch compile fix for clock-sh7722Magnus Damm2009-05-221-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>
| * sh: clkfwk: Add MSTP bits to SH7785 clock framework.Paul Mundt2009-05-143-8/+77
| | | | | | | | | | | | | | 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>
| * sh: clkfwk: Map tree hierarchy in debugfs.Paul Mundt2009-05-131-26/+84
| | | | | | | | | | | | | | | | 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>
| * sh: clkfwk: rate table construction and rounding for SH7785.Paul Mundt2009-05-132-13/+99
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * sh: clkfwk: Update SH7785 for refactored clock framework.Paul Mundt2009-05-131-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>
| * sh: clkfwk: Rework legacy CPG clock handling.Paul Mundt2009-05-1310-62/+101
| | | | | | | | | | | | | | | | | | 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>
| * sh: clkfwk: Provide a generic clk_set_rate_ex() path for root clocks.Paul Mundt2009-05-131-9/+16
| | | | | | | | | | | | | | | | | | | | 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>
| * sh: clkfwk: Handle NULL clkops for root clocks.Paul Mundt2009-05-131-3/+3
| | | | | | | | | | | | | | | | 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>
| * sh: clkfwk: module_clk -> peripheral_clk rename.Paul Mundt2009-05-1320-96/+96
| | | | | | | | | | | | | | 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>
| * Merge branch 'master' into sh/clkfwkPaul Mundt2009-05-1217-382/+1656
| |\
| * | sh: clkfwk: Use arch_clk_init() for on-chip clock registration.Paul Mundt2009-05-127-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | sh: clkfwk: Handle clk_get_sys() returning an ERR_PTR.Paul Mundt2009-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
| * | sh: clkfwk: Wire up clk_get_sys() support.Paul Mundt2009-05-121-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | sh: clkfwk: Kill off clk_recalc_rate().Paul Mundt2009-05-122-15/+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>
| * | sh: clkfwk: Tidy up on-chip clock registration and rate propagation.Paul Mundt2009-05-126-79/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | sh: clkfwk: Improve the generic clk_set_parent() implementation.Paul Mundt2009-05-121-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | sh: clkfwk: Fix up the clk_enable() error path.Paul Mundt2009-05-122-30/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud