diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2019-12-04 22:20:05 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-12-09 21:35:37 +0300 |
commit | 253f584a0699d12a90bde9d524d499a921cc7827 (patch) | |
tree | 9602decdb31094a1ba8600cc81b076ee86297741 /sound/soc/ti/davinci-mcasp.h | |
parent | abe3b6727b653307c27870a2d4ecbf9de4e914a5 (diff) | |
download | linux-253f584a0699d12a90bde9d524d499a921cc7827.tar.xz |
ASoC: ti: davinci-mcasp: Improve the sysclk selection
When McASP is master the bclk can be generated from two main source:
AUXCLK: functional clock for McASP or
AHCLK: from external source or internal mux in dra7x family
With this patch it is possible to select between the two source. The patch
is not breaking existing machine drivers since historically the clk_id was
ignored and left as 0 in all cases.
When output clock is configured - which can be only the AHCLK, we select
the AUXCLK as source for the internal HCLK. In this case the HCLK rate is
the same as the output clock.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20191204192005.31210-1-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/ti/davinci-mcasp.h')
-rw-r--r-- | sound/soc/ti/davinci-mcasp.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/ti/davinci-mcasp.h b/sound/soc/ti/davinci-mcasp.h index bc705d6ca48b..5de2b8a31061 100644 --- a/sound/soc/ti/davinci-mcasp.h +++ b/sound/soc/ti/davinci-mcasp.h @@ -295,6 +295,10 @@ #define NUMEVT(x) (((x) & 0xFF) << 8) #define NUMDMA_MASK (0xFF) +/* Source of High-frequency transmit/receive clock */ +#define MCASP_CLK_HCLK_AHCLK 0 /* AHCLKX/R */ +#define MCASP_CLK_HCLK_AUXCLK 1 /* Internal functional clock */ + /* clock divider IDs */ #define MCASP_CLKDIV_AUXCLK 0 /* HCLK divider from AUXCLK */ #define MCASP_CLKDIV_BCLK 1 /* BCLK divider from HCLK */ |