Commit Graph

2011 Commits (68a1750b46ad5177f7703081b5fe85624f1aa62b)

Author SHA1 Message Date
Kuninori Morimoto c5eeff1f8e sh: sh7724: INTC setting update
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-11 09:17:12 +03:00
Magnus Damm 46e9371c0e sh: sh7722 clock framework rewrite
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-11 09:15:15 +03:00
Magnus Damm 4ed3739484 sh: sh7366 clock framework rewrite
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-11 09:15:07 +03:00
Magnus Damm bc49b6eaac sh: sh7343 clock framework rewrite
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-11 09:14:34 +03:00
Magnus Damm b621370a35 sh: sh7724 clock framework rewrite V3
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-11 09:14:28 +03:00
Magnus Damm c521dc0203 sh: sh7723 clock framework rewrite V2
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-11 09:13:36 +03:00
Magnus Damm 098dee99d1 sh: add enable()/disable()/set_rate() to div6 code
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>
2009-06-11 09:12:58 +03:00
Magnus Damm c01641b42a sh: add AP325RXA mode pin configuration
This patch adds mode pin configuration to ap325rxa.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11 09:09:33 +03:00
Magnus Damm 0ec80fddf1 sh: add Migo-R mode pin configuration
This patch adds mode pin configuration and
a machvec structure to Migo-R.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11 09:09:27 +03:00
Magnus Damm ed740cb9b7 sh: sh7722 mode pin definitions
This patch adds sh7722 mode pin and pin function
controller comments.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11 09:09:19 +03:00
Magnus Damm 36e5b26bda sh: sh7724 mode pin comments
This patch adds comments for the sh7724 mode pins
and pin function controller.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11 09:09:12 +03:00
Magnus Damm e4218ef506 sh: sh7723 mode pin V2
This patch is sh7723 mode pin V2. Mode pins and
pin function controller comments are added.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-11 09:09:01 +03:00
Magnus Damm 0d4fdbb64f sh: rework mode pin code
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-11 09:08:53 +03:00
Magnus Damm 2693e2740d sh: clock div6 helper code
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>
2009-06-11 09:07:13 +03:00
Magnus Damm a50de78dc6 sh: clock div4 frequency table offset fix
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>
2009-06-11 09:07:04 +03:00
Paul Mundt cf9fe114e3 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-11 09:01:14 +03:00
Paul Mundt c1d0d32a60 sh: plug vsyscall dir in to archclean.
The vsyscall targets are presently not cleaned up, so just handle it in
the archclean rule.

Reported-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-10 09:48:33 +03:00
Magnus Damm 48c72fccbf sh: 16-bit get_unaligned() sh4a fix
This patch fixes the 16-bit case of the sh4a specific
unaligned access implementation. Without this patch
the 16-bit version of sh4a get_unaligned() results in
a 32-bit read which may read more data than intended
and/or cross page boundaries.

Unbreaks mtd NOR write handling on Migo-R.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-04 20:20:24 +09:00
Kuninori Morimoto 138f025267 sh: sh7723: L2 cache initialization.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-02 12:12:59 +09:00
Kuninori Morimoto b4bd9eb0d8 sh: sh7724: L2 cache initialization.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-02 12:12:57 +09:00
Kuninori Morimoto fab88d9fe9 sh: add weak l2_cache_init function.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-02 12:12:55 +09:00
Kuninori Morimoto d974ac24b7 sh: add RAMCR definition for sh4
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-02 12:12:53 +09:00
Kuninori Morimoto 4778541470 sh: fix CONFIG_SH_PCLK_FREQ bug for sh7724
CONFIG_SH_PCLK_FREQ=33333333 is correct for sh7724.
sh7724 master clock is 33333333, but peripheral is 41666666.
This bug came to light because sh-sci driver had changed clk
from "module_clk" to "peripheral_clk"

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-02 12:08:52 +09:00
Paul Mundt 0bf8513ed0 sh: Tidy up SH-4A boot_cpu_data.flags probing.
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>
2009-06-01 19:50:08 +09:00
Paul Mundt 7863d3f7ae sh: Tidy up the optional L2 probing, wire it up for SH7786.
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>
2009-06-01 19:38:41 +09:00
Magnus Damm 43909a9380 sh: hook up shared div4 clock code to sh7785
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-01 18:07:50 +09:00
Magnus Damm a1153e27ee sh: shared div4 clock code
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>
2009-06-01 18:07:37 +09:00
Magnus Damm e89d53e605 sh: hook up shared mstp32 clock code to sh7785
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-01 18:06:36 +09:00
Magnus Damm 6881e8bf3d sh: shared mstp32 clock code
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>
2009-06-01 18:05:37 +09:00
Kuninori Morimoto 98fbe45bea sh: SH7724 has an L2 cache.
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>
2009-06-01 15:59:03 +09:00
Magnus Damm 1823f6d5e6 sh: sh7785 pll configuration from mode pin
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-06-01 15:57:12 +09:00
Magnus Damm 63d12e2323 sh: sh7785lcr mode pin configuration
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>
2009-06-01 15:56:59 +09:00
Magnus Damm 4a44b32969 sh: sh7785 mode pin definitions
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>
2009-06-01 15:56:00 +09:00
Magnus Damm eb9b9b56ee sh: boot word / mode pin support V2
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>
2009-06-01 15:44:49 +09:00
Oskar Schirmer c3dc5bec05 flat: fix data sections alignment
The flat loader uses an architecture's flat_stack_align() to align the
stack but assumes word-alignment is enough for the data sections.

However, on the Xtensa S6000 we have registers up to 128bit width
which can be used from userspace and therefor need userspace stack and
data-section alignment of at least this size.

This patch drops flat_stack_align() and uses the same alignment that
is required for slab caches, ARCH_SLAB_MINALIGN, or wordsize if it's
not defined by the architecture.

It also fixes m32r which was obviously kaput, aligning an
uninitialized stack entry instead of the stack pointer.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Oskar Schirmer <os@emlix.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Johannes Weiner <jw@emlix.com>
Acked-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-29 08:40:02 -07:00
Paul Mundt 5582b0648d sh: pci-sh7780: Fix up for PCI_DISABLE_MWI changes.
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>
2009-05-27 00:12:58 +09:00
Paul Mundt 464c9e1037 Merge branch 'sh/clkfwk' 2009-05-26 23:50:40 +09:00
Paul Mundt b7e2ac6194 sh: pci: Disable MWI and make pci_dma_burst_advice() a bit more accurate.
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>
2009-05-26 23:13:13 +09:00
Paul Mundt d076d2bd0d sh: pci-sh7751: Initialize io_map_base in controller definition.
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>
2009-05-26 23:10:15 +09:00
Paul Mundt f9e2b97dc2 sh: Add a KBUILD_DEFCONFIG for sh64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-26 17:12:20 +09:00
Magnus Damm 61ce5393e4 sh: remove clk_ops->build_rate_table()
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>
2009-05-26 17:08:45 +09:00
Magnus Damm df109e630f sh: use shared frequency tables on sh7785
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-26 17:08:42 +09:00
Magnus Damm c94a85746f sh: add shared clock framework frequency table code
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>
2009-05-26 17:08:39 +09:00
Magnus Damm c9904dd159 sh: add pll_clk to sh7785
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-26 17:08:36 +09:00
Paul Mundt 5b25ab29ba sh: Record ms7724se in mach-types.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-26 17:02:18 +09:00
Kuninori Morimoto 287c129716 sh: Add ms7724se (SH7724) board support
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>
2009-05-26 17:01:47 +09:00
Paul Mundt 3709ab8dfa sh: irq: Fix up imask build warnings.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-26 13:52:28 +09:00
Paul Mundt 8fc40238b4 sh: Prefer slab_is_available() over after_bootmem.
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>
2009-05-22 14:21:03 +09:00
Paul Mundt 36aa1e32f4 sh: clkfwk: Make clock-cpg usable for non-legacy platforms.
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>
2009-05-22 14:00:34 +09:00
Paul Mundt 62fad39be0 sh: Add a NR_IRQS_LEGACY for external IRQ0-7.
This adds a NR_IRQS_LEGACY definition, which will be used by sparse irq.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-22 13:50:18 +09:00
Paul Mundt 2f3ed17e01 sh: Wrap irq_to_desc_alloc_cpu() around CONFIG_SPARSE_IRQ temporarily.
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>
2009-05-22 13:47:52 +09:00
Paul Mundt 5f8371cec9 Merge branches 'sh/stable-updates' and 'sh/sparseirq' 2009-05-22 13:29:37 +09:00
Magnus Damm 37869fa2da sh: ap325 camera without i2c driver fix
This patch fixes the ap325rxa ncm03j camera code to handle
the case where no i2c driver is present. Without this fix
i2c_transfer() may be passed NULL as adapter which results
in a crash.

Triggered when i2c-sh_mobile.c failed to probe() due to
missing MSTP clocks.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-22 13:19:11 +09:00
Roel Kluin 7fc1e5c15f sh: clkfwk: beyond ARRAY_SIZE of onchip_ops for sh7722.
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-22 12:58:02 +09:00
Magnus Damm 30cff215b5 sh: clkfwk branch compile fix for clock-sh7722
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-22 02:57:11 +09:00
Paul Mundt d8586ba6e1 sh: irq: Provide an arch_probe_nr_irqs() that wraps the machvec def.
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>
2009-05-22 01:36:13 +09:00
Paul Mundt 05ff3004d2 sh: irq: Teach ipr and intc about dynamically allocating irq_descs.
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>
2009-05-22 01:28:33 +09:00
Paul Mundt fa1d43ab45 sh: irq: Convert from irq_desc[] to irq_to_desc().
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>
2009-05-22 01:26:16 +09:00
Paul Mundt 55620c86eb sh: irq: Rework the SR.IMASK bitmap handling.
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>
2009-05-22 01:16:17 +09:00
Paul Mundt 62669e61a5 sh: mach-hp6xx: Fix up the hp6xx build for hd64461 changes.
Fixes several compile errors due to the recent hd64461 I/O base changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-20 11:27:13 +09:00
Paul Mundt bec36eca6f sh: hd64461: Fix up I/O base register offsets.
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>
2009-05-15 12:03:04 +09:00
Magnus Damm 9304d0ccf1 sh: intc tables for sh7770
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-14 17:42:31 +09:00
Paul Mundt ad3256e361 sh: Provide FORCE_MAX_ZONEORDER.
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>
2009-05-14 17:40:08 +09:00
Paul Mundt 549b5e358d sh: clkfwk: Add MSTP bits to SH7785 clock framework.
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-14 17:38:46 +09:00
Paul Mundt cedcf3366f sh: clkfwk: Map tree hierarchy in debugfs.
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>
2009-05-13 21:51:28 +09:00
Paul Mundt cc96eace48 sh: clkfwk: rate table construction and rounding for SH7785.
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-13 20:28:15 +09:00
Paul Mundt a77b5ac0ea sh: clkfwk: Update SH7785 for refactored clock framework.
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-13 17:55:00 +09:00
Paul Mundt 253b0887b3 sh: clkfwk: Rework legacy CPG clock handling.
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-13 17:38:11 +09:00
Paul Mundt 100890c55e sh: clkfwk: Provide a generic clk_set_rate_ex() path for root clocks.
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>
2009-05-13 17:05:51 +09:00
Paul Mundt d672fef027 sh: clkfwk: Handle NULL clkops for root clocks.
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>
2009-05-13 17:03:09 +09:00
Paul Mundt af777ce42d sh: clkfwk: module_clk -> peripheral_clk rename.
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-13 16:59:40 +09:00
Paul Mundt fd5b12458b Merge branch 'master' into sh/clkfwk 2009-05-12 19:54:36 +09:00
Paul Mundt 8be5f1a68f sh: Kill off the remnants of the old timer code.
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>
2009-05-12 19:53:55 +09:00
Magnus Damm f19900b2e6 sh: remove old TMU driver
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>
2009-05-12 19:53:14 +09:00
Magnus Damm 2b23a8826a sh: CMT platform data for sh7720/sh7721
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>
2009-05-12 19:53:09 +09:00
Magnus Damm 4a1a5a2f60 sh: TMU platform data for sh7720/sh7721
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>
2009-05-12 19:53:01 +09:00
Magnus Damm e5ad00896a sh: TMU platform data for sh7710/sh7712
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>
2009-05-12 19:52:52 +09:00
Magnus Damm c8a9011bce sh: TMU platform data for sh7706/sh7707/sh7708/sh7709
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>
2009-05-12 19:52:45 +09:00
Magnus Damm acd664ab54 sh: TMU platform data for sh7705
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>
2009-05-12 19:52:39 +09:00
Magnus Damm 6a3501b63d sh: TMU platform data for sh7724
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-12 19:37:52 +09:00
Magnus Damm f2710ebcd0 sh: TMU platform data for sh7366
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-12 19:37:39 +09:00
Magnus Damm e37677a429 sh: TMU platform data for sh7343
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-12 19:37:33 +09:00
Magnus Damm 67d889bd82 sh: add sh4-202 INTC tables
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>
2009-05-12 19:37:26 +09:00
Magnus Damm 5f8a29ba39 sh: TMU platform data for sh4-202
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>
2009-05-12 19:37:21 +09:00
Magnus Damm f251935e02 sh: TMU platform data for sh7770
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-12 19:35:59 +09:00
Magnus Damm 5d8728a71f sh: add sh7770_generic_defconfig
This patch adds a generic sh7770 defconfig file.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-12 19:35:51 +09:00
Magnus Damm 0ee8b4d7c7 sh: TMU platform data for sh7763
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-12 19:34:40 +09:00
Paul Mundt 9fe5ee0efb sh: clkfwk: Use arch_clk_init() for on-chip clock registration.
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-12 19:29:04 +09:00
Paul Mundt f3f8290cb3 sh: clkfwk: Handle clk_get_sys() returning an ERR_PTR.
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>
2009-05-12 16:07:40 +09:00
Paul Mundt 0dae89572c sh: clkfwk: Wire up clk_get_sys() support.
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>
2009-05-12 06:18:09 +09:00
Paul Mundt 007e8363b6 sh: clkfwk: Kill off clk_recalc_rate().
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-12 06:05:32 +09:00
Paul Mundt f5c84cf508 sh: clkfwk: Tidy up on-chip clock registration and rate propagation.
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-12 05:59:27 +09:00
Paul Mundt aa87aa343f sh: clkfwk: Improve the generic clk_set_parent() implementation.
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>
2009-05-12 05:51:05 +09:00
Paul Mundt ae891a4264 sh: clkfwk: Fix up the clk_enable() error path.
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-12 05:30:10 +09:00
Paul Mundt 154502e160 sh: clkfwk: Convert SH-Mobile CPUs to use CLK_ENABLE_ON_INIT.
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-12 05:18:13 +09:00
Paul Mundt 4ff29ff8e8 sh: clkfwk: Consolidate the ALWAYS_ENABLED / NEEDS_INIT mess.
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-12 05:14:53 +09:00
Paul Mundt b1f6cfe48c sh: clkfwk: refactor rate propagation.
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-12 04:27:43 +09:00
Paul Mundt a02cb230bb sh: clkfwk: Add a followparent_recalc() helper.
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-12 03:50:44 +09:00
Paul Mundt b68d820143 sh: clkfwk: Make recalc return an unsigned long.
This is prep work for cleaning up some of the rate propagation bits.
Trivial conversion.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-12 03:45:08 +09:00
Magnus Damm ccc195655f sh: TMU platform data for sh7780
This patch adds TMU platform data for sh7780. 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-11 22:02:04 +09:00
Magnus Damm 50e2d0d3b4 sh: r7780 highlander clock fixes
Update the r7780 highlander defconfig to fix
PCLK value, while at it fix cmdline on r7785.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-11 22:02:00 +09:00
Magnus Damm 3d6ad46021 sh: multiple vectors per irq - sh7760
Update intc tables and platform data to use one linux irq
per maskable interrupt source instead of keeping the one-to-one
mapping between vectors and linux irqs.

This fixes potential irq masking issues for sh7760 hardware
blocks such as DMAC/TMU2/REF.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-11 21:59:58 +09:00
Magnus Damm c42f32dca3 sh: TMU platform data for sh7760
This patch adds TMU platform data for sh7760. 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-11 18:45:52 +09:00
Magnus Damm 03f408f1aa sh: TMU platform data for sh775x
This patch adds TMU platform data for sh775x. 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-11 18:45:49 +09:00
Magnus Damm 53c0054c3f sh: include empty_zero_page in text
Include empty_zero_page in _text. This fixes a problem
introduced by c3e2586b79
which results in broken boot on R2D-Plus.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-11 18:42:14 +09:00
Yoshihiro Shimoda 7bce6c2740 sh: sh7785lcr: fix I2C device address map for 32-bit mode
This fixes up the broken I2C offset in 32-bit mode.
The cause is because the board datasheet had a mistake.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-11 16:56:16 +09:00
Paul Mundt 780f98ff1f sh: Account for INITIAL_JIFFIES when using jiffies clocksource.
In the case where we fall back on the generic jiffies clocksource,
INITIAL_JIFFIES needs to be accounted for so that printk times aren't
completely skewed.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-11 12:15:14 +09:00
Paul Mundt d9d674e500 sh: Fix up typo in arch/sh/kernel/vmlinux.lds.S
.init_ramfs ought to be .init.ramfs, fix it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-11 12:12:38 +09:00
Paul Mundt 567bb8fd47 sh: Fix up R0 dependence in __arch_swab16/32.
There is nothing in these routines that inherently depends on R0 use.
Given that these routines are inlined, it is rather easy to blow up the
compiler by exhausting the spill class when performing a 64-bit swab.

This presently manifests itself as the following:

CC      fs/ocfs2/suballoc.o
fs/ocfs2/suballoc.c: In function 'ocfs2_reserve_suballoc_bits':
fs/ocfs2/suballoc.c:638: error: unrecognizable insn:
(insn 2793 1230 1231 103 arch/sh/include/asm/swab.h:33 (set (reg:HI 853)
        (subreg:HI (reg:SI 149 macl) 2)) -1 (expr_list:REG_DEAD (reg:SI 149 macl)
        (nil)))
fs/ocfs2/suballoc.c:638: internal compiler error: in extract_insn, at recog.c:1991

This patch switches over to using an arbitrarily assigned register instead.

While the same issue does not exist in the SH-5 case, there is likewise no harm
in having an alternate register used for the byterev/shari pair.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 14:25:39 +09:00
Paul Mundt 457daa2b66 sh: Hook up cc-cross-prefix support.
This implements a simple case that just iterates through the common
cases, looking at UTS_MACHINE for hints.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 01:28:01 +09:00
Paul Mundt b412a49af9 sh: Consolidate the boot link and entry offset definitions.
Consolidate these in a single place in the Kconfig menus. At the same
time, disable their interactivity and set them according to the board
config defaults.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 01:23:25 +09:00
Paul Mundt 1eca133cc9 sh: Merge the split arch/sh/boot/compressed/ Makefiles.
This kills off the _64 variant and moves the _32 one over as the generic
one to use.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 00:58:21 +09:00
Paul Mundt b208835624 sh: Provide a BITS definition, use it in the arch/sh/boot/ Makefiles.
This introduces a BITS export that can handily be picked up by Makefiles
for cleaner sharing. Reflect its use in arch/sh/boot/compressed/ in
preparation for unifying the Makefiles.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 00:55:45 +09:00
Paul Mundt a2e76c80d9 sh: Provide a tighter BOOT_LINK_OFFSET definition for the Cayman board.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 00:54:39 +09:00
Paul Mundt 20b27fa337 sh: Fix up the sh64 zImage build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 00:36:22 +09:00
Paul Mundt 7b022d07a0 sh: Tidy up the ldscript output format specifier.
Tie this in to the Makefile directly, where we already know what we are
running on. This tidies up the linker script a bit, and is prep work for
unifying the arch/sh/boot/compressed linker scripts.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 00:25:08 +09:00
Paul Mundt dce97c8cb2 sh: Move the unified linker script in place, kill off old _64 one.
Just forcefully rename the _32 variant overtop, and kill off the now
unused _64 version.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 23:36:10 +09:00
Paul Mundt c3e2586b79 sh: Integrate sh64 bits in vmlinux_32.lds.S.
This adds all of the requisite bits from vmlinux_64.lds.S in to the _32
variant, resulting in a unified and generic linker script that can be
shared across both.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 23:33:02 +09:00
Paul Mundt 7cd0378ef4 sh: Fix up SHmedia module ELF relocations.
This fixes up the LSB setting for SHmedia branching in updated symbols
when processing module relocations.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 18:03:37 +09:00
Paul Mundt 1031a3a57e sh: Provide an __sdivsi3_2 export for sh64.
Newer code paths that are heavier in 64-bit math manage to get this
generated by newer compilers, provide a definition and export
accordingly. This is trivially wrapped around the existing __sdivsi3
code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 17:57:21 +09:00
Paul Mundt 2bcfffa423 sh: Rename opcode_t to insn_size_t.
This is now clashing with a driver, so just rename it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 16:02:08 +09:00
Paul Mundt 6dbe47a170 sh: Provide __read_{read,write}sl() definitions for sh64.
These are presently only defined for sh32, use the plain unoptimized
versions for sh64. Fixes up smsc911x build.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 14:44:30 +09:00
Paul Mundt 2fedaacdc0 sh: Cleanup irqflags size mismatch on SH-5 build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 14:38:49 +09:00
Peter Griffin cd89436e54 sh: Add UBC trap vector for SH2A
Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 00:11:33 +09:00
Peter Griffin ba0d474082 sh: Add ptrace support for NOMMU debugging
Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 00:11:27 +09:00
Kieran Bingham e73173dbe5 sh: Fix UBC setup and registers for SH2A
Signed-off-by: Kieran Bingham <kieranbingham@gmail.com>
Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 00:09:21 +09:00
Kieran Bingham be6514c629 sh: Add in some ptrace definitions from GDB.
Plugs in PT_TEXT_END_ADDR/PT_TEXT_ADDR/PT_DATA_ADDR/PT_TEXT_LEN
definitions.

Signed-off-by: Kieran Bingham <kieranbingham@gmail.com>
Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-09 00:06:03 +09:00
Paul Mundt 3b226e15be sh: Add clock id to sh-sci platform data on SH-Mobile CPUs.
This adds the clock specifier to all of the SH-Mobile sh-sci ports.
Impacted CPUs are SH7343/SH7366/SH7722/SH7723/SH7724.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 23:28:54 +09:00
Paul Mundt 7b551f9daa sh: Kill off the GENERIC_CALIBRATE_DELAY ifndef.
Now that everyone is using the clock framework directly and we
unconditionally provide our own calibrate_delay() function, having it
wrapped in an ifndef is no longer useful. So, kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 22:14:01 +09:00
Paul Mundt ccdaeb4c8f sh: TMU platform data for SH-X3 proto CPU.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 22:09:30 +09:00
Paul Mundt c3d480ded1 sh: TMU platform data for SH7786.
Wires up all 12 TMU channels, with TMU0 and 1 used as clockevent and
clocksource respectively.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 21:57:04 +09:00
Paul Mundt c29418c2ae sh: Always fixup unaligned userspace accesses on sh64.
sh64 has traditionally had this configurable via a Kconfig option
(CONFIG_SH64_USER_MISALIGNED_FIXUP). In practice it has never really been
terribly useful to turn this off, so just get rid of the option entirely.

We leave the sysctl around so we don't end up breaking existing root
file systems, and to allow folks that really want this off to do so at
their own risk.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 20:32:56 +09:00
Paul Mundt 30d88cf52f sh: Kill off extra cflags Kconfig entry.
There is no real reason to use this anymore, as the build system
generally knows what it is doing with regards to cflags mangling.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 20:20:56 +09:00
Paul Mundt 6eac1af011 sh: Always select RTC_LIB, not just for SUPERH32.
The RTC_LIB helpers are used in arch/sh/kernel/time.c, which was
previously only the case for the 32-bit variant. Now that this has
become the common implementation, move the RTC_LIB select to reflect
that. Fixes up the sh64 build.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 19:48:47 +09:00
Paul Mundt b366328335 sh: Drop dead rules from arch/sh/kernel/Makefile_64.
Several of these options are specific to the SHcompact ISA and will need
to be rewritten for SHmedia if they are to be supported at all. Drop
the impossible rules for now.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 18:01:03 +09:00
Magnus Damm 47dd6f4439 sh: TMU platform data for sh7723
This patch adds TMU platform data for sh7723. Both clockevent
and clocksource support is enabled. While at it, adjust the
CMT clocksource rating to prioritize the TMU.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 17:47:16 +09:00
Magnus Damm 583d1d549f sh: enable TMU clocksource on sh7722
This patch enables the TMU clocksource on sh7722.
To prioritize TMU over CMT we also adjust the CMT
clock source rating.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 17:46:57 +09:00
Magnus Damm 4f5ecaa054 sh: clock framework update, fix count and kill off kref
This patch updates the clock framework use count code.
With this patch the enable() and disable() callbacks
only get called when counting from and to zero.
While at it the kref stuff gets replaced with an int.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 17:46:22 +09:00
Paul Mundt 7d170b1bc5 sh: Move out cayman-specific panic handler code to its own file.
This moves out the cayman-specific panic handler code to a better
location, and leaves the generic implementation a simple stub that is
still used under emulation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 17:41:59 +09:00
Paul Mundt ef9f89996e sh: Kill off unused sh64 debug code.
None of the print_page() code and associated helpers are presently used
by anything in-tree, so just kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 17:36:57 +09:00
Paul Mundt cb3a86c89e sh: Kill off sh64's hand-rolled syscall tracer.
This is no longer necessary, as there are now sufficient generic
alternatives available.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 17:25:35 +09:00
Paul Mundt 1af2fe45fe sh: Kill off the global rtc_lock with extreme prejudice.
Now that all of the possible users for rtc_lock have gone away, it is no
longer necessary to keep this lock definition around.

This follows several other architectures that have either recently
dropped it or never supported it in the first place.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 16:59:05 +09:00
Paul Mundt cd1408f22d sh: mach-sh03: Give the sh03 rtc its own spinlock.
This converts the sh03 rtc code off of using the global rtc_lock and on
to its own spinlock. There are no other possible users of the rtc_lock,
so serializing with it is not necessary.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 16:57:35 +09:00
Paul Mundt 6459d7bb72 sh: Kill off dead timer sysclass pm hooks.
With the conversion to generic clockevents these are completely unused,
so just kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 16:47:48 +09:00
Paul Mundt 5ac5496411 sh: Kill off dead handle_timer_tick() code.
Nothing is using this anymore now that we have fully converted to generic
time, so kill it off completely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 16:44:00 +09:00
Paul Mundt 6d134b9e8d sh: Wire up GENERIC_CMOS_UPDATE for the platforms that need it.
Now that everything has converted over to generic timekeeping, we need an
alternate method for keeping the RTC updated for those platforms that are
still using the rtc_sh_get/set_time pairs, presently limited to SH-03 and
the Dreamcast. This wires up the GENERIC_CMOS_UPDATE hooks for those to
maintain the same behaviour.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 16:36:13 +09:00
Paul Mundt b179b72fad sh: Rename arch/sh/kernel/time_32.c to arch/sh/kernel/time.c.
This is now fully generic, and used both by _32 and _64 variants.
Rename it accordingly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 16:17:36 +09:00
Paul Mundt add47067a8 sh: Finish the sh64 migration off of ARCH_USES_GETTIMEOFFSET.
This adds sh_tmu support to the SH-5 subtypes, which subsequently allows
us to kill off time_64.c and use the now generic time_32.c. As a bonus,
SH-5 now supports highres timers and tickless for the first time.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 16:12:17 +09:00
Paul Mundt c2ecb4c4a7 sh: Move out rtc-sh registration from time_64.c to setup-sh5.c
Now that the onchip_remap() mess is sorted out, the rtc-sh support code
for SH-5 can follow the same approach as the other CPUs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 15:39:25 +09:00
Paul Mundt 4fa48e1774 sh: Enable new TMU driver support for all SH-3 and SH-4 CPUs.
The TMU block is supported on all SH-3 and SH-4 subtypes, so just select
it there, rather than conditionalizing it per subtype.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 15:28:15 +09:00