aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
Commit message (Collapse)AuthorAge
* sh: multi-evt support for SH-X3 proto CPU.Paul Mundt2009-09-14
| | | | | | | This adds support for multiple vectors per unique IRQ masking source on the SH-X3 proto CPU. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: remove bogus set_bus_parent() from SH7709.Rafael Ignacio Zurita2009-09-14
| | | | | | | | | | | | | | | | This fixes up broken clock re-parenting undertaken by the SH7709 clock framework code, which is currently in conflict with the legacy CPG framework. With this change in place, the legacy CPG ancestry is used, and we manage to avoid contending on the clock_list_sem mutex, which is already held under the legacy registration path, resulting in livelock. In order for SH7709 to fully support the varying clock modes, it needs to implement a more complete clock framework. After this change it is in sync with legacy CPG mode, which ends up being the default configuration for this CPU anyways. Signed-off-by: Rafael Ignacio Zurita <rizurita@yahoo.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix the indication point of the liquid crystal of AP-325RXA(AP3300)Yusuke Goda2009-09-11
| | | | | Signed-off-by: Yusuke Goda <goda.yusuke@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add EcoVec24 romImage defconfigKuninori Morimoto2009-09-11
| | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: USB disable process is needed if romImage boot for EcoVec24Kuninori Morimoto2009-09-11
| | | | | | | | | | when you use romImage on EcoVec24, 1st Linux will enable USB device. But no-one disable it. So re-started Linux will get interrupt before USB driver is attached. This patch disable USB device at first Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: EcoVec24: add HIZA setting for LEDKuninori Morimoto2009-09-11
| | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: EcoVec24: write MAC address in bootKuninori Morimoto2009-09-11
| | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add romImage support for EcoVec24Kuninori Morimoto2009-09-11
| | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: add romimage-macros.hKuninori Morimoto2009-09-11
| | | | | | | | | romimage macros which are used in kfr2r09 is very useful for other board. This patch divides kfr2r09's romimage.h into romimage-macros and partner-jet-setup. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add I2C device support for EcoVec24Kuninori Morimoto2009-09-11
| | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Cleanup whitespace damage in sh4_flush_icache_range().Paul Mundt2009-09-09
| | | | | | | There was quite a lot of tab->space damage done here from a former patch, clean it up once and for all. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off dcache writeback from copy_page().Paul Mundt2009-09-08
| | | | | | | | Now that the cache purging is handled manually by all copy_page() callers, we can kill off copy_page()'s on writeback. This optimizes the non-aliasing case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Use more aggressive dcache purging in kmap teardown.Paul Mundt2009-09-08
| | | | | | | | | This fixes up a number of outstanding issues observed with old mappings on the same colour hanging around. This requires some more optimal handling, but is a safe fallback until all of the corner cases have been handled. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up and optimize the kmap_coherent() interface.Paul Mundt2009-09-03
| | | | | | | | | | | | | This fixes up the kmap_coherent/kunmap_coherent() interface for recent changes both in the page fault path and the shared cache flushers, as well as adding in some optimizations. One of the key things to note here is that the TLB flush itself is deferred until the unmap, and the call in to update_mmu_cache() itself goes away, relying on the regular page fault path to handle the lazy dcache writeback if necessary. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up build warning for SH7785LCR proto board.Paul Mundt2009-09-01
| | | | | | | This fixes up a build warning introduced by the proto board resource changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: disable trapped I/O on SH7785LCR.Paul Mundt2009-09-01
| | | | | | | This board doesn't use trapped I/O for anything, so just kill off the select. This was causing problems in the unhandled page fault die path. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up UP deadlock with SMP-aware cache ops.Paul Mundt2009-09-01
| | | | | | | | | | This builds on top of the previous reversion and implements a special on_each_cpu() variant that simple disables preemption across the call while leaving the interrupt state to the function itself. There were some unintended consequences with IRQ disabling in some of these paths on UP that ran in to a deadlock scenario with IRQs being missed. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Revert "sh: Kill off now redundant local irq disabling."Paul Mundt2009-09-01
| | | | | | | | | | | This reverts commit 64a6d72213dd810dd55bd0a503c36150af41c3c3. Unfortunately we can't use on_each_cpu() for all of the cache ops, as some of them only require preempt disabling. This seems to be the same issue that impacts the mips r4k caches, where this code was based on. This fixes up a deadlock that showed up in some IRQ context cases. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off kgdb's magical NMI debouncing.Paul Mundt2009-09-01
| | | | | | | | The kgdb stub has traditionally tied in to the NMI slot, and manually handled debounce. Now that we have a generic way to do this instead, all of the stub-specific debounce silliness can be killed off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: nmi_debug support.Paul Mundt2009-09-01
| | | | | | | | | | | | | This implements support for NMI debugging that was shamelessly copied from the avr32 port. A bit of special magic is needed in the interrupt exception path given that the NMI exception handler is stubbed in to the regular exception handling table despite being reported in INTEVT. So we mangle the lookup and kick off an EXPEVT-style exception dispatch from the INTEVT path for exceptions that do_IRQ() has no chance of handling. As a result, we also drop the evt2irq() conversion from the do_IRQ() path and just do it in assembly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'master' into sh/smpPaul Mundt2009-09-01
|\ | | | | | | | | Conflicts: arch/sh/mm/cache-sh4.c
| * sh: Fix dcache flushing for N-way write-through caches.Matt Fleming2009-09-01
| | | | | | | | | | | | | | | | | | | | This adopts the special-cased 2-way write-through dcache flusher for N-ways and moves it in to the generic path. Assignment is done at runtime via the check for the CCR_CACHE_WT bit in the same path as the per-way writeback flushers. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: unwinder: Fix up uninitialized variable warnings on sh2a build.Paul Mundt2009-08-31
| | | | | | | | | | | | A couple of these popped up on the sh2a build, causing build failures. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Only shout about fixing up unexpected unaligned accessesMatt Fleming2009-08-29
| | | | | | | | | | | | | | | | | | Some unaligned accesses are completely expected. For example, the trapped_io code uses the unaligned access fixup code path so there's no need to warn about having to fixup the unaligned access. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: sh7785lcr: fix prototype board on 32bit MMU mode.Yoshihiro Shimoda2009-08-27
| | | | | | | | | | | | | | | | Fix up PCA9564 resources on 32bit MMU mode using prototype board. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Tested-by: Raul Porcel <armin76@gentoo.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Tidy up watchdog build for SH-2.Paul Mundt2009-08-27
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Add LCDC Panel support for EcoVec24Kuninori Morimoto2009-08-26
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Add CEU support for EcoVec24Kuninori Morimoto2009-08-26
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Add support LCDC for EcoVec24Kuninori Morimoto2009-08-26
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Add USB support for EcoVec24Kuninori Morimoto2009-08-26
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Add SH-ETH support for EcoVec24Kuninori Morimoto2009-08-26
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: modify to enable boot for EcoVec24Kuninori Morimoto2009-08-26
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: fix CPU_SH7723/7724 numbering bugKuninori Morimoto2009-08-26
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Fix an off-by-1 in FTRACE_SYSCALL_MAX.Paul Mundt2009-08-25
| | | | | | | | | | | | | | | | | | | | This is supposed to be the equivalent of __NR_syscalls, not __NR_syscalls -1. The x86 code this was based on had simply fallen out of sync at the time this was implemented. Fix it up now. As a result, tracing of __NR_perf_counter_open works as advertised. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * Merge branch 'sh/st-integration'Paul Mundt2009-08-24
| |\
| | * sh: Simplify "multi-evt" interrupt handling.Pawel Moll2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way in which "multi-evt" interrups are handled. The intc_evt2irq_table and related intc_evt2irq() have been removed and the "redirecting" handler is installed for the coupled interrupts. Thanks to that the do_IRQ() function don't have to use another level of indirection for all the interrupts... Signed-off-by: Pawel Moll <pawel.moll@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: fix sys_cacheflush error checkingGiuseppe Cavallaro2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys_cacheflush should return with EINVAL if the cache parameter is not one of ICACHE, DCACHE or BCACHE. So, we need to include 0 in the first check. It also adds the three definitions above as wrapper of the existent macros. PS: ltp cacheflush01 test now passes. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Fix problems with cache flushing when cache is in write-through modeStuart Menefy2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | Change the method used to flush the cache in write-through mode to avoid corrupted data being written back to memory. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Fix overzealous checking in __ioremap()Stuart Menefy2009-08-24
| | | | | | | | | | | | | | | | | | | | | Allow peripherals before the start of RAM to be remapped. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Fixes some write posting issues in the interrupt handling for SHStuart Menefy2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible for the CPU to re-enable it's interrupt block bit before the write to the interrupt controller has actually masked out the external interupt at the controller. We get around this by reading back from the interrupt controller which will ensure the write has happened. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Fix underflow in SH udelay() code.Stuart Menefy2009-08-24
| | | | | | | | | | | | | | | Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Add sys_cacheflush() call for SH CPUs.Stuart Menefy2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a system call to allow user code to flush code from the cache. You can use instructions for the data side, but the iside can only be done by a flush ROM which really only works with a direct mapped cache. The later SH4's have 2 way Iside, so this call allows a portable way to flush the cache. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Improve comments int SH4 cache flushing codeStuart Menefy2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | This is a pure documentation, to try to explain why the cache flushing code for the SH4 is implemented the way it is. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Optimise memcpy_to/fromio for SH4Stuart Menefy2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimise memcpy_to/fromio. This is used extensivly by MTD, so is a worthwhile performance gain. The main savings come from not repeatedly calling readl/writel, and doing word instead of byte at a time transfers. Also using "movca.l" on SH4 gives a small performance win. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: generic_in/outs{bwl} optimizations.Stuart Menefy2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | After performing the port2addr conversion, and checking that the data is correctly aligned, simply call __raw_readsX/writesX. These have already been optimised. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Read from CCN_PVR instead of ROM for delay.Stuart Menefy2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | Reading from the ROM is not a good idea as it could disturb some flash operation that it is in progress. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Remove implicit sign extension from assembler immediatesStuart Menefy2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SH instruction set has several instructions which accept an 8 bit immediate operand. For logical instructions this operand is zero extended, for arithmetic instructions the operand is sign extended. After adding an option to the assembler to check this, it was found that several pieces of assembly code were assuming this behaviour, and in one case getting it wrong. So this patch explicitly sign extends any immediate operands, which makes it obvious what is happening, and fixes the one case which got it wrong. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Allow for kernel command line concatenation.Pawel Moll2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far kernel command line arguments could be passed in by a bootloader or defined as CONFIG_CMDLINE, which completely overwriting the first one. This change allows a developer to declare selected kernel parameters in a kernel configuration (eg. project-specific defconfig), retaining possibility of passing others by a bootloader. The obvious examples of the first type are MTD partition or bigphysarea-like region definitions, while "debug" option or network configuration should be given by a bootloader or a JTAG boot script. Signed-off-by: Pawel Moll <pawel.moll@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Use internal watchdog timer to perform resetJon Frosdick2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patches will trigger a reboot using the watchdog timer instead of double fault. Unlike the previous method, this one actually works in 32 bit mode. Reset should also be cleaner. Signed-off-by: Jon Frosdick <jon.frosdick@st.com> Signed-off-by: Carl Shaw <carl.shaw@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: kgdb: do not reload VBR while handling debugger breackpointGiuseppe Cavallaro2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Save the VBR allowing GDB to dump full registers set but do not reload it as soon as the kgdb_handle_exception is invoked. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>