aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sh
Commit message (Collapse)AuthorAge
* Merge branch 'soc4' of ↵Arnd Bergmann2012-11-13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc2 Its a little embarrassing, but they all fix problems introduced in previous pull-requests for 3.8 that have been merged. * The three Revert patches back-out secondary CPU initialisation changes from Bastian Hecht which he as advised me are incorrect and break secondary CPU initialisation. * The clkfwk patch from Morimoto-san resolves a build warning. * 'soc4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: sh: clkfwk: fixup unsed variable warning Revert "ARM: shmobile: r8a7779: Replace modify_scu_cpu_psr with scu_power_mode" Revert "ARM: shmobile: sh73a0: Replace modify_scu_cpu_psr with scu_power_mode" Revert "ARM: shmobile: emev2: Replace modify_scu_cpu_psr with scu_power_mode" Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * sh: clkfwk: fixup unsed variable warningKuninori Morimoto2012-11-12
| | | | | | | | | | | | | | | | | | | | This patch solves above warning ${LINUX}/drivers/sh/clk/cpg.c:404:6: warning: \ unused variable 'val' [-Wunused-variable] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms@verge.net.au>
* | Merge branches 'depends/asoc', 'renesas/boards', 'renesas/soc' and ↵Arnd Bergmann2012-11-12
|\| | | | | | | | | | | | | | | | | 'renesas/soc2' into next/boards2 These are all dependencies for the next set of renesas shmobile board changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * sh: clkfwk: add sh_clk_fsidiv_register()Kuninori Morimoto2012-11-08
| | | | | | | | | | | | | | | | This patch adds sh_clk_fsidiv_register() to share FSI-DIV clock code Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
* | sh: Fix up more fallout from pointless ARM __iomem churn.Paul Mundt2012-10-15
|/ | | | | | | | | It was already pointed out how to fix these cases before the offending patches were merged, but unsurprisingly, that didn't happen. As this change is entirely superfluous to begin with, simply shut things up by casting everything away. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge tag 'multiplatform' of ↵Linus Torvalds2012-10-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM soc multiplatform enablement from Olof Johansson: "This is a pretty significant branch. It's the introduction of the first multiplatform support on ARM, and with this (and the later branch) merged, it is now possible to build one kernel that contains support for highbank, vexpress, mvebu, socfpga, and picoxcell. More platforms will be convered over in the next few releases. Two critical last things had to be done for this to be practical and possible: * Today each platform has its own include directory under mach-<mach>/include/mach/*, and traditionally that is where a lot of driver/platform shared definitions have gone, such as platform data structures. They now need to move out to a common location instead, and this branch moves a large number of those out to include/linux/platform_data. * Each platform used to list the device trees to compile for its boards in mach-<mach>/Makefile.boot. Both of the above changes will mean that there are some merge conflicts to come (and some to resolve here). It's a one-time move and once it settles in, we should be good for quite a while. Sorry for the overhead." Fix conflicts as per Olof. * tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (51 commits) ARM: add v7 multi-platform defconfig ARM: msm: Move core.h contents into common.h ARM: highbank: call highbank_pm_init from .init_machine ARM: dtb: move all dtb targets to common Makefile ARM: spear: move platform_data definitions ARM: samsung: move platform_data definitions ARM: orion: move platform_data definitions ARM: vexpress: convert to multi-platform ARM: initial multiplatform support ARM: mvebu: move armada-370-xp.h in mach dir ARM: vexpress: remove dependency on mach/* headers ARM: picoxcell: remove dependency on mach/* headers ARM: move all dtb targets out of Makefile.boot ARM: picoxcell: move debug macros to include/debug ARM: socfpga: move debug macros to include/debug ARM: mvebu: move debug macros to include/debug ARM: vexpress: move debug macros to include/debug ARM: highbank: move debug macros to include/debug ARM: move debug macros to common location ARM: make mach/gpio.h headers optional ...
| * ARM: shmobile: move custom gpio functions to sh-gpio.hRob Herring2012-09-14
| | | | | | | | | | | | | | | | | | | | Move custom shmobile gpio code to a sh-gpio.h to remove the dependency on mach/gpio.h. shmobile always uses gpiolib, so we can remove __GPIOLIB_COMPLEX define from mach/gpio.h. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Magnus Damm <magnus.damm@gmail.com>
* | sh: pfc: Fix up GPIO mux type reconfig case.Paul Mundt2012-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers need to switch pin states between GPIO and pin function at runtime, which was inadvertently broken in the pinctrl driver for GPIOs being bound to a specific direction. This fixes up the request path to ensure that previously configured GPIOs don't cause us to inadvertently error out with an unsupported mux on reconfig, which in practice is primarily aimed at trapping pull-up/down users that have yet to be implemented under the new API. Fixes up regressions in the TPU PWM driver, amongst others. Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error pathLaurent Pinchart2012-09-18
| | | | | | | | | | | | | | | | | | The sh_pfc_gpio_request_enable() function acquires a spinlock but fails to release it before returning if the requested mux type is not supported. Fix this. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: intc: Fix up multi-evt irq association.Paul Mundt2012-08-20
|/ | | | | | | In the multi-evt case we were accidentally associating the parent IRQ, fix this up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: intc: Handle domain association for sparseirq pre-allocated vectors.Paul Mundt2012-08-09
| | | | | | | | | | | | | | | | | | Presently it's assumed that the irqdomain code handles the irq_desc allocation for us, but this isn't necessarily the case when we've pre-allocated IRQs via sparseirq. Previously we had a -EEXIST check in the code that attempted to trap these cases and simply update them in-place, but this behaviour was inadvertently lost in the transition to irqdomains. This simply restores the previous behaviour, first attempting to let the irqdomain core fetch the allocation for us, and falling back to an in-place domain association in the extant IRQ case. Fixes up regressions on platforms that pre-allocate legacy IRQs (specifically ARM-based SH-Mobile platforms, as SH stopped pre-allocating vectors some time ago). Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'common/irqdomain' into sh-latestPaul Mundt2012-08-01
|\
| * sh: intc: initial irqdomain support.Paul Mundt2012-08-01
| | | | | | | | | | | | | | Trivial support for irq domains, using either a linear map or radix tree depending on the vector layout. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: pfc: Fix up init ordering mess.Paul Mundt2012-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ca5481c68e9fbcea62bb3c78ae6cccf99ca8fb73 ("sh: pfc: Rudimentary pinctrl-backed GPIO support.") introduced a regression for platforms that were doing early GPIO API calls (from arch_initcall() or earlier), leading to a situation where our two-stage registration logic would trip itself up and we'd -ENODEV out of the pinctrl registration path, resulting in endless -EPROBE_DEFER errors. Further lack of checking any sort of errors from gpio_request() resulted in boot time warnings, tripping on the FLAG_REQUESTED test-and-set in gpio_ensure_requested(). As it turns out there's no particular need to bother with the two-stage registration, as the platform bus is already available at the point that we have to start caring. As such, it's easiest to simply fold these together in to a single init path, the ordering of which is ensured through the platform's mux registration, as usual. Reported-by: Rafael J. Wysocki <rjw@sisk.pl> Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: pfc: Build fix for pinctrl_remove_gpio_range() changes.Paul Mundt2012-07-25
|/ | | | | | | pinctrl_remove_gpio_range() is now handled by the pinctrl core in the unreg path for some reason, so use that instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'common/pinctrl' into sh-latestPaul Mundt2012-07-20
|\
| * sh: pfc: pin config get/set support.Paul Mundt2012-07-20
| | | | | | | | | | | | | | | | | | This implements simple support for adjusting the pin config value via the pinctrl API. The pinconf-generic code is abandoned for now until we've got a chance to revamp the pinmux_type state tracking that's needed by legacy code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: Prefer DRV_NAME over KBUILD_MODNAME.Paul Mundt2012-07-20
| | | | | | | | | | | | | | While this code is still being shuffled around the KBUILD_MODNAME value isn't particularly useful, switch to something a bit more useful. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: pinctrl legacy group support.Paul Mundt2012-07-17
| | | | | | | | | | | | | | | | This follows the function support by simply doing 1 pin per group encapsulation in order to keep with legacy behaviour. This will be built on incrementally as SoCs define their own pin groups. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: Ignore pinmux GPIOs with invalid enum IDs.Paul Mundt2012-07-17
| | | | | | | | | | | | | | If we encounter invalid entries in the pinmux GPIO range, make sure we've still got a dummy pin definition but don't otherwise map it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: Export pinctrl binding init symbol.Paul Mundt2012-07-17
| | | | | | | | | | | | | | symbol_request() requires the registration symbol to be exported, make sure it is. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: Error out on pinctrl init resolution failure.Paul Mundt2012-07-17
| | | | | | | | | | | | | | pinctrl support is required for correct operation, failure to locate the init routine is fatal. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: Make pr_fmt consistent across pfc drivers.Paul Mundt2012-07-11
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: pinctrl legacy function support.Paul Mundt2012-07-11
| | | | | | | | | | | | | | | | | | This maps out all of the function types to pinctrl function groups. Presently this is restricted to one pin per function to maintain compatability with legacy behaviour. This will be extended as groups are introduced and exiting users migrated. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: Rudimentary pinctrl-backed GPIO support.Paul Mundt2012-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This begins the migration of the PFC core to the pinctrl subsystem. Initial support is very basic, with the bulk of the implementation simply being nopped out in such a way to allow registration with the pinctrl core to succeed. The gpio chip driver is stripped down considerably now relying purely on pinctrl API calls to manage the bulk of its operations. This provides a basis for further PFC refactoring, including decoupling pin functions from the GPIO API, establishing pin groups, and so forth. These will all be dealt with incrementally so as to introduce as few growing and migratory pains to tree-wide PFC pinmux users today. When the interfaces have been well established and in-tree users have been migrated off of the legacy interfaces it will be possible to strip down the core considerably, leading to eventual drivers/pinctrl rehoming. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: Shuffle PFC support core.Paul Mundt2012-07-09
| | | | | | | | | | | | | | | | This follows the intc/clk changes and shuffles the PFC support code under its own directory. This will facilitate better code sharing, and allow us to trim down the exported interface by quite a margin. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | Merge branch 'common/pfc' into sh-latestPaul Mundt2012-06-21
|\|
| * sh: pfc: Verify pin type encoding size at build time.Paul Mundt2012-06-20
| | | | | | | | | | | | | | | | | | | | The encoding is tightly packed, and future changes (such as pinconf-generic support) can easily lead to a situation where we violate the encoding constraints and trample data bit/reg bits. This plugs in some sanity checks by way of a BUILD_BUG_ON() to blow up if we fail to fit. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: Make gpio chip support optional where possible.Paul Mundt2012-06-20
| | | | | | | | | | | | | | | | This implements some Kconfig knobs for ensuring that the PFC gpio chip can be disabled or built as a module in the cases where it's optional, or forcibly enabled in cases where it's not. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: pfc: Split out gpio chip support.Paul Mundt2012-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements a bit of rework for the PFC code, making the core itself slightly more pluggable and moving out the gpio chip handling completely. The API is preserved in such a way that platforms that depend on it for early configuration are still able to do so, while making it possible to migrate to alternate interfaces going forward. This is the first step of chainsawing necessary to support the pinctrl API, with the eventual goal being able to decouple pin function state from the gpio API while retaining gpio chip tie-in for gpio pin functions only, relying on the pinctrl/pinmux API for non-gpio function demux. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | Merge branch 'sh/clkfwk' into sh-latestPaul Mundt2012-06-19
|\ \
| * | sh: clkfwk: Consolidate div clk registration helper.Paul Mundt2012-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | This consolidates the div6/4 versions of the clk registration wrapper. The existing wrappers with their own sh_clk_ops are maintained for API compatability, though in the future it should be possible to be rid of them entirely. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: clkfwk: Consolidate div6/div4 clk_ops definitions.Paul Mundt2012-05-25
| | | | | | | | | | | | | | | | | | | | | Everything with the exception of the _reparent ops are now shared, so switch everything over to common types. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: clkfwk: Use shared sh_clk_div_enable/disable().Paul Mundt2012-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new flag for clocks that need to have their divisor ratio set back to their initial mask at disable time to prevent interactivity problems with the clock stop bit (presently div6 only). With this in place it's possible to handle the corner case on top of the div4 op without any particular need for leaving things split out. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: clkfwk: Use shared sh_clk_div_set_rate()Paul Mundt2012-05-25
| | | | | | | | | | | | | | | | | | Follows the sh_clk_div_recalc() change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: clkfwk: Use shared sh_clk_div_recalc().Paul Mundt2012-05-25
| | | | | | | | | | | | | | | | | | | | | This generalizes the div4 recalc routine for use by div6 and others, then makes it the default. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: clkfwk: Introduce a div_mask for variable div types.Paul Mundt2012-05-25
| | | | | | | | | | | | | | | | | | | | | | | | This plugs in a div_mask for the clock and sets it up for the existing div6/4 cases. This will make it possible to support other div types, as well as share more div6/4 infrastructure. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: clkfwk: Move to common clk_div_table accessors for div4/div6.Paul Mundt2012-05-25
| |/ | | | | | | | | | | | | | | This plugs in a generic clk_div_table, based on the div4 version. div6 is then adopted to use it for encapsulating its div table, which permits us to start div6/4 unification, as well as preparation for other div types. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | Merge branch 'sh/dynamic-irq-cleanup' into sh-latestPaul Mundt2012-06-12
|\ \ | |/ |/| | | | | | | | | Conflicts: drivers/sh/intc/dynamic.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: intc: Allocate subgroup virq backing desc directly.Paul Mundt2012-06-12
| | | | | | | | | | | | | | | | | | This switches to using irq_alloc_desc() directly for subgroup IRQs. We still need to call activate_irq() on these in order to make them requestable, at least up until these get moved in to their own irq domain.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: intc: Kill off deprecated dynamic IRQ API.Paul Mundt2012-05-24
| | | | | | | | | | | | | | Now that all of the users have been converted away, kill off the remnants of the old API. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: intc: Kill off special reservation interface.Paul Mundt2012-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present reserving the IRLs in the IRQ bitmap in addition to the dropping of the legacy IRQ pre-allocation prevent IRL IRQs from being allocated for the x3proto board. The only reason to permit reservations was to lock down possible hardware vectors prior to dynamic IRQ scanning, but this doesn't matter much given that the hardware controller configuration is sorted before we get around to doing any dynamic IRQ allocation anyways. Beyond that, all of the tables are __init annotated, so quite a bit more work would need to be done to support reconfiguring things like IRL controllers on the fly, much more than would ever make it worth the hassle. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Support variable size accesses for div4/div6 clocks.Paul Mundt2012-04-12
| | | | | | | | | | | | | | | | This follows the MSTP clock change and implements variable access size support for the rest of the CPG clocks, too. Upcoming SH-2A support has need of this for 16-bit div4 clocks, while others will follow. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Support variable size accesses for MSTP clocks.Paul Mundt2012-04-10
|/ | | | | | | | | The bulk of the MSTP users require 32-bit access, but this isn't the case for some of the SH-2A parts, so add in some basic infrastructure to let the CPU define its required access size in preparation. Requested-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-shLinus Torvalds2012-03-30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull SuperH updates from Paul Mundt. * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (25 commits) sh: Support I/O space swapping where needed. sh: use set_current_blocked() and block_sigmask() sh: no need to reset handler if SA_ONESHOT sh: intc: Fix up section mismatch for intc_ack_data sh: select ARCH_DISCARD_MEMBLOCK. sh: Consolidate duplicate _32/_64 unistd definitions. sh: ecovec: switch SDHI controllers to card polling sh: Avoid exporting unimplemented syscalls. sh: add platform_device for RSPI in setup-sh7757 SH: pci-sh7780: enable big-endian operation. serial: sh-sci: fix a race of DMA submit_tx on transfer sh: dma: Collect up CHCR of SH7763, SH7764, SH7780 and SH7785 sh: dma: Collect up CHCR of SH7723 and SH7730 sh/next: Fix build fail by asm/system.h in asm/bitops.h arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are compatible sh: cpufreq: Wire up scaling_available_freqs support. sh: cpufreq: notify about rate rounding fallback. sh: cpufreq: Support CPU clock frequency table. sh: cpufreq: struct device lookup from CPU topology. sh: cpufreq: percpu struct clk accounting. ...
| * sh: intc: Fix up section mismatch for intc_ack_dataPaul Mundt2012-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | intc_ack_data is flagged as __init when it shouldn't be, causing section mismatches in non-init paths like intc_set_ack_handle(): WARNING: drivers/built-in.o(.text+0x5d760): Section mismatch in reference from the function intc_set_ack_handle() to the function .init.text:intc_ack_data() The function intc_set_ack_handle() references the function __init intc_ack_data(). This is often because intc_set_ack_handle lacks a __init annotation or the annotation of intc_ack_data is wrong. Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * Merge branch 'common/intc-extension' into sh-latestPaul Mundt2012-03-28
| |\
| | * sh: intc: optimize intc IRQ lookupPaul Mundt2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | This ensures that the sense/prio lists are sorted at registration time, enabling us to use a simple binary search for an optimized lookup (something that had been on the TODO for some time). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: intc: Use IRQ_SET_MASK_OK_NOCOPY for intc_set_affinity.Paul Mundt2012-01-24
| | | | | | | | | | | | | | | | | | | | | intc_set_affinity() updates the cpumask in place, so there's no need for the upper layer to do this itself. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: intc: Kill off superfluous irq_shutdown hooking.Paul Mundt2012-01-24
| | | | | | | | | | | | | | | | | | This already gets handled via disable, as per the notes in linux/irq.h. Signed-off-by: Paul Mundt <lethal@linux-sh.org>