summaryrefslogtreecommitdiff
path: root/drivers/clocksource/sh_mtu2.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-03-04 21:09:15 +0400
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-04-16 14:03:33 +0400
commit6dc9693bb3997cb324a2ffb39deaa72081a9bd0d (patch)
tree5006e8f7a90429aeff771d0a6c9316c26c07e3be /drivers/clocksource/sh_mtu2.c
parentfaf3f4f8c805f5f8a786ba544c94bf3e01838388 (diff)
downloadlinux-6dc9693bb3997cb324a2ffb39deaa72081a9bd0d.tar.xz
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>
Diffstat (limited to 'drivers/clocksource/sh_mtu2.c')
-rw-r--r--drivers/clocksource/sh_mtu2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index 7cc6d9429f81..3a3785702422 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -465,7 +465,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
}
/* Get hold of clock. */
- mtu->clk = clk_get(&mtu->pdev->dev, "mtu2_fck");
+ mtu->clk = clk_get(&mtu->pdev->dev, mtu->legacy ? "mtu2_fck" : "fck");
if (IS_ERR(mtu->clk)) {
dev_err(&mtu->pdev->dev, "cannot get clock\n");
return PTR_ERR(mtu->clk);