aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
Commit message (Collapse)AuthorAgeFilesLines
...
| * | sh: clkfwk: Map tree hierarchy in debugfs.Paul Mundt2009-05-132-26/+85
| | | | | | | | | | | | | | | | | | | | | | | | 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-133-13/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-134-104/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1313-63/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1222-557/+2359
| |\ \
| * | | 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-122-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-123-16/+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-122-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-123-31/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | sh: clkfwk: Convert SH-Mobile CPUs to use CLK_ENABLE_ON_INIT.Paul Mundt2009-05-127-225/+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>
| * | | sh: clkfwk: Consolidate the ALWAYS_ENABLED / NEEDS_INIT mess.Paul Mundt2009-05-128-75/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | sh: clkfwk: refactor rate propagation.Paul Mundt2009-05-123-52/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | sh: clkfwk: Add a followparent_recalc() helper.Paul Mundt2009-05-126-25/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | sh: clkfwk: Make recalc return an unsigned long.Paul Mundt2009-05-1223-175/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is prep work for cleaning up some of the rate propagation bits. Trivial conversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: pci: Disable MWI and make pci_dma_burst_advice() a bit more accurate.Paul Mundt2009-05-261-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of the SH PCI controllers support MWI, it is always treated as a direct memory write, so simply disable it outright. In the case of the PCI cache line size, consult that for the pci_dma_burst_advice() strategy, and switch over to PCI_DMA_BURST_MULTIPLE, as PPC64. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: pci-sh7751: Initialize io_map_base in controller definition.Paul Mundt2009-05-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As there is only a single controller and remapping has no impact for the address range in question, just initialize it directly in the controller definition. This fixes up boot time warnings about not having the field initialized. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: Add a KBUILD_DEFCONFIG for sh64.Paul Mundt2009-05-261-9/+10
| | | | | | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: Record ms7724se in mach-types.Paul Mundt2009-05-261-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: Add ms7724se (SH7724) board supportKuninori Morimoto2009-05-267-0/+2226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds preliminary support for the ms7724se solution engine board. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: irq: Fix up imask build warnings.Paul Mundt2009-05-261-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: Prefer slab_is_available() over after_bootmem.Paul Mundt2009-05-222-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This kills off after_bootmem and switches to using slab_is_available() instead. Presently the only place this is used is by the sh64 ioremap, and there's not much point in keeping the reference around otherwise. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: Add a NR_IRQS_LEGACY for external IRQ0-7.Paul Mundt2009-05-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This adds a NR_IRQS_LEGACY definition, which will be used by sparse irq. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: Wrap irq_to_desc_alloc_cpu() around CONFIG_SPARSE_IRQ temporarily.Paul Mundt2009-05-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | irq_to_desc_alloc_cpu() has been renamed to irq_to_desc_alloc_node() in -next, but as we can not presently enable SPARSE_IRQ without the early irq_desc alloc patch, protect it with an ifdef until the interface has settled and we are ready to enable it system-wide. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | Merge branches 'sh/stable-updates' and 'sh/sparseirq'Paul Mundt2009-05-22204-5538/+12434
|\ \ \ \ | |_|_|/ |/| | |
| * | | sh: irq: Provide an arch_probe_nr_irqs() that wraps the machvec def.Paul Mundt2009-05-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is just a simple arch_probe_nr_irqs() stub that wraps to the platform defined number of IRQs. This can be made gradually more intelligent based on what we can infer from the INTC tables and so on. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: irq: Teach ipr and intc about dynamically allocating irq_descs.Paul Mundt2009-05-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hooks in irq_to_desc_alloc_cpu() to the necessary code paths in the intc and ipr controller registration paths. As these are the primary call paths for all SH CPUs, this alone will make all CPUs sparse IRQ ready. There is the added benefit now that each CPU contains specific IPR and INTC tables, so only the vectors with interrupt sources backing them will ever see an irq_desc instantiation. This effectively packs irq_desc down to match the CPU, rather than padding NR_IRQS out to cover the valid vector range. Boards with extra sources will still have to fiddle with the nr_irqs setting, but they can continue doing so through the machvec as before. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: irq: Convert from irq_desc[] to irq_to_desc().Paul Mundt2009-05-223-39/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts a few places that were using the old irq_desc[] array over to the shiny new irq_to_desc() helper. Preperatory work for sparse irq support. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: irq: Rework the SR.IMASK bitmap handling.Paul Mundt2009-05-221-48/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tidies up how the SR.IMASK bitmap is managed, using the bitmap API directly instead. At the same time, tidy up the irq_chip conversion a bit. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: mach-hp6xx: Fix up the hp6xx build for hd64461 changes.Paul Mundt2009-05-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes several compile errors due to the recent hd64461 I/O base changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: hd64461: Fix up I/O base register offsets.Paul Mundt2009-05-152-77/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hd64461 is mapped in a fixed location, so the I/O base itself is fairly meaningless as a configuration item. Additionally, this makes it impossible to share hd64461 code alongside generic drivers (in the case of sh_dac_audio), so simply make it commonly defined and permit the mach_is_foo() logic to work out the proper semantics. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: intc tables for sh7770Magnus Damm2009-05-141-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>
| * | | sh: Provide FORCE_MAX_ZONEORDER.Paul Mundt2009-05-141-0/+23
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Several platforms want to be able to do large physically contiguous allocations (primarily nommu and video codecs on SH-Mobile), provide a MAX_ORDER override for those cases. Tested-by: Conrad Parker <conrad@metadecks.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Kill off the remnants of the old timer code.Paul Mundt2009-05-128-120/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | sh: remove old TMU driverMagnus Damm2009-05-127-438/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the old TMU driver (CONFIG_SH_TMU/timer-tmu.c) As replacement, select the sh_tmu driver with CONFIG_SH_TIMER_TMU and configure timer channel using platform data. If multiple TMU channels are enabled using platform data, use the earlytimer parameter on the kernel command line to select channel. For instance, use "earlytimer=sh_tmu.0" to select the first channel. To verify which timer is being used, look at printouts or the timer irq count in /proc/interrupts. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: CMT platform data for sh7720/sh7721Magnus Damm2009-05-122-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds CMT platform data for sh7720 and sh7721. All 5 32-bit CMT channels unfortunately share a single IRQ. 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>
| * | sh: TMU platform data for sh7720/sh7721Magnus Damm2009-05-121-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds TMU platform data for sh7720 and sh7721. 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>
| * | sh: TMU platform data for sh7710/sh7712Magnus Damm2009-05-121-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds TMU platform data for sh7710 and sh7712. 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>
| * | sh: TMU platform data for sh7706/sh7707/sh7708/sh7709Magnus Damm2009-05-121-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | Add TMU platform data for sh7706/sh7707/sh7708/sh7709. 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>
| * | sh: TMU platform data for sh7705Magnus Damm2009-05-121-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds TMU platform data for sh7705. 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>
| * | sh: TMU platform data for sh7724Magnus Damm2009-05-121-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>
| * | sh: TMU platform data for sh7366Magnus Damm2009-05-121-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>
| * | sh: TMU platform data for sh7343Magnus Damm2009-05-121-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>
| * | sh: add sh4-202 INTC tablesMagnus Damm2009-05-121-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds INTC tables for sh4-202 with support for HUDI, TMU0, TMU1, TMU2, RTC, SCIF and WDT. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: TMU platform data for sh4-202Magnus Damm2009-05-121-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds TMU platform data for sh4-202. 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>