]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agoMerge branch 'heads/soc-cleanup-for-v3.16' into next
Simon Horman [Wed, 14 May 2014 05:02:58 +0000 (14:02 +0900)]
Merge branch 'heads/soc-cleanup-for-v3.16' into next

10 years agoARM: shmobile: Set clock frequency in HZ from OF nodes
Simon Horman [Tue, 13 May 2014 06:59:18 +0000 (15:59 +0900)]
ARM: shmobile: Set clock frequency in HZ from OF nodes

shmobile_init_delay() looks for OF "clock-frequency" to determine
the delay which is set by calling shmobile_setup_delay().

Unfortunately this seems to be incorrect in detail as
"clock-frequency" node values are in HZ whereas the frequency
argument to shmobile_setup_delay() is in MHz.

Provide a variant of shmobile_setup_delay() that accepts HZ to
correct this problem.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branch 'heads/r7s72100-ccf-for-v3.16' into next
Simon Horman [Wed, 14 May 2014 02:45:21 +0000 (11:45 +0900)]
Merge branch 'heads/r7s72100-ccf-for-v3.16' into next

10 years agoARM: shmobile: r7s72100: use workaround for non DT-clocks
Wolfram Sang [Wed, 14 May 2014 01:10:15 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: use workaround for non DT-clocks

MTU2 is not yet prepared for DT usage, so use the common workaround via
clkdev for now.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: Add forward declaration of struct clk to silence warning
Geert Uytterhoeven [Wed, 14 May 2014 01:10:16 +0000 (03:10 +0200)]
ARM: shmobile: Add forward declaration of struct clk to silence warning

arch/arm/mach-shmobile/board-genmai-reference.c:23:0:
arch/arm/mach-shmobile/include/mach/clock.h:19:54: warning: 'struct clk' declared inside parameter list [enabled by default]
arch/arm/mach-shmobile/include/mach/clock.h:19:54: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: remove SPI DT clocks from legacy clock support
Wolfram Sang [Wed, 14 May 2014 01:10:14 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: remove SPI DT clocks from legacy clock support

Not used anymore since we switched to CCF.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: add spi clocks to dtsi
Wolfram Sang [Wed, 14 May 2014 01:10:13 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: add spi clocks to dtsi

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: remove I2C DT clocks from legacy clock support
Wolfram Sang [Wed, 14 May 2014 01:10:12 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: remove I2C DT clocks from legacy clock support

Not used anymore since we switched to CCF.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: add i2c clocks to dtsi
Wolfram Sang [Wed, 14 May 2014 01:10:11 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: add i2c clocks to dtsi

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: genmai: platform scif devices only for legacy support
Wolfram Sang [Wed, 14 May 2014 01:10:10 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: genmai: platform scif devices only for legacy support

We have now DT support for SCIF, so use the platform_device
initialization only for the legacy support.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: genmai: add uart alias and activate scif2 as console
Wolfram Sang [Wed, 14 May 2014 01:10:09 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: genmai: add uart alias and activate scif2 as console

We keep the UART naming backwards compatible with the legacy version.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: add scif nodes to dtsi
Wolfram Sang [Wed, 14 May 2014 01:10:08 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: add scif nodes to dtsi

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: genmai: populate nodes for external clocks
Wolfram Sang [Wed, 14 May 2014 01:10:07 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: genmai: populate nodes for external clocks

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: add essential clock nodes to dtsi
Wolfram Sang [Wed, 14 May 2014 01:10:06 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: add essential clock nodes to dtsi

Only essential clocks are added for now. Other clocks will be added when
needed.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: document MSTP clock support
Wolfram Sang [Wed, 14 May 2014 01:10:05 +0000 (03:10 +0200)]
ARM: shmobile: r7s72100: document MSTP clock support

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branch 'heads/dt-scif-for-v3.16' into next
Simon Horman [Wed, 14 May 2014 00:57:26 +0000 (09:57 +0900)]
Merge branch 'heads/dt-scif-for-v3.16' into next

Conflicts:
arch/arm/boot/dts/r8a7790-lager.dts

10 years agoARM: shmobile: koelsch: Enable SCIF0 and SCIF1 serial ports in DT
Laurent Pinchart [Wed, 30 Apr 2014 00:31:46 +0000 (02:31 +0200)]
ARM: shmobile: koelsch: Enable SCIF0 and SCIF1 serial ports in DT

SCIF0 and SCIF1 are used as debug serial ports. Enable them and
configure pinmuxing appropriately. We can now remove the clkdev
registration hack for SCIF devices from the Koelsch reference board
file.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[horms+renesas@verge.net.au: added aliases to avoid device renumbering]
[horms+renesas@verge.net.au: resolved conflicts]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
Laurent Pinchart [Wed, 30 Apr 2014 00:31:45 +0000 (02:31 +0200)]
ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT

SCIF0 and SCIF1 are used as debug serial ports. Enable them and
configure pinmuxing appropriately. We can now remove the clkdev
registration hack for SCIF devices from the Lager reference board file.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[horms+renesas@verge.net.au: updated changelog to remove references to
                             device renaming]
[horms+renesas@verge.net.au: resolved conflicts]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branch 'heads/soc-cleanup-for-v3.16' into next
Simon Horman [Tue, 13 May 2014 08:10:43 +0000 (17:10 +0900)]
Merge branch 'heads/soc-cleanup-for-v3.16' into next

10 years agoARM: shmobile: Use shmobile_init_late() on r8a7740
Magnus Damm [Sun, 11 May 2014 23:10:50 +0000 (08:10 +0900)]
ARM: shmobile: Use shmobile_init_late() on r8a7740

Hook up ->init_late for r8a7740 to initialize Suspend-to-RAM
and CPUIdle in case of C-code less board support for r8a7740.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branch 'heads/dt-for-v3.16' into next
Simon Horman [Tue, 13 May 2014 04:41:17 +0000 (13:41 +0900)]
Merge branch 'heads/dt-for-v3.16' into next

10 years agoARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull
Simon Horman [Wed, 15 May 2013 02:57:30 +0000 (11:57 +0900)]
ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull

This change makes the DTS consistent with the platform data
that exists in board-marzen.c.

Empirically it does not appear to be necessary.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branches 'heads/clock-for-v3.16' and 'heads/dt-for-v3.16' into next
Simon Horman [Tue, 13 May 2014 01:51:12 +0000 (10:51 +0900)]
Merge branches 'heads/clock-for-v3.16' and 'heads/dt-for-v3.16' into next

10 years agoARM: shmobile: r8a7791 dtsi: Add GPIO clocks
Geert Uytterhoeven [Wed, 23 Apr 2014 08:25:28 +0000 (10:25 +0200)]
ARM: shmobile: r8a7791 dtsi: Add GPIO clocks

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7790 dtsi: Add GPIO clocks
Geert Uytterhoeven [Wed, 23 Apr 2014 08:25:27 +0000 (10:25 +0200)]
ARM: shmobile: r8a7790 dtsi: Add GPIO clocks

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7791: Correct SYS-DMAC clock defines
Geert Uytterhoeven [Mon, 12 May 2014 18:49:33 +0000 (20:49 +0200)]
ARM: shmobile: r8a7791: Correct SYS-DMAC clock defines

R-Car M2 has two MSTP bits for SYS-DMAC, not one.
Also bring the naming in sync with the documentation.

This issue was introduced in v3.14, in commit
4d8864c9e94ec727f1c675b9f6921525c360334b ("ARM: shmobile: r8a7791: Add
clock index macros for DT sources").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: dts: Move interrupt-parent property to root node
Laurent Pinchart [Wed, 30 Apr 2014 00:41:28 +0000 (02:41 +0200)]
ARM: shmobile: dts: Move interrupt-parent property to root node

There's no need to duplicate the interrupt-parent property in all DT
nodes as the kernel automatically walks parent nodes to find the
property. Specify it once in the root node only.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branches 'heads/soc-cleanup-for-v3.16' and 'heads/sh-drivers-for-v3.16' into...
Simon Horman [Mon, 12 May 2014 07:11:18 +0000 (16:11 +0900)]
Merge branches 'heads/soc-cleanup-for-v3.16' and 'heads/sh-drivers-for-v3.16' into next

10 years agoARM: shmobile: Remove unused r8a7791_init_early()
Magnus Damm [Sun, 11 May 2014 23:25:37 +0000 (08:25 +0900)]
ARM: shmobile: Remove unused r8a7791_init_early()

Remove the now unused r8a7791_init_early() function.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: Use r8a7791 DT CPU Frequency for Koelsch
Magnus Damm [Sun, 11 May 2014 23:25:27 +0000 (08:25 +0900)]
ARM: shmobile: Use r8a7791 DT CPU Frequency for Koelsch

Convert the Koelsch board support to use shmobile_init_delay()
to be able to migrate away from per-SoC delay setup functions.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: Use r8a7791 DT CPU Frequency in common case
Magnus Damm [Sun, 11 May 2014 23:25:18 +0000 (08:25 +0900)]
ARM: shmobile: Use r8a7791 DT CPU Frequency in common case

Convert the common C-code-less r8a7791 DT board support
to use shmobile_init_delay() to be able to migrate away
from per-SoC delay setup functions.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agodrivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI
Geert Uytterhoeven [Tue, 6 May 2014 21:26:19 +0000 (23:26 +0200)]
drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI

If the kernel is built to support multi-ARM configuration with shmobile
support built in, then drivers/sh is not built. This contains the PM
runtime code in drivers/sh/pm_runtime.c, which implicitly enables the
module clocks for all devices, and thus is quite essential.
Without this, the state of clocks depends on implicit reset state, or on
the bootloader.

If ARCH_SHMOBILE_MULTI then build the drivers/sh directory, but ensure that
bits that may conflict (drivers/sh/clk if the common clock framework is
enabled) or are not used (drivers/sh/intc), are not built.
Also, only enable the PM runtime code when actually running on a shmobile
SoCs that needs it.

ARCH_SHMOBILE_MULTI was added a while ago by commit
efacfce5f8a523457e9419a25d52fe39db00b26a ("ARM: shmobile: Introduce
ARCH_SHMOBILE_MULTI"), but drivers/sh was compiled for both
ARCH_SHMOBILE_LEGACY and ARCH_SHMOBILE_MULTI until commit
bf98c1eac1d4a6bcf00532e4fa41d8126cd6c187 ("ARM: Rename ARCH_SHMOBILE to
ARCH_SHMOBILE_LEGACY").

Inspired by a patch from Ben Dooks <ben.dooks@codethink.co.uk>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branches 'heads/clock-cleanup-for-v3.16', 'heads/r8a7740-cleanup-for-v3.16...
Simon Horman [Sun, 11 May 2014 12:00:44 +0000 (21:00 +0900)]
Merge branches 'heads/clock-cleanup-for-v3.16', 'heads/r8a7740-cleanup-for-v3.16', 'heads/boards-for-v3.16', 'heads/clock-for-v3.16' and 'heads/dt-for-v3.16' into next

10 years agoARM: shmobile: Minor cleanup of the Armadillo legacy board code
Magnus Damm [Wed, 7 May 2014 23:37:53 +0000 (08:37 +0900)]
ARM: shmobile: Minor cleanup of the Armadillo legacy board code

Cleanup the legacy Armadillo board code slightly by
removing the pointless eva_add_early_devices() function

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: Remove unused r8a7740_init_delay()
Magnus Damm [Wed, 7 May 2014 23:32:56 +0000 (08:32 +0900)]
ARM: shmobile: Remove unused r8a7740_init_delay()

Remove the now unused r8a7740_init_delay() function.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: Use r8a7740 DT CPU Frequency for Armadillo DT Ref
Magnus Damm [Wed, 7 May 2014 23:32:47 +0000 (08:32 +0900)]
ARM: shmobile: Use r8a7740 DT CPU Frequency for Armadillo DT Ref

Convert the Armadillo r8a7740 DT reference board support
to use shmobile_init_delay() to be able to migrate away
from per-SoC delay setup functions.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: Use r8a7740 DT CPU Frequency in common case
Magnus Damm [Wed, 7 May 2014 23:32:38 +0000 (08:32 +0900)]
ARM: shmobile: Use r8a7740 DT CPU Frequency in common case

Convert the common C-code-less r8a7740 DT board support
to use shmobile_init_delay() to be able to migrate away
from per-SoC delay setup functions.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: Add r8a7740 Maximum CPU Frequency to DTS
Magnus Damm [Wed, 7 May 2014 23:32:29 +0000 (08:32 +0900)]
ARM: shmobile: Add r8a7740 Maximum CPU Frequency to DTS

Add 800 MHz to the r8a7740 DTS to describe the maximum CPU frequency.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r7s72100: Switch to new style MTU2 device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:22 +0000 (13:15 +0200)]
ARM: shmobile: r7s72100: Switch to new style MTU2 device

The MTU2 (Multi-Function Timer Pulse Unit 2) driver implements a new
style of platform data that handles the timer as a single device with
multiple channel. Switch from the old-style platform data to the
new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agosh: Switch to new style MTU2 device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:21 +0000 (13:15 +0200)]
sh: Switch to new style MTU2 device

The MTU2 (Multi-Function Timer Pulse Unit 2) driver implements a new
style of platform data that handles the timer as a single device with
multiple channel. Switch from the old-style platform data to the
new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7779: Switch to new style TMU device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:20 +0000 (13:15 +0200)]
ARM: shmobile: r8a7779: Switch to new style TMU device

The TMU (Timer Unit) driver implements a new style of platform data that
handles the timer as a single device with multiple channel. Switch from
the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7778: Switch to new style TMU device
Laurent Pinchart [Fri, 2 May 2014 18:21:25 +0000 (20:21 +0200)]
ARM: shmobile: r8a7778: Switch to new style TMU device

The TMU (Timer Unit) driver implements a new style of platform data that
handles the timer as a single device with multiple channel. Switch from
the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7740: Switch to new style TMU device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:18 +0000 (13:15 +0200)]
ARM: shmobile: r8a7740: Switch to new style TMU device

The TMU (Timer Unit) driver implements a new style of platform data that
handles the timer as a single device with multiple channel. Switch from
the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: sh73a0: Switch to new style TMU device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:17 +0000 (13:15 +0200)]
ARM: shmobile: sh73a0: Switch to new style TMU device

The TMU (Timer Unit) driver implements a new style of platform data that
handles the timer as a single device with multiple channel. Switch from
the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: sh7372: Switch to new style TMU device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:16 +0000 (13:15 +0200)]
ARM: shmobile: sh7372: Switch to new style TMU device

The TMU (Timer Unit) driver implements a new style of platform data that
handles the timer as a single device with multiple channel. Switch from
the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agosh: Switch to new style TMU device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:15 +0000 (13:15 +0200)]
sh: Switch to new style TMU device

The TMU (Timer Unit) driver implements a new style of platform data that
handles the timer as a single device with multiple channel. Switch from
the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7791: Switch to new style CMT device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:14 +0000 (13:15 +0200)]
ARM: shmobile: r8a7791: Switch to new style CMT device

The CMT (Compare Match Timer) driver implements a new style of platform
data that handles the timer as a single device with multiple channel.
Switch from the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[horms+renesas@verge.net.au resolved conflict: use clk_names]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7790: Switch to new style CMT device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:13 +0000 (13:15 +0200)]
ARM: shmobile: r8a7790: Switch to new style CMT device

The CMT (Compare Match Timer) driver implements a new style of platform
data that handles the timer as a single device with multiple channel.
Switch from the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[horms+renesas@verge.net.au resolved conflict: use clk_names]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7740: Switch to new style CMT device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:12 +0000 (13:15 +0200)]
ARM: shmobile: r8a7740: Switch to new style CMT device

The CMT (Compare Match Timer) driver implements a new style of platform
data that handles the timer as a single device with multiple channel.
Switch from the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a73a4: Switch to new style CMT device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:11 +0000 (13:15 +0200)]
ARM: shmobile: r8a73a4: Switch to new style CMT device

The CMT (Compare Match Timer) driver implements a new style of platform
data that handles the timer as a single device with multiple channel.
Switch from the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: sh73a0: Switch to new style CMT device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:10 +0000 (13:15 +0200)]
ARM: shmobile: sh73a0: Switch to new style CMT device

The CMT (Compare Match Timer) driver implements a new style of platform
data that handles the timer as a single device with multiple channel.
Switch from the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: sh7372: Switch to new style CMT device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:09 +0000 (13:15 +0200)]
ARM: shmobile: sh7372: Switch to new style CMT device

The CMT (Compare Match Timer) driver implements a new style of platform
data that handles the timer as a single device with multiple channel.
Switch from the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agosh: Switch to new style CMT device
Laurent Pinchart [Wed, 23 Apr 2014 11:15:08 +0000 (13:15 +0200)]
sh: Switch to new style CMT device

The CMT (Compare Match Timer) driver implements a new style of platform
data that handles the timer as a single device with multiple channel.
Switch from the old-style platform data to the new-style platform data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7740: Correct name of DT Ethernet clock
Geert Uytterhoeven [Wed, 7 May 2014 20:32:28 +0000 (22:32 +0200)]
ARM: shmobile: r8a7740: Correct name of DT Ethernet clock

The preferred node name in DT for an Ethernet device is "ethernet".
"sh-eth" was used in preliminary and incomplete bindings.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: armadillo-reference dts: Add Ethernet support
Geert Uytterhoeven [Wed, 7 May 2014 20:32:30 +0000 (22:32 +0200)]
ARM: shmobile: armadillo-reference dts: Add Ethernet support

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7740 dtsi: Add Ethernet support
Geert Uytterhoeven [Wed, 7 May 2014 20:32:29 +0000 (22:32 +0200)]
ARM: shmobile: r8a7740 dtsi: Add Ethernet support

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: henninger: add MSIOF0 DT support
Sergei Shtylyov [Tue, 6 May 2014 20:47:59 +0000 (00:47 +0400)]
ARM: shmobile: henninger: add MSIOF0 DT support

Define the Henninger board dependent part of the MSIOF0 device node.
Add device node for Renesas R2A11302FT PMIC for which no bindings exist yet.

Based on the Koelsch MSIOF device tree patch by Geert Uytterhoeven.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: henninger: add QSPI DT support
Sergei Shtylyov [Mon, 5 May 2014 22:45:31 +0000 (02:45 +0400)]
ARM: shmobile: henninger: add QSPI DT support

Define the Henninger board dependent part of the QSPI device node.
Add device nodes for Spansion S25FL512S SPI flash and MTD partitions on it.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: henninger: add SDHI0/2 DT support
Sergei Shtylyov [Sat, 3 May 2014 17:04:34 +0000 (21:04 +0400)]
ARM: shmobile: henninger: add SDHI0/2 DT support

Define the Henninger board dependent part of the SDHI0/2 device nodes along with
the necessary voltage regulators (note that the Vcc regulators are dummy -- they
are required but don't actually exist on the board). Also, GPIOs have to be used
for the CD and WP signals due to the SDHI driver constraints...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branch 'dt-for-v3.16' into next
Simon Horman [Fri, 2 May 2014 02:27:11 +0000 (11:27 +0900)]
Merge branch 'dt-for-v3.16' into next

10 years agoARM: shmobile: henninger: specify EXTAL frequency
Sergei Shtylyov [Thu, 1 May 2014 22:56:33 +0000 (02:56 +0400)]
ARM: shmobile: henninger: specify EXTAL frequency

When creating the initial device tree for the Henninger board,  I've overlooked
that EXTAL frequency needs to be overridden there. The 'sh-sci' driver  managed
to work somehow but the SDHI driver that I've tried to enable just hanged with
the default EXTAL frequency of 0...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branch 'heads/dt-for-v3.16' into next
Simon Horman [Mon, 28 Apr 2014 00:12:39 +0000 (09:12 +0900)]
Merge branch 'heads/dt-for-v3.16' into next

10 years agoARM: shmobile: henninger: enable SATA0
Sergei Shtylyov [Fri, 25 Apr 2014 22:51:27 +0000 (02:51 +0400)]
ARM: shmobile: henninger: enable SATA0

Enable SATA0 device for the Henninger board.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branch 'heads/dt-for-v3.16' into next
Simon Horman [Fri, 25 Apr 2014 01:27:00 +0000 (10:27 +0900)]
Merge branch 'heads/dt-for-v3.16' into next

10 years agoARM: shmobile: henninger: add Ether DT support
Sergei Shtylyov [Thu, 24 Apr 2014 22:44:12 +0000 (02:44 +0400)]
ARM: shmobile: henninger: add Ether DT support

Define the Henninger board dependent part of the Ether device node.
Enable DHCP and NFS root for the kernel booting.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: henninger: initial device tree
Sergei Shtylyov [Thu, 24 Apr 2014 22:42:41 +0000 (02:42 +0400)]
ARM: shmobile: henninger: initial device tree

Add the initial device tree for the R8A7791 SoC based Henninger board. SCIF0
serial port support is included, so that the serial console can work.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branch 'heads/soc-for-v3.16' into next
Simon Horman [Fri, 25 Apr 2014 01:02:42 +0000 (10:02 +0900)]
Merge branch 'heads/soc-for-v3.16' into next

10 years agoARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Ulf Hansson [Fri, 11 Apr 2014 15:26:41 +0000 (17:26 +0200)]
ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data

There are no active users of these callbacks, thus there are no benefit
of trying to invoke them.

Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge branch 'clockevents/cmt-mtu2-tmu-cleanups' of git://git.linaro.org/people/danie...
Simon Horman [Wed, 23 Apr 2014 01:01:02 +0000 (10:01 +0900)]
Merge branch 'clockevents/cmt-mtu2-tmu-cleanups' of git://git.linaro.org/people/daniel.lezcano/linux into cmt-mtu2-tmu-cleanups-for-v3.16

10 years agoMerge tag 'renesas-clock-for-v3.16' into cmt-mtu2-tmu-cleanups-for-v3.16
Simon Horman [Wed, 23 Apr 2014 00:59:40 +0000 (09:59 +0900)]
Merge tag 'renesas-clock-for-v3.16' into cmt-mtu2-tmu-cleanups-for-v3.16

Renesas ARM Based SoC Clock Updates for v3.16

SH Mobile shared clock code
* Introduce shmobile_clk_workaround()

r8a7791 (R-Car M2) SoC
* Rename VSP1_SY clocks to VSP1_S
* Correct the I2C clocks parents

r8a7790 (R-Car H2) SoC
* Remove old style audio clock
* Rename VSP1_(SY|RT) clocks to VSP1_(S|R)
* Fix the I2C clocks parents

r8a7778 (R-Car M1) SoC
* Remove old style audio clock

10 years agoclocksource: sh_mtu2: Sort headers alphabetically
Laurent Pinchart [Tue, 4 Mar 2014 13:11:47 +0000 (14:11 +0100)]
clocksource: sh_mtu2: Sort headers alphabetically

This helps locating duplicates and inserting new headers.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Remove FSF mail address from GPL notice
Laurent Pinchart [Tue, 4 Mar 2014 13:12:32 +0000 (14:12 +0100)]
clocksource: sh_mtu2: Remove FSF mail address from GPL notice

Do not include the paragraph about writing to the Free Software
Foundation's mailing address from the sample GPL notice. The FSF has
changed addresses in the past, and may do so again. Linux already
includes a copy of the GPL.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Rename clock to "fck" in the non-legacy case
Laurent Pinchart [Tue, 4 Mar 2014 17:09:15 +0000 (18:09 +0100)]
clocksource: sh_mtu2: Rename clock to "fck" in the non-legacy case

The sh_mtu2 driver gets the MTU2 functional clock using a connection ID
of "mtu2_fck". While all SH SoCs create clock lookup entries with a NULL
device ID and a "mtu2_fck" connection ID, the ARM SoCs use the device ID
only with a NULL connection ID. This works on legacy platforms but will
break on ARM with DT boot.

Fix the situation by using a connection ID of "fck" in the non-legacy
platform data case. Clock lookup entries will be renamed to use the
device ID as well as the connection ID as platforms get moved to new
platform data. The legacy code will eventually be dropped, leaving us
with device ID based clock lookup, compatible with DT boot.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Add support for multiple channels per device
Laurent Pinchart [Tue, 4 Mar 2014 17:05:45 +0000 (18:05 +0100)]
clocksource: sh_mtu2: Add support for multiple channels per device

MTU2 hardware devices can support multiple channels, with global
registers and per-channel registers. The sh_mtu2 driver currently models
the hardware with one Linux device per channel. This model makes it
difficult to handle global registers in a clean way.

Add support for a new model that uses one Linux device per timer with
multiple channels per device. This requires changes to platform data,
add new channel configuration fields.

Support for the legacy model is kept and will be removed after all
platforms switch to the new model.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Hardcode MTU2 clock event rating to 200
Laurent Pinchart [Tue, 4 Mar 2014 14:19:41 +0000 (15:19 +0100)]
clocksource: sh_mtu2: Hardcode MTU2 clock event rating to 200

All boards use clock event ratings of 200 for the MTU2, hardcode it in
the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Set cpumask to cpu_possible_mask
Laurent Pinchart [Tue, 4 Mar 2014 14:22:19 +0000 (15:22 +0100)]
clocksource: sh_mtu2: Set cpumask to cpu_possible_mask

The MTU2 is not tied to CPU0, make it usable on any CPU.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Replace hardcoded register values with macros
Laurent Pinchart [Tue, 4 Mar 2014 14:16:25 +0000 (15:16 +0100)]
clocksource: sh_mtu2: Replace hardcoded register values with macros

Define symbolic macros for all used registers bits.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Allocate channels dynamically
Laurent Pinchart [Tue, 4 Mar 2014 13:23:00 +0000 (14:23 +0100)]
clocksource: sh_mtu2: Allocate channels dynamically

This prepares the driver for multi-channel support.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Replace kmalloc + memset with kzalloc
Laurent Pinchart [Tue, 4 Mar 2014 13:10:55 +0000 (14:10 +0100)]
clocksource: sh_mtu2: Replace kmalloc + memset with kzalloc

One kzalloc a day keeps the bugs away.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Add index to struct sh_mtu2_channel
Laurent Pinchart [Tue, 4 Mar 2014 13:17:26 +0000 (14:17 +0100)]
clocksource: sh_mtu2: Add index to struct sh_mtu2_channel

Use the index as the timer start/stop bit and when printing messages to
identify the channel.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Add memory base to sh_mtu2_channel structure
Laurent Pinchart [Tue, 4 Mar 2014 13:04:24 +0000 (14:04 +0100)]
clocksource: sh_mtu2: Add memory base to sh_mtu2_channel structure

The channel memory base is channel-specific, add it to the channel
structure in preparation for support of multiple channels per device.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Constify name argument to sh_mtu2_register()
Laurent Pinchart [Tue, 4 Mar 2014 12:57:14 +0000 (13:57 +0100)]
clocksource: sh_mtu2: Constify name argument to sh_mtu2_register()

The name argument is assigned to const structure fields only, constify
it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Split channel setup to separate function
Laurent Pinchart [Tue, 4 Mar 2014 12:11:23 +0000 (13:11 +0100)]
clocksource: sh_mtu2: Split channel setup to separate function

Move the channel setup code from sh_mtu2_setup to a new
sh_mtu2_setup_channel function and call it from sh_mtu2_setup.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Rename struct sh_mtu2_priv to sh_mtu2_device
Laurent Pinchart [Tue, 4 Mar 2014 12:04:48 +0000 (13:04 +0100)]
clocksource: sh_mtu2: Rename struct sh_mtu2_priv to sh_mtu2_device

Channel data is private as well, rename priv to device to make the
distrinction between the core device and the channels clearer.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Split channel fields from sh_mtu2_priv
Laurent Pinchart [Tue, 4 Mar 2014 11:58:30 +0000 (12:58 +0100)]
clocksource: sh_mtu2: Split channel fields from sh_mtu2_priv

Create a new sh_mtu2_channel structure to hold the channel-specific
fields in preparation for multiple channels per device support.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Turn sh_mtu2_priv fields into local variables
Laurent Pinchart [Tue, 4 Mar 2014 11:59:54 +0000 (12:59 +0100)]
clocksource: sh_mtu2: Turn sh_mtu2_priv fields into local variables

The rate and periodic fields are used in a single function only, as
local variables. Remove them from the structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_mtu2: Use request_irq() instead of setup_irq()
Laurent Pinchart [Mon, 17 Feb 2014 10:27:49 +0000 (11:27 +0100)]
clocksource: sh_mtu2: Use request_irq() instead of setup_irq()

The driver claims it needs to register an interrupt handler too early
for request_irq(). This might have been true in the past, but the only
meaningful difference between request_irq() and setup_irq() today is an
additional kzalloc() call in request_irq(). As the driver calls
kmalloc() itself we know that the slab allocator is available, we can
thus switch to request_irq().

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
10 years agoclocksource: sh_tmu: Sort headers alphabetically
Laurent Pinchart [Wed, 12 Feb 2014 15:56:44 +0000 (16:56 +0100)]
clocksource: sh_tmu: Sort headers alphabetically

This helps locating duplicates and inserting new headers.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Remove FSF mail address from GPL notice
Laurent Pinchart [Fri, 14 Feb 2014 00:25:50 +0000 (01:25 +0100)]
clocksource: sh_tmu: Remove FSF mail address from GPL notice

Do not include the paragraph about writing to the Free Software
Foundation's mailing address from the sample GPL notice. The FSF has
changed addresses in the past, and may do so again. Linux already
includes a copy of the GPL.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Rename clock to "fck" in the non-legacy case
Laurent Pinchart [Thu, 13 Feb 2014 23:35:18 +0000 (00:35 +0100)]
clocksource: sh_tmu: Rename clock to "fck" in the non-legacy case

The sh_tmu driver gets the TMU functional clock using a connection ID of
"tmu_fck". While all SH SoCs create clock lookup entries with a NULL
device ID and a "tmu_fck" connection ID, the ARM SoCs use the device ID
only with a NULL connection ID. This works on legacy platforms but will
break on ARM with DT boot.

Fix the situation by using a connection ID of "fck" in the non-legacy
platform data case. Clock lookup entries will be renamed to use the
device ID as well as the connection ID as platforms get moved to new
platform data. The legacy code will eventually be dropped, leaving us
with device ID based clock lookup, compatible with DT boot.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Add support for multiple channels per device
Laurent Pinchart [Tue, 28 Jan 2014 11:36:48 +0000 (12:36 +0100)]
clocksource: sh_tmu: Add support for multiple channels per device

TMU hardware devices can support multiple channels, with global
registers and per-channel registers. The sh_tmu driver currently models
the hardware with one Linux device per channel. This model makes it
difficult to handle global registers in a clean way.

Add support for a new model that uses one Linux device per timer with
multiple channels per device. This requires changes to platform data,
add new channel configuration fields.

Support for the legacy model is kept and will be removed after all
platforms switch to the new model.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Hardcode TMU clock event and source ratings to 200
Laurent Pinchart [Wed, 19 Feb 2014 16:00:31 +0000 (17:00 +0100)]
clocksource: sh_tmu: Hardcode TMU clock event and source ratings to 200

All boards use clock event and clock source ratings of 200 for the TMU,
hardcode it in the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Replace hardcoded register values with macros
Laurent Pinchart [Tue, 28 Jan 2014 23:33:08 +0000 (00:33 +0100)]
clocksource: sh_tmu: Replace hardcoded register values with macros

Define symbolic macros for all used registers bits.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Allocate channels dynamically
Laurent Pinchart [Mon, 27 Jan 2014 21:04:17 +0000 (22:04 +0100)]
clocksource: sh_tmu: Allocate channels dynamically

This prepares the driver for multi-channel support.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Replace kmalloc + memset with kzalloc
Laurent Pinchart [Mon, 27 Jan 2014 21:04:17 +0000 (22:04 +0100)]
clocksource: sh_tmu: Replace kmalloc + memset with kzalloc

One kzalloc a day keeps the bugs away.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Add index to struct sh_tmu_channel
Laurent Pinchart [Mon, 27 Jan 2014 21:04:17 +0000 (22:04 +0100)]
clocksource: sh_tmu: Add index to struct sh_tmu_channel

Use the index as the timer start/stop bit and when printing messages to
identify the channel.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Add memory base to sh_tmu_channel structure
Laurent Pinchart [Mon, 27 Jan 2014 21:04:17 +0000 (22:04 +0100)]
clocksource: sh_tmu: Add memory base to sh_tmu_channel structure

The channel memory base is channel-specific, add it to the channel
structure in preparation for support of multiple channels per device.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Constify name argument to sh_tmu_register()
Laurent Pinchart [Mon, 17 Feb 2014 15:04:16 +0000 (16:04 +0100)]
clocksource: sh_tmu: Constify name argument to sh_tmu_register()

The name argument is assigned to const structure fields only, constify
it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Split channel setup to separate function
Laurent Pinchart [Mon, 27 Jan 2014 21:04:17 +0000 (22:04 +0100)]
clocksource: sh_tmu: Split channel setup to separate function

Move the channel setup code from sh_tmu_setup to a new
sh_tmu_setup_channel function and call it from sh_tmu_setup.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
10 years agoclocksource: sh_tmu: Rename struct sh_tmu_priv to sh_tmu_device
Laurent Pinchart [Mon, 27 Jan 2014 21:04:17 +0000 (22:04 +0100)]
clocksource: sh_tmu: Rename struct sh_tmu_priv to sh_tmu_device

Channel data is private as well, rename priv to device to make the
distrinction between the core device and the channels clearer.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>