Lines Matching refs:r5_core

67 	struct zynqmp_r5_core *r5_core;  member
154 rproc = ipi->r5_core->rproc; in handle_event_notified()
275 struct zynqmp_r5_core *r5_core = rproc->priv; in zynqmp_r5_rproc_kick() local
276 struct device *dev = r5_core->dev; in zynqmp_r5_rproc_kick()
281 ipi = r5_core->ipi; in zynqmp_r5_rproc_kick()
304 static int zynqmp_r5_set_mode(struct zynqmp_r5_core *r5_core, in zynqmp_r5_set_mode() argument
310 ret = zynqmp_pm_set_rpu_mode(r5_core->pm_domain_id, fw_reg_val); in zynqmp_r5_set_mode()
312 dev_err(r5_core->dev, "failed to set RPU mode\n"); in zynqmp_r5_set_mode()
316 ret = zynqmp_pm_set_tcm_config(r5_core->pm_domain_id, tcm_mode); in zynqmp_r5_set_mode()
318 dev_err(r5_core->dev, "failed to configure TCM\n"); in zynqmp_r5_set_mode()
333 struct zynqmp_r5_core *r5_core = rproc->priv; in zynqmp_r5_rproc_start() local
357 dev_dbg(r5_core->dev, "RPU boot addr 0x%llx from %s.", rproc->bootaddr, in zynqmp_r5_rproc_start()
360 ret = zynqmp_pm_request_wake(r5_core->pm_domain_id, 1, in zynqmp_r5_rproc_start()
363 dev_err(r5_core->dev, in zynqmp_r5_rproc_start()
364 "failed to start RPU = 0x%x\n", r5_core->pm_domain_id); in zynqmp_r5_rproc_start()
378 struct zynqmp_r5_core *r5_core = rproc->priv; in zynqmp_r5_rproc_stop() local
381 ret = zynqmp_pm_force_pwrdwn(r5_core->pm_domain_id, in zynqmp_r5_rproc_stop()
384 dev_err(r5_core->dev, "failed to stop remoteproc RPU %d\n", ret); in zynqmp_r5_rproc_stop()
439 struct zynqmp_r5_core *r5_core; in add_mem_regions_carveout() local
444 r5_core = rproc->priv; in add_mem_regions_carveout()
447 of_phandle_iterator_init(&it, r5_core->np, "memory-region", NULL, 0); in add_mem_regions_carveout()
567 struct zynqmp_r5_core *r5_core; in add_tcm_carveout_split_mode() local
575 r5_core = rproc->priv; in add_tcm_carveout_split_mode()
576 dev = r5_core->dev; in add_tcm_carveout_split_mode()
577 num_banks = r5_core->tcm_bank_count; in add_tcm_carveout_split_mode()
585 bank_addr = r5_core->tcm_banks[i]->addr; in add_tcm_carveout_split_mode()
586 bank_name = r5_core->tcm_banks[i]->bank_name; in add_tcm_carveout_split_mode()
587 bank_size = r5_core->tcm_banks[i]->size; in add_tcm_carveout_split_mode()
588 pm_domain_id = r5_core->tcm_banks[i]->pm_domain_id; in add_tcm_carveout_split_mode()
619 pm_domain_id = r5_core->tcm_banks[i]->pm_domain_id; in add_tcm_carveout_split_mode()
636 struct zynqmp_r5_core *r5_core; in add_tcm_carveout_lockstep_mode() local
644 r5_core = rproc->priv; in add_tcm_carveout_lockstep_mode()
645 dev = r5_core->dev; in add_tcm_carveout_lockstep_mode()
648 num_banks = r5_core->tcm_bank_count; in add_tcm_carveout_lockstep_mode()
656 bank_addr = r5_core->tcm_banks[0]->addr; in add_tcm_carveout_lockstep_mode()
657 bank_name = r5_core->tcm_banks[0]->bank_name; in add_tcm_carveout_lockstep_mode()
660 bank_size += r5_core->tcm_banks[i]->size; in add_tcm_carveout_lockstep_mode()
661 pm_domain_id = r5_core->tcm_banks[i]->pm_domain_id; in add_tcm_carveout_lockstep_mode()
694 pm_domain_id = r5_core->tcm_banks[i]->pm_domain_id; in add_tcm_carveout_lockstep_mode()
711 struct zynqmp_r5_core *r5_core; in add_tcm_banks() local
714 r5_core = rproc->priv; in add_tcm_banks()
715 if (!r5_core) in add_tcm_banks()
718 dev = r5_core->dev; in add_tcm_banks()
803 struct zynqmp_r5_core *r5_core; in zynqmp_r5_rproc_unprepare() local
807 r5_core = rproc->priv; in zynqmp_r5_rproc_unprepare()
809 for (i = 0; i < r5_core->tcm_bank_count; i++) { in zynqmp_r5_rproc_unprepare()
810 pm_domain_id = r5_core->tcm_banks[i]->pm_domain_id; in zynqmp_r5_rproc_unprepare()
812 dev_warn(r5_core->dev, in zynqmp_r5_rproc_unprepare()
843 struct zynqmp_r5_core *r5_core; in zynqmp_r5_add_rproc_core() local
862 r5_core = r5_rproc->priv; in zynqmp_r5_add_rproc_core()
863 r5_core->dev = cdev; in zynqmp_r5_add_rproc_core()
864 r5_core->np = dev_of_node(cdev); in zynqmp_r5_add_rproc_core()
865 if (!r5_core->np) { in zynqmp_r5_add_rproc_core()
878 r5_core->rproc = r5_rproc; in zynqmp_r5_add_rproc_core()
879 return r5_core; in zynqmp_r5_add_rproc_core()
899 struct zynqmp_r5_core *r5_core; in zynqmp_r5_get_tcm_node() local
915 r5_core = cluster->r5_cores[i]; in zynqmp_r5_get_tcm_node()
916 r5_core->tcm_banks = devm_kcalloc(dev, tcm_bank_count, in zynqmp_r5_get_tcm_node()
919 if (!r5_core->tcm_banks) in zynqmp_r5_get_tcm_node()
928 r5_core->tcm_banks[j] = in zynqmp_r5_get_tcm_node()
933 r5_core->tcm_bank_count = tcm_bank_count; in zynqmp_r5_get_tcm_node()
954 struct zynqmp_r5_core *r5_core; in zynqmp_r5_core_init() local
964 r5_core = cluster->r5_cores[i]; in zynqmp_r5_core_init()
967 ret = of_property_read_u32_index(r5_core->np, "power-domains", in zynqmp_r5_core_init()
968 1, &r5_core->pm_domain_id); in zynqmp_r5_core_init()
974 ret = zynqmp_r5_set_mode(r5_core, fw_reg_val, tcm_mode); in zynqmp_r5_core_init()
1092 ipi->r5_core = r5_cores[i]; in zynqmp_r5_cluster_init()
1148 struct zynqmp_r5_core *r5_core; in zynqmp_r5_cluster_exit() local
1156 r5_core = cluster->r5_cores[i]; in zynqmp_r5_cluster_exit()
1157 zynqmp_r5_free_mbox(r5_core->ipi); in zynqmp_r5_cluster_exit()
1158 of_reserved_mem_device_release(r5_core->dev); in zynqmp_r5_cluster_exit()
1159 put_device(r5_core->dev); in zynqmp_r5_cluster_exit()
1160 rproc_del(r5_core->rproc); in zynqmp_r5_cluster_exit()
1161 rproc_free(r5_core->rproc); in zynqmp_r5_cluster_exit()