GitHub/moto-9609/android_kernel_motorola_exynos9610.git
15 years agosh: mach-edosk7705: Fix up edosk7705 so it all builds again.
Paul Mundt [Wed, 17 Dec 2008 04:57:15 +0000 (13:57 +0900)]
sh: mach-edosk7705: Fix up edosk7705 so it all builds again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-microdev: Split out the fdc37c93xapm initialization code.
Paul Mundt [Wed, 17 Dec 2008 04:14:22 +0000 (13:14 +0900)]
sh: mach-microdev: Split out the fdc37c93xapm initialization code.

This makes the microdev code a bit more readable, and moves the
setup for the SuperIO out on its own.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-sh03: Use __set_io_port_base(), kill off special ioport_map().
Paul Mundt [Wed, 17 Dec 2008 03:54:09 +0000 (12:54 +0900)]
sh: mach-sh03: Use __set_io_port_base(), kill off special ioport_map().

This also fixes up a long-standing bug for this platform where the PIO
base was set to a register offset, rather than the actual PIO offset
itself.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-sh03: Move off of cf_enabler to pata_platform, as per landisk.
Paul Mundt [Wed, 17 Dec 2008 03:48:41 +0000 (12:48 +0900)]
sh: mach-sh03: Move off of cf_enabler to pata_platform, as per landisk.

This gets rid of the cf enabler use on mach-sh03 and switches to use
pata_platform with the proper address directly. cf_enabler is
subsequently disabled for mach-sh03.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: board-shmin: Convert shmin to use __set_io_port_base().
Paul Mundt [Wed, 17 Dec 2008 03:42:20 +0000 (12:42 +0900)]
sh: board-shmin: Convert shmin to use __set_io_port_base().

Drop the special mv_ioport_map() implementation, as this can simply use
__set_io_port_base() directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off dead mv_init_pci() from machvec.
Paul Mundt [Wed, 17 Dec 2008 03:31:32 +0000 (12:31 +0900)]
sh: Kill off dead mv_init_pci() from machvec.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Simplify kernel_thread_helper() for sh32.
Paul Mundt [Wed, 17 Dec 2008 03:20:15 +0000 (12:20 +0900)]
sh: Simplify kernel_thread_helper() for sh32.

This can use the same implementation as sh64, the generated assembly is
the same between the new and old version, so there is not much point in
leaving it open coded in inline assembly.

This is preparatory work for future consolidation of the _32/_64
variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off mv_heartbeat() from the machvec.
Paul Mundt [Wed, 17 Dec 2008 03:19:30 +0000 (12:19 +0900)]
sh: Kill off mv_heartbeat() from the machvec.

Nothing is using this any more, so get rid of it before anyone gets the
bright idea to start using it again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off the cayman and microdev special heartbeat code.
Paul Mundt [Wed, 17 Dec 2008 03:17:20 +0000 (12:17 +0900)]
sh: Kill off the cayman and microdev special heartbeat code.

These can use the generic code instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off sh_bios_in_gdb_mode().
Paul Mundt [Wed, 17 Dec 2008 02:47:59 +0000 (11:47 +0900)]
sh: Kill off sh_bios_in_gdb_mode().

With the reworked kgdb support, we always detach and reinitialize the
stub. This was mostly a feature for handoffs between sh-ipl+g and the
kgdb stub, but virtually no sh-ipl+g versions ever had this working
right in the first place.

Given that the sh-ipl+g stubs in general use today don't even support
the GDB stub, and we have already killed off the special casing in the
sh-sci serial driver, kill off this now unused symbol too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: export sh_bios_get_node_addr() symbol for stnic module.
Paul Mundt [Wed, 17 Dec 2008 02:39:33 +0000 (11:39 +0900)]
sh: export sh_bios_get_node_addr() symbol for stnic module.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Run sh_bios through a long overdue Lindent.
Paul Mundt [Wed, 17 Dec 2008 02:37:51 +0000 (11:37 +0900)]
sh: Run sh_bios through a long overdue Lindent.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoserial: sh-sci: Generalize port pin initialization.
Paul Mundt [Tue, 16 Dec 2008 11:07:27 +0000 (20:07 +0900)]
serial: sh-sci: Generalize port pin initialization.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoserial: sh-sci: Tidy up fifo overrun error handling.
Paul Mundt [Tue, 16 Dec 2008 10:29:38 +0000 (19:29 +0900)]
serial: sh-sci: Tidy up fifo overrun error handling.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoserial: sh-sci: pr_debug() -> dev_dbg() conversion.
Paul Mundt [Tue, 16 Dec 2008 09:55:26 +0000 (18:55 +0900)]
serial: sh-sci: pr_debug() -> dev_dbg() conversion.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoserial: sh-sci: Fix up the cpufreq notifier to use the proper port clock.
Paul Mundt [Tue, 16 Dec 2008 09:36:16 +0000 (18:36 +0900)]
serial: sh-sci: Fix up the cpufreq notifier to use the proper port clock.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: oprofile: Convert op_model_sh7750 to new common interface.
Paul Mundt [Tue, 16 Dec 2008 00:36:25 +0000 (09:36 +0900)]
sh: oprofile: Convert op_model_sh7750 to new common interface.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: oprofile: Backtrace support.
Dave Peverley [Tue, 16 Dec 2008 00:35:40 +0000 (09:35 +0900)]
sh: oprofile: Backtrace support.

This patch improves the oprofile support on sh and adds backtrace
support.

Signed-off-by: Dave Peverley <dpeverley@mpc-data.co.uk>
Signed-off-by: Chris Smith <chris.smith@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: oprofile: Refactor common setup code for multiple driver support.
Paul Mundt [Tue, 16 Dec 2008 00:33:53 +0000 (09:33 +0900)]
sh: oprofile: Refactor common setup code for multiple driver support.

This re-implements the old op_model_null code in to something more
generic, where multiple drivers, backtrace, etc. can all be interfaced.
Based largely on arch/mips/oprofile/common.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Enable GENERIC_HARDIRQS_NO__DO_IRQ for all SuperH machines
Matt Fleming [Tue, 16 Dec 2008 00:13:05 +0000 (09:13 +0900)]
sh: Enable GENERIC_HARDIRQS_NO__DO_IRQ for all SuperH machines

After the recent changes to switch SuperH board support over to irq_chip
it is now possible to set GENERIC_HARDIRQS_NO__DO_IRQ for all SuperH
boards.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Convert Cayman boards from hw_interrupt_type to irq_chip
Matt Fleming [Sun, 14 Dec 2008 12:02:27 +0000 (12:02 +0000)]
sh: Convert Cayman boards from hw_interrupt_type to irq_chip

I've been unable to even compile-test this change because I don't have
an sh5 toolchain. All uses of hw_interrupt_type for SuperH boards have
now been converted to use irq_chip.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Convert Dreamcast support from hw_interrupt_type to irq_chip
Matt Fleming [Sun, 14 Dec 2008 12:02:26 +0000 (12:02 +0000)]
sh: Convert Dreamcast support from hw_interrupt_type to irq_chip

Switch the dreamcast IRQ code over to the irq_chip way of doing things,
so that we can set GENERIC_HARDIRQS_NO__DO_IRQ for all SuperH boards.

Also, whilst I'm here change some things to make checkpatch.pl happy:
- Indent with tabs, not with spaces
- Include <linux/io.h>, not <asm/io.h>
- Fix the multi-line comment style
- Fix some typos in the comments

Tested-by: Adrian McMenamin <adrian@newgolddream.dyndns.info>
Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Convert SystemH board support from hw_interrupt_type to irq_chip
Matt Fleming [Sun, 14 Dec 2008 12:02:25 +0000 (12:02 +0000)]
sh: Convert SystemH board support from hw_interrupt_type to irq_chip

... as part of the hw_interrupt_type to irq_chip crusade.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Convert Microdev boards from hw_interrupt_type to irq_chip
Matt Fleming [Sun, 14 Dec 2008 12:02:24 +0000 (12:02 +0000)]
sh: Convert Microdev boards from hw_interrupt_type to irq_chip

This is part of the SH move to irq_chip.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Provide sdivsi3/udivsi3/udivdi3 for sh64, kill off libgcc linking.
Paul Mundt [Fri, 12 Dec 2008 07:53:14 +0000 (16:53 +0900)]
sh: Provide sdivsi3/udivsi3/udivdi3 for sh64, kill off libgcc linking.

This moves in the necessary libgcc bits and kills off the libgcc linking
for sh64 kernels as well.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agofb: SH-5 uses __raw I/O accessors now also, drop the special casing.
Paul Mundt [Fri, 12 Dec 2008 07:35:40 +0000 (16:35 +0900)]
fb: SH-5 uses __raw I/O accessors now also, drop the special casing.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add SH-5 optimized memcpy()/memset()/strcpy()/strlen().
Paul Mundt [Fri, 12 Dec 2008 07:34:44 +0000 (16:34 +0900)]
sh: Add SH-5 optimized memcpy()/memset()/strcpy()/strlen().

Adopted from the uClibc optimized string versions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off remaining CONFIG_SH_KGDB bits.
Paul Mundt [Thu, 11 Dec 2008 10:15:14 +0000 (19:15 +0900)]
sh: Kill off remaining CONFIG_SH_KGDB bits.

Now that we use the generic stub, kill off all of the left over
references.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoserial: sh-sci: Implement CONSOLE_POLL support and kill off old kgdb console.
Paul Mundt [Thu, 11 Dec 2008 10:06:43 +0000 (19:06 +0900)]
serial: sh-sci: Implement CONSOLE_POLL support and kill off old kgdb console.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Generic kgdb stub support.
Paul Mundt [Thu, 11 Dec 2008 09:46:46 +0000 (18:46 +0900)]
sh: Generic kgdb stub support.

This migrates from the old bitrotted kgdb stub implementation and moves
to the generic stub. In the process support for SH-2/SH-2A is also added,
which the old stub never provided.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Enable HAVE_ARCH_TRACEHOOK for all SH, now that SH-5 supports it too.
Paul Mundt [Wed, 10 Dec 2008 11:17:15 +0000 (20:17 +0900)]
sh: Enable HAVE_ARCH_TRACEHOOK for all SH, now that SH-5 supports it too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Provide linux/regset.h interface for SH-5.
Paul Mundt [Wed, 10 Dec 2008 11:14:15 +0000 (20:14 +0900)]
sh: Provide linux/regset.h interface for SH-5.

Plugs in general and FPU regsets.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Provide asm/syscall.h for SH-5.
Paul Mundt [Wed, 10 Dec 2008 10:46:18 +0000 (19:46 +0900)]
sh: Provide asm/syscall.h for SH-5.

This provides the asm/syscall.h implementation for sh64 parts.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Handle cases where setup{_rt,}_frame() fail on SH-5 signal delivery.
Paul Mundt [Wed, 10 Dec 2008 10:26:44 +0000 (19:26 +0900)]
sh: Handle cases where setup{_rt,}_frame() fail on SH-5 signal delivery.

Presently these cases are not handled properly due to the return value
not being passed back. This needs to be correct to get proper behaviour
out of things like the tracehook signal notifier, amongst others.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Fix up syscall_get_nr() comment in syscall_32.h.
Paul Mundt [Wed, 10 Dec 2008 10:18:46 +0000 (19:18 +0900)]
sh: Fix up syscall_get_nr() comment in syscall_32.h.

Residual copy-and-paste damage, fix it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Fix up the cpu_asid() return value on nommu.
Paul Mundt [Wed, 10 Dec 2008 09:17:19 +0000 (18:17 +0900)]
sh: Fix up the cpu_asid() return value on nommu.

This ought to be unsigned long, rather than defaulting to int.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Convert sh64 /proc/asids to debugfs and generic sh.
Paul Mundt [Wed, 10 Dec 2008 09:06:36 +0000 (18:06 +0900)]
sh: Convert sh64 /proc/asids to debugfs and generic sh.

This converts the sh64 /proc/asids entry to debugfs and enables it for
all SH parts that have debugfs enabled.

On MMU systems this can be used to determine which processes are using
which ASIDs which in turn can be used for finer grained cache tag
analysis.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Kill off sh64's unused alloc/free_task_struct() definitions.
Paul Mundt [Wed, 10 Dec 2008 08:16:09 +0000 (17:16 +0900)]
sh: Kill off sh64's unused alloc/free_task_struct() definitions.

These were left over from some time ago, sh64 never got around to
defining __HAVE_ARCH_TASK_STRUCT_ALLOCATOR during the conversion, and it
has no need to. Kill these off and use the generic versions instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: mach-migor: Kill off unused Migo-R machvec.
Paul Mundt [Wed, 10 Dec 2008 08:09:36 +0000 (17:09 +0900)]
sh: mach-migor: Kill off unused Migo-R machvec.

This kills off the special Migo-R machvec, as nothing is using it. By
default this will switch to using the generic machvec, which provides the
same functionality. This saves us a bit of space in the machvec section.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: add ov772x reset delay on Migo-R
Magnus Damm [Wed, 10 Dec 2008 08:02:13 +0000 (17:02 +0900)]
sh: add ov772x reset delay on Migo-R

Add reset delay for the ov772x device on Migo-R.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Drop the special qemu defconfig.
Paul Mundt [Wed, 10 Dec 2008 04:42:14 +0000 (13:42 +0900)]
sh: Drop the special qemu defconfig.

QEMU can now use rts7751r2dplus_defconfig directly, there is no more need
for a neutered defconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Delete unnecessary mov in the interrupt exception entry point.
Aoi Shinkai [Wed, 10 Dec 2008 04:30:28 +0000 (13:30 +0900)]
sh: Delete unnecessary mov in the interrupt exception entry point.

The INTEVT read at interrupt exception entry is uneccessary, as the read
is deferred until we are ready to enter do_IRQ(). The kgdb nmi path still
requires it, so move it there.

Signed-off-by: Aoi Shinkai <shinkoi2005@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Fix an off-by-1 check in __mutex_fastpath_unlock().
Paul Mundt [Mon, 8 Dec 2008 08:01:40 +0000 (17:01 +0900)]
sh: Fix an off-by-1 check in __mutex_fastpath_unlock().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Update rsk701_defconfig to reflect mach-rsk changes.
Paul Mundt [Mon, 8 Dec 2008 05:53:28 +0000 (14:53 +0900)]
sh: Update rsk701_defconfig to reflect mach-rsk changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Enable leds-gpio in rsk7203 defconfig.
Paul Mundt [Mon, 8 Dec 2008 05:46:55 +0000 (14:46 +0900)]
sh: Enable leds-gpio in rsk7203 defconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Consolidate rsk7203/7201 in to a new mach-rsk.
Paul Mundt [Mon, 8 Dec 2008 05:32:03 +0000 (14:32 +0900)]
sh: Consolidate rsk7203/7201 in to a new mach-rsk.

RSK+ platforms have quite a few characteristics in common, so roll them
together in to a shiny new RSK mach-type.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Provide ftrace_make_call()/ftrace_make_nop().
Paul Mundt [Mon, 8 Dec 2008 03:02:28 +0000 (12:02 +0900)]
sh: Provide ftrace_make_call()/ftrace_make_nop().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Disable -Werror for arch/sh/oprofile/.
Paul Mundt [Mon, 8 Dec 2008 02:49:19 +0000 (11:49 +0900)]
sh: Disable -Werror for arch/sh/oprofile/.

drivers/oprofile/ objects have proven to be problematic in this regard,
so simply disable -Werror for now.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add plain udivsi3 (not _i4*) for gcc-4.1 and lower.
Takashi YOSHII [Mon, 8 Dec 2008 02:33:06 +0000 (11:33 +0900)]
sh: Add plain udivsi3 (not _i4*) for gcc-4.1 and lower.

We chan't share code for udivsi3 and udivsi3_i4, because they
have a different clobber list. Copy udivsi3 from gcc-4.1.2.

As shown in arch/sh/lib/udivsi3.S (and -Os.S),

  .global __udivsi3_i4i
  .global __udivsi3_i4
  .global __udivsi3
__udivsi3_i4i:
  ...

Three symbols are sharing one code, which is actually udivsi3_i4i.
But, this results unwanted code with gcc 4.1.

In gcc, these three are treated as pseudo instructions that have
their own clobber list apart from the usual calling convention.

According to sh's machine description. The clobber list is as
follows:

 - udivsi3_i4i : t,r1,pr,mach,macl
 - udivsi3_i4  : t,r0,r1,r4,r5,pr,dr0,dr2,dr4
 - udivsi3     : t,r4,pr

The caller of udivsi3 will be left with a broken r1 and mac*.

gcc-4.1.x and older(at least to 3.4) generate udivsi3.
ST's gcc-4.1.1 seems to be OK because it has _i4i.

Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoFix incorrect use of loose in c-checksum.c
Nick Andrew [Fri, 5 Dec 2008 03:07:57 +0000 (14:07 +1100)]
Fix incorrect use of loose in c-checksum.c

Fix incorrect use of loose in c-checksum.c

It should be 'lose', not 'loose'.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Fix up the SH-4A mutex fastpath semantics.
Paul Mundt [Mon, 8 Dec 2008 02:25:50 +0000 (11:25 +0900)]
sh: Fix up the SH-4A mutex fastpath semantics.

This fixes up the __mutex_fastpath_xxx() routines to match the semantics
noted in the comment. Previously these were looping rather than doing a
single-pass, which is counter-intuitive, as the slow path takes care of
the looping for us in the event of contention.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: allow CONFIG_CPU_IDLE
Magnus Damm [Thu, 4 Dec 2008 13:45:20 +0000 (22:45 +0900)]
sh: allow CONFIG_CPU_IDLE

Allow users to select CONFIG_CPU_IDLE regardless of processor type or board.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: allow CONFIG_PM
Magnus Damm [Thu, 4 Dec 2008 13:45:12 +0000 (22:45 +0900)]
sh: allow CONFIG_PM

Allow users to select CONFIG_PM regardless of processor type or board.
Suspend and hibernation are only allowed on supported platforms.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: move the hp6xx pm code
Magnus Damm [Thu, 4 Dec 2008 13:45:03 +0000 (22:45 +0900)]
sh: move the hp6xx pm code

Move the not-so-generic pm code from arch/sh/kernel/pm.c to the
platform directory together with the rest of the hp6xx pm code.

This is done to let non-hp6xx platforms enable CONFIG_PM.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: update se7343 defconfig
Magnus Damm [Thu, 4 Dec 2008 09:00:39 +0000 (18:00 +0900)]
sh: update se7343 defconfig

Update the se7343 defconfig with:
 - use 33MHz PCLK
 - increase max number of SCIFs
 - add serial console configuration to compiled-in kernel command line
 - add 8250 serial port support
 - add sh-mobile-i2c driver
 - add uio driver to export VEU and VPU
 - add usb support and isp1161 host controller
 - add dm9601 ethernet-over-usb support
 - remove smc91x support

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: remove ioport cruft and smc91x from se7343
Magnus Damm [Thu, 4 Dec 2008 09:00:30 +0000 (18:00 +0900)]
sh: remove ioport cruft and smc91x from se7343

Remove out-of-date se7343 ioport code including some old support
for unknown-ne2000-pcmcia-card, cf-over-pcmcia and a mysterical
smc91x that once must have been on a special daughterboard.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: add isp1161 usb host device to se7343
Magnus Damm [Thu, 4 Dec 2008 09:00:22 +0000 (18:00 +0900)]
sh: add isp1161 usb host device to se7343

Add isp1161 platform data to get usb host working on se7343.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: add st16c2550 devices to se7343
Magnus Damm [Thu, 4 Dec 2008 09:00:11 +0000 (18:00 +0900)]
sh: add st16c2550 devices to se7343

Add 8250 platform data to setup the ST16C2550C chip on se7343.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: fix number of interrupts on se7343
Magnus Damm [Thu, 4 Dec 2008 09:00:02 +0000 (18:00 +0900)]
sh: fix number of interrupts on se7343

Fix to make sure that the on-board interrupt sources are included
in the interrupt count on se7343.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh7343 scif configuration update
Magnus Damm [Thu, 4 Dec 2008 08:59:54 +0000 (17:59 +0900)]
sh: sh7343 scif configuration update

Fix interrupt values for the first sh7343 SCIF port and
update the configuration to include the remaining 3 ones.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: propagate r_clk
Magnus Damm [Mon, 1 Dec 2008 06:40:33 +0000 (15:40 +0900)]
sh: propagate r_clk

Make sure the 32 KHz r_clk rate gets propagated correctly. Without
this fix the clocks for RTC, CMT, KEYSC and RWDT are stuck at 0 Hz.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: RSK+ 7201 board support.
Peter Griffin [Fri, 28 Nov 2008 13:56:45 +0000 (22:56 +0900)]
sh: RSK+ 7201 board support.

This patch adds support for the RTE RSK+ 7201 board.

Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add support for SH7201 CPU subtype.
Peter Griffin [Fri, 28 Nov 2008 13:48:20 +0000 (22:48 +0900)]
sh: Add support for SH7201 CPU subtype.

This patch adds support for the SH-2A FPU based SH7201 processor subtype.

Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Switch HD64461 from hw_interrupt_type to irq_chip
Matt Fleming [Fri, 28 Nov 2008 08:58:30 +0000 (08:58 +0000)]
sh: Switch HD64461 from hw_interrupt_type to irq_chip

Use struct irq_chip for the interrupt handler for the HD64461. Also
convert some in{b,w} and out{b,w} calls to the equivalent __raw_* calls.
Include <linux/io.h> and not <asm/io.h> to stop checkpatch.pl
complaining.

This change should now allow machines with HD64461 to define
GENERIC_HARDIRQS_NO__DO_IRQ.

Acked-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: pci-sh7780: fix pci memory address mask
Yoshihiro Shimoda [Thu, 27 Nov 2008 09:57:35 +0000 (18:57 +0900)]
sh: pci-sh7780: fix pci memory address mask

Fix the problem that cannot work a PCI device when system memory size is
256Mbyte in 29bit address mode.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Provide a dyn_arch_ftrace struct definition.
Paul Mundt [Thu, 27 Nov 2008 02:04:43 +0000 (11:04 +0900)]
sh: Provide a dyn_arch_ftrace struct definition.

Needed for dynamic ftrace API changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Split out the idle loop for reuse between _32/_64 variants.
Paul Mundt [Wed, 26 Nov 2008 06:52:44 +0000 (15:52 +0900)]
sh: Split out the idle loop for reuse between _32/_64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Consolidate cpu_relax()/cpu_sleep() definitions across _32/_64.
Paul Mundt [Wed, 26 Nov 2008 06:47:44 +0000 (15:47 +0900)]
sh: Consolidate cpu_relax()/cpu_sleep() definitions across _32/_64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: do not latency trace idle.
Paul Mundt [Wed, 26 Nov 2008 06:22:50 +0000 (15:22 +0900)]
sh: do not latency trace idle.

Description snipped from Steven Rostedt's PPC patch:

    When idle is called, interrupts are blocked, but the idle
    function will still wake up on an interrupt. The problem is
    that the interrupt disabled latency tracer will take this call
    to idle as a latency.

    This patch disables the latency tracing when going into idle.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Tidy up backtrace formatting with kallsyms disabled.
Paul Mundt [Wed, 26 Nov 2008 06:20:35 +0000 (15:20 +0900)]
sh: Tidy up backtrace formatting with kallsyms disabled.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add a simple code dumper for SUPERH32 show_regs().
Paul Mundt [Wed, 26 Nov 2008 05:31:03 +0000 (14:31 +0900)]
sh: Add a simple code dumper for SUPERH32 show_regs().

This implements a simple show_code() that is in turn plugged in to
show_regs() to provide minimal code dumping at the end of the trace.

Built on top of a simple instruction disassembler derived from the
binutils opcode table.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add a few more branch types to the branch emulator.
Paul Mundt [Wed, 26 Nov 2008 04:06:04 +0000 (13:06 +0900)]
sh: Add a few more branch types to the branch emulator.

This plugs in some extra encodings for matching more bsr/bsrf/jsr
branches.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Re-add support for best fit ISA tuning if none is available.
Paul Mundt [Tue, 25 Nov 2008 19:21:36 +0000 (04:21 +0900)]
sh: Re-add support for best fit ISA tuning if none is available.

This was removed in the libgcc integration, but there are still some
compilers that need this. We also relax the rules on the ISA tuning in
the cases where there are no matches for the CPU tuning and adopt the
-any default, which matches the intent of the isa-y target list. This
compensates for mismatches where binutils supports a wide array of
targets whilst the compiler is much more restricted.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: More movmem alias symbol exports for older compilers.
Paul Mundt [Tue, 25 Nov 2008 18:44:07 +0000 (03:44 +0900)]
sh: More movmem alias symbol exports for older compilers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Provide optimized unaligned loads on SH-4A.
Paul Mundt [Tue, 25 Nov 2008 15:29:58 +0000 (00:29 +0900)]
sh: Provide optimized unaligned loads on SH-4A.

This adds support for unaligned loads on SH-4A, using the SH-4A's
neutered movua.l instruction. As movua.l is r0-inspired, stores are
still handled through the packed struct.

Based on asm-generic/unaligned.h by Harvey Harrison.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: P4 ioremap pass-through
Magnus Damm [Tue, 25 Nov 2008 12:57:29 +0000 (21:57 +0900)]
sh: P4 ioremap pass-through

This patch adds a pass-through case when ioremapping P4 addresses.

Addresses passed to ioremap() should be physical addresses, so the
best option is usually to convert the virtual address to a physical
address before calling ioremap. This will give you a virtual address
in P2 which matches the physical address and this works well for
most internal hardware blocks on the SuperH architecture.

However, some hardware blocks must be accessed through P4. Converting
the P4 address to a physical and then back to a P2 does not work. One
example of this is the sh7722 TMU block, it must be accessed through P4.

Without this patch P4 addresses will be mapped using PTEs which
requires the page allocator to be up and running.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add SH-4A optimized fastpath mutex implementation.
Michael Trimarchi [Tue, 25 Nov 2008 12:37:14 +0000 (21:37 +0900)]
sh: Add SH-4A optimized fastpath mutex implementation.

Add fast mutex path implementation for the SH4A architecture

Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh7760fb: Add support SH7720/SH7721 of Renesas
Nobuhiro Iwamatsu [Fri, 21 Nov 2008 05:35:29 +0000 (14:35 +0900)]
sh: sh7760fb: Add support SH7720/SH7721 of Renesas

SH7720 and 7721 has IP of Frame Buffer same as SH7760.
This driver can support these.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh7760fb: Fix color pallette setting
Nobuhiro Iwamatsu [Fri, 21 Nov 2008 05:34:25 +0000 (14:34 +0900)]
sh: sh7760fb: Fix color pallette setting

The setting of the color palette was wrong, fixed it.
And removed fb_setcmap, and added fb_setcolreg function.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: add SH DMAC burst mode constant
Steve Glendinning [Sun, 23 Nov 2008 15:00:31 +0000 (15:00 +0000)]
sh: add SH DMAC burst mode constant

The SH7709 datasheet defines bit 5 as set for burst mode, clear for
cycle-steal mode.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: fix DMAOR register access on SH7709
Steve Glendinning [Sun, 23 Nov 2008 14:27:22 +0000 (14:27 +0000)]
sh: fix DMAOR register access on SH7709

sh7709 hardware manual says DMAOR is 16 bits long on this platform.

Tested and working with a modified smsc911x ethernet driver (sh-dma
support patch for this driver is coming soon).

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add platform-specific constants for SH7709
Steve Glendinning [Sun, 23 Nov 2008 14:27:21 +0000 (14:27 +0000)]
sh: Add platform-specific constants for SH7709

I'm using these constants in support of an in-house development board,
and thought they may be useful to other users of SH7709.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Provide optimized non-atomic bitops for SH-2A.
Paul Mundt [Tue, 25 Nov 2008 12:22:02 +0000 (21:22 +0900)]
sh: Provide optimized non-atomic bitops for SH-2A.

This ties in the new SH-2A 32-bit non-atomic bitops.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add -m4al tuning for SH4AL-DSP.
Paul Mundt [Thu, 20 Nov 2008 06:28:47 +0000 (15:28 +0900)]
sh: Add -m4al tuning for SH4AL-DSP.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add exports for __udivsi3/__sdivsi3 and the _i4 versions.
Paul Mundt [Thu, 20 Nov 2008 06:26:35 +0000 (15:26 +0900)]
sh: Add exports for __udivsi3/__sdivsi3 and the _i4 versions.

Needed by older compilers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Convert to generic bitops for IRQ-toggling implementation.
Paul Mundt [Thu, 20 Nov 2008 06:25:22 +0000 (15:25 +0900)]
sh: Convert to generic bitops for IRQ-toggling implementation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Specify sane default image targets for the SH-2 platforms.
Paul Mundt [Tue, 18 Nov 2008 08:35:45 +0000 (17:35 +0900)]
sh: Specify sane default image targets for the SH-2 platforms.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32.
Paul Mundt [Tue, 18 Nov 2008 08:33:48 +0000 (17:33 +0900)]
sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32.

This moves in the necessary libgcc bits for SUPERH32 and drops the
libgcc linking for the regular targets. This in turn allows us to rip
out quite a few hacks both in sh_ksyms_32 and arch/sh/Makefile.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: __udivdi3 -> do_div() in softfloat lib.
Paul Mundt [Tue, 18 Nov 2008 05:22:39 +0000 (14:22 +0900)]
sh: __udivdi3 -> do_div() in softfloat lib.

Inhibit the generation of __udivdi3 for the softfloat lib, use do_div()
outright.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Fix clock framework compiler warnings.
Paul Mundt [Tue, 18 Nov 2008 05:21:34 +0000 (14:21 +0900)]
sh: Fix clock framework compiler warnings.

  CC      arch/sh/kernel/cpu/clock.o
  arch/sh/kernel/cpu/clock.c: In function 'clk_disable':
  arch/sh/kernel/cpu/clock.c:156: warning: 'return' with a value, in function returning void

Introduced by ("sh: enable and disable clocks recursively").

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agousb: Fix up sh_mobile usbf clock framework warnings.
Paul Mundt [Tue, 18 Nov 2008 03:40:39 +0000 (12:40 +0900)]
usb: Fix up sh_mobile usbf clock framework warnings.

drivers/usb/gadget/m66592-udc.c: In function 'm66592_probe':
drivers/usb/gadget/m66592-udc.c:1672: warning: label 'clean_up2' defined but not used
drivers/usb/host/r8a66597-hcd.c: In function 'r8a66597_probe':
drivers/usb/host/r8a66597-hcd.c:2401: warning: label 'clean_up2' defined but not used

Added by commit 985fc7c81c7852f2e104c71cbe913ace683c9e6a ("sh: sh_mobile
usbf clock framework support").

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoserial: sh-sci: Codestyle cleanup patch.
Michael Trimarchi [Thu, 13 Nov 2008 09:18:35 +0000 (18:18 +0900)]
serial: sh-sci: Codestyle cleanup patch.

Trivial coding style cleanups.

Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agomedia: sh_mobile_ceu_camera: Add HAVE_CLK dependency.
Paul Mundt [Thu, 13 Nov 2008 03:20:26 +0000 (12:20 +0900)]
media: sh_mobile_ceu_camera: Add HAVE_CLK dependency.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: dynamic ftrace support.
Matt Fleming [Wed, 12 Nov 2008 11:11:47 +0000 (20:11 +0900)]
sh: dynamic ftrace support.

First cut at dynamic ftrace support.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: remove old sh_mobile mstpc clocks
Magnus Damm [Fri, 31 Oct 2008 11:24:01 +0000 (20:24 +0900)]
sh: remove old sh_mobile mstpc clocks

Remove the old sh_mobile mstpcr clocks.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh_mobile lcdc clock framework support
Magnus Damm [Fri, 31 Oct 2008 11:23:26 +0000 (20:23 +0900)]
sh: sh_mobile lcdc clock framework support

Add clock framework support to the lcdc driver and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh_mobile usb clock framework support
Magnus Damm [Fri, 31 Oct 2008 11:22:38 +0000 (20:22 +0900)]
sh: sh_mobile usb clock framework support

Add clock framework support to the usb/r8a66597 driver and
adjust the cpu specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh_mobile usbf clock framework support
Magnus Damm [Fri, 31 Oct 2008 11:22:13 +0000 (20:22 +0900)]
sh: sh_mobile usbf clock framework support

Add clock framework support to the usbf/m66592 driver and
adjust the cpu specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh_mobile ceu clock framework support
Magnus Damm [Fri, 31 Oct 2008 11:21:44 +0000 (20:21 +0900)]
sh: sh_mobile ceu clock framework support

Add clock framework support to the sh_mobile ceu and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh_mobile keysc clock framework support
Magnus Damm [Fri, 31 Oct 2008 11:21:23 +0000 (20:21 +0900)]
sh: sh_mobile keysc clock framework support

Add clock framework support to the sh_mobile keysc driver and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>