[Sound-open-firmware] [PATCH 1/2] byt: clk: fix 38.4 MHz CPU clock support
38.4 MHz is not available, replace by 50 MHz as documented in HAS
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- src/platform/baytrail/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/platform/baytrail/clk.c b/src/platform/baytrail/clk.c index ce40052..b972aed 100644 --- a/src/platform/baytrail/clk.c +++ b/src/platform/baytrail/clk.c @@ -69,7 +69,7 @@ static struct clk_pdata *clk_pdata; static const struct freq_table cpu_freq[] = { {25000000, 25, 0x0}, {25000000, 25, 0x1}, - {38400000, 50, 0x2}, + {50000000, 50, 0x2}, {50000000, 50, 0x3}, /* default */ {100000000, 100, 0x4}, {200000000, 200, 0x5},
Cherrytrail SSP settings were the same as Baytrail but the SSP root clock is different. To use 19.2MHz the Xtal source needs to be selected
Also add definition for SSP @ 25 MHz - even if it's unlikely to ever be used
Tested on Up board and Cyan Chromebook.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- src/platform/baytrail/clk.c | 1 + src/platform/baytrail/include/platform/pmc.h | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/platform/baytrail/clk.c b/src/platform/baytrail/clk.c index b972aed..99e1bfd 100644 --- a/src/platform/baytrail/clk.c +++ b/src/platform/baytrail/clk.c @@ -101,6 +101,7 @@ static const struct freq_table cpu_freq[] = {
static const struct freq_table ssp_freq[] = { {19200000, 19, PMC_SET_SSP_19M2}, /* default */ + {25000000, 25, PMC_SET_SSP_25M}, };
#define CPU_DEFAULT_IDX 3 diff --git a/src/platform/baytrail/include/platform/pmc.h b/src/platform/baytrail/include/platform/pmc.h index 8cbda37..c174f19 100644 --- a/src/platform/baytrail/include/platform/pmc.h +++ b/src/platform/baytrail/include/platform/pmc.h @@ -32,13 +32,23 @@ #define __PLATFORM_PMC_H__
#include <stdint.h> +#include <config.h>
/* messages */ #define PMC_DDR_LINK_UP 0xc0 /* LPE req path to DRAM is up */ #define PMC_DDR_LINK_DOWN 0xc1 /* LPE req path to DRAM is down */ #define PMC_SET_LPECLK 0xc2 /* LPE req clock change to FR_LAT_REQ */ -#define PMC_SET_SSP_19M2 0xc5 /* LPE req SSP clock to 19.2MHz */ -#define PMC_SET_SSP_25M 0xc6 /* LPE req SSP clock to 25MHz */ + +#ifdef CONFIG_BAYTRAIL + +#define PMC_SET_SSP_19M2 0xc5 /* LPE req SSP clock to 19.2MHz w/ PLL*/ +#define PMC_SET_SSP_25M 0xc6 /* LPE req SSP clock to 25MHz w/ XTAL */ + +#elif CONFIG_CHERRYTRAIL + +#define PMC_SET_SSP_25M 0xc5 /* LPE req SSP clock to 25MHz w/ PLL */ +#define PMC_SET_SSP_19M2 0xc6 /* LPE req SSP clock to 19.2MHz w/ XTAL*/ +#endif
int platform_ipc_pmc_init(void); int ipc_pmc_send_msg(uint32_t message);
On Tue, 2017-12-05 at 21:33 -0600, Pierre-Louis Bossart wrote:
38.4 MHz is not available, replace by 50 MHz as documented in HAS
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel .com>
Applied.
participants (2)
-
Liam Girdwood
-
Pierre-Louis Bossart