Lines Matching refs:oproc

275 	struct omap_rproc *oproc = rproc->priv;  in omap_rproc_watchdog_isr()  local
277 struct omap_rproc_timer *timers = oproc->timers; in omap_rproc_watchdog_isr()
279 int num_timers = oproc->num_timers + oproc->num_wd_timers; in omap_rproc_watchdog_isr()
282 for (i = oproc->num_timers; i < num_timers; i++) { in omap_rproc_watchdog_isr()
320 struct omap_rproc *oproc = rproc->priv; in omap_rproc_enable_timers() local
321 struct omap_rproc_timer *timers = oproc->timers; in omap_rproc_enable_timers()
324 int num_timers = oproc->num_timers + oproc->num_wd_timers; in omap_rproc_enable_timers()
333 if (i < oproc->num_timers) in omap_rproc_enable_timers()
338 (i - oproc->num_timers)); in omap_rproc_enable_timers()
342 i < oproc->num_timers ? i : in omap_rproc_enable_timers()
343 i - oproc->num_timers, ret); in omap_rproc_enable_timers()
383 if (i >= oproc->num_timers) { in omap_rproc_enable_timers()
430 if (i >= oproc->num_timers) in omap_rproc_enable_timers()
456 struct omap_rproc *oproc = rproc->priv; in omap_rproc_disable_timers() local
457 struct omap_rproc_timer *timers = oproc->timers; in omap_rproc_disable_timers()
458 int num_timers = oproc->num_timers + oproc->num_wd_timers; in omap_rproc_disable_timers()
466 if (i >= oproc->num_timers) in omap_rproc_disable_timers()
494 struct omap_rproc *oproc = container_of(client, struct omap_rproc, in omap_rproc_mbox_callback() local
496 struct device *dev = oproc->rproc->dev.parent; in omap_rproc_mbox_callback()
497 const char *name = oproc->rproc->name; in omap_rproc_mbox_callback()
509 rproc_report_crash(oproc->rproc, RPROC_FATAL_ERROR); in omap_rproc_mbox_callback()
516 oproc->suspend_acked = msg == RP_MBOX_SUSPEND_ACK; in omap_rproc_mbox_callback()
517 complete(&oproc->pm_comp); in omap_rproc_mbox_callback()
522 if (msg > oproc->rproc->max_notifyid) { in omap_rproc_mbox_callback()
527 if (rproc_vq_interrupt(oproc->rproc, msg) == IRQ_NONE) in omap_rproc_mbox_callback()
535 struct omap_rproc *oproc = rproc->priv; in omap_rproc_kick() local
549 ret = mbox_send_message(oproc->mbox, (void *)vqid); in omap_rproc_kick()
569 struct omap_rproc *oproc = rproc->priv; in omap_rproc_write_dsp_boot_addr() local
570 struct omap_rproc_boot_data *bdata = oproc->boot_data; in omap_rproc_write_dsp_boot_addr()
596 struct omap_rproc *oproc = rproc->priv; in omap_rproc_start() local
599 struct mbox_client *client = &oproc->client; in omap_rproc_start()
601 if (oproc->boot_data) { in omap_rproc_start()
613 oproc->mbox = mbox_request_channel(client, 0); in omap_rproc_start()
614 if (IS_ERR(oproc->mbox)) { in omap_rproc_start()
617 PTR_ERR(oproc->mbox)); in omap_rproc_start()
628 ret = mbox_send_message(oproc->mbox, (void *)RP_MBOX_ECHO_REQUEST); in omap_rproc_start()
640 ret = reset_control_deassert(oproc->reset); in omap_rproc_start()
663 mbox_free_channel(oproc->mbox); in omap_rproc_start()
671 struct omap_rproc *oproc = rproc->priv; in omap_rproc_stop() local
688 ret = reset_control_assert(oproc->reset); in omap_rproc_stop()
696 mbox_free_channel(oproc->mbox); in omap_rproc_stop()
710 reset_control_deassert(oproc->reset); in omap_rproc_stop()
734 struct omap_rproc *oproc = rproc->priv; in omap_rproc_da_to_va() local
741 if (!oproc->num_mems) in omap_rproc_da_to_va()
744 for (i = 0; i < oproc->num_mems; i++) { in omap_rproc_da_to_va()
745 if (da >= oproc->mem[i].dev_addr && da + len <= in omap_rproc_da_to_va()
746 oproc->mem[i].dev_addr + oproc->mem[i].size) { in omap_rproc_da_to_va()
747 offset = da - oproc->mem[i].dev_addr; in omap_rproc_da_to_va()
749 return (__force void *)(oproc->mem[i].cpu_addr + in omap_rproc_da_to_va()
765 static bool _is_rproc_in_standby(struct omap_rproc *oproc) in _is_rproc_in_standby() argument
767 return ti_clk_is_in_standby(oproc->fck); in _is_rproc_in_standby()
775 struct omap_rproc *oproc = rproc->priv; in _omap_rproc_suspend() local
782 reinit_completion(&oproc->pm_comp); in _omap_rproc_suspend()
783 oproc->suspend_acked = false; in _omap_rproc_suspend()
784 ret = mbox_send_message(oproc->mbox, (void *)suspend_msg); in _omap_rproc_suspend()
790 ret = wait_for_completion_timeout(&oproc->pm_comp, to); in _omap_rproc_suspend()
791 if (!oproc->suspend_acked) in _omap_rproc_suspend()
809 while (!_is_rproc_in_standby(oproc)) { in _omap_rproc_suspend()
815 ret = reset_control_assert(oproc->reset); in _omap_rproc_suspend()
848 reset_control_deassert(oproc->reset); in _omap_rproc_suspend()
855 struct omap_rproc *oproc = rproc->priv; in _omap_rproc_resume() local
872 if (oproc->boot_data) { in _omap_rproc_resume()
886 ret = reset_control_deassert(oproc->reset); in _omap_rproc_resume()
906 struct omap_rproc *oproc = rproc->priv; in omap_rproc_suspend() local
931 oproc->need_resume = true; in omap_rproc_suspend()
942 struct omap_rproc *oproc = rproc->priv; in omap_rproc_resume() local
959 if (!oproc->need_resume) in omap_rproc_resume()
968 oproc->need_resume = false; in omap_rproc_resume()
980 struct omap_rproc *oproc = rproc->priv; in omap_rproc_runtime_suspend() local
1000 if (!_is_rproc_in_standby(oproc)) { in omap_rproc_runtime_suspend()
1134 struct omap_rproc *oproc = rproc->priv; in omap_rproc_get_boot_data() local
1145 oproc->boot_data = devm_kzalloc(&pdev->dev, sizeof(*oproc->boot_data), in omap_rproc_get_boot_data()
1147 if (!oproc->boot_data) in omap_rproc_get_boot_data()
1150 oproc->boot_data->syscon = in omap_rproc_get_boot_data()
1152 if (IS_ERR(oproc->boot_data->syscon)) { in omap_rproc_get_boot_data()
1153 ret = PTR_ERR(oproc->boot_data->syscon); in omap_rproc_get_boot_data()
1158 &oproc->boot_data->boot_reg)) { in omap_rproc_get_boot_data()
1164 &oproc->boot_data->boot_reg_shift); in omap_rproc_get_boot_data()
1172 struct omap_rproc *oproc = rproc->priv; in omap_rproc_of_get_internal_memories() local
1189 oproc->mem = devm_kcalloc(dev, num_mems, sizeof(*oproc->mem), in omap_rproc_of_get_internal_memories()
1191 if (!oproc->mem) in omap_rproc_of_get_internal_memories()
1202 oproc->mem[i].cpu_addr = devm_ioremap_resource(dev, res); in omap_rproc_of_get_internal_memories()
1203 if (IS_ERR(oproc->mem[i].cpu_addr)) { in omap_rproc_of_get_internal_memories()
1206 return PTR_ERR(oproc->mem[i].cpu_addr); in omap_rproc_of_get_internal_memories()
1208 oproc->mem[i].bus_addr = res->start; in omap_rproc_of_get_internal_memories()
1209 oproc->mem[i].dev_addr = data->mems[i].dev_addr; in omap_rproc_of_get_internal_memories()
1210 oproc->mem[i].size = resource_size(res); in omap_rproc_of_get_internal_memories()
1213 data->mems[i].name, &oproc->mem[i].bus_addr, in omap_rproc_of_get_internal_memories()
1214 oproc->mem[i].size, oproc->mem[i].cpu_addr, in omap_rproc_of_get_internal_memories()
1215 oproc->mem[i].dev_addr); in omap_rproc_of_get_internal_memories()
1217 oproc->num_mems = num_mems; in omap_rproc_of_get_internal_memories()
1248 struct omap_rproc *oproc = rproc->priv; in omap_rproc_of_get_timers() local
1256 oproc->num_timers = of_count_phandle_with_args(np, "ti,timers", NULL); in omap_rproc_of_get_timers()
1257 if (oproc->num_timers <= 0) { in omap_rproc_of_get_timers()
1259 oproc->num_timers); in omap_rproc_of_get_timers()
1260 oproc->num_timers = 0; in omap_rproc_of_get_timers()
1263 oproc->num_wd_timers = omap_rproc_count_wdog_timers(dev); in omap_rproc_of_get_timers()
1265 num_timers = oproc->num_timers + oproc->num_wd_timers; in omap_rproc_of_get_timers()
1267 oproc->timers = devm_kcalloc(dev, num_timers, in omap_rproc_of_get_timers()
1268 sizeof(*oproc->timers), in omap_rproc_of_get_timers()
1270 if (!oproc->timers) in omap_rproc_of_get_timers()
1274 oproc->num_timers, oproc->num_wd_timers); in omap_rproc_of_get_timers()
1283 struct omap_rproc *oproc; in omap_rproc_probe() local
1309 firmware, sizeof(*oproc)); in omap_rproc_probe()
1313 oproc = rproc->priv; in omap_rproc_probe()
1314 oproc->rproc = rproc; in omap_rproc_probe()
1315 oproc->reset = reset; in omap_rproc_probe()
1331 init_completion(&oproc->pm_comp); in omap_rproc_probe()
1332 oproc->autosuspend_delay = DEFAULT_AUTOSUSPEND_DELAY; in omap_rproc_probe()
1335 &oproc->autosuspend_delay); in omap_rproc_probe()
1337 pm_runtime_set_autosuspend_delay(&pdev->dev, oproc->autosuspend_delay); in omap_rproc_probe()
1339 oproc->fck = devm_clk_get(&pdev->dev, 0); in omap_rproc_probe()
1340 if (IS_ERR(oproc->fck)) { in omap_rproc_probe()
1341 ret = PTR_ERR(oproc->fck); in omap_rproc_probe()