• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/staging/dream/qdsp5/

Lines Matching refs:adev

248 static long adsp_write_cmd(struct adsp_device *adev, void __user *arg)
271 mutex_lock(&adev->module->pmem_regions_lock);
272 if (adsp_verify_cmd(adev->module, cmd.queue, cmd_data, cmd.len)) {
274 adev->module->name);
278 rc = msm_adsp_write(adev->module, cmd.queue, cmd_data, cmd.len);
280 mutex_unlock(&adev->module->pmem_regions_lock);
288 static int adsp_events_pending(struct adsp_device *adev)
292 spin_lock_irqsave(&adev->event_queue_lock, flags);
293 yes = !list_empty(&adev->event_queue);
294 spin_unlock_irqrestore(&adev->event_queue_lock, flags);
295 return yes || adev->abort;
342 static long adsp_get_event(struct adsp_device *adev, void __user *arg)
357 adev->event_wait, adsp_events_pending(adev),
363 adev->event_wait, adsp_events_pending(adev));
368 if (adev->abort)
371 spin_lock_irqsave(&adev->event_queue_lock, flags);
372 if (!list_empty(&adev->event_queue)) {
373 data = list_first_entry(&adev->event_queue,
377 spin_unlock_irqrestore(&adev->event_queue_lock, flags);
384 adsp_patch_event(adev->module, data);
418 struct adsp_device *adev = filp->private_data;
422 return msm_adsp_enable(adev->module);
425 return msm_adsp_disable(adev->module);
435 return adsp_write_cmd(adev, (void __user *) arg);
438 return adsp_get_event(adev, (void __user *) arg);
445 return adsp_set_clkrate(adev->module, clk_rate);
453 return adsp_pmem_add(adev->module, &info);
457 adev->abort = 1;
458 wake_up(&adev->event_wait);
469 struct adsp_device *adev = filp->private_data;
470 struct msm_adsp_module *module = adev->module;
474 pr_info("adsp_release() '%s'\n", adev->name);
477 adev->module = NULL;
496 struct adsp_device *adev = driver_data;
526 spin_lock_irqsave(&adev->event_queue_lock, flags);
527 list_add_tail(&event->list, &adev->event_queue);
528 spin_unlock_irqrestore(&adev->event_queue_lock, flags);
529 wake_up(&adev->event_wait);
538 struct adsp_device *adev;
545 adev = inode_to_device(inode);
546 if (!adev)
549 pr_info("adsp_open() name = '%s'\n", adev->name);
551 rc = msm_adsp_get(adev->name, &adev->module, &adsp_ops, adev);
555 pr_info("adsp_open() module '%s' adev %p\n", adev->name, adev);
556 filp->private_data = adev;
557 adev->abort = 0;
558 INIT_HLIST_HEAD(&adev->module->pmem_regions);
559 mutex_init(&adev->module->pmem_regions_lock);
587 static void adsp_create(struct adsp_device *adev, const char *name,
597 init_waitqueue_head(&adev->event_wait);
598 INIT_LIST_HEAD(&adev->event_queue);
599 spin_lock_init(&adev->event_queue_lock);
601 cdev_init(&adev->cdev, &adsp_fops);
602 adev->cdev.owner = THIS_MODULE;
604 rc = cdev_add(&adev->cdev, devt, 1);
608 adev->device = dev;
609 adev->name = name;