• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/arch/arm/plat-omap/

Lines Matching defs:od

103  * @od: struct omap_device *
106 * Increase readiness of omap_device @od (thus decreasing device
115 static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
119 pr_debug("omap_device: %s: activating\n", od->pdev.name);
121 while (od->pm_lat_level > 0) {
125 od->pm_lat_level--;
127 odpl = od->pm_lats + od->pm_lat_level;
130 (od->dev_wakeup_lat <= od->_dev_wakeup_lat_limit))
135 odpl->activate_func(od);
143 "%llu nsec\n", od->pdev.name, od->pm_lat_level,
152 od->pdev.name, od->pdev.id,
153 od->pm_lat_level, act_lat);
158 od->pdev.name, od->pdev.id,
159 od->pm_lat_level, act_lat,
163 od->dev_wakeup_lat -= odpl->activate_lat;
171 * @od: struct omap_device *
174 * Decrease readiness of omap_device @od (thus increasing device
183 static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
187 pr_debug("omap_device: %s: deactivating\n", od->pdev.name);
189 while (od->pm_lat_level < od->pm_lats_cnt) {
193 odpl = od->pm_lats + od->pm_lat_level;
196 ((od->dev_wakeup_lat + odpl->activate_lat) >
197 od->_dev_wakeup_lat_limit))
202 odpl->deactivate_func(od);
210 "%llu nsec\n", od->pdev.name, od->pm_lat_level,
219 od->pdev.name, od->pdev.id,
220 od->pm_lat_level, deact_lat);
225 od->pdev.name, od->pdev.id,
226 od->pm_lat_level, deact_lat,
231 od->dev_wakeup_lat += odpl->activate_lat;
233 od->pm_lat_level++;
249 * @od: struct omap_device *
252 * omap_device @od. Used by omap_device_build_ss() to determine how
256 int omap_device_count_resources(struct omap_device *od)
262 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
266 "hwmods\n", od->pdev.name, c, od->hwmods_cnt);
273 * @od: struct omap_device *
277 * the resource data for this omap_device @od. Used by
288 int omap_device_fill_resources(struct omap_device *od, struct resource *res)
294 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) {
360 struct omap_device *od;
375 od = kzalloc(sizeof(struct omap_device), GFP_KERNEL);
376 if (!od)
379 od->hwmods_cnt = oh_cnt;
387 od->hwmods = hwmods;
394 od->pdev.name = pdev_name2;
395 od->pdev.id = pdev_id;
397 res_count = omap_device_count_resources(od);
403 omap_device_fill_resources(od, res);
405 od->pdev.num_resources = res_count;
406 od->pdev.resource = res;
408 ret = platform_device_add_data(&od->pdev, pdata, pdata_len);
412 od->pm_lats = pm_lats;
413 od->pm_lats_cnt = pm_lats_cnt;
415 od->magic = OMAP_DEVICE_MAGIC;
418 ret = omap_early_device_register(od);
420 ret = omap_device_register(od);
423 hwmods[i]->od = od;
428 return od;
437 kfree(od);
447 * @od: struct omap_device * to register
453 int omap_early_device_register(struct omap_device *od)
457 devices[0] = &(od->pdev);
464 * @od: struct omap_device * to register
470 int omap_device_register(struct omap_device *od)
472 pr_debug("omap_device: %s: registering\n", od->pdev.name);
474 return platform_device_register(&od->pdev);
482 * @od: struct omap_device * to activate
484 * Do whatever is necessary for the hwmods underlying omap_device @od
496 struct omap_device *od;
498 od = _find_by_pdev(pdev);
500 if (od->_state == OMAP_DEVICE_STATE_ENABLED) {
502 od->pdev.name, od->pdev.id, __func__, od->_state);
507 if (od->_state == OMAP_DEVICE_STATE_UNKNOWN)
508 od->pm_lat_level = od->pm_lats_cnt;
510 ret = _omap_device_activate(od, IGNORE_WAKEUP_LAT);
512 od->dev_wakeup_lat = 0;
513 od->_dev_wakeup_lat_limit = UINT_MAX;
514 od->_state = OMAP_DEVICE_STATE_ENABLED;
521 * @od: struct omap_device * to idle
523 * Idle omap_device @od by calling as many .deactivate_func() entries
535 struct omap_device *od;
537 od = _find_by_pdev(pdev);
539 if (od->_state != OMAP_DEVICE_STATE_ENABLED) {
541 od->pdev.name, od->pdev.id, __func__, od->_state);
545 ret = _omap_device_deactivate(od, USE_WAKEUP_LAT);
547 od->_state = OMAP_DEVICE_STATE_IDLE;
554 * @od: struct omap_device * to shut down
556 * Shut down omap_device @od by calling all .deactivate_func() entries
566 struct omap_device *od;
569 od = _find_by_pdev(pdev);
571 if (od->_state != OMAP_DEVICE_STATE_ENABLED &&
572 od->_state != OMAP_DEVICE_STATE_IDLE) {
574 od->pdev.name, od->pdev.id, __func__, od->_state);
578 ret = _omap_device_deactivate(od, IGNORE_WAKEUP_LAT);
580 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
583 od->_state = OMAP_DEVICE_STATE_SHUTDOWN;
590 * @od: struct omap_device *
608 struct omap_device *od;
610 od = _find_by_pdev(pdev);
612 if (new_wakeup_lat_limit == od->dev_wakeup_lat)
615 od->_dev_wakeup_lat_limit = new_wakeup_lat_limit;
617 if (od->_state != OMAP_DEVICE_STATE_IDLE)
619 else if (new_wakeup_lat_limit > od->dev_wakeup_lat)
620 ret = _omap_device_deactivate(od, USE_WAKEUP_LAT);
621 else if (new_wakeup_lat_limit < od->dev_wakeup_lat)
622 ret = _omap_device_activate(od, USE_WAKEUP_LAT);
629 * @od: struct omap_device *
631 * Return whether struct omap_device pointer @od points to a valid
634 bool omap_device_is_valid(struct omap_device *od)
636 return (od && od->magic == OMAP_DEVICE_MAGIC);
640 * omap_device_get_pwrdm - return the powerdomain * associated with @od
641 * @od: struct omap_device *
648 struct powerdomain *omap_device_get_pwrdm(struct omap_device *od)
650 if (!od->hwmods_cnt)
653 return omap_hwmod_get_pwrdm(od->hwmods[0]);
658 * @od: struct omap_device *
667 void __iomem *omap_device_get_rt_va(struct omap_device *od)
669 if (od->hwmods_cnt != 1)
672 return omap_hwmod_get_mpu_rt_va(od->hwmods[0]);
682 * @od: struct omap_device *od
686 int omap_device_enable_hwmods(struct omap_device *od)
691 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
699 * @od: struct omap_device *od
703 int omap_device_idle_hwmods(struct omap_device *od)
708 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
716 * @od: struct omap_device *od
721 int omap_device_disable_clocks(struct omap_device *od)
726 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
734 * @od: struct omap_device *od
739 int omap_device_enable_clocks(struct omap_device *od)
744 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)