clk: add clocks pointer to sof main context

Adds pointer to platforms clock info to sof main context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2019-12-19 15:12:52 +01:00 committed by Liam Girdwood
parent f4af2a6671
commit 452f8ef6d3
5 changed files with 12 additions and 0 deletions

View File

@ -12,6 +12,7 @@
#include <sof/common.h> #include <sof/common.h>
#include <sof/lib/memory.h> #include <sof/lib/memory.h>
struct clock_info;
struct dma_trace_data; struct dma_trace_data;
struct ipc; struct ipc;
struct sa; struct sa;
@ -41,6 +42,9 @@ struct sof {
/* generic trace structure */ /* generic trace structure */
struct trace *trace; struct trace *trace;
/* platform clock information */
struct clock_info *clocks;
__aligned(PLATFORM_DCACHE_ALIGN) int alignment[0]; __aligned(PLATFORM_DCACHE_ALIGN) int alignment[0];
} __aligned(PLATFORM_DCACHE_ALIGN); } __aligned(PLATFORM_DCACHE_ALIGN);

View File

@ -119,4 +119,6 @@ void platform_clock_init(struct sof *sof)
for (i = 0; i < NUM_CLOCKS; i++) for (i = 0; i < NUM_CLOCKS; i++)
spinlock_init(&platform_clocks_info[i].lock); spinlock_init(&platform_clocks_info[i].lock);
sof->clocks = clocks;
} }

View File

@ -90,4 +90,6 @@ void platform_clock_init(struct sof *sof)
for (i = 0; i < NUM_CLOCKS; i++) for (i = 0; i < NUM_CLOCKS; i++)
spinlock_init(&platform_clocks_info[i].lock); spinlock_init(&platform_clocks_info[i].lock);
sof->clocks = clocks;
} }

View File

@ -39,4 +39,6 @@ void platform_clock_init(struct sof *sof)
spinlock_init(&platform_clocks_info[i].lock); spinlock_init(&platform_clocks_info[i].lock);
} }
sof->clocks = clocks;
} }

View File

@ -78,4 +78,6 @@ void platform_clock_init(struct sof *sof)
}; };
spinlock_init(&platform_clocks_info[CLK_SSP].lock); spinlock_init(&platform_clocks_info[CLK_SSP].lock);
sof->clocks = clocks;
} }