/openbmc/linux/drivers/remoteproc/ |
H A D | remoteproc_internal.h | 18 struct rproc; 21 struct rproc *rproc; member 33 * the resource can be cached by rproc. 42 static inline bool rproc_has_feature(struct rproc *rproc, unsigned int feature) in rproc_has_feature() argument 44 return test_bit(feature, rproc->features); in rproc_has_feature() 47 static inline int rproc_set_feature(struct rproc *rproc, unsigned int feature) in rproc_set_feature() argument 52 set_bit(feature, rproc->features); in rproc_set_feature() 63 irqreturn_t rproc_vq_interrupt(struct rproc *rproc, int vq_id); 67 struct dentry *rproc_create_trace_file(const char *name, struct rproc *rproc, 69 void rproc_delete_debug_dir(struct rproc *rproc); [all …]
|
H A D | remoteproc_core.c | 50 typedef int (*rproc_handle_resource_t)(struct rproc *rproc, 53 static int rproc_alloc_carveout(struct rproc *rproc, 55 static int rproc_release_carveout(struct rproc *rproc, 87 struct rproc *rproc = token; in rproc_iommu_fault() local 91 rproc_report_crash(rproc, RPROC_MMUFAULT); in rproc_iommu_fault() 100 static int rproc_enable_iommu(struct rproc *rproc) in rproc_enable_iommu() argument 103 struct device *dev = rproc->dev.parent; in rproc_enable_iommu() 106 if (!rproc->has_iommu) { in rproc_enable_iommu() 117 iommu_set_fault_handler(domain, rproc_iommu_fault, rproc); in rproc_enable_iommu() 125 rproc->domain = domain; in rproc_enable_iommu() [all …]
|
H A D | remoteproc_cdev.c | 23 struct rproc *rproc = container_of(filp->f_inode->i_cdev, struct rproc, cdev); in rproc_cdev_write() local 35 ret = rproc_boot(rproc); in rproc_cdev_write() 37 ret = rproc_shutdown(rproc); in rproc_cdev_write() 39 ret = rproc_detach(rproc); in rproc_cdev_write() 41 dev_err(&rproc->dev, "Unrecognized option\n"); in rproc_cdev_write() 50 struct rproc *rproc = container_of(filp->f_inode->i_cdev, struct rproc, cdev); in rproc_device_ioctl() local 59 rproc->cdev_put_on_release = !!param; in rproc_device_ioctl() 62 param = (s32)rproc->cdev_put_on_release; in rproc_device_ioctl() 68 dev_err(&rproc->dev, "Unsupported ioctl\n"); in rproc_device_ioctl() 77 struct rproc *rproc = container_of(inode->i_cdev, struct rproc, cdev); in rproc_cdev_release() local [all …]
|
H A D | rcar_rproc.c | 22 static int rcar_rproc_mem_alloc(struct rproc *rproc, in rcar_rproc_mem_alloc() argument 25 struct device *dev = &rproc->dev; in rcar_rproc_mem_alloc() 42 static int rcar_rproc_mem_release(struct rproc *rproc, in rcar_rproc_mem_release() argument 45 dev_dbg(&rproc->dev, "unmap memory: %pa\n", &mem->dma); in rcar_rproc_mem_release() 51 static int rcar_rproc_prepare(struct rproc *rproc) in rcar_rproc_prepare() argument 53 struct device *dev = rproc->dev.parent; in rcar_rproc_prepare() 67 dev_err(&rproc->dev, in rcar_rproc_prepare() 91 rproc_add_carveout(rproc, mem); in rcar_rproc_prepare() 97 static int rcar_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) in rcar_rproc_parse_fw() argument 101 ret = rproc_elf_load_rsc_table(rproc, fw); in rcar_rproc_parse_fw() [all …]
|
H A D | stm32_rproc.c | 96 static int stm32_rproc_pa_to_da(struct rproc *rproc, phys_addr_t pa, u64 *da) in stm32_rproc_pa_to_da() argument 99 struct stm32_rproc *ddata = rproc->priv; in stm32_rproc_pa_to_da() 109 dev_dbg(rproc->dev.parent, "pa %pa to da %llx\n", &pa, *da); in stm32_rproc_pa_to_da() 116 static int stm32_rproc_mem_alloc(struct rproc *rproc, in stm32_rproc_mem_alloc() argument 119 struct device *dev = rproc->dev.parent; in stm32_rproc_mem_alloc() 136 static int stm32_rproc_mem_release(struct rproc *rproc, in stm32_rproc_mem_release() argument 139 dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma); in stm32_rproc_mem_release() 198 static int stm32_rproc_mbox_idx(struct rproc *rproc, const unsigned char *name) in stm32_rproc_mbox_idx() argument 200 struct stm32_rproc *ddata = rproc->priv; in stm32_rproc_mbox_idx() 207 dev_err(&rproc->dev, "mailbox %s not found\n", name); in stm32_rproc_mbox_idx() [all …]
|
H A D | remoteproc_coredump.c | 17 struct rproc *rproc; member 24 * @rproc: the remote processor handle 26 void rproc_coredump_cleanup(struct rproc *rproc) in rproc_coredump_cleanup() argument 30 list_for_each_entry_safe(entry, tmp, &rproc->dump_segments, node) { in rproc_coredump_cleanup() 39 * @rproc: handle of a remote processor 48 int rproc_coredump_add_segment(struct rproc *rproc, dma_addr_t da, size_t size) in rproc_coredump_add_segment() argument 59 list_add_tail(&segment->node, &rproc->dump_segments); in rproc_coredump_add_segment() 67 * @rproc: handle of a remote processor 79 int rproc_coredump_add_custom_segment(struct rproc *rproc, in rproc_coredump_add_custom_segment() argument 81 void (*dumpfn)(struct rproc *rproc, in rproc_coredump_add_custom_segment() argument [all …]
|
H A D | qcom_common.h | 37 void qcom_minidump(struct rproc *rproc, unsigned int minidump_id, 38 void (*rproc_dumpfn_t)(struct rproc *rproc, 42 void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink, 44 void qcom_remove_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink); 46 int qcom_register_dump_segments(struct rproc *rproc, const struct firmware *fw); 48 void qcom_add_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd); 49 void qcom_remove_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd); 51 void qcom_add_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr, 53 void qcom_remove_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr); 56 struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc, [all …]
|
H A D | remoteproc_sysfs.c | 11 #define to_rproc(d) container_of(d, struct rproc, dev) 16 struct rproc *rproc = to_rproc(dev); in recovery_show() local 18 return sysfs_emit(buf, "%s", rproc->recovery_disabled ? "disabled\n" : "enabled\n"); in recovery_show() 49 struct rproc *rproc = to_rproc(dev); in recovery_store() local 53 rproc->recovery_disabled = false; in recovery_store() 54 rproc_trigger_recovery(rproc); in recovery_store() 56 rproc->recovery_disabled = true; in recovery_store() 59 rproc_trigger_recovery(rproc); in recovery_store() 83 struct rproc *rproc = to_rproc(dev); in coredump_show() local 85 return sysfs_emit(buf, "%s\n", rproc_coredump_str[rproc->dump_conf]); in coredump_show() [all …]
|
H A D | qcom_common.c | 93 static void qcom_minidump_cleanup(struct rproc *rproc) in qcom_minidump_cleanup() argument 97 list_for_each_entry_safe(entry, tmp, &rproc->dump_segments, node) { in qcom_minidump_cleanup() 104 static int qcom_add_minidump_segments(struct rproc *rproc, struct minidump_subsystem *subsystem, in qcom_add_minidump_segments() argument 105 void (*rproc_dumpfn_t)(struct rproc *rproc, struct rproc_dump_segment *segment, in qcom_add_minidump_segments() argument 115 if (WARN_ON(!list_empty(&rproc->dump_segments))) { in qcom_add_minidump_segments() 116 dev_err(&rproc->dev, "dump segment list already populated\n"); in qcom_add_minidump_segments() 136 rproc_coredump_add_custom_segment(rproc, da, size, rproc_dumpfn_t, name); in qcom_add_minidump_segments() 144 void qcom_minidump(struct rproc *rproc, unsigned int minidump_id, in qcom_minidump() argument 145 void (*rproc_dumpfn_t)(struct rproc *rproc, in qcom_minidump() argument 158 dev_err(&rproc->dev, "Minidump TOC not found in SMEM\n"); in qcom_minidump() [all …]
|
H A D | st_remoteproc.c | 58 struct rproc *rproc = dev_get_drvdata(dev); in st_rproc_mbox_callback() local 60 if (rproc_vq_interrupt(rproc, msg) == IRQ_NONE) in st_rproc_mbox_callback() 76 static void st_rproc_kick(struct rproc *rproc, int vqid) in st_rproc_kick() argument 78 struct st_rproc *ddata = rproc->priv; in st_rproc_kick() 79 struct device *dev = rproc->dev.parent; in st_rproc_kick() 92 static int st_rproc_mem_alloc(struct rproc *rproc, in st_rproc_mem_alloc() argument 95 struct device *dev = rproc->dev.parent; in st_rproc_mem_alloc() 111 static int st_rproc_mem_release(struct rproc *rproc, in st_rproc_mem_release() argument 119 static int st_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) in st_rproc_parse_fw() argument 121 struct device *dev = rproc->dev.parent; in st_rproc_parse_fw() [all …]
|
H A D | omap_remoteproc.c | 74 * struct omap_rproc_timer - data structure for a timer used by a omap rproc 92 * @num_timers: number of rproc timer(s) 93 * @num_wd_timers: number of rproc watchdog timers 94 * @timers: timer(s) info used by rproc 97 * @rproc: rproc handle 114 struct rproc *rproc; member 182 * @timer: handle to a OMAP rproc timer 198 * @timer: handle to a OMAP rproc timer 215 * @timer: handle to a OMAP rproc timer 230 * @timer: handle to a OMAP rproc timer [all …]
|
H A D | pru_rproc.c | 100 * @rproc: remoteproc pointer for this PRU core 119 struct rproc *rproc; member 165 * @rproc: the rproc instance of the PRU 170 static int pru_rproc_set_firmware(struct rproc *rproc, const char *fw_name) in pru_rproc_set_firmware() argument 172 struct pru_rproc *pru = rproc->priv; in pru_rproc_set_firmware() 177 return rproc_set_firmware(rproc, fw_name); in pru_rproc_set_firmware() 180 static struct rproc *__pru_rproc_get(struct device_node *np, int index) in __pru_rproc_get() 182 struct rproc *rproc; in __pru_rproc_get() local 190 rproc = rproc_get_by_phandle(rproc_phandle); in __pru_rproc_get() 191 if (!rproc) { in __pru_rproc_get() [all …]
|
H A D | xlnx_r5_remoteproc.c | 92 * @rproc: rproc handle 101 struct rproc *rproc; member 123 * @id: rproc->notify id 134 struct rproc *rproc = data; in event_notified_idr_cb() local 136 if (rproc_vq_interrupt(rproc, id) == IRQ_NONE) in event_notified_idr_cb() 137 dev_dbg(&rproc->dev, "data not found for vqid=%d\n", id); in event_notified_idr_cb() 151 struct rproc *rproc; in handle_event_notified() local 154 rproc = ipi->r5_core->rproc; in handle_event_notified() 163 idr_for_each(&rproc->notifyids, event_notified_idr_cb, rproc); in handle_event_notified() 270 * @rproc: r5 core's corresponding rproc structure [all …]
|
H A D | remoteproc_debugfs.c | 45 struct rproc *rproc = filp->private_data; in rproc_coredump_read() local 50 rproc_coredump_str[rproc->dump_conf]); in rproc_coredump_read() 75 struct rproc *rproc = filp->private_data; in rproc_coredump_write() local 90 if (rproc->state == RPROC_CRASHED) { in rproc_coredump_write() 91 dev_err(&rproc->dev, "can't change coredump configuration\n"); in rproc_coredump_write() 97 rproc->dump_conf = RPROC_COREDUMP_DISABLED; in rproc_coredump_write() 99 rproc->dump_conf = RPROC_COREDUMP_ENABLED; in rproc_coredump_write() 101 rproc->dump_conf = RPROC_COREDUMP_INLINE; in rproc_coredump_write() 103 dev_err(&rproc->dev, "Invalid coredump configuration\n"); in rproc_coredump_write() 122 * We will most probably improve the rproc tracing facilities later on, [all …]
|
H A D | da8xx_remoteproc.c | 26 "Name of DSP firmware file in /lib/firmware (if not specified defaults to 'rproc-dsp-fw')"); 56 * @rproc: rproc handle 67 struct rproc *rproc; member 87 struct rproc *rproc = p; in handle_event() local 90 rproc_vq_interrupt(rproc, 0); in handle_event() 91 rproc_vq_interrupt(rproc, 1); in handle_event() 107 struct rproc *rproc = p; in da8xx_rproc_callback() local 108 struct da8xx_rproc *drproc = rproc->priv; in da8xx_rproc_callback() 133 static int da8xx_rproc_start(struct rproc *rproc) in da8xx_rproc_start() argument 135 struct device *dev = rproc->dev.parent; in da8xx_rproc_start() [all …]
|
H A D | ingenic_rproc.c | 69 static int ingenic_rproc_prepare(struct rproc *rproc) in ingenic_rproc_prepare() argument 71 struct vpu *vpu = rproc->priv; in ingenic_rproc_prepare() 82 static int ingenic_rproc_unprepare(struct rproc *rproc) in ingenic_rproc_unprepare() argument 84 struct vpu *vpu = rproc->priv; in ingenic_rproc_unprepare() 91 static int ingenic_rproc_start(struct rproc *rproc) in ingenic_rproc_start() argument 93 struct vpu *vpu = rproc->priv; in ingenic_rproc_start() 105 static int ingenic_rproc_stop(struct rproc *rproc) in ingenic_rproc_stop() argument 107 struct vpu *vpu = rproc->priv; in ingenic_rproc_stop() 117 static void ingenic_rproc_kick(struct rproc *rproc, int vqid) in ingenic_rproc_kick() argument 119 struct vpu *vpu = rproc->priv; in ingenic_rproc_kick() [all …]
|
H A D | remoteproc_virtio.c | 57 static struct rproc *vdev_to_rproc(struct virtio_device *vdev) in vdev_to_rproc() 61 return rvdev->rproc; in vdev_to_rproc() 68 struct rproc *rproc = rvring->rvdev->rproc; in rproc_virtio_notify() local 71 dev_dbg(&rproc->dev, "kicking vq index: %d\n", notifyid); in rproc_virtio_notify() 73 rproc->ops->kick(rproc, notifyid); in rproc_virtio_notify() 79 * @rproc: handle to the remote processor 80 * @notifyid: index of the signalled virtqueue (unique per this @rproc) 82 * This function should be called by the platform-specific rproc driver, 89 irqreturn_t rproc_vq_interrupt(struct rproc *rproc, int notifyid) in rproc_vq_interrupt() argument 93 dev_dbg(&rproc->dev, "vq index %d is interrupted\n", notifyid); in rproc_vq_interrupt() [all …]
|
H A D | imx_rproc.c | 93 static int imx_rproc_xtr_mbox_init(struct rproc *rproc); 94 static void imx_rproc_free_mbox(struct rproc *rproc); 95 static int imx_rproc_detach_pd(struct rproc *rproc); 101 struct rproc *rproc; member 373 static int imx_rproc_start(struct rproc *rproc) in imx_rproc_start() argument 375 struct imx_rproc *priv = rproc->priv; in imx_rproc_start() 381 ret = imx_rproc_xtr_mbox_init(rproc); in imx_rproc_start() 413 static int imx_rproc_stop(struct rproc *rproc) in imx_rproc_stop() argument 415 struct imx_rproc *priv = rproc->priv; in imx_rproc_stop() 452 imx_rproc_free_mbox(rproc); in imx_rproc_stop() [all …]
|
H A D | imx_dsp_rproc.c | 98 * @rproc: rproc handler 116 struct rproc *rproc; member 290 static int imx_dsp_rproc_ready(struct rproc *rproc) in imx_dsp_rproc_ready() argument 292 struct imx_dsp_rproc *priv = rproc->priv; in imx_dsp_rproc_ready() 315 static int imx_dsp_rproc_start(struct rproc *rproc) in imx_dsp_rproc_start() argument 317 struct imx_dsp_rproc *priv = rproc->priv; in imx_dsp_rproc_start() 320 struct device *dev = rproc->dev.parent; in imx_dsp_rproc_start() 334 rproc->bootaddr); in imx_dsp_rproc_start() 343 ret = imx_dsp_rproc_ready(rproc); in imx_dsp_rproc_start() 352 static int imx_dsp_rproc_stop(struct rproc *rproc) in imx_dsp_rproc_stop() argument [all …]
|
H A D | wkup_m3_rproc.c | 44 * @rproc: rproc handle 50 struct rproc *rproc; member 56 static int wkup_m3_rproc_start(struct rproc *rproc) in wkup_m3_rproc_start() argument 58 struct wkup_m3_rproc *wkupm3 = rproc->priv; in wkup_m3_rproc_start() 74 static int wkup_m3_rproc_stop(struct rproc *rproc) in wkup_m3_rproc_stop() argument 76 struct wkup_m3_rproc *wkupm3 = rproc->priv; in wkup_m3_rproc_stop() 92 static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) in wkup_m3_rproc_da_to_va() argument 94 struct wkup_m3_rproc *wkupm3 = rproc->priv; in wkup_m3_rproc_da_to_va() 136 struct rproc *rproc; in wkup_m3_rproc_probe() local 158 rproc = rproc_alloc(dev, "wkup_m3", &wkup_m3_rproc_ops, in wkup_m3_rproc_probe() [all …]
|
H A D | st_slim_rproc.c | 3 * SLIM core rproc driver 111 static int slim_rproc_start(struct rproc *rproc) in slim_rproc_start() argument 113 struct device *dev = &rproc->dev; in slim_rproc_start() 114 struct st_slim_rproc *slim_rproc = rproc->priv; in slim_rproc_start() 153 static int slim_rproc_stop(struct rproc *rproc) in slim_rproc_stop() argument 155 struct st_slim_rproc *slim_rproc = rproc->priv; in slim_rproc_stop() 169 dev_warn(&rproc->dev, "Failed to disable SLIM"); in slim_rproc_stop() 171 dev_dbg(&rproc->dev, "slim stopped\n"); in slim_rproc_stop() 176 static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) in slim_rproc_da_to_va() argument 178 struct st_slim_rproc *slim_rproc = rproc->priv; in slim_rproc_da_to_va() [all …]
|
/openbmc/linux/include/linux/ |
H A D | remoteproc.h | 146 * needed to map it (in case @rproc is using an IOMMU). Reducing the TLB 246 * @notifyid: a unique rproc-wide notify index for this vring. This notify 269 * @notifyid: a unique rproc-wide notify index for this vdev. This notify 287 * to statically allocate a vdev upon registration of the rproc (dynamic vdev 314 struct rproc; 344 int (*alloc)(struct rproc *rproc, struct rproc_mem_entry *mem); 345 int (*release)(struct rproc *rproc, struct rproc_mem_entry *mem); 386 int (*prepare)(struct rproc *rproc); 387 int (*unprepare)(struct rproc *rproc); 388 int (*start)(struct rproc *rproc); [all …]
|
/openbmc/u-boot/drivers/remoteproc/ |
H A D | k3_rproc.c | 27 * @rproc_pwrdmn: rproc power domain data 28 * @rproc_rst: rproc reset control data 46 * @dev: rproc device pointer 54 struct k3_rproc_privdata *rproc = dev_get_priv(dev); in k3_rproc_load() local 55 const struct ti_sci_proc_ops *pops = &rproc->sci->ops.proc_ops; in k3_rproc_load() 61 ret = pops->proc_request(rproc->sci, rproc->proc_id); in k3_rproc_load() 67 ret = pops->set_proc_boot_cfg(rproc->sci, rproc->proc_id, addr, 0, 0); in k3_rproc_load() 73 dev_dbg(dev, "%s: rproc successfully loaded\n", __func__); in k3_rproc_load() 80 * @dev: rproc device pointer 86 struct k3_rproc_privdata *rproc = dev_get_priv(dev); in k3_rproc_start() local [all …]
|
/openbmc/linux/Documentation/staging/ |
H A D | remoteproc.rst | 37 int rproc_boot(struct rproc *rproc) 45 Note: to use this function you should already have a valid rproc 52 int rproc_shutdown(struct rproc *rproc) 55 In case @rproc is still being used by an additional user(s), then 65 we're not decrementing the rproc's refcount, only the power refcount. 66 which means that the @rproc handle stays valid even after 72 struct rproc *rproc_get_by_phandle(phandle phandle) 74 Find an rproc handle using a device tree phandle. Returns the rproc 77 decrement it back once rproc isn't needed anymore. 86 /* in case we were given a valid 'rproc' handle */ [all …]
|
/openbmc/openbmc/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/corstone1000/ |
H A D | 0001-remoteproc-Add-Arm-remoteproc-driver.patch | 128 + int (*stop)(struct rproc *rproc); 129 + int (*start)(struct rproc *rproc); 134 + * @rproc: rproc handler 139 + struct rproc *rproc; 163 + * @rproc: pointer to the remote processor object 172 +static int arm_rproc_start_cs1000_extsys(struct rproc *rproc) 174 + struct arm_rproc *priv = rproc->priv; 187 + * @rproc: pointer to the remote processor object 199 +static int arm_rproc_cs1000_extsys_poll_rst_ack(struct rproc *rproc, 202 + struct arm_rproc *priv = rproc->priv; [all …]
|