mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
fdcec00405
This adds support for the STM32 remoteproc, additional i.MX platforms with Cortex M4 remoteprocs and Qualcomm's QCS404 Compute DSP. Initial support for vendor specific resource table entries and support for unprocessed Qualcomm firmware files. -----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAl0uGwsbHGJqb3JuLmFu ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FVhcQALBcuPOo2nBQEiOvgS79 0kVBSdUxw6+mI4EFLfQPeSTtGGrSK5/oZBmYhdv+HEDu6CLG1DS+6PZyCjhqdDsU xjeTIkfe4RDAwnqlGxqK7OyeslAUe91kr0FDaS0XyajhQ+urI8N9Ou/JQDEZKArl lpuxGmjWASeIbO3TC/p4OhyOU6yqqlyxlv9x/kJnF+PhDfdK1tezvgmLvCDtnD9y gtYMzSz9txQCXMJmUaDFeUrMph6/Eo2Zn9rYyen5fDzqAXBys7nfH2fbDcbNK1fy qgjWDjUxENeoZEuohIFn2Dg3egr6rF9TQQvM4uoAoKlS6+yEvTiE8g122BJxVGd3 BOmWK44hTpV1qAGfTivGOH3g/Q9pxI22a17t1BTxcHIYcmMBxERHAVRQ/wbwXRDp qEv4HUuvciMSjonf8pW3GuuOny9jeTird5q8e3gTNA/s6aESm/YoynwWF3LmNZBo XePc5sP4oz9HGJKS/SUu0/H6d1/YqOXOwVBmlTl4L0ErWOpaeGMinJQvSRHb0rL2 BgL8bADxFJGM0ITeIA5CpzZzbbbZSmPqxOBhcU+a/PnRL8zVWJOpSCMLe04vrQNT 9lVXAxmcRZjq80fbfyjqomyaT5N5Yvvv6dIz2AtCnAOEynHLnJq/dd5eX840l3RC 1wXvNF4l0rzYm0yYHr0+oQXQ =iqXq -----END PGP SIGNATURE----- Merge tag 'rproc-v5.3' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This adds support for the STM32 remoteproc, additional i.MX platforms with Cortex M4 remoteprocs and Qualcomm's QCS404 Compute DSP. Also initial support for vendor specific resource table entries and support for unprocessed Qualcomm firmware files" * tag 'rproc-v5.3' of git://github.com/andersson/remoteproc: remoteproc: stm32: fix building without ARM SMCC remoteproc: qcom: q6v5-mss: Fix build error without QCOM_MDT_LOADER remoteproc: copy parent dma_pfn_offset for vdev remoteproc: qcom: q6v5-mss: Support loading non-split images soc: qcom: mdt_loader: Support loading non-split images remoteproc: stm32: add an ST stm32_rproc driver dt-bindings: remoteproc: add bindings for stm32 remote processor driver dt-bindings: stm32: add bindings for ML-AHB interconnect remoteproc: Use struct_size() helper remoteproc: add vendor resources handling remoteproc: imx: Fix typo in "failed" remoteproc: imx: Broaden the Kconfig selection logic remoteproc,rpmsg: add missing MAINTAINERS file entries remoteproc: qcom: qdsp6-adsp: Add support for QCS404 CDSP dt-bindings: remoteproc: Rename and amend Hexagon v56 binding
123 lines
3.3 KiB
C
123 lines
3.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Remote processor framework
|
|
*
|
|
* Copyright (C) 2011 Texas Instruments, Inc.
|
|
* Copyright (C) 2011 Google, Inc.
|
|
*
|
|
* Ohad Ben-Cohen <ohad@wizery.com>
|
|
* Brian Swetland <swetland@google.com>
|
|
*/
|
|
|
|
#ifndef REMOTEPROC_INTERNAL_H
|
|
#define REMOTEPROC_INTERNAL_H
|
|
|
|
#include <linux/irqreturn.h>
|
|
#include <linux/firmware.h>
|
|
|
|
struct rproc;
|
|
|
|
struct rproc_debug_trace {
|
|
struct rproc *rproc;
|
|
struct dentry *tfile;
|
|
struct list_head node;
|
|
struct rproc_mem_entry trace_mem;
|
|
};
|
|
|
|
/* from remoteproc_core.c */
|
|
void rproc_release(struct kref *kref);
|
|
irqreturn_t rproc_vq_interrupt(struct rproc *rproc, int vq_id);
|
|
void rproc_vdev_release(struct kref *ref);
|
|
|
|
/* from remoteproc_virtio.c */
|
|
int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id);
|
|
int rproc_remove_virtio_dev(struct device *dev, void *data);
|
|
|
|
/* from remoteproc_debugfs.c */
|
|
void rproc_remove_trace_file(struct dentry *tfile);
|
|
struct dentry *rproc_create_trace_file(const char *name, struct rproc *rproc,
|
|
struct rproc_debug_trace *trace);
|
|
void rproc_delete_debug_dir(struct rproc *rproc);
|
|
void rproc_create_debug_dir(struct rproc *rproc);
|
|
void rproc_init_debugfs(void);
|
|
void rproc_exit_debugfs(void);
|
|
|
|
/* from remoteproc_sysfs.c */
|
|
extern struct class rproc_class;
|
|
int rproc_init_sysfs(void);
|
|
void rproc_exit_sysfs(void);
|
|
|
|
void rproc_free_vring(struct rproc_vring *rvring);
|
|
int rproc_alloc_vring(struct rproc_vdev *rvdev, int i);
|
|
|
|
void *rproc_da_to_va(struct rproc *rproc, u64 da, int len);
|
|
phys_addr_t rproc_va_to_pa(void *cpu_addr);
|
|
int rproc_trigger_recovery(struct rproc *rproc);
|
|
|
|
int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw);
|
|
u32 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw);
|
|
int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw);
|
|
int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware *fw);
|
|
struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc,
|
|
const struct firmware *fw);
|
|
struct rproc_mem_entry *
|
|
rproc_find_carveout_by_name(struct rproc *rproc, const char *name, ...);
|
|
|
|
static inline
|
|
int rproc_fw_sanity_check(struct rproc *rproc, const struct firmware *fw)
|
|
{
|
|
if (rproc->ops->sanity_check)
|
|
return rproc->ops->sanity_check(rproc, fw);
|
|
|
|
return 0;
|
|
}
|
|
|
|
static inline
|
|
u32 rproc_get_boot_addr(struct rproc *rproc, const struct firmware *fw)
|
|
{
|
|
if (rproc->ops->get_boot_addr)
|
|
return rproc->ops->get_boot_addr(rproc, fw);
|
|
|
|
return 0;
|
|
}
|
|
|
|
static inline
|
|
int rproc_load_segments(struct rproc *rproc, const struct firmware *fw)
|
|
{
|
|
if (rproc->ops->load)
|
|
return rproc->ops->load(rproc, fw);
|
|
|
|
return -EINVAL;
|
|
}
|
|
|
|
static inline int rproc_parse_fw(struct rproc *rproc, const struct firmware *fw)
|
|
{
|
|
if (rproc->ops->parse_fw)
|
|
return rproc->ops->parse_fw(rproc, fw);
|
|
|
|
return 0;
|
|
}
|
|
|
|
static inline
|
|
int rproc_handle_rsc(struct rproc *rproc, u32 rsc_type, void *rsc, int offset,
|
|
int avail)
|
|
{
|
|
if (rproc->ops->handle_rsc)
|
|
return rproc->ops->handle_rsc(rproc, rsc_type, rsc, offset,
|
|
avail);
|
|
|
|
return RSC_IGNORED;
|
|
}
|
|
|
|
static inline
|
|
struct resource_table *rproc_find_loaded_rsc_table(struct rproc *rproc,
|
|
const struct firmware *fw)
|
|
{
|
|
if (rproc->ops->find_loaded_rsc_table)
|
|
return rproc->ops->find_loaded_rsc_table(rproc, fw);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
#endif /* REMOTEPROC_INTERNAL_H */
|