summaryrefslogtreecommitdiffstats
path: root/drivers/clk/x86
diff options
context:
space:
mode:
authorPierre-Louis Bossart2017-02-20 21:23:56 +0100
committerStephen Boyd2017-04-19 18:52:32 +0200
commit41ee7caf59e1c68d696162523cdf1fa7f717a731 (patch)
tree8e9d88329c9ed73e61db1bdf8c0b616fa13dbb34 /drivers/clk/x86
parentclk: ns2: Correct SDIO bits (diff)
downloadkernel-qcow2-linux-41ee7caf59e1c68d696162523cdf1fa7f717a731.tar.gz
kernel-qcow2-linux-41ee7caf59e1c68d696162523cdf1fa7f717a731.tar.xz
kernel-qcow2-linux-41ee7caf59e1c68d696162523cdf1fa7f717a731.zip
clk: x86: add "mclk" alias for Baytrail/Cherrytrail
Due to timing requirements, TI and Conexant manage the audio reference clock from their ASoC codec drivers using the "mclk" string. This patch adds another lookup for the "pmc_plt_clk_3" clock to avoid Intel-specific tests in those codec drivers and use code as-is. To avoid a leak, clk_add_alias() is not used in this patch. Instead the lookup is created manually as part of the .probe() step and dropped in the .remove() step. "pmc_plt_clk_3" is used exclusively for audio on all known Baytrail/CherryTrail designs and is e.g. routed on the MCLK (pin 26) of the MinnowBoardMAX Turbot LSE connector. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/x86')
-rw-r--r--drivers/clk/x86/clk-pmc-atom.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/clk/x86/clk-pmc-atom.c b/drivers/clk/x86/clk-pmc-atom.c
index 2b60577703ef..fafc99120dc2 100644
--- a/drivers/clk/x86/clk-pmc-atom.c
+++ b/drivers/clk/x86/clk-pmc-atom.c
@@ -54,6 +54,7 @@ struct clk_plt_data {
struct clk_plt_fixed **parents;
u8 nparents;
struct clk_plt *clks[PMC_CLK_NUM];
+ struct clk_lookup *mclk_lookup;
};
/* Return an index in parent table */
@@ -337,6 +338,11 @@ static int plt_clk_probe(struct platform_device *pdev)
goto err_unreg_clk_plt;
}
}
+ data->mclk_lookup = clkdev_hw_create(&data->clks[3]->hw, "mclk", NULL);
+ if (IS_ERR(data->mclk_lookup)) {
+ err = PTR_ERR(data->mclk_lookup);
+ goto err_unreg_clk_plt;
+ }
plt_clk_free_parent_names_loop(parent_names, data->nparents);
@@ -356,6 +362,7 @@ static int plt_clk_remove(struct platform_device *pdev)
data = platform_get_drvdata(pdev);
+ clkdev_drop(data->mclk_lookup);
plt_clk_unregister_loop(data, PMC_CLK_NUM);
plt_clk_unregister_parents(data);
return 0;