summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sh: drop static UIO clocks for sh7722, sh7723 and sh7724Magnus Damm2009-08-233-10/+10
| | | | | | | | | | The Runtime PM patch for UIO driver implements coarse grained dynamic power management for UIO devices. With that patch in place we can get rid of the static clock configuration. Which in turn makes it possible for cpuidle to enter deeper sleep. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: let ARCH_SHMOBILE select PM and PM_RUNTIMEMagnus Damm2009-08-231-0/+2
| | | | | | | | | | With the Runtime PM driver changes in place, we must have Runtime PM support in place. Otherwise there is no way to enable clocks to the Runtime PM enabled hardware blocks. This patch makes Runtime PM mandatory on SuperH Mobile. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix section mismatch in platform bus notifier.Paul Mundt2009-08-231-3/+2
| | | | | | | | The runtime PM for SH-Mobile code had platform_bus_notify() as __devinit, which is rather bogus. Kill off the annotation, which subsequently silences the section mismatch warnings. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* uio: Runtime PM for UIO devicesMagnus Damm2009-08-231-0/+54
| | | | | | | | | | | This patch modifies the uio_pdrv_genirq driver to support Runtime PM. The power management implementation simply runtime resumes the device at open() time and runtime suspends it at release() time. The user space driver is responsible for re-initializing the hardware after open(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* v4l2: Runtime PM for SuperH Mobile CEUMagnus Damm2009-08-231-16/+25
| | | | | | | | | | | This patch modifies the SuperH Mobile CEU driver to support Runtime PM. Driver callbacks for Runtime PM are empty because the device registers are always re-initialized after pm_runtime_get_sync(). The Runtime PM functions replaces the clock framework module stop bit handling in this driver. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: Runtime PM for SuperH Mobile LCDCMagnus Damm2009-08-231-46/+110
| | | | | | | | | | | | | | | | This patch modifies the SuperH Mobile LCDC framebuffer driver to support Runtime PM. The driver is using the functions - pm_runtime_get_sync() - pm_runtime_put_sync() to inform the bus code if the hardware is idle or not. If the hardware is idle then the bus code may call the runtime dev_pm_ops callbacks to save and restore state. pm_runtime_resume() is used to allow the driver to access the hardware from probe(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* i2c: Runtime PM for SuperH Mobile I2CMagnus Damm2009-08-231-2/+37
| | | | | | | | | | | This patch modifies the SuperH Mobile I2C driver to support Runtime PM. These changes is all that is needed for proper Runtime PM support in this driver. Driver callbacks for Runtime PM are empty because the device registers are always re-initialized after pm_runtime_get_sync(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Runtime PM for SuperH Mobile platform bus devicesMagnus Damm2009-08-234-1/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is V3 of the SuperH Mobile Runtime PM platform bus implentation matching Rafael's Runtime PM v16. The code gets invoked from the SuperH specific Runtime PM platform bus functions that override the weak symbols for: - platform_pm_runtime_suspend() - platform_pm_runtime_resume() - platform_pm_runtime_idle() This Runtime PM implementation performs two levels of power management. At the time of platform bus runtime suspend the clock to the device is stopped instantly. Later on if all devices within the power domain has their clocks stopped then the device driver ->runtime_suspend() callbacks are used to save hardware register state for each device. Device driver ->runtime_suspend() calls are scheduled from cpuidle context using platform_pm_runtime_suspend_idle(). When all devices have been fully suspended the processor is allowed to enter deep sleep from cpuidle. The runtime resume operation turns on clocks and also restores registers if needed. It is worth noting that the devices start in a suspended state and the device driver is responsible for calling runtime resume before accessing the actual hardware. In this particular platform bus implementation runtime resume is not allowed from interrupt context. Runtime suspend is however allowed from interrupt context as long as the synchronous functions are avoided. [ updated for v17 -- PFM. ] Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'sh/hwblk' into sh/pm-runtimePaul Mundt2009-08-23109-1791/+6560
|\
| * sh: Runtime PM pdev hwblk - kfr2r09 LCDCMagnus Damm2009-08-151-0/+3
| | | | | | | | | | | | | | This patch simply adds LCDC hwblk_id data for the kfr2r09 board. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * Merge branch 'master' into sh/hwblkPaul Mundt2009-08-15669-8354/+18639
| |\
| | * Merge branch 'sh/stable-updates'Paul Mundt2009-08-1545-411/+1042
| | |\
| | * | sh: Set the cfa_offset to 0 if we see a DW_CFA_def_cfa_register opMatt Fleming2009-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way that the CFA is calculated can change as we progress through a function. If we see a DW_CFA_def_cfa_register op we need to reset the frame's cfa_offset value which may have been previously setup. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: delay slot future proofing via EXPMASK on SH-4A parts.Paul Mundt2009-08-151-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements EXPMASK initialization code for SH-4A parts, where it is possible to disable compat features that will go away in newer cores. Presently this includes disabling support for non-nop instructions in the rte delay slot, as well as a sleep instruction being placed in a delay slot (neither of which the kernel does any longer). As a result of this, any future offenders will have illegal slot exceptions generated for them. Associative writes for the memory-mapped cache array are still left enabled, until such a point that special cache operations for SH-4A are provided to move off of the current (and rather dated) SH-4 versions. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: Make sure rte delay slots are nopped out on all parts.Paul Mundt2009-08-152-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Future SH parts do not support any instruction but a nop in the rte delay slot, so make the change for all offending parts. SH-5 is excluded from this, and already has its own set of restrictions with regards to rte delay slot handling. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: stacktrace: Properly terminate the trace entry buffer.Paul Mundt2009-08-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This inserts a ULONG_MAX entry at the end of the valid entries in the stack trace buffer so the default code doesn't need to scan to the end of available slots. This also makes the trace buffer termination behaviour consistent with the other architectures. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: flag the default unwinder as reliable.Paul Mundt2009-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flags the default unwinder as reliable, as it tends to be reliable enough for the purposes of the stacktrace buffer. We leave the unreliable cases for the unwind methods that we know to be completely broken. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: stacktrace: Add reliability checks in address saving ops.Paul Mundt2009-08-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adopts the reliability checks from the x86 stacktrace code so known bad addresses are not recorded in the stack trace buffer. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: unwinder: Convert frame allocations to GFP_ATOMIC.Paul Mundt2009-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | save_stack_trace_tsk() and friends can be called from atomic context (as triggered by latencytop), and subsequently hit two problematic allocation points that were using GFP_KERNEL (these were dwarf_unwind_stack() and dwarf_frame_alloc_regs()). Convert these over to GFP_ATOMIC and get latencytop working with the DWARF unwinder. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | Merge branch 'sh/dwarf-unwinder'Paul Mundt2009-08-1413-1/+1363
| | |\ \
| | | * | sh: Delete DWARF_ARCH_UNWIND_OFFSETMatt Fleming2009-08-142-14/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to figure out the best value for DWARF_ARCH_UNWIND_OFFSET is tricky at best. Various things can change the size (and offset from the beginning of the function) of the prologue. Notably, turning on ftrace adds calls to mcount at the beginning of functions, thereby pushing the prologue further into the function. So replace DWARF_ARCH_UNWIND_OFFSET with some code that continues to execute CFA instructions until the value of return address register is defined. This is safe to do because we know that the return address must have been pushed onto the frame before our first function call; we just can't figure out where at compile-time. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | | * | sh: unwinder: Restore put_unaligned() for an unaligned destination.Paul Mundt2009-08-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The destination address might be unaligned, so set it with put_unaligned() for safety. This restores the previous behaviour, albeit through the proper API. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | | * | sh: unwinder: Fix up usage of unaligned accessors.Paul Mundt2009-08-141-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was using internal symbols for unaligned accesses, bypassing the exposed interface for variable sized safe accesses. This converts all of the __get_unaligned_cpuXX() users over to get_unaligned() directly, relying on the cast to select the proper internal routine. Additionally, the __put_unaligned_cpuXX() case is superfluous given that the destination address is aligned in all of the current cases, so just drop that outright. Furthermore, this switches to the asm/unaligned.h header instead of the asm-generic version, which was silently bypassing the SH-4A optimized unaligned ops. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | | * | sh: Add CFI annotations for exception return.Matt Fleming2009-08-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Annotate various assembly code paths with CFI assembler directives so that DWARF unwind info is available for the unwinder. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | | * | sh: Setup the frame register in asm codeMatt Fleming2009-08-143-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to use DWARF unwinder info the frame register has to contain a valid value. Whilst GCC takes care of this for C code, we have to do it ourselves for assembly. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | | * | sh: dwarf unwinder support.Matt Fleming2009-08-1410-1/+1322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first cut at a generic DWARF unwinder for the kernel. It's still lacking DWARF64 support and the DWARF expression support hasn't been tested very well but it is generating proper stacktraces on SH for WARN_ON() and NULL dereferences. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: oprofile: Kill off dead valid_kernel_stack().Paul Mundt2009-08-141-27/+0
| | |/ / | | | | | | | | | | | | | | | | | | | | This is no longer used, kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: Use the new stack unwinder APIMatt Fleming2009-08-133-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of implementing our own stack unwinder via dump_trace() we should use the new stack unwinder API because it is more modular. This change allows us to decouple the interface for generating stacktraces from the implementation of a stack unwinder. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: Allow multiple stack unwinders to be setupMatt Fleming2009-08-134-3/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide an interface for registering stack unwinders, where each unwinder is given a rating that describes its accuracy and complexity. The more accurate an unwinder is, the more complex it is. If a the current stack unwinder faults, then the stack unwinder with the next highest accuracy will be used in its place (provided one is available). For example, this allows unwinders, such as the DWARF unwinder, to liberally sprinkle BUG()s to catch badly formed DWARF debug info. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: Use the generalized stacktrace opsMatt Fleming2009-08-136-71/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy the stacktrace ops code from x86 and provide a central function for use by functions that need to dump a callstack. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: use printk_onceMarcin Slusarz2009-08-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: linux-sh@vger.kernel.org Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | Merge branch 'sh/stable-updates'Paul Mundt2009-08-13894-15598/+26870
| | |\ \
| | * | | sh: clean up Migo-R header fileMagnus Damm2009-08-072-64/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the Migo-R specific header file from mach-common/ into mach-migor/ and removes unused cruft. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: fix romImage mach dir usageMagnus Damm2009-08-074-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves all the romImage related header files into the mach/ directory. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: LED9, LED10 and LED11 support for Solution Engine 7724Magnus Damm2009-08-071-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for LED9, LED10 and LED11 on the Solution Engine 7724 board. If CONFIG_PM is enabled then these LEDs are used to show the hardware sleep mode used by the processor. Useful to debug cpuidle. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: kfr2r09 board support - NAND flashMagnus Damm2009-08-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the NAND flash chip attached to CS4 on the KFR2R09 board. The device is driven by the platform device driver "onenand-flash". Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: kfr2r09 board support - LCDC panelMagnus Damm2009-08-074-0/+448
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the WQVGA LCD display used by the KFR2R09 board. The LCD module is a TX07D34VM0AAA made by Hitachi, and this module is made up by a R61517 chip together with a 240x400 pixel display. The screen is attached to the SuperH Mobile LCDC using a 18-bit SYS bus. The register settings used by the SYS panel setup code are based on an out-of-tree driver which apart from duplicating all LCDC driver code and writing to non-existing hardware registers also never was posted for upstream merge. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: 18-bit SYS panel fix for SuperH Mobile LCDCMagnus Damm2009-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the SuperH Mobile LCDC driver to make use of the full 18-bit DRD field in the LDDRDR register. Without this patch only 16-bit register access is possible. Needed by 18-bit SYS panels such as the one used on kfr2r09. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: LCDC SYS bus access wait fixMagnus Damm2009-08-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the SuperH Mobile LCDC driver to wait for SYS bus to become idle after reading or writing. This is needed by the kfr2r09 board, but also fixes potential problems on other boards making use of the LCDC in a SYS configuration. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: convert to asm-generic/hardirq.hChristoph Hellwig2009-08-051-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: Fix up early printk build error.Paul Mundt2009-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing endif in the early printk case, fix it up.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: Add SH7724 DMAC support.Kuninori Morimoto2009-08-042-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | | sh: ms7724se: add 1280x720 lcdc output supportKuninori Morimoto2009-08-041-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was no big meaning in the support of SVGA, but 720p support is necessary for ms7724se board. So, this patch support 720p instead of SVGA. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | sh: Runtime PM pdev hwblk - Solution Engine 7724Magnus Damm2009-08-041-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hwblk_id to Solution Engine 7724 board specific on-chip sh7724 platform devices. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | sh: Runtime PM pdev hwblk - kfr2r09Magnus Damm2009-08-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hwblk_id to kfr2r09 board specific on-chip sh7724 platform devices. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | sh: Runtime PM pdev hwblk - sh7724Magnus Damm2009-08-041-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hwblk_id to on-chip sh7724 platform devices. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | sh: Runtime PM pdev hwblk - AP325RXAMagnus Damm2009-08-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hwblk_id to AP325RXA board specific on-chip sh7723 platform devices. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | sh: Runtime PM pdev hwblk - sh7723Magnus Damm2009-08-041-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hwblk_id to on-chip sh7723 platform devices. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | sh: Runtime PM pdev hwblk - Solution Engine 7722Magnus Damm2009-08-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hwblk_id to Solution Engine 7722 board specific on-chip sh7722 platform devices. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | sh: Runtime PM pdev hwblk - Migo-RMagnus Damm2009-08-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hwblk_id to Migo-R board specific on-chip sh7722 platform devices. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
OpenPOWER on IntegriCloud