Commit 12677467 authored by Clement Leger's avatar Clement Leger Committed by Bjorn Andersson

remoteproc: Allow overriding only sanity_check

Now that rproc_elf_sanity_check can be used by external drivers, allow
to only overwrite the sanity_check member of rproc_ops. This will allow
drivers to handle elf32 and elf64 by overwriting sanity_check with
rproc_elf_sanity_check function.
Signed-off-by: default avatarClement Leger <cleger@kalray.eu>
Link: https://lore.kernel.org/r/20200302093902.27849-8-cleger@kalray.euSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent f31e339f
...@@ -2061,7 +2061,8 @@ struct rproc *rproc_alloc(struct device *dev, const char *name, ...@@ -2061,7 +2061,8 @@ struct rproc *rproc_alloc(struct device *dev, const char *name,
rproc->ops->load = rproc_elf_load_segments; rproc->ops->load = rproc_elf_load_segments;
rproc->ops->parse_fw = rproc_elf_load_rsc_table; rproc->ops->parse_fw = rproc_elf_load_rsc_table;
rproc->ops->find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table; rproc->ops->find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table;
rproc->ops->sanity_check = rproc_elf32_sanity_check; if (!rproc->ops->sanity_check)
rproc->ops->sanity_check = rproc_elf32_sanity_check;
rproc->ops->get_boot_addr = rproc_elf_get_boot_addr; rproc->ops->get_boot_addr = rproc_elf_get_boot_addr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment