diff options
author | Per Åstrand <per.astrand@arm.com> | 2022-04-19 15:51:09 +0200 |
---|---|---|
committer | Per Åstrand <per.astrand@arm.com> | 2022-04-27 10:10:03 +0000 |
commit | 415de582dcf6f06dc71c9c48eeed0a01bfefc222 (patch) | |
tree | 1d751a7fd912bd66a67e123a2f865bb64c31c125 | |
parent | 3a353a3f1df7a24d2437ee218a4f5bbb2146796c (diff) | |
download | ethos-u-linux-driver-stack-415de582dcf6f06dc71c9c48eeed0a01bfefc222.tar.gz |
Adapt remoteproc module for more kernel versions
The .da_to_va has different signatures for different kernel versions.
Add kernel version checks to pick the correct one.
Change-Id: Ie25c496aa646119526867c91f244f9ad195860cd
-rw-r--r-- | remoteproc/ethosu_remoteproc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/remoteproc/ethosu_remoteproc.c b/remoteproc/ethosu_remoteproc.c index 493a618..0418ef4 100644 --- a/remoteproc/ethosu_remoteproc.c +++ b/remoteproc/ethosu_remoteproc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. All rights reserved. + * Copyright (c) 2021-2022 Arm Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -93,15 +93,19 @@ static void ethosu_rproc_kick(struct rproc *rproc, return; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) static void *ethosu_da_to_va(struct rproc *rproc, u64 da, - int len) + size_t len, + bool *is_iomem) +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0) +static void *ethosu_da_to_va(struct rproc *rproc, + u64 da, + size_t len) #else static void *ethosu_da_to_va(struct rproc *rproc, u64 da, - size_t len, - bool *is_iomem) + int len) #endif { struct ethosu_rproc *ethosu = (struct ethosu_rproc *)rproc->priv; |