Lines Matching refs:oproc
274 struct omap_rproc *oproc = rproc->priv; in omap_rproc_watchdog_isr() local
276 struct omap_rproc_timer *timers = oproc->timers; in omap_rproc_watchdog_isr()
278 int num_timers = oproc->num_timers + oproc->num_wd_timers; in omap_rproc_watchdog_isr()
281 for (i = oproc->num_timers; i < num_timers; i++) { in omap_rproc_watchdog_isr()
319 struct omap_rproc *oproc = rproc->priv; in omap_rproc_enable_timers() local
320 struct omap_rproc_timer *timers = oproc->timers; in omap_rproc_enable_timers()
323 int num_timers = oproc->num_timers + oproc->num_wd_timers; in omap_rproc_enable_timers()
332 if (i < oproc->num_timers) in omap_rproc_enable_timers()
337 (i - oproc->num_timers)); in omap_rproc_enable_timers()
341 i < oproc->num_timers ? i : in omap_rproc_enable_timers()
342 i - oproc->num_timers, ret); in omap_rproc_enable_timers()
382 if (i >= oproc->num_timers) { in omap_rproc_enable_timers()
429 if (i >= oproc->num_timers) in omap_rproc_enable_timers()
455 struct omap_rproc *oproc = rproc->priv; in omap_rproc_disable_timers() local
456 struct omap_rproc_timer *timers = oproc->timers; in omap_rproc_disable_timers()
457 int num_timers = oproc->num_timers + oproc->num_wd_timers; in omap_rproc_disable_timers()
465 if (i >= oproc->num_timers) in omap_rproc_disable_timers()
493 struct omap_rproc *oproc = container_of(client, struct omap_rproc, in omap_rproc_mbox_callback() local
495 struct device *dev = oproc->rproc->dev.parent; in omap_rproc_mbox_callback()
496 const char *name = oproc->rproc->name; in omap_rproc_mbox_callback()
508 rproc_report_crash(oproc->rproc, RPROC_FATAL_ERROR); in omap_rproc_mbox_callback()
515 oproc->suspend_acked = msg == RP_MBOX_SUSPEND_ACK; in omap_rproc_mbox_callback()
516 complete(&oproc->pm_comp); in omap_rproc_mbox_callback()
521 if (msg > oproc->rproc->max_notifyid) { in omap_rproc_mbox_callback()
526 if (rproc_vq_interrupt(oproc->rproc, msg) == IRQ_NONE) in omap_rproc_mbox_callback()
534 struct omap_rproc *oproc = rproc->priv; in omap_rproc_kick() local
548 ret = mbox_send_message(oproc->mbox, (void *)vqid); in omap_rproc_kick()
568 struct omap_rproc *oproc = rproc->priv; in omap_rproc_write_dsp_boot_addr() local
569 struct omap_rproc_boot_data *bdata = oproc->boot_data; in omap_rproc_write_dsp_boot_addr()
595 struct omap_rproc *oproc = rproc->priv; in omap_rproc_start() local
598 struct mbox_client *client = &oproc->client; in omap_rproc_start()
600 if (oproc->boot_data) { in omap_rproc_start()
612 oproc->mbox = mbox_request_channel(client, 0); in omap_rproc_start()
613 if (IS_ERR(oproc->mbox)) { in omap_rproc_start()
616 PTR_ERR(oproc->mbox)); in omap_rproc_start()
627 ret = mbox_send_message(oproc->mbox, (void *)RP_MBOX_ECHO_REQUEST); in omap_rproc_start()
639 ret = reset_control_deassert(oproc->reset); in omap_rproc_start()
662 mbox_free_channel(oproc->mbox); in omap_rproc_start()
670 struct omap_rproc *oproc = rproc->priv; in omap_rproc_stop() local
687 ret = reset_control_assert(oproc->reset); in omap_rproc_stop()
695 mbox_free_channel(oproc->mbox); in omap_rproc_stop()
709 reset_control_deassert(oproc->reset); in omap_rproc_stop()
733 struct omap_rproc *oproc = rproc->priv; in omap_rproc_da_to_va() local
740 if (!oproc->num_mems) in omap_rproc_da_to_va()
743 for (i = 0; i < oproc->num_mems; i++) { in omap_rproc_da_to_va()
744 if (da >= oproc->mem[i].dev_addr && da + len <= in omap_rproc_da_to_va()
745 oproc->mem[i].dev_addr + oproc->mem[i].size) { in omap_rproc_da_to_va()
746 offset = da - oproc->mem[i].dev_addr; in omap_rproc_da_to_va()
748 return (__force void *)(oproc->mem[i].cpu_addr + in omap_rproc_da_to_va()
764 static bool _is_rproc_in_standby(struct omap_rproc *oproc) in _is_rproc_in_standby() argument
766 return ti_clk_is_in_standby(oproc->fck); in _is_rproc_in_standby()
774 struct omap_rproc *oproc = rproc->priv; in _omap_rproc_suspend() local
781 reinit_completion(&oproc->pm_comp); in _omap_rproc_suspend()
782 oproc->suspend_acked = false; in _omap_rproc_suspend()
783 ret = mbox_send_message(oproc->mbox, (void *)suspend_msg); in _omap_rproc_suspend()
789 ret = wait_for_completion_timeout(&oproc->pm_comp, to); in _omap_rproc_suspend()
790 if (!oproc->suspend_acked) in _omap_rproc_suspend()
808 while (!_is_rproc_in_standby(oproc)) { in _omap_rproc_suspend()
814 ret = reset_control_assert(oproc->reset); in _omap_rproc_suspend()
847 reset_control_deassert(oproc->reset); in _omap_rproc_suspend()
854 struct omap_rproc *oproc = rproc->priv; in _omap_rproc_resume() local
871 if (oproc->boot_data) { in _omap_rproc_resume()
885 ret = reset_control_deassert(oproc->reset); in _omap_rproc_resume()
905 struct omap_rproc *oproc = rproc->priv; in omap_rproc_suspend() local
930 oproc->need_resume = true; in omap_rproc_suspend()
941 struct omap_rproc *oproc = rproc->priv; in omap_rproc_resume() local
958 if (!oproc->need_resume) in omap_rproc_resume()
967 oproc->need_resume = false; in omap_rproc_resume()
979 struct omap_rproc *oproc = rproc->priv; in omap_rproc_runtime_suspend() local
999 if (!_is_rproc_in_standby(oproc)) { in omap_rproc_runtime_suspend()
1133 struct omap_rproc *oproc = rproc->priv; in omap_rproc_get_boot_data() local
1144 oproc->boot_data = devm_kzalloc(&pdev->dev, sizeof(*oproc->boot_data), in omap_rproc_get_boot_data()
1146 if (!oproc->boot_data) in omap_rproc_get_boot_data()
1149 oproc->boot_data->syscon = in omap_rproc_get_boot_data()
1151 if (IS_ERR(oproc->boot_data->syscon)) { in omap_rproc_get_boot_data()
1152 ret = PTR_ERR(oproc->boot_data->syscon); in omap_rproc_get_boot_data()
1157 &oproc->boot_data->boot_reg)) { in omap_rproc_get_boot_data()
1163 &oproc->boot_data->boot_reg_shift); in omap_rproc_get_boot_data()
1171 struct omap_rproc *oproc = rproc->priv; in omap_rproc_of_get_internal_memories() local
1188 oproc->mem = devm_kcalloc(dev, num_mems, sizeof(*oproc->mem), in omap_rproc_of_get_internal_memories()
1190 if (!oproc->mem) in omap_rproc_of_get_internal_memories()
1201 oproc->mem[i].cpu_addr = devm_ioremap_resource(dev, res); in omap_rproc_of_get_internal_memories()
1202 if (IS_ERR(oproc->mem[i].cpu_addr)) { in omap_rproc_of_get_internal_memories()
1205 return PTR_ERR(oproc->mem[i].cpu_addr); in omap_rproc_of_get_internal_memories()
1207 oproc->mem[i].bus_addr = res->start; in omap_rproc_of_get_internal_memories()
1208 oproc->mem[i].dev_addr = data->mems[i].dev_addr; in omap_rproc_of_get_internal_memories()
1209 oproc->mem[i].size = resource_size(res); in omap_rproc_of_get_internal_memories()
1212 data->mems[i].name, &oproc->mem[i].bus_addr, in omap_rproc_of_get_internal_memories()
1213 oproc->mem[i].size, oproc->mem[i].cpu_addr, in omap_rproc_of_get_internal_memories()
1214 oproc->mem[i].dev_addr); in omap_rproc_of_get_internal_memories()
1216 oproc->num_mems = num_mems; in omap_rproc_of_get_internal_memories()
1247 struct omap_rproc *oproc = rproc->priv; in omap_rproc_of_get_timers() local
1255 oproc->num_timers = of_count_phandle_with_args(np, "ti,timers", NULL); in omap_rproc_of_get_timers()
1256 if (oproc->num_timers <= 0) { in omap_rproc_of_get_timers()
1258 oproc->num_timers); in omap_rproc_of_get_timers()
1259 oproc->num_timers = 0; in omap_rproc_of_get_timers()
1262 oproc->num_wd_timers = omap_rproc_count_wdog_timers(dev); in omap_rproc_of_get_timers()
1264 num_timers = oproc->num_timers + oproc->num_wd_timers; in omap_rproc_of_get_timers()
1266 oproc->timers = devm_kcalloc(dev, num_timers, in omap_rproc_of_get_timers()
1267 sizeof(*oproc->timers), in omap_rproc_of_get_timers()
1269 if (!oproc->timers) in omap_rproc_of_get_timers()
1273 oproc->num_timers, oproc->num_wd_timers); in omap_rproc_of_get_timers()
1282 struct omap_rproc *oproc; in omap_rproc_probe() local
1308 firmware, sizeof(*oproc)); in omap_rproc_probe()
1312 oproc = rproc->priv; in omap_rproc_probe()
1313 oproc->rproc = rproc; in omap_rproc_probe()
1314 oproc->reset = reset; in omap_rproc_probe()
1330 init_completion(&oproc->pm_comp); in omap_rproc_probe()
1331 oproc->autosuspend_delay = DEFAULT_AUTOSUSPEND_DELAY; in omap_rproc_probe()
1334 &oproc->autosuspend_delay); in omap_rproc_probe()
1336 pm_runtime_set_autosuspend_delay(&pdev->dev, oproc->autosuspend_delay); in omap_rproc_probe()
1338 oproc->fck = devm_clk_get(&pdev->dev, 0); in omap_rproc_probe()
1339 if (IS_ERR(oproc->fck)) { in omap_rproc_probe()
1340 ret = PTR_ERR(oproc->fck); in omap_rproc_probe()