summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-02-14 00:35:18 +0100
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>2015-02-04 11:14:23 +0100
commitea8f135af1440389fc5913576d183b0eccf6c3d4 (patch)
tree5f0940ed390de9cf78405b29c48c3e6c088eeff5 /drivers
parent3ded45a73fea80ddcac208ed5999b074d98a7e94 (diff)
downloadlinux-stable-ea8f135af1440389fc5913576d183b0eccf6c3d4.tar.gz
linux-stable-ea8f135af1440389fc5913576d183b0eccf6c3d4.tar.bz2
linux-stable-ea8f135af1440389fc5913576d183b0eccf6c3d4.zip
clocksource: sh_cmt: Rename clock to "fck" in the non-legacy case
The sh_cmt driver gets the CMT functional clock using a connection ID of "cmt_fck". While all SH SoCs create clock lookup entries with a NULL device ID and a "cmt_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> (cherry picked from commit 24b4e07df54b7bf7739fb3dd193f639a8f274ad6) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clocksource/sh_cmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index 1efe7d64efca..a5ea9aedbd50 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -1007,7 +1007,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
cmt->legacy = cmt->info ? false : true;
/* Get hold of clock. */
- cmt->clk = clk_get(&cmt->pdev->dev, "cmt_fck");
+ cmt->clk = clk_get(&cmt->pdev->dev, cmt->legacy ? "cmt_fck" : "fck");
if (IS_ERR(cmt->clk)) {
dev_err(&cmt->pdev->dev, "cannot get clock\n");
return PTR_ERR(cmt->clk);