mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 10:44:14 +08:00
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>
This commit is contained in:
parent
81b3b27110
commit
24b4e07df5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user