Skip to content

Commit 261fef4

Browse files
Marcin Makajajanusz
authored andcommitted
icelake: clk defs cleanup, using common cavs defs
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
1 parent 345e1e5 commit 261fef4

File tree

3 files changed

+12
-31
lines changed

3 files changed

+12
-31
lines changed

src/platform/icelake/include/platform/clk-map.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,24 @@
3333

3434
#include <sof/clk.h>
3535

36+
#define CLK_MAX_CPU_HZ 400000000
37+
3638
static const struct freq_table cpu_freq[] = {
3739
{120000000, 120000, 0x0},
38-
{400000000, 400000, 0x4}, /* default */
40+
{CLK_MAX_CPU_HZ, 400000, 0x4}, /* default */
3941
};
4042

43+
#define CPU_DEFAULT_IDX 1
44+
4145
/* IMPORTANT: array should be filled in increasing order
4246
* (regarding to .freq field)
4347
*/
4448
static const struct freq_table ssp_freq[] = {
4549
{ 24576000, 24576, CLOCK_SSP_AUDIO_CARDINAL },
46-
{ 38400000, 38400, CLOCK_SSP_XTAL_OSCILLATOR },
50+
{ 38400000, 38400, CLOCK_SSP_XTAL_OSCILLATOR }, /* default */
4751
{ 96000000, 96000, CLOCK_SSP_PLL_FIXED },
4852
};
4953

54+
#define SSP_DEFAULT_IDX 1
55+
5056
#endif

src/platform/icelake/include/platform/clk.h

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,34 +33,6 @@
3333
#ifndef __PLATFORM_CLOCK__
3434
#define __PLATFORM_CLOCK__
3535

36-
#include <sof/cpu.h>
37-
#include <sof/io.h>
38-
#include <platform/shim.h>
39-
40-
#define CLK_CPU(x) (x)
41-
#define CLK_SSP 4
42-
43-
#define CPU_DEFAULT_IDX 1
44-
#define SSP_DEFAULT_IDX 1
45-
46-
#define CLK_DEFAULT_CPU_HZ 120000000
47-
#define CLK_MAX_CPU_HZ 400000000
48-
49-
#define NUM_CLOCKS 5
50-
51-
static inline int clock_platform_set_cpu_freq(uint32_t cpu_freq_enc)
52-
{
53-
/* set CPU frequency request for CCU */
54-
io_reg_update_bits(SHIM_BASE + SHIM_CLKCTL,
55-
SHIM_CLKCTL_DPCS_MASK(cpu_get_id()),
56-
cpu_freq_enc);
57-
58-
return 0;
59-
}
60-
61-
static inline int clock_platform_set_ssp_freq(uint32_t ssp_freq_enc)
62-
{
63-
return 0;
64-
}
36+
#include <cavs/clk.h>
6537

6638
#endif

src/platform/intel/cavs/platform.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
#include <platform/dma.h>
3838
#include <platform/dai.h>
3939
#include <platform/clk.h>
40+
#if defined(CONFIG_ICELAKE) || defined(CONFIG_SUECREEK)
41+
#include <platform/clk-map.h>
42+
#endif
4043
#include <platform/timer.h>
4144
#include <platform/interrupt.h>
4245
#include <platform/idc.h>

0 commit comments

Comments
 (0)