dsp: update avtimer for kernel 5.4

update timespec to timespec64 in avtimer.

Change-Id: I63ada80df880ea670791592cc79804e930f9d311
Signed-off-by: Dechen Chai <dchai@codeaurora.org>
This commit is contained in:
Dechen Chai 2021-06-24 17:17:21 +05:30
commit cb89ebef6a

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2012-2015, 2017-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2015, 2017-2021 The Linux Foundation. All rights reserved.
*/
#include <linux/kernel.h>
@ -334,7 +334,7 @@ int avcs_core_query_timer_offset(int64_t *av_offset, int32_t clock_id)
{
uint32_t avtimer_msw = 0, avtimer_lsw = 0;
uint64_t avtimer_tick_temp, avtimer_tick, sys_time = 0;
struct timespec ts;
struct timespec64 ts;
if (!atomic_read(&avtimer.adsp_ready)) {
pr_debug("%s:In SSR, return\n", __func__);
@ -346,22 +346,22 @@ int avcs_core_query_timer_offset(int64_t *av_offset, int32_t clock_id)
return -EINVAL;
}
memset(&ts, 0, sizeof(struct timespec));
memset(&ts, 0, sizeof(struct timespec64));
avtimer_lsw = ioread32(avtimer.p_avtimer_lsw);
avtimer_msw = ioread32(avtimer.p_avtimer_msw);
switch (clock_id) {
case CLOCK_MONOTONIC_RAW:
getrawmonotonic(&ts);
ktime_get_raw_ts64(&ts);
break;
case CLOCK_BOOTTIME:
get_monotonic_boottime(&ts);
ktime_get_boottime_ts64(&ts);
break;
case CLOCK_MONOTONIC:
ktime_get_ts(&ts);
ktime_get_ts64(&ts);
break;
case CLOCK_REALTIME:
ktime_get_real_ts(&ts);
ktime_get_real_ts64(&ts);
break;
default:
pr_debug("%s: unsupported clock id %d\n", __func__, clock_id);