sh: clkfwk: Move to common clk_div_table accessors for div4/div6.

This plugs in a generic clk_div_table, based on the div4 version. div6 is
then adopted to use it for encapsulating its div table, which permits us
to start div6/4 unification, as well as preparation for other div types.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: clkfwk: Introduce a div_mask for variable div types.

This plugs in a div_mask for the clock and sets it up for the existing
div6/4 cases. This will make it possible to support other div types, as
well as share more div6/4 infrastructure.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: clkfwk: Use shared sh_clk_div_recalc().

This generalizes the div4 recalc routine for use by div6 and others, then
makes it the default.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: clkfwk: Use shared sh_clk_div_set_rate()

Follows the sh_clk_div_recalc() change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: clkfwk: Use shared sh_clk_div_enable/disable().

This introduces a new flag for clocks that need to have their divisor
ratio set back to their initial mask at disable time to prevent
interactivity problems with the clock stop bit (presently div6 only).
With this in place it's possible to handle the corner case on top of the
div4 op without any particular need for leaving things split out.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: clkfwk: Consolidate div6/div4 clk_ops definitions.

Everything with the exception of the _reparent ops are now shared, so
switch everything over to common types.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: clkfwk: Consolidate div clk registration helper.

This consolidates the div6/4 versions of the clk registration wrapper.
The existing wrappers with their own sh_clk_ops are maintained for API
compatability, though in the future it should be possible to be rid of
them entirely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh64: Use generic unaligned access control/counters.

This switches over from the special-casing that sh64 had and to the model
that's being employed for sh32.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh64: Kill off old exception debugging helpers.

There's not much here that we can't get at through alternate means (aside
from the TLB contents, but that doesn't belong here anyways). Most of
this information is already provided by the sh32 routines, which we'll
consolidate on next.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: Consolidate die definitions for trap handlers.

This kills off the _64 versions and consolidates on the more robust _32
versions instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh64: Attempt to make reserved insn trap handler resemble C.

This has been long overdue. No functional changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh64: Fix up section mismatch warnings.

WARNING: vmlinux.o(.cpuinit.text+0x280): Section mismatch in reference from the function cpu_probe() to the function .init.text:sh64_tlb_init()
The function __cpuinit cpu_probe() references
a function __init sh64_tlb_init().
If sh64_tlb_init is only used by cpu_probe then
annotate sh64_tlb_init with a matching annotation.

sh64_tlb_init() simply needs to be __cpuinit annotated, so fix that up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Merge branch 'sh/clkfwk' into sh-latest