summaryrefslogtreecommitdiffstats
path: root/arch/sh
Commit message (Collapse)AuthorAgeFilesLines
* sh: Disable GENERIC_HARDIRQS_NO__DO_IRQ for unconverted platforms.Paul Mundt2008-12-161-0/+2
| | | | | | | Presently limited to Cayman, Dreamcast, Microdev, and SystemH 7751. Re-enable it for everyone once these have been fixed up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* serial: sh-sci: Reorder the SCxTDR write after the TDxE clear.Paul Mundt2008-11-131-1/+1
| | | | | | | | | | | | Under qemu there is a race between the TDxE read-and-clear and the SCxTDR write. While on hardware it can be gauranteed that the read-and-clear will happen prior to the character being written out, no such assumption can be made under emulation. As this path happens with IRQs off and the hardware itself doesn't care about the ordering, move the SCxTDR write until after the read-and-clear. Signed-off-by: Vladimir Prus <vladimir@codesourcery.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: __copy_user function can corrupt the stack in case of exceptionStuart MENEFY2008-11-131-3/+8
| | | | | | | | | | | | | | | | | | | | The __copy_user function can corrupt the stack in the case of a non-trivial length of data, and either of the first two move instructions cause an exception. This is because the fixup for these two instructions is mapped to the no_pop case, but these instructions execute after the stack is pushed. This change creates an explicit NO_POP exception mapping macro, and uses it for the two instructions executed in the trivial case where no stack pushes occur. More information at ST Linux bugzilla: https://bugzilla.stlinux.com/show_bug.cgi?id=4824 Signed-off-by: Dylan Reid <dylan_reid@bose.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixed the TMU0 reload value on resumeFrancesco VIRLINZI2008-11-131-1/+1
| | | | | | | | | | | | | This patch fixes the TMU0 interrupt frequency on suspend/resume. During the resume the kernel reprograms the TMU0.ClockEvent mode but if the mode is periodic than the TMU0.TCOR is updated with a random wrong value without taking care latest valid saved value. There was no problem with No_HZ system where TMU0.TCOR isn't used. Signed-off-by: Francesco M. Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Don't factor in PAGE_OFFSET for valid_phys_addr_range() check.Paul Mundt2008-11-131-1/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: early printk port type fixMagnus Damm2008-11-131-0/+1
| | | | | | | Add PORT_SCIF to unbreak the early printk code. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Provide a sane valid_phys_addr_range() to prevent TLB reset with PMB.Paul Mundt2008-11-124-2/+37
| | | | | | | | | | | | | | | With the PMB enabled, only P1SEG and up are covered by the PMB mappings, meaning that situations where out-of-bounds physical addresses are read from will lead to TLB reset after the PMB miss, allowing for use cases like dd if=/dev/mem to reset the TLB. Fix this up to make sure the reference is between __MEMORY_START (phys) and __pa(high_memory). This is coherent across all variants of sh/sh64 with and without MMU, though the PMB bug itself is only applicable to SH-4A parts. Reported-by: Hideo Saito <saito@densan.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* fix sci type for SH7723Yoshihiro Shimoda2008-11-121-3/+3
| | | | | | | This patch changes sci type of SH7723 from PORT_SCI to PORT_SCIFA. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Handle fixmap TLB eviction more coherently.Paul Mundt2008-11-103-3/+32
| | | | | | | | | | | | | | | | | | There was a race in the kmap_coherent() implementation. While we guarded against preemption, there was nothing preventing eviction of the pre-faulted fixmap entry from the UTLB. Under certain workloads this would result in the fixmap entries used for cache colouring being evicted from the UTLB in the midst of a copy_page(). In addition to pre-faulting, we also make sure to preserve the PTEs in the kernel page table and introduce a cached PTE for kmap_coherent() usage. This follows a similar change on MIPS ("[MIPS] Fix aliasing bug in copy_to_user_page / copy_from_user_page"). Reported-by: Hideo Saito <saito@densan.co.jp> Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com> Tested-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fix sh2a cache entry_maskYoshihiro Shimoda2008-10-311-4/+4
| | | | | | | fix sh2a cache entry_mask in __flush_{purge,invalidate}_region. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Enable NFS root in Migo-R defconfig.Kuninori Morimoto2008-10-311-7/+28
| | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: FTRACE renamed to FUNCTION_TRACER.Paul Mundt2008-10-314-5/+5
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Add support usb setting on sh 7366Kuninori Morimoto2008-10-311-0/+28
| | | | | | | This patch add usb setting for sh 7366 Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: use the new byteorder headers.Harvey Harrison2008-10-311-19/+17
| | | | | | Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: SHmedia ISA tuning fixups.Paul Mundt2008-10-311-0/+4
| | | | | | | SH-5 doesn't support any elaborate ISA inheritance schemes (-dsp, -up, etc.), so only bother with that if we are building an sh32 kernel. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off long-dead HD64465 cchip support.Paul Mundt2008-10-2811-992/+0
| | | | | | | | | | This code has been dead for many years. The last update it received was in 2003 in order to update it for the driver model changes, though it had already been in disarray and unused before that point. The only boards that ever used this chip have not had users in many years either, so it is finally safe to just kill it off and move on with life. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
*-. Merge branches 'sh/serial-rework' and 'sh/oprofile'Paul Mundt2008-10-281-4/+2
|\ \
| | * sh: oprofile: Fix up the SH7750 performance counter name.Paul Mundt2008-10-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Rather than varying this on a subtype level, we use the counter type as a generic identifier. This simplifies logic in the userspace tools where no fundamental difference exists across the various subtypes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Simplify and lock down the ISA tuning.Paul Mundt2008-10-281-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ISA tuning as it is today can not cope with all of the different variations that are possible, so all we can do is a best attempt based on the CPU family. The DSP and FPU generation are already at odds with each other, and the nommu tuning we weren't handling at all. Additionally, for platforms that never had an FPU, the -nofpu variant never existed, meaning that we would lose out on family granular tuning completely in certain cases. With tat out of the way, we were also using -up versions, allowing for later instructions that branched off of a particular subset of the ISA, but are not actually reflected on the hardware being targetted. This leads to some confusion, and the possibility of bogus instructions on older parts. Kill that off and lock it down to the family being built for specifically. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: sh7785lcr: Select uImage as default image target.Paul Mundt2008-10-281-1/+2
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Add on-chip RTC support for SH7722.Paul Mundt2008-10-282-3/+33
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Provide a sample defconfig for the UL2 (SH7366) board.Kuninori Morimoto2008-10-281-0/+1169
| | | | | | | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Fix FPU tuning on toolchains with mismatched multilib targets.Paul Mundt2008-10-282-5/+22
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Presently there is very little standing in the way of using an SH-4 toolchain for building an SH-2 kernel, and vice versa. Binutils itself has no limitations whatsoever and supports explicit ISA hinting, which we already use with varying degrees of success today. This leaves GCC as the odd one out, due to a rather dubious policy decision by the GCC folks to not include all of the CPU family variants in the default list of multilib targets in GCC4. Despite best efforts to the contrary, libgcc itself already contains awareness of the various CPU types and remains generally usable, allowing it to safely be referenced even on a mismatched target (and indeed, explicit ISA tuning by binutils keeps us honest in terms of ensuring that we do not link incompatible objects in). In order to support this, a couple of changes had to be made. Firstly, the introduction of MAYBE_DECLARE_EXPORT(), which provides a __weak extern reference for libgcc resident routines when finer-grained -m<cpu-family> based tuning is not supported by the toolchain. This fixes up the __sdivsi3_i4i and __udivsi3_i4i references when dealing with SH-2 kernels linked with an SH-4 libgcc. Secondly, in case where we are unable to find a suitable match for CPU family tuning but still have a toolchain that defaults to FP instruction generation, a suitable nofpu target must be selected. This is accomplished by selecting the first nofpu multilib target supported by the toolchain, which is also necessary for selecting the proper libgcc to link against. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().Paul Mundt2008-10-231-0/+1
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: mach-highlander: Handle SCIF pinmuxing on R7785RP.Paul Mundt2008-10-235-5/+34
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: sh7785 pinmux supportMagnus Damm2008-10-233-0/+1545
| | | | | | | | | | | | | | This patch implements pinmux tables for the sh7785 processor. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: update defconfigs.Paul Mundt2008-10-2236-3983/+6098
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off unused p1fc divisors from SH7763 clk fwk.Paul Mundt2008-10-221-1/+0
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: improve pinmux support for single direction pinsMagnus Damm2008-10-223-23/+27
| | | | | | | | | | | | | | | | | | | | This patch improves the support for gpio pins that are hard wired to either input or output and lack control register association. A special force enum id is used to allow use without control register but still mark the gpio pin as input or output. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: use 10MHz VIO_CLK for ov772x on Migo-RMagnus Damm2008-10-221-1/+4
| | | | | | | | | | | | | | | | Use a slower VIO_CKO clock frequency for the ov772x on Migo-R. This improves the camera picture quality on Panel Board V2.1. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Update gpio_set_value() pin value handlingMagnus Damm2008-10-211-1/+1
| | | | | | | | | | | | | | | | | | This patch updates the pinmux code to use the boolean value for the function gpio_set_value(). Without this patch values other than 0 and 1 will result in incorrect GPIO settings. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: update ov772x byte order on Migo-RMagnus Damm2008-10-211-1/+1
| | | | | | | | | | | | | | | | Update the ov772x byte sequence to enable byte swap. This to reflect the recent CEU driver change to follow incoming byte order. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Export cache flush routines needed by sh_eth on SH7619.Paul Mundt2008-10-211-1/+6
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Wire up oops reporting in the die notifier chain.Paul Mundt2008-10-212-0/+3
| | | | | | | | | | | | | | | | | | | | | | Commit 3f5a54e371ca20b119b73704f6c01b71295c1714 ("ftrace: dump out ftrace buffers to console on panic") added an ftrace buffer dumper that hooks in to the die notifier chain and dumps out data in the oops path. Unfortunately SH supported ftrace but didn't support DIE_OOPS, so add that in and get it building again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: ap325rxa: Kill off unused port definitions.Paul Mundt2008-10-211-5/+0
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Hook up PB0->PB7 input-only pins in SH7203 PFC.Paul Mundt2008-10-211-9/+8
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: ap325rxa: Move off of hardcoded pinmux for flctl initialization.Paul Mundt2008-10-211-6/+14
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: add support FLCTL for ap325rxa boardYoshihiro Shimoda2008-10-211-6/+55
| | | | | | | | | | | | | | | | This patch adds platform_device for sh_flctl driver, NAND Flash simple partition, and GPIO setting. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.Paul Mundt2008-10-211-0/+15
| | | | | | | | | | | | | | IRQ modes are not presently supported, so stub in dummy definitions for now (taken from linux/gpio.h). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: rsk7203: leds-gpio support for RSK+ LEDs.Paul Mundt2008-10-211-5/+37
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.Paul Mundt2008-10-211-4/+2
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: fix soc-camera compile breakage on Migo-R.Guennadi Liakhovetski2008-10-211-2/+9
| | | | | | | | | | | | | | Fix Migo-R compile breakage caused by incomplete merge. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: arch/sh/kernel/smp.c needs linux/cpu.h for notify_cpu_starting().Paul Mundt2008-10-211-0/+1
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off duplicate remove_memory() definition.Andrew Morton2008-10-211-17/+0
| | | | | | | | | | | | | | Use the generic remove_memory() provided by mm/memory_hotplug.c instead. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Fix up the SH7203 build.Paul Mundt2008-10-212-2/+2
| | | | | | | | | | | | | | The sh7203.h include paths were missed in the previous update, so switch the include path to cpu/ as with the rest. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds2008-10-20163-1915/+12970
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (112 commits) sh: Move SH-4 CPU headers down one more level. sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected. sh: Migrate common board headers to mach-common/. sh: Move the CPU definition headers from asm/ to cpu/. serial: sh-sci: Add support SCIF of SH7723 video: add sh_mobile_lcdc platform flags video: remove unused sh_mobile_lcdc platform data sh: remove consistent alloc cruft sh: add dynamic crash base address support sh: reduce Migo-R smc91x overruns sh: Fix up some merge damage. Fix debugfs_create_file's error checking method for arch/sh/mm/ Fix debugfs_create_dir's error checking method for arch/sh/kernel/ sh: ap325rxa: Add support RTC RX-8564LC in AP325RXA board sh: Use sh7720 GPIO on magicpanelr2 board sh: Add sh7720 pinmux code sh: Use sh7203 GPIO on rsk7203 board sh: Add sh7203 pinmux code sh: Use sh7723 GPIO on AP325RXA board sh: Add sh7723 pinmux code ...
| * | sh: Move SH-4 CPU headers down one more level.Paul Mundt2008-10-202-0/+0
| | | | | | | | | | | | | | | | | | | | | These accidentally got placed in to cpu-sh4 instead of cpu-sh4/cpu, push them down one more level. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected.Paul Mundt2008-10-202-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The pinmux management is tied in to this code, while it is presently only used by platforms that select GENERIC_GPIO. The asm/gpio.h definitions are not referenced when GENERIC_GPIO is disabled, resulting in a build failure for all of the platforms that don't select it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Migrate common board headers to mach-common/.Paul Mundt2008-10-2053-37/+40
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Move the CPU definition headers from asm/ to cpu/.Paul Mundt2008-10-2011-7/+7
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
OpenPOWER on IntegriCloud