byt: use an internal timer for "cpu_timer"

Using the same hardware timer for both "cpu_timer" and
"platform_timer" doesn't work, switch the "cpu_timer" to use
TIMER1 on Baytrail. This also fixes performance counters on
the platform.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2020-08-25 14:40:08 +02:00 committed by Liam Girdwood
parent c0b969d784
commit 84298db608
1 changed files with 7 additions and 2 deletions

View File

@ -139,11 +139,16 @@ EXT_MAN_PORT(
}, },
)); ));
SHARED_DATA struct timer timer = { static SHARED_DATA struct timer timer = {
.id = TIMER3, /* external timer */ .id = TIMER3, /* external timer */
.irq = IRQ_NUM_EXT_TIMER, .irq = IRQ_NUM_EXT_TIMER,
}; };
static SHARED_DATA struct timer arch_timer = {
.id = TIMER1, /* internal timer */
.irq = IRQ_NUM_TIMER1,
};
int platform_boot_complete(uint32_t boot_message) int platform_boot_complete(uint32_t boot_message)
{ {
uint32_t mb_offset = 0; uint32_t mb_offset = 0;
@ -200,7 +205,7 @@ int platform_init(struct sof *sof)
int ret; int ret;
sof->platform_timer = &timer; sof->platform_timer = &timer;
sof->cpu_timers = &timer; sof->cpu_timers = &arch_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);