Lines Matching full:rproc

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()
493 static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) in imx_rproc_da_to_va() argument
495 struct imx_rproc *priv = rproc->priv; in imx_rproc_da_to_va()
520 dev_dbg(&rproc->dev, "da = 0x%llx len = 0x%zx va = 0x%p\n", in imx_rproc_da_to_va()
526 static int imx_rproc_mem_alloc(struct rproc *rproc, in imx_rproc_mem_alloc() argument
529 struct device *dev = rproc->dev.parent; in imx_rproc_mem_alloc()
546 static int imx_rproc_mem_release(struct rproc *rproc, in imx_rproc_mem_release() argument
549 dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma); in imx_rproc_mem_release()
555 static int imx_rproc_prepare(struct rproc *rproc) in imx_rproc_prepare() argument
557 struct imx_rproc *priv = rproc->priv; in imx_rproc_prepare()
593 rproc_coredump_add_segment(rproc, da, rmem->size); in imx_rproc_prepare()
599 rproc_add_carveout(rproc, mem); in imx_rproc_prepare()
605 static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) in imx_rproc_parse_fw() argument
609 ret = rproc_elf_load_rsc_table(rproc, fw); in imx_rproc_parse_fw()
611 dev_info(&rproc->dev, "No resource table in elf\n"); in imx_rproc_parse_fw()
616 static void imx_rproc_kick(struct rproc *rproc, int vqid) in imx_rproc_kick() argument
618 struct imx_rproc *priv = rproc->priv; in imx_rproc_kick()
639 static int imx_rproc_attach(struct rproc *rproc) in imx_rproc_attach() argument
641 return imx_rproc_xtr_mbox_init(rproc); in imx_rproc_attach()
644 static int imx_rproc_detach(struct rproc *rproc) in imx_rproc_detach() argument
646 struct imx_rproc *priv = rproc->priv; in imx_rproc_detach()
655 imx_rproc_free_mbox(rproc); in imx_rproc_detach()
660 static struct resource_table *imx_rproc_get_loaded_rsc_table(struct rproc *rproc, size_t *table_sz) in imx_rproc_get_loaded_rsc_table() argument
662 struct imx_rproc *priv = rproc->priv; in imx_rproc_get_loaded_rsc_table()
673 imx_rproc_elf_find_loaded_rsc_table(struct rproc *rproc, const struct firmware *fw) in imx_rproc_elf_find_loaded_rsc_table() argument
675 struct imx_rproc *priv = rproc->priv; in imx_rproc_elf_find_loaded_rsc_table()
680 return rproc_elf_find_loaded_rsc_table(rproc, fw); in imx_rproc_elf_find_loaded_rsc_table()
782 struct rproc *rproc = data; in imx_rproc_notified_idr_cb() local
784 rproc_vq_interrupt(rproc, id); in imx_rproc_notified_idr_cb()
793 struct rproc *rproc = priv->rproc; in imx_rproc_vq_work() local
795 idr_for_each(&rproc->notifyids, imx_rproc_notified_idr_cb, rproc); in imx_rproc_vq_work()
800 struct rproc *rproc = dev_get_drvdata(cl->dev); in imx_rproc_rx_callback() local
801 struct imx_rproc *priv = rproc->priv; in imx_rproc_rx_callback()
806 static int imx_rproc_xtr_mbox_init(struct rproc *rproc) in imx_rproc_xtr_mbox_init() argument
808 struct imx_rproc *priv = rproc->priv; in imx_rproc_xtr_mbox_init()
849 static void imx_rproc_free_mbox(struct rproc *rproc) in imx_rproc_free_mbox() argument
851 struct imx_rproc *priv = rproc->priv; in imx_rproc_free_mbox()
864 static void imx_rproc_put_scu(struct rproc *rproc) in imx_rproc_put_scu() argument
866 struct imx_rproc *priv = rproc->priv; in imx_rproc_put_scu()
873 imx_rproc_detach_pd(rproc); in imx_rproc_put_scu()
890 rproc_report_crash(priv->rproc, RPROC_WATCHDOG); in imx_rproc_partition_notify()
948 static int imx_rproc_detach_pd(struct rproc *rproc) in imx_rproc_detach_pd() argument
950 struct imx_rproc *priv = rproc->priv; in imx_rproc_detach_pd()
970 struct regmap_config config = { .name = "imx-rproc" }; in imx_rproc_detect_mode()
981 priv->rproc->state = RPROC_DETACHED; in imx_rproc_detect_mode()
986 priv->rproc->state = RPROC_DETACHED; in imx_rproc_detect_mode()
1014 priv->rproc->state = RPROC_DETACHED; in imx_rproc_detect_mode()
1015 priv->rproc->recovery_disabled = false; in imx_rproc_detect_mode()
1016 rproc_set_feature(priv->rproc, RPROC_FEAT_ATTACH_ON_RECOVERY); in imx_rproc_detect_mode()
1068 imx_rproc_stop(priv->rproc); in imx_rproc_detect_mode()
1080 priv->rproc->state = RPROC_DETACHED; in imx_rproc_detect_mode()
1119 struct rproc *rproc; in imx_rproc_probe() local
1124 rproc = rproc_alloc(dev, "imx-rproc", &imx_rproc_ops, in imx_rproc_probe()
1126 if (!rproc) in imx_rproc_probe()
1135 priv = rproc->priv; in imx_rproc_probe()
1136 priv->rproc = rproc; in imx_rproc_probe()
1140 dev_set_drvdata(dev, rproc); in imx_rproc_probe()
1150 ret = imx_rproc_xtr_mbox_init(rproc); in imx_rproc_probe()
1168 if (rproc->state != RPROC_DETACHED) in imx_rproc_probe()
1169 rproc->auto_boot = of_property_read_bool(np, "fsl,auto-boot"); in imx_rproc_probe()
1171 ret = rproc_add(rproc); in imx_rproc_probe()
1182 imx_rproc_put_scu(rproc); in imx_rproc_probe()
1184 imx_rproc_free_mbox(rproc); in imx_rproc_probe()
1188 rproc_free(rproc); in imx_rproc_probe()
1195 struct rproc *rproc = platform_get_drvdata(pdev); in imx_rproc_remove() local
1196 struct imx_rproc *priv = rproc->priv; in imx_rproc_remove()
1199 rproc_del(rproc); in imx_rproc_remove()
1200 imx_rproc_put_scu(rproc); in imx_rproc_remove()
1201 imx_rproc_free_mbox(rproc); in imx_rproc_remove()
1203 rproc_free(rproc); in imx_rproc_remove()
1228 .name = "imx-rproc",