timer: add platform timer to sof context

Adds pointer to default platform timer to main sof context.

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

View File

@ -16,6 +16,7 @@ struct clock_info;
struct dma_trace_data; struct dma_trace_data;
struct ipc; struct ipc;
struct sa; struct sa;
struct timer;
struct trace; struct trace;
/** /**
@ -45,6 +46,9 @@ struct sof {
/* platform clock information */ /* platform clock information */
struct clock_info *clocks; struct clock_info *clocks;
/* default platform timer */
struct timer *platform_timer;
__aligned(PLATFORM_DCACHE_ALIGN) int alignment[0]; __aligned(PLATFORM_DCACHE_ALIGN) int alignment[0];
} __aligned(PLATFORM_DCACHE_ALIGN); } __aligned(PLATFORM_DCACHE_ALIGN);

View File

@ -175,6 +175,8 @@ int platform_init(struct sof *sof)
#endif #endif
int ret; int ret;
sof->platform_timer = &timer;
/* clear mailbox for early trace and debug */ /* clear mailbox for early trace and debug */
trace_point(TRACE_BOOT_PLATFORM_MBOX); trace_point(TRACE_BOOT_PLATFORM_MBOX);
bzero((void *)MAILBOX_BASE, MAILBOX_SIZE); bzero((void *)MAILBOX_BASE, MAILBOX_SIZE);

View File

@ -172,6 +172,8 @@ int platform_init(struct sof *sof)
struct dai *ssp1; struct dai *ssp1;
int ret; int ret;
sof->platform_timer = &timer;
/* clear mailbox for early trace and debug */ /* clear mailbox for early trace and debug */
trace_point(TRACE_BOOT_PLATFORM_MBOX); trace_point(TRACE_BOOT_PLATFORM_MBOX);
bzero((void *)MAILBOX_BASE, MAILBOX_SIZE); bzero((void *)MAILBOX_BASE, MAILBOX_SIZE);

View File

@ -152,6 +152,8 @@ int platform_init(struct sof *sof)
{ {
int ret; int ret;
sof->platform_timer = &timer;
platform_interrupt_init(); platform_interrupt_init();
platform_clock_init(sof); platform_clock_init(sof);
scheduler_init_edf(); scheduler_init_edf();

View File

@ -341,6 +341,8 @@ int platform_init(struct sof *sof)
#endif #endif
int ret; int ret;
sof->platform_timer = &timer;
/* pm runtime already initialized, request the DSP to stay in D0 /* pm runtime already initialized, request the DSP to stay in D0
* until we are allowed to do full power gating (by the IPC req). * until we are allowed to do full power gating (by the IPC req).
*/ */