1
0
Fork 0

MLK-23754-21 remoteproc: imx_rproc: add imx memcpy functions

Add i.MX memcpy functions for remoteproc, because linux memcpy
would trigger abort when copying elf data to TCML space using
64bit copy, but start with not 64bit aligned TCML address.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Peng Fan 2020-03-27 18:04:59 +08:00
parent 0c83261a17
commit 9a3b975180
1 changed files with 14 additions and 0 deletions

View File

@ -605,6 +605,19 @@ static void imx_rproc_kick(struct rproc *rproc, int vqid)
__func__, vqid, err);
}
static void *imx_rproc_memcpy(struct rproc *rproc, void *dest,
const void *src, size_t count, int flags)
{
u32 *tmp = dest;
const u32 *s = src;
count = count / 4;
while (count--)
*tmp++ = *s++;
return dest;
}
static const struct rproc_ops imx_rproc_ops = {
.start = imx_rproc_start,
.stop = imx_rproc_stop,
@ -615,6 +628,7 @@ static const struct rproc_ops imx_rproc_ops = {
.find_loaded_rsc_table = imx_rproc_elf_find_loaded_rsc_table,
.sanity_check = imx_rproc_elf_sanity_check,
.get_boot_addr = imx_rproc_elf_get_boot_addr,
.memcpy = imx_rproc_memcpy,
};
static int imx_rproc_addr_init(struct imx_rproc *priv,