Add JPU support on Migo-R via UIO. This make use of Magnus's
generic UIO platform driver. Chunk of contiguous memory to hold
intermediate image and compressed data during encode and decode.
Signed-off-by: Takanari Hayama <taki@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Enable LCDC deferred io on Migo-R using 1s delay.
As with other deferred io frame buffers user space code should
use fsync() on the frame buffer device to trigger an update.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Add LCDC interrupt resources for AP325 and Migo-R. The LCDC driver does
not require interrupts at this point, but changes such as one-shot SYS
mode using deferred io, and wait-for-vblank will both need this.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Split pages returned by dma_alloc_coherent() and make sure
we free them one by one.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
We don't really want this enabled by default, but it is still quite
useful for debugging. So, make it conditional and leave it off by
default.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This enables the same functionality that sh64 has for sh32. When running
on simulated hardware or via remote memory via the debug interface,
memory is gauranteed to be zero on boot already, and skipping the zeroing
of BSS has measurable boot time benefits.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
The sh cpufreq driver is no longer limited to just the SH-3 and SH-4,
update the documentation to reflect this fact accordingly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Now that the rest of the boards that were using cf-enabler "generically"
have switched to setting up their mappings on their own, only the mach-se
boards were left using it. All of the cf-enabler using mach-se boards
use a special initialization of the MRSHPC windows rather than going
through the special PTE as other SH-4 platforms do. This consolidates
the MRSHPC setup logic, hooks it up on the boards that care, and gets rid
of any and all remaining references to cf-enabler.
This has been long overdue, as cf-enabler has been the bane of
arch/sh/kernel for the last 7 years. Good riddance.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>