clk_id was never used so remove all the related code. However since we need an identifier for the mclk reclaim it with a name change.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- src/drivers/apl-ssp.c | 25 +------------------------ src/drivers/byt-ssp.c | 25 ------------------------- src/include/uapi/ipc.h | 2 +- 3 files changed, 2 insertions(+), 50 deletions(-)
diff --git a/src/drivers/apl-ssp.c b/src/drivers/apl-ssp.c index 53bb8be..1190596 100644 --- a/src/drivers/apl-ssp.c +++ b/src/drivers/apl-ssp.c @@ -232,30 +232,7 @@ static inline int ssp_set_config(struct dai *dai, goto out; }
-#ifdef CLK_TYPE /* not enabled, keep the code for reference */ - /* TODO: allow topology to define SSP clock type */ - config->ssp.clk_id = SSP_CLK_EXT; - - /* clock source */ - switch (config->ssp.clk_id) { - case SSP_CLK_AUDIO: - sscr0 |= SSCR0_ACS; - break; - case SSP_CLK_NET_PLL: - sscr0 |= SSCR0_MOD; - break; - case SSP_CLK_EXT: - sscr0 |= SSCR0_ECS; - break; - case SSP_CLK_NET: - sscr0 |= SSCR0_NCS | SSCR0_MOD; - break; - default: - trace_ssp_error("ec4"); - ret = -EINVAL; - goto out; - } -#elif CONFIG_APOLLOLAKE +if CONFIG_APOLLOLAKE sscr0 |= SSCR0_MOD | SSCR0_ACS | SSCR0_ECS; #else sscr0 |= SSCR0_MOD | SSCR0_ACS; diff --git a/src/drivers/byt-ssp.c b/src/drivers/byt-ssp.c index ca3385d..13b6d76 100644 --- a/src/drivers/byt-ssp.c +++ b/src/drivers/byt-ssp.c @@ -238,31 +238,6 @@ static inline int ssp_set_config(struct dai *dai, goto out; }
-#ifdef CLK_TYPE /* not enabled, keep the code for reference */ - /* TODO: allow topology to define SSP clock type */ - config->ssp.clk_id = SSP_CLK_EXT; - - /* clock source */ - switch (config->ssp.clk_id) { - case SSP_CLK_AUDIO: - sscr0 |= SSCR0_ACS; - break; - case SSP_CLK_NET_PLL: - sscr0 |= SSCR0_MOD; - break; - case SSP_CLK_EXT: - sscr0 |= SSCR0_ECS; - break; - case SSP_CLK_NET: - sscr0 |= SSCR0_NCS | SSCR0_MOD; - break; - default: - trace_ssp_error("ec4"); - ret = -EINVAL; - goto out; - } -#endif - /* BCLK is generated from MCLK - must be divisable */ if (config->ssp.mclk_rate % config->ssp.bclk_rate) { trace_ssp_error("ec5"); diff --git a/src/include/uapi/ipc.h b/src/include/uapi/ipc.h index b32376d..c13fc4b 100644 --- a/src/include/uapi/ipc.h +++ b/src/include/uapi/ipc.h @@ -238,7 +238,7 @@ enum sof_ipc_dai_type { struct sof_ipc_dai_ssp_params { struct sof_ipc_hdr hdr; uint16_t mode; // FIXME: do we need this? - uint16_t clk_id; // FIXME: do we need this? + uint16_t mclk_id;
uint32_t mclk_rate; /* mclk frequency in Hz */ uint32_t fsync_rate; /* fsync frequency in Hz */