clocksource: sh_cmt: Add support for multiple channels per device
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 28 Jan 2014 11:36:48 +0000 (12:36 +0100)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:14:23 +0000 (11:14 +0100)
commit3ded45a73fea80ddcac208ed5999b074d98a7e94
treef68e11613e553a758441e27578a2da38ee6db229
parent04fe3dc863be72866c412928db3c9665036b6c74
clocksource: sh_cmt: Add support for multiple channels per device

CMT hardware devices can support multiple channels, with global
registers and per-channel registers. The sh_cmt 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>
(cherry picked from commit 81b3b2711072b6047d5f332cd8751a1c5c9a3fb2)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/clocksource/sh_cmt.c
include/linux/sh_timer.h