clocksource: sh_mtu2: Add support for multiple channels per device
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 4 Mar 2014 17:05:45 +0000 (18:05 +0100)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:14:27 +0000 (11:14 +0100)
commit464be7f4010434e172500a68aef9801c89ed8ac5
tree6f9ef6b7d11f69c23ab6e2eed30897ac3d42503c
parentbcbfa40dfbbdadda454b4f8112075b311010ec8b
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>
(cherry picked from commit faf3f4f8c805f5f8a786ba544c94bf3e01838388)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/clocksource/sh_mtu2.c