]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
15 years agosh: remove old TMU driver
Magnus Damm [Tue, 12 May 2009 10:25:54 +0000 (10:25 +0000)]
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>
15 years agosh: CMT platform data for sh7720/sh7721
Magnus Damm [Tue, 12 May 2009 10:21:11 +0000 (10:21 +0000)]
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>
15 years agosh: TMU platform data for sh7720/sh7721
Magnus Damm [Tue, 12 May 2009 10:17:52 +0000 (10:17 +0000)]
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>
15 years agosh: TMU platform data for sh7710/sh7712
Magnus Damm [Tue, 12 May 2009 10:15:30 +0000 (10:15 +0000)]
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>
15 years agosh: TMU platform data for sh7706/sh7707/sh7708/sh7709
Magnus Damm [Tue, 12 May 2009 10:04:49 +0000 (10:04 +0000)]
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>
15 years agosh: TMU platform data for sh7705
Magnus Damm [Tue, 12 May 2009 10:01:01 +0000 (10:01 +0000)]
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>
15 years agosh: TMU platform data for sh7724
Magnus Damm [Tue, 12 May 2009 09:50:46 +0000 (09:50 +0000)]
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>
15 years agosh: TMU platform data for sh7366
Magnus Damm [Tue, 12 May 2009 09:48:21 +0000 (09:48 +0000)]
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>
15 years agosh: TMU platform data for sh7343
Magnus Damm [Tue, 12 May 2009 09:39:06 +0000 (09:39 +0000)]
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>
15 years agosh: add sh4-202 INTC tables
Magnus Damm [Tue, 12 May 2009 09:34:26 +0000 (09:34 +0000)]
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>
15 years agosh: TMU platform data for sh4-202
Magnus Damm [Tue, 12 May 2009 09:28:25 +0000 (09:28 +0000)]
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>
15 years agosh: TMU platform data for sh7770
Magnus Damm [Tue, 12 May 2009 09:20:08 +0000 (09:20 +0000)]
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>
15 years agosh: add sh7770_generic_defconfig
Magnus Damm [Tue, 12 May 2009 09:18:13 +0000 (09:18 +0000)]
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>
15 years agosh: TMU platform data for sh7763
Magnus Damm [Tue, 12 May 2009 09:13:59 +0000 (09:13 +0000)]
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>
15 years agosh: TMU platform data for sh7780
Magnus Damm [Mon, 11 May 2009 11:37:16 +0000 (11:37 +0000)]
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>
15 years agosh: r7780 highlander clock fixes
Magnus Damm [Mon, 11 May 2009 11:34:16 +0000 (11:34 +0000)]
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>
15 years agosh: multiple vectors per irq - sh7760
Magnus Damm [Mon, 11 May 2009 09:01:08 +0000 (09:01 +0000)]
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>
15 years agosh: TMU platform data for sh7760
Magnus Damm [Mon, 11 May 2009 09:06:24 +0000 (09:06 +0000)]
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>
15 years agosh: TMU platform data for sh775x
Magnus Damm [Mon, 11 May 2009 08:54:54 +0000 (08:54 +0000)]
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>
15 years agosh: include empty_zero_page in text
Magnus Damm [Mon, 11 May 2009 08:45:27 +0000 (08:45 +0000)]
sh: include empty_zero_page in text

Include empty_zero_page in _text. This fixes a problem
introduced by c3e2586b794b12ffcdf69b4e547030b51e18e6d9
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>
15 years agosh: sh7785lcr: fix I2C device address map for 32-bit mode
Yoshihiro Shimoda [Mon, 11 May 2009 06:51:28 +0000 (06:51 +0000)]
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>
15 years agosh: Account for INITIAL_JIFFIES when using jiffies clocksource.
Paul Mundt [Mon, 11 May 2009 03:15:14 +0000 (12:15 +0900)]
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>
15 years agosh: Fix up typo in arch/sh/kernel/vmlinux.lds.S
Paul Mundt [Mon, 11 May 2009 03:12:38 +0000 (12:12 +0900)]
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>
15 years agosh: Fix up R0 dependence in __arch_swab16/32.
Paul Mundt [Sun, 10 May 2009 05:25:39 +0000 (14:25 +0900)]
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>
15 years agosh: Hook up cc-cross-prefix support.
Paul Mundt [Sat, 9 May 2009 16:28:01 +0000 (01:28 +0900)]
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>
15 years agosh: Consolidate the boot link and entry offset definitions.
Paul Mundt [Sat, 9 May 2009 16:23:25 +0000 (01:23 +0900)]
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>
15 years agosh: Merge the split arch/sh/boot/compressed/ Makefiles.
Paul Mundt [Sat, 9 May 2009 15:58:21 +0000 (00:58 +0900)]
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>
15 years agosh: Provide a BITS definition, use it in the arch/sh/boot/ Makefiles.
Paul Mundt [Sat, 9 May 2009 15:55:45 +0000 (00:55 +0900)]
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>
15 years agosh: Provide a tighter BOOT_LINK_OFFSET definition for the Cayman board.
Paul Mundt [Sat, 9 May 2009 15:54:39 +0000 (00:54 +0900)]
sh: Provide a tighter BOOT_LINK_OFFSET definition for the Cayman board.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Fix up the sh64 zImage build.
Paul Mundt [Sat, 9 May 2009 15:36:22 +0000 (00:36 +0900)]
sh: Fix up the sh64 zImage build.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Tidy up the ldscript output format specifier.
Paul Mundt [Sat, 9 May 2009 15:25:08 +0000 (00:25 +0900)]
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>
15 years agosh: Move the unified linker script in place, kill off old _64 one.
Paul Mundt [Sat, 9 May 2009 14:36:10 +0000 (23:36 +0900)]
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>
15 years agosh: Integrate sh64 bits in vmlinux_32.lds.S.
Paul Mundt [Sat, 9 May 2009 14:33:02 +0000 (23:33 +0900)]
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>
15 years agosh: Fix up SHmedia module ELF relocations.
Paul Mundt [Sat, 9 May 2009 09:03:37 +0000 (18:03 +0900)]
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>
15 years agosh: Provide an __sdivsi3_2 export for sh64.
Paul Mundt [Sat, 9 May 2009 08:57:21 +0000 (17:57 +0900)]
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>
15 years agosh: Rename opcode_t to insn_size_t.
Paul Mundt [Sat, 9 May 2009 07:02:08 +0000 (16:02 +0900)]
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>
15 years agosh: Provide __read_{read,write}sl() definitions for sh64.
Paul Mundt [Sat, 9 May 2009 05:44:30 +0000 (14:44 +0900)]
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>
15 years agosh: Cleanup irqflags size mismatch on SH-5 build.
Paul Mundt [Sat, 9 May 2009 05:38:49 +0000 (14:38 +0900)]
sh: Cleanup irqflags size mismatch on SH-5 build.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Fix up the sh64 earlyprintk build.
Paul Mundt [Sat, 9 May 2009 05:31:37 +0000 (14:31 +0900)]
sh: Fix up the sh64 earlyprintk build.

sci_rxd_in() on SH-5 wants to be using SCSPTR, not SCSPTR2.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add UBC trap vector for SH2A
Peter Griffin [Fri, 8 May 2009 14:51:51 +0000 (15:51 +0100)]
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>
15 years agosh: Add ptrace support for NOMMU debugging
Peter Griffin [Fri, 8 May 2009 14:50:54 +0000 (15:50 +0100)]
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>
15 years agosh: Fix UBC setup and registers for SH2A
Kieran Bingham [Fri, 8 May 2009 14:49:50 +0000 (15:49 +0100)]
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>
15 years agosh: Add in some ptrace definitions from GDB.
Kieran Bingham [Fri, 8 May 2009 14:48:15 +0000 (15:48 +0100)]
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>
15 years agoserial: sh-sci: Fix up h8300 support.
Yoshinori Sato [Tue, 28 Apr 2009 04:40:15 +0000 (04:40 +0000)]
serial: sh-sci: Fix up h8300 support.

- Dummy SCIF functions define.
- h8300 specific header include.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoserial: sh-sci: Fix up section mismatch in error path.
Paul Mundt [Fri, 8 May 2009 14:48:33 +0000 (23:48 +0900)]
serial: sh-sci: Fix up section mismatch in error path.

The sci_probe_single() path attempts to use sci_remove() for the error
path, while sci_remove() is still flagged as __devexit. So, we simply
discard the section annotation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add clock id to sh-sci platform data on SH-Mobile CPUs.
Paul Mundt [Fri, 8 May 2009 14:28:54 +0000 (23:28 +0900)]
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>
15 years agosh-sci: improve clock framework support
Magnus Damm [Wed, 21 Jan 2009 15:14:30 +0000 (15:14 +0000)]
sh-sci: improve clock framework support

Use enable/disable hooks for clock framework integration.
Make sure we control the clock for the serial console as well.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh-sci: ioremap() in a single place
Magnus Damm [Wed, 21 Jan 2009 15:14:22 +0000 (15:14 +0000)]
sh-sci: ioremap() in a single place

Handle ioremap() in sci_config_port only.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh-sci: replace sci_init_ports()
Magnus Damm [Wed, 21 Jan 2009 15:14:14 +0000 (15:14 +0000)]
sh-sci: replace sci_init_ports()

Replace sci_init_ports() with sci_init_single().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh-sci: allow single port platform devices
Magnus Damm [Wed, 21 Jan 2009 15:13:50 +0000 (15:13 +0000)]
sh-sci: allow single port platform devices

Allow registration of single port sh-sci platform devices.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh-sci: use to_sci_port() if possible
Magnus Damm [Wed, 21 Jan 2009 15:14:38 +0000 (15:14 +0000)]
sh-sci: use to_sci_port() if possible

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh-sci: rework serial console support
Magnus Damm [Wed, 21 Jan 2009 15:14:06 +0000 (15:14 +0000)]
sh-sci: rework serial console support

Rework sh-sci serial console code.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh-sci: remove early_sci_setup()
Magnus Damm [Wed, 21 Jan 2009 15:13:58 +0000 (15:13 +0000)]
sh-sci: remove early_sci_setup()

Remove unused early_sci_setup() function from sh-sci.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh-sci: add platform device private data
Magnus Damm [Wed, 21 Jan 2009 15:13:42 +0000 (15:13 +0000)]
sh-sci: add platform device private data

This patch adds per-platform private data to the sh-sci driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off the GENERIC_CALIBRATE_DELAY ifndef.
Paul Mundt [Fri, 8 May 2009 13:14:01 +0000 (22:14 +0900)]
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>
15 years agosh: TMU platform data for SH-X3 proto CPU.
Paul Mundt [Fri, 8 May 2009 13:09:30 +0000 (22:09 +0900)]
sh: TMU platform data for SH-X3 proto CPU.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: TMU platform data for SH7786.
Paul Mundt [Fri, 8 May 2009 12:57:04 +0000 (21:57 +0900)]
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>
15 years agosh: Always fixup unaligned userspace accesses on sh64.
Paul Mundt [Fri, 8 May 2009 11:32:56 +0000 (20:32 +0900)]
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>
15 years agosh: Kill off extra cflags Kconfig entry.
Paul Mundt [Fri, 8 May 2009 11:20:56 +0000 (20:20 +0900)]
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>
15 years agosh: Always select RTC_LIB, not just for SUPERH32.
Paul Mundt [Fri, 8 May 2009 10:48:47 +0000 (19:48 +0900)]
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>
15 years agosh: Drop dead rules from arch/sh/kernel/Makefile_64.
Paul Mundt [Fri, 8 May 2009 09:01:03 +0000 (18:01 +0900)]
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>
15 years agosh: TMU platform data for sh7723
Magnus Damm [Fri, 8 May 2009 08:32:18 +0000 (08:32 +0000)]
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>
15 years agosh: enable TMU clocksource on sh7722
Magnus Damm [Fri, 8 May 2009 08:27:19 +0000 (08:27 +0000)]
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>
15 years agosh: clock framework update, fix count and kill off kref
Magnus Damm [Fri, 8 May 2009 08:23:29 +0000 (08:23 +0000)]
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>
15 years agosh: Move out cayman-specific panic handler code to its own file.
Paul Mundt [Fri, 8 May 2009 08:41:59 +0000 (17:41 +0900)]
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>
15 years agosh: Kill off unused sh64 debug code.
Paul Mundt [Fri, 8 May 2009 08:36:57 +0000 (17:36 +0900)]
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>
15 years agosh: Kill off sh64's hand-rolled syscall tracer.
Paul Mundt [Fri, 8 May 2009 08:25:35 +0000 (17:25 +0900)]
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>
15 years agosh: Kill off the global rtc_lock with extreme prejudice.
Paul Mundt [Fri, 8 May 2009 07:59:05 +0000 (16:59 +0900)]
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>
15 years agosh: mach-sh03: Give the sh03 rtc its own spinlock.
Paul Mundt [Fri, 8 May 2009 07:57:35 +0000 (16:57 +0900)]
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>
15 years agosh: Kill off dead timer sysclass pm hooks.
Paul Mundt [Fri, 8 May 2009 07:47:48 +0000 (16:47 +0900)]
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>
15 years agosh: Kill off dead handle_timer_tick() code.
Paul Mundt [Fri, 8 May 2009 07:44:00 +0000 (16:44 +0900)]
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>
15 years agosh: Wire up GENERIC_CMOS_UPDATE for the platforms that need it.
Paul Mundt [Fri, 8 May 2009 07:36:13 +0000 (16:36 +0900)]
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>
15 years agosh: Rename arch/sh/kernel/time_32.c to arch/sh/kernel/time.c.
Paul Mundt [Fri, 8 May 2009 07:17:36 +0000 (16:17 +0900)]
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>
15 years agosh: Finish the sh64 migration off of ARCH_USES_GETTIMEOFFSET.
Paul Mundt [Fri, 8 May 2009 07:12:17 +0000 (16:12 +0900)]
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>
15 years agosh: Move out rtc-sh registration from time_64.c to setup-sh5.c
Paul Mundt [Fri, 8 May 2009 06:39:25 +0000 (15:39 +0900)]
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>
15 years agosh: Enable new TMU driver support for all SH-3 and SH-4 CPUs.
Paul Mundt [Fri, 8 May 2009 06:28:15 +0000 (15:28 +0900)]
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>
15 years agosh: TMU platform data for sh7785
Magnus Damm [Thu, 7 May 2009 10:55:37 +0000 (10:55 +0000)]
sh: TMU platform data for sh7785

This patch adds TMU platform data for sh7785. 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>
15 years agosh: r7785 highlander clock fixes
Magnus Damm [Thu, 7 May 2009 10:44:55 +0000 (10:44 +0000)]
sh: r7785 highlander clock fixes

Update the r7785 highlander defconfig to fix
PCLK value and that mode4 is set high.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: call clock framework init() callback once
Magnus Damm [Thu, 7 May 2009 10:31:39 +0000 (10:31 +0000)]
sh: call clock framework init() callback once

Make sure that clk->ops->init() only gets called once in
the case of CLK_ALWAYS_ENABLED. Without this patch the
init() callback may be called multiple times.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh7785 early scif fix
Magnus Damm [Thu, 7 May 2009 10:17:44 +0000 (10:17 +0000)]
sh: sh7785 early scif fix

This patch moves the SH4 case of EARLY_SCIF_CONSOLE_PORT
so the SH7785 default value gets used. Without this patch
the value for SH7785 is set to 0xffe80000.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off unused SH-5 irq_describe cruft.
Paul Mundt [Thu, 7 May 2009 09:17:20 +0000 (18:17 +0900)]
sh: Kill off unused SH-5 irq_describe cruft.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Integrate the SH-5 onchip_remap() more coherently.
Paul Mundt [Thu, 7 May 2009 09:10:27 +0000 (18:10 +0900)]
sh: Integrate the SH-5 onchip_remap() more coherently.

Presently this is special-cased for early initialization. While there are
situations where these static early initializations are still necessary,
with minor changes it is possible to use this for the regular ioremap
implementation as well. This allows us to kill off the special-casing for
the remap completely and to start tidying up all of the SH-5
special-casing in drivers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh64 still needs ARCH_USES_GETTIMEOFFSET temporarily.
Paul Mundt [Thu, 7 May 2009 08:55:09 +0000 (17:55 +0900)]
sh: sh64 still needs ARCH_USES_GETTIMEOFFSET temporarily.

sh64 is still using this, so re-enable it temporarily while SH-5 gets
converted to use the generic code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Handle shm_align_mask also for HAVE_ARCH_UNMAPPED_AREA_TOPDOWN.
Paul Mundt [Thu, 7 May 2009 07:38:16 +0000 (16:38 +0900)]
sh: Handle shm_align_mask also for HAVE_ARCH_UNMAPPED_AREA_TOPDOWN.

Presently shm_align_mask is only looked at for the bottom up case, but we
still want this for proper colouring constraints in the topdown case.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Flag IRQSTACKS as BROKEN for now.
Paul Mundt [Thu, 7 May 2009 06:24:36 +0000 (15:24 +0900)]
sh: Flag IRQSTACKS as BROKEN for now.

There still seems to be some stack corruption to sort out here, so flag
this as BROKEN until this issue is sorted out.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Move dummy clockevents broadcast timer to its new home.
Paul Mundt [Sun, 3 May 2009 09:29:27 +0000 (18:29 +0900)]
sh: Move dummy clockevents broadcast timer to its new home.

The old arch/sh/kernel/timers/ directly will be going away completely
once the rest of the TMU users are migrated, so move the dummy broadcast
driver up a level in preparation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off the now unused ARCH_USES_GETTIMEOFFSET code.
Paul Mundt [Sun, 3 May 2009 09:18:14 +0000 (18:18 +0900)]
sh: Kill off the now unused ARCH_USES_GETTIMEOFFSET code.

Now that the stragglers (MTU2/CMT/etc.) have been rewritten and we are
selecting both GENERIC_TIME and GENERIC_CLOCKEVENTS, the get_offset()
timer op is completely unused. As a result, we are now able to kill off
the ARCH_USES_GETTIMEOFFSET references.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: select both GENERIC_TIME and GENERIC_CLOCKEVENTS.
Paul Mundt [Sun, 3 May 2009 09:12:26 +0000 (18:12 +0900)]
sh: select both GENERIC_TIME and GENERIC_CLOCKEVENTS.

Now that the rest of the timers that didn't support clockevents have been
rewritten, both of these can be enabled by default.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoclocksource: sh_mtu2/cmt_register() should be static.
Paul Mundt [Sun, 3 May 2009 09:05:42 +0000 (18:05 +0900)]
clocksource: sh_mtu2/cmt_register() should be static.

Neither of these need to be exported, so just make them static.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Consolidate MTU2/CMT/TMU timer platform data.
Paul Mundt [Sun, 3 May 2009 08:57:17 +0000 (17:57 +0900)]
sh: Consolidate MTU2/CMT/TMU timer platform data.

All of the SH timers use a roughly identical structure for platform data,
which presently is broken out for each block. Consolidate all of these
definitions, as there is no reason for them to be broken out in the first
place.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: TMU platform data for sh7722
Magnus Damm [Fri, 1 May 2009 06:58:52 +0000 (06:58 +0000)]
sh: TMU platform data for sh7722

This patch adds TMU platform data for sh7722. Only clockevent
mode is enabled for now, clocksource requires this patch:
"clocksource: setup mult_orig in clocksource_enable()"

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoclocksource: SuperH TMU Timer driver
Magnus Damm [Fri, 1 May 2009 06:51:00 +0000 (06:51 +0000)]
clocksource: SuperH TMU Timer driver

This patch adds a TMU driver for the SuperH architecture.

The TMU driver is a platform driver with early platform
support to allow using a TMU channel as clockevent or
clocksource during system bootup or later.

Clocksource or clockevent can be selected.
Both periodic and oneshot clockevents are supported.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: remove old MTU2 driver
Magnus Damm [Thu, 30 Apr 2009 07:12:09 +0000 (07:12 +0000)]
sh: remove old MTU2 driver

This patch removes the old MTU2 driver (CONFIG_SH_MTU2/timer-mtu2.c)

As replacement, select the sh_cmt driver with CONFIG_SH_TIMER_MTU2
and configure timer channel using platform data.

If multiple MTU channels are enabled using platform data, use the
earlytimer parameter on the kernel command line to select channel.
For instance, use "earlytimer=sh_mtu2.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>
15 years agosh: sh2a MTU2 platform data
Magnus Damm [Thu, 30 Apr 2009 07:06:26 +0000 (07:06 +0000)]
sh: sh2a MTU2 platform data

This patch adds MTU2 platform data for the following cpus:
 - sh7201 (3/5 channels)
 - sh7203/sh7263 (2/4 channels)
 - sh7206 (3/5 channels)
 - MXG (3/5 channels)

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoclocksource: SuperH MTU2 Timer driver
Magnus Damm [Thu, 30 Apr 2009 07:02:49 +0000 (07:02 +0000)]
clocksource: SuperH MTU2 Timer driver

This patch adds a MTU2 driver for the SuperH architecture.

The MTU2 driver is a platform driver with early platform
support to allow using a MTU2 channel as only clockevent
during system bootup.

Clocksource on sh2a is currently unsupported due to code
generation issues with 64-bit math, so at this point only
periodic clockevent support is in place.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agotime: sh: convert to use arch_getoffset() infrastructure
john stultz [Fri, 1 May 2009 20:10:28 +0000 (13:10 -0700)]
time: sh: convert to use arch_getoffset() infrastructure

Convert sh to use GENERIC_TIME via the arch_getoffset() infrastructure.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: remove obsolete hw_interrupt_type
Thomas Gleixner [Sat, 2 May 2009 20:01:20 +0000 (20:01 +0000)]
sh: remove obsolete hw_interrupt_type

Impact: cleanup

Convert the last remaining users to struct irq_chip and remove the
define.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: remove obsolete no_irq_type
Thomas Gleixner [Sat, 2 May 2009 20:00:44 +0000 (20:00 +0000)]
sh: remove obsolete no_irq_type

Impact: cleanup

convert the last remaining users to no_irq_chip

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoMerge branch 'timers/clocksource' of git://git.kernel.org/pub/scm/linux/kernel/git...
Paul Mundt [Sun, 3 May 2009 08:24:55 +0000 (17:24 +0900)]
Merge branch 'timers/clocksource' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip

15 years agotimekeeping: create arch_gettimeoffset infrastructure
john stultz [Fri, 1 May 2009 20:10:26 +0000 (13:10 -0700)]
timekeeping: create arch_gettimeoffset infrastructure

Some arches don't supply their own clocksource. This is mainly the
case in architectures that get their inter-tick times by reading the
counter on their interval timer.  Since these timers wrap every tick,
they're not really useful as clocksources.  Wrapping them to act like
one is possible but not very efficient. So we provide a callout these
arches can implement for use with the jiffies clocksource to provide
finer then tick granular time.

[ Impact: ease the migration to generic time keeping ]

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>