summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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-012-0/+70
| | | | | | | | | | | 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-012-0/+48
| | | | | | | | | | | 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: sh7785lcr mode pin configurationMagnus Damm2009-06-011-0/+22
| | | | | | | | | | | | This patch adds mode pin support to the sh7785lcr board. The harware allows the user to control the mode pins using dip switches S1 and S2, but from the software the pins are fixed to the factory default since we have no way to reading out this configuration from software. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: sh7785 mode pin definitionsMagnus Damm2009-06-011-0/+24
| | | | | | | | This patch adds sh7785 mode pin definitions. Mode pins and pin function controller comments are added as well. 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-014-0/+18
| | | | | | | | | | | | | | | | 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>
* sh: pci-sh7780: Fix up for PCI_DISABLE_MWI changes.Paul Mundt2009-05-271-6/+1
| | | | | | | | This fixes a build error where references to pci_cache_line_size are undefined, as this ceases to be exported when PCI_DISABLE_MWI is enabled, as is now the default. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'sh/clkfwk'Paul Mundt2009-05-2653-893/+1213
|\
| * sh: remove clk_ops->build_rate_table()Magnus Damm2009-05-262-3/+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-262-0/+93
| | | | | | | | | | | | | | | | | | 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-223-1/+7
| | | | | | | | | | | | | | | | | | | | | | 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-144-8/+80
| | | | | | | | | | | | | | 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-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-1323-103/+103
| | | | | | | | | | | | | | 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-222-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-22222-5814/+13690
|\ \ \