Lines Matching +full:no +full:- +full:tick +full:- +full:in +full:- +full:suspend
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2011-2020 Texas Instruments Incorporated - http://www.ti.com/
8 * Ohad Ben-Cohen <ohad@wizery.com>
12 * Suman Anna <s-anna@ti.com>
13 * Hari Kanigeri <h-kanigeri2@ti.com>
27 #include <linux/dma-mapping.h>
31 #include <linux/omap-iommu.h>
32 #include <linux/omap-mailbox.h>
36 #include <clocksource/timer-ti-dm.h>
38 #include <linux/platform_data/dmtimer-omap.h>
43 /* default auto-suspend delay (ms) */
47 * struct omap_rproc_boot_data - boot data structure for the DSP omap rprocs
50 * @boot_reg_shift: bit-field shift required for the boot address value in
60 * struct omap_rproc_mem - internal memory structure
74 * struct omap_rproc_timer - data structure for a timer used by a omap rproc
86 * struct omap_rproc - omap remote processor state
95 * @autosuspend_delay: auto-suspend delay value to be used for runtime pm
96 * @need_resume: if true a resume is needed in the system resume callback
99 * @pm_comp: completion primitive to sync for suspend response
101 * @suspend_acked: state machine flag to store the suspend request ack
122 * struct omap_rproc_mem_data - memory definitions for an omap remote processor
132 * struct omap_rproc_dev_data - device data for the omap remote processor
142 * omap_rproc_request_timer() - request a timer for a remoteproc
148 * a remoteproc. The returned handle is stored in the .odt field of the
149 * @timer structure passed in, and is used to invoke other timer specific
160 timer->odt = timer->timer_ops->request_by_node(np); in omap_rproc_request_timer()
161 if (!timer->odt) { in omap_rproc_request_timer()
163 return -EBUSY; in omap_rproc_request_timer()
166 ret = timer->timer_ops->set_source(timer->odt, OMAP_TIMER_SRC_SYS_CLK); in omap_rproc_request_timer()
170 timer->timer_ops->free(timer->odt); in omap_rproc_request_timer()
175 timer->timer_ops->set_load(timer->odt, 0); in omap_rproc_request_timer()
181 * omap_rproc_start_timer() - start a timer for a remoteproc
193 return timer->timer_ops->start(timer->odt); in omap_rproc_start_timer()
197 * omap_rproc_stop_timer() - stop a timer for a remoteproc
202 * or suspend operation. The separate helper function allows the driver
204 * suspend operation.
210 return timer->timer_ops->stop(timer->odt); in omap_rproc_stop_timer()
214 * omap_rproc_release_timer() - release a timer for a remoteproc
225 return timer->timer_ops->free(timer->odt); in omap_rproc_release_timer()
229 * omap_rproc_get_timer_irq() - get the irq for a timer
240 return timer->timer_ops->get_irq(timer->odt); in omap_rproc_get_timer_irq()
244 * omap_rproc_ack_timer_irq() - acknowledge a timer irq
253 timer->timer_ops->write_status(timer->odt, OMAP_TIMER_INT_OVERFLOW); in omap_rproc_ack_timer_irq()
257 * omap_rproc_watchdog_isr() - Watchdog ISR handler for remoteproc device
261 * This ISR routine executes the required necessary low-level code to
275 struct omap_rproc *oproc = rproc->priv; in omap_rproc_watchdog_isr()
276 struct device *dev = rproc->dev.parent; in omap_rproc_watchdog_isr()
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()
302 * omap_rproc_enable_timers() - enable the timers for a remoteproc
320 struct omap_rproc *oproc = rproc->priv; in omap_rproc_enable_timers()
321 struct omap_rproc_timer *timers = oproc->timers; in omap_rproc_enable_timers()
322 struct device *dev = rproc->dev.parent; 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()
334 np = of_parse_phandle(dev->of_node, "ti,timers", i); in omap_rproc_enable_timers()
336 np = of_parse_phandle(dev->of_node, in omap_rproc_enable_timers()
337 "ti,watchdog-timers", in omap_rproc_enable_timers()
338 (i - oproc->num_timers)); in omap_rproc_enable_timers()
340 ret = -ENXIO; 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()
349 ret = -ENODEV; in omap_rproc_enable_timers()
354 tpdata = dev_get_platdata(&tpdev->dev); in omap_rproc_enable_timers()
355 put_device(&tpdev->dev); in omap_rproc_enable_timers()
357 ret = -EINVAL; in omap_rproc_enable_timers()
362 timer_ops = tpdata->timer_ops; in omap_rproc_enable_timers()
363 if (!timer_ops || !timer_ops->request_by_node || in omap_rproc_enable_timers()
364 !timer_ops->set_source || !timer_ops->set_load || in omap_rproc_enable_timers()
365 !timer_ops->free || !timer_ops->start || in omap_rproc_enable_timers()
366 !timer_ops->stop || !timer_ops->get_irq || in omap_rproc_enable_timers()
367 !timer_ops->write_status) { in omap_rproc_enable_timers()
368 ret = -EINVAL; in omap_rproc_enable_timers()
373 timers[i].irq = -1; in omap_rproc_enable_timers()
383 if (i >= oproc->num_timers) { in omap_rproc_enable_timers()
388 ret = -EBUSY; in omap_rproc_enable_timers()
394 "rproc-wdt", rproc); in omap_rproc_enable_timers()
401 timers[i].irq = -1; in omap_rproc_enable_timers()
419 i--; in omap_rproc_enable_timers()
429 while (i--) { in omap_rproc_enable_timers()
430 if (i >= oproc->num_timers) in omap_rproc_enable_timers()
435 timers[i].irq = -1; in omap_rproc_enable_timers()
442 * omap_rproc_disable_timers() - disable the timers for a remoteproc
449 * stop a timer (during a suspend operation).
451 * Return: 0 on success or no timers
456 struct omap_rproc *oproc = rproc->priv; in omap_rproc_disable_timers()
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()
471 timers[i].irq = -1; in omap_rproc_disable_timers()
479 * omap_rproc_mbox_callback() - inbound mailbox message handler
488 * In addition to virtqueue indices, we also have some out-of-band values
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()
528 dev_dbg(dev, "no message was found in vqid %d\n", msg); in omap_rproc_mbox_callback()
535 struct omap_rproc *oproc = rproc->priv; in omap_rproc_kick()
536 struct device *dev = rproc->dev.parent; in omap_rproc_kick()
548 /* send the index of the triggered virtqueue in the mailbox payload */ in omap_rproc_kick()
549 ret = mbox_send_message(oproc->mbox, (void *)vqid); in omap_rproc_kick()
559 * omap_rproc_write_dsp_boot_addr() - set boot address for DSP remote processor
564 * Return: 0 on success, or -EINVAL if boot address is not aligned properly
568 struct device *dev = rproc->dev.parent; in omap_rproc_write_dsp_boot_addr()
569 struct omap_rproc *oproc = rproc->priv; in omap_rproc_write_dsp_boot_addr()
570 struct omap_rproc_boot_data *bdata = oproc->boot_data; in omap_rproc_write_dsp_boot_addr()
571 u32 offset = bdata->boot_reg; in omap_rproc_write_dsp_boot_addr()
575 if (rproc->bootaddr & (SZ_1K - 1)) { in omap_rproc_write_dsp_boot_addr()
577 rproc->bootaddr); in omap_rproc_write_dsp_boot_addr()
578 return -EINVAL; in omap_rproc_write_dsp_boot_addr()
581 value = rproc->bootaddr >> bdata->boot_reg_shift; in omap_rproc_write_dsp_boot_addr()
582 mask = ~(SZ_1K - 1) >> bdata->boot_reg_shift; in omap_rproc_write_dsp_boot_addr()
584 return regmap_update_bits(bdata->syscon, offset, mask, value); in omap_rproc_write_dsp_boot_addr()
596 struct omap_rproc *oproc = rproc->priv; in omap_rproc_start()
597 struct device *dev = rproc->dev.parent; in omap_rproc_start()
599 struct mbox_client *client = &oproc->client; in omap_rproc_start()
601 if (oproc->boot_data) { in omap_rproc_start()
607 client->dev = dev; in omap_rproc_start()
608 client->tx_done = NULL; in omap_rproc_start()
609 client->rx_callback = omap_rproc_mbox_callback; in omap_rproc_start()
610 client->tx_block = false; in omap_rproc_start()
611 client->knows_txdone = false; 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()
615 ret = -EBUSY; in omap_rproc_start()
617 PTR_ERR(oproc->mbox)); in omap_rproc_start()
622 * Ping the remote processor. this is only for sanity-sake; in omap_rproc_start()
623 * there is no functional effect whatsoever. in omap_rproc_start()
626 * will wait in the mailbox fifo until the remote processor is booted. 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()
648 * enable the auto-suspend. The device usage count is incremented in omap_rproc_start()
649 * manually for balancing it for auto-suspend in omap_rproc_start()
663 mbox_free_channel(oproc->mbox); in omap_rproc_start()
670 struct device *dev = rproc->dev.parent; in omap_rproc_stop()
671 struct omap_rproc *oproc = rproc->priv; in omap_rproc_stop()
675 * cancel any possible scheduled runtime suspend by incrementing in omap_rproc_stop()
679 * avoid potential issues in misindentifying a subsequent device in omap_rproc_stop()
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()
712 /* schedule the next auto-suspend */ in omap_rproc_stop()
719 * omap_rproc_da_to_va() - internal memory translation helper
726 * present in a DSP or IPU device). The translated addresses can be used
729 * Return: translated virtual address in kernel memory space on success,
734 struct omap_rproc *oproc = rproc->priv; in omap_rproc_da_to_va()
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()
767 return ti_clk_is_in_standby(oproc->fck); in _is_rproc_in_standby()
770 /* 1 sec is long enough time to let the remoteproc side suspend the device */
774 struct device *dev = rproc->dev.parent; in _omap_rproc_suspend()
775 struct omap_rproc *oproc = rproc->priv; in _omap_rproc_suspend()
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()
792 return -EBUSY; in _omap_rproc_suspend()
797 * function, and it cannot have any inter-dependencies against the IPC in _omap_rproc_suspend()
806 * appropriate target-specific WFI instruction causing the module to in _omap_rproc_suspend()
811 return -ETIME; in _omap_rproc_suspend()
815 ret = reset_control_assert(oproc->reset); in _omap_rproc_suspend()
817 dev_err(dev, "reset assert during suspend failed %d\n", ret); in _omap_rproc_suspend()
823 dev_err(dev, "disabling timers during suspend failed %d\n", in _omap_rproc_suspend()
829 * IOMMUs would have to be disabled specifically for runtime suspend. in _omap_rproc_suspend()
831 * regular system suspend in _omap_rproc_suspend()
834 ret = omap_iommu_domain_deactivate(rproc->domain); in _omap_rproc_suspend()
845 /* ignore errors on re-enabling code */ in _omap_rproc_suspend()
848 reset_control_deassert(oproc->reset); in _omap_rproc_suspend()
854 struct device *dev = rproc->dev.parent; in _omap_rproc_resume()
855 struct omap_rproc *oproc = rproc->priv; in _omap_rproc_resume()
864 ret = omap_iommu_domain_activate(rproc->domain); in _omap_rproc_resume()
871 /* boot address could be lost after suspend, so restore it */ in _omap_rproc_resume()
872 if (oproc->boot_data) { in _omap_rproc_resume()
886 ret = reset_control_deassert(oproc->reset); in _omap_rproc_resume()
898 omap_iommu_domain_deactivate(rproc->domain); in _omap_rproc_resume()
906 struct omap_rproc *oproc = rproc->priv; in omap_rproc_suspend()
909 mutex_lock(&rproc->lock); in omap_rproc_suspend()
910 if (rproc->state == RPROC_OFFLINE) in omap_rproc_suspend()
913 if (rproc->state == RPROC_SUSPENDED) in omap_rproc_suspend()
916 if (rproc->state != RPROC_RUNNING) { in omap_rproc_suspend()
917 ret = -EBUSY; in omap_rproc_suspend()
923 dev_err(dev, "suspend failed %d\n", ret); in omap_rproc_suspend()
928 * remoteproc is running at the time of system suspend, so remember in omap_rproc_suspend()
931 oproc->need_resume = true; in omap_rproc_suspend()
932 rproc->state = RPROC_SUSPENDED; in omap_rproc_suspend()
935 mutex_unlock(&rproc->lock); in omap_rproc_suspend()
942 struct omap_rproc *oproc = rproc->priv; in omap_rproc_resume()
945 mutex_lock(&rproc->lock); in omap_rproc_resume()
946 if (rproc->state == RPROC_OFFLINE) in omap_rproc_resume()
949 if (rproc->state != RPROC_SUSPENDED) { in omap_rproc_resume()
950 ret = -EBUSY; in omap_rproc_resume()
955 * remoteproc was auto-suspended at the time of system suspend, in omap_rproc_resume()
956 * so no need to wake-up the processor (leave it in suspended in omap_rproc_resume()
959 if (!oproc->need_resume) in omap_rproc_resume()
968 oproc->need_resume = false; in omap_rproc_resume()
969 rproc->state = RPROC_RUNNING; in omap_rproc_resume()
973 mutex_unlock(&rproc->lock); in omap_rproc_resume()
980 struct omap_rproc *oproc = rproc->priv; in omap_rproc_runtime_suspend()
983 mutex_lock(&rproc->lock); in omap_rproc_runtime_suspend()
984 if (rproc->state == RPROC_CRASHED) { in omap_rproc_runtime_suspend()
986 ret = -EBUSY; in omap_rproc_runtime_suspend()
990 if (WARN_ON(rproc->state != RPROC_RUNNING)) { in omap_rproc_runtime_suspend()
992 ret = -EBUSY; in omap_rproc_runtime_suspend()
997 * do not even attempt suspend if the remote processor is not in omap_rproc_runtime_suspend()
998 * idled for runtime auto-suspend in omap_rproc_runtime_suspend()
1001 ret = -EBUSY; in omap_rproc_runtime_suspend()
1009 rproc->state = RPROC_SUSPENDED; in omap_rproc_runtime_suspend()
1010 mutex_unlock(&rproc->lock); in omap_rproc_runtime_suspend()
1016 mutex_unlock(&rproc->lock); in omap_rproc_runtime_suspend()
1025 mutex_lock(&rproc->lock); in omap_rproc_runtime_resume()
1026 if (WARN_ON(rproc->state != RPROC_SUSPENDED)) { in omap_rproc_runtime_resume()
1028 rproc->state); in omap_rproc_runtime_resume()
1029 ret = -EBUSY; in omap_rproc_runtime_resume()
1039 rproc->state = RPROC_RUNNING; in omap_rproc_runtime_resume()
1041 mutex_unlock(&rproc->lock); in omap_rproc_runtime_resume()
1088 .compatible = "ti,omap4-dsp",
1092 .compatible = "ti,omap4-ipu",
1096 .compatible = "ti,omap5-dsp",
1100 .compatible = "ti,omap5-ipu",
1104 .compatible = "ti,dra7-dsp",
1108 .compatible = "ti,dra7-ipu",
1122 ret = of_property_read_string(pdev->dev.of_node, "firmware-name", in omap_rproc_get_firmware()
1133 struct device_node *np = pdev->dev.of_node; in omap_rproc_get_boot_data()
1134 struct omap_rproc *oproc = rproc->priv; in omap_rproc_get_boot_data()
1138 data = of_device_get_match_data(&pdev->dev); in omap_rproc_get_boot_data()
1140 return -ENODEV; in omap_rproc_get_boot_data()
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()
1148 return -ENOMEM; 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()
1159 dev_err(&pdev->dev, "couldn't get the boot register\n"); in omap_rproc_get_boot_data()
1160 return -EINVAL; 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()
1173 struct device *dev = &pdev->dev; in omap_rproc_of_get_internal_memories()
1181 return -ENODEV; in omap_rproc_of_get_internal_memories()
1183 if (!data->mems) in omap_rproc_of_get_internal_memories()
1186 num_mems = of_property_count_elems_of_size(dev->of_node, "reg", in omap_rproc_of_get_internal_memories()
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()
1192 return -ENOMEM; in omap_rproc_of_get_internal_memories()
1194 for (i = 0; data->mems[i].name; i++) { in omap_rproc_of_get_internal_memories()
1196 data->mems[i].name); in omap_rproc_of_get_internal_memories()
1198 dev_err(dev, "no memory defined for %s\n", in omap_rproc_of_get_internal_memories()
1199 data->mems[i].name); in omap_rproc_of_get_internal_memories()
1200 return -ENOMEM; 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()
1205 data->mems[i].name); 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()
1225 struct device_node *np = dev->of_node; in omap_rproc_count_wdog_timers()
1228 ret = of_count_phandle_with_args(np, "ti,watchdog-timers", NULL); in omap_rproc_count_wdog_timers()
1247 struct device_node *np = pdev->dev.of_node; in omap_rproc_of_get_timers()
1248 struct omap_rproc *oproc = rproc->priv; in omap_rproc_of_get_timers()
1249 struct device *dev = &pdev->dev; in omap_rproc_of_get_timers()
1253 * Timer nodes are directly used in client nodes as phandles, so in omap_rproc_of_get_timers()
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()
1271 return -ENOMEM; in omap_rproc_of_get_timers()
1273 dev_dbg(dev, "device has %d tick timers and %d watchdog timers\n", in omap_rproc_of_get_timers()
1274 oproc->num_timers, oproc->num_wd_timers); in omap_rproc_of_get_timers()
1289 struct device_node *np = pdev->dev.of_node; in omap_rproc_probe()
1297 dev_err(&pdev->dev, "only DT-based devices are supported\n"); in omap_rproc_probe()
1298 return -ENODEV; in omap_rproc_probe()
1301 reset = devm_reset_control_array_get_exclusive(&pdev->dev); in omap_rproc_probe()
1309 ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); in omap_rproc_probe()
1311 dev_err(&pdev->dev, "dma_set_coherent_mask: %d\n", ret); in omap_rproc_probe()
1315 rproc = devm_rproc_alloc(&pdev->dev, dev_name(&pdev->dev), &omap_rproc_ops, in omap_rproc_probe()
1318 return -ENOMEM; in omap_rproc_probe()
1320 oproc = rproc->priv; in omap_rproc_probe()
1321 oproc->rproc = rproc; in omap_rproc_probe()
1322 oproc->reset = reset; in omap_rproc_probe()
1324 rproc->has_iommu = true; in omap_rproc_probe()
1338 init_completion(&oproc->pm_comp); in omap_rproc_probe()
1339 oproc->autosuspend_delay = DEFAULT_AUTOSUSPEND_DELAY; in omap_rproc_probe()
1341 of_property_read_u32(pdev->dev.of_node, "ti,autosuspend-delay-ms", in omap_rproc_probe()
1342 &oproc->autosuspend_delay); in omap_rproc_probe()
1344 pm_runtime_set_autosuspend_delay(&pdev->dev, oproc->autosuspend_delay); in omap_rproc_probe()
1346 oproc->fck = devm_clk_get(&pdev->dev, 0); in omap_rproc_probe()
1347 if (IS_ERR(oproc->fck)) in omap_rproc_probe()
1348 return PTR_ERR(oproc->fck); in omap_rproc_probe()
1350 ret = of_reserved_mem_device_init(&pdev->dev); in omap_rproc_probe()
1352 dev_warn(&pdev->dev, "device does not have specific CMA pool.\n"); in omap_rproc_probe()
1353 dev_warn(&pdev->dev, "Typically this should be provided,\n"); in omap_rproc_probe()
1354 dev_warn(&pdev->dev, "only omit if you know what you are doing.\n"); in omap_rproc_probe()
1356 ret = devm_add_action_or_reset(&pdev->dev, omap_rproc_mem_release, &pdev->dev); in omap_rproc_probe()
1362 ret = devm_rproc_add(&pdev->dev, rproc); in omap_rproc_probe()
1378 .name = "omap-rproc",