Lines Matching refs:vpdev
62 struct vop_device *vpdev; member
191 struct vop_device *vpdev = vdev->vpdev; in vop_set_status() local
196 vpdev->hw_ops->send_intr(vpdev, vdev->c2h_vdev_db); in vop_set_status()
204 struct vop_device *vpdev = vdev->vpdev; in vop_reset_inform_host() local
209 vpdev->hw_ops->send_intr(vpdev, vdev->c2h_vdev_db); in vop_reset_inform_host()
241 struct vop_device *vpdev = vdev->vpdev; in vop_notify() local
243 vpdev->hw_ops->send_intr(vpdev, vdev->c2h_vdev_db); in vop_notify()
251 struct vop_device *vpdev = vdev->vpdev; in vop_del_vq() local
253 dma_unmap_single(&vpdev->dev, vdev->used[n], in vop_del_vq()
257 vpdev->hw_ops->iounmap(vpdev, vdev->vr[n]); in vop_del_vq()
284 struct vop_device *vpdev = vdev->vpdev; in vop_find_vq() local
306 va = vpdev->hw_ops->ioremap(vpdev, le64_to_cpu(config.address), in vop_find_vq()
343 vdev->used[index] = dma_map_single(&vpdev->dev, used, in vop_find_vq()
346 if (dma_mapping_error(&vpdev->dev, vdev->used[index])) { in vop_find_vq()
371 vpdev->hw_ops->iounmap(vpdev, vdev->vr[index]); in vop_find_vq()
382 struct vop_device *vpdev = vdev->vpdev; in vop_find_vqs() local
406 vpdev->hw_ops->send_intr(vpdev, vdev->c2h_vdev_db); in vop_find_vqs()
443 struct vop_device *vpdev = vdev->vpdev; in vop_virtio_intr_handler() local
446 vpdev->hw_ops->ack_interrupt(vpdev, vdev->h2c_vdev_db); in vop_virtio_intr_handler()
468 unsigned int offset, struct vop_device *vpdev, in _vop_add_device() argument
479 vdev->vpdev = vpdev; in _vop_add_device()
480 vdev->vdev.dev.parent = &vpdev->dev; in _vop_add_device()
490 vdev->h2c_vdev_db = vpdev->hw_ops->next_db(vpdev); in _vop_add_device()
491 vdev->virtio_cookie = vpdev->hw_ops->request_irq(vpdev, in _vop_add_device()
516 vpdev->hw_ops->free_irq(vpdev, vdev->virtio_cookie, vdev); in _vop_add_device()
538 struct vop_device *vpdev) in _vop_handle_config_change() argument
547 dev_dbg(&vpdev->dev, "%s %d\n", __func__, __LINE__); in _vop_handle_config_change()
557 unsigned int offset, struct vop_device *vpdev) in _vop_remove_device() argument
568 dev_dbg(&vpdev->dev, in _vop_remove_device()
575 vpdev->hw_ops->free_irq(vpdev, vdev->virtio_cookie, vdev); in _vop_remove_device()
581 dev_dbg(&vpdev->dev, "%s %d guest_ack %d\n", in _vop_remove_device()
591 static void _vop_scan_devices(void __iomem *dp, struct vop_device *vpdev, in _vop_scan_devices() argument
621 dev = device_find_child(&vpdev->dev, (void __force *)d, in _vop_scan_devices()
628 _vop_handle_config_change(d, i, vpdev); in _vop_scan_devices()
629 ret = _vop_remove_device(d, i, vpdev); in _vop_scan_devices()
638 dev_dbg(&vpdev->dev, "%s %d Adding new virtio device %p\n", in _vop_scan_devices()
641 _vop_add_device(d, i, vpdev, dnode); in _vop_scan_devices()
646 struct vop_device *vpdev, bool remove) in vop_scan_devices() argument
648 void __iomem *dp = vpdev->hw_ops->get_remote_dp(vpdev); in vop_scan_devices()
653 _vop_scan_devices(dp, vpdev, remove, vpdev->dnode); in vop_scan_devices()
665 vop_scan_devices(vi, vi->vpdev, !REMOVE_DEVICES); in vop_hotplug_devices()
675 struct vop_device *vpdev = vi->vpdev; in vop_extint_handler() local
677 bp = vpdev->hw_ops->get_remote_dp(vpdev); in vop_extint_handler()
678 dev_dbg(&vpdev->dev, "%s %d hotplug work\n", in vop_extint_handler()
680 vpdev->hw_ops->ack_interrupt(vpdev, ioread8(&bp->h2c_config_db)); in vop_extint_handler()
685 static int vop_driver_probe(struct vop_device *vpdev) in vop_driver_probe() argument
695 dev_set_drvdata(&vpdev->dev, vi); in vop_driver_probe()
696 vi->vpdev = vpdev; in vop_driver_probe()
700 if (vpdev->dnode) { in vop_driver_probe()
707 vop_scan_devices(vi, vpdev, !REMOVE_DEVICES); in vop_driver_probe()
709 vi->h2c_config_db = vpdev->hw_ops->next_db(vpdev); in vop_driver_probe()
710 vi->cookie = vpdev->hw_ops->request_irq(vpdev, in vop_driver_probe()
718 bootparam = vpdev->hw_ops->get_remote_dp(vpdev); in vop_driver_probe()
729 static void vop_driver_remove(struct vop_device *vpdev) in vop_driver_remove() argument
731 struct vop_info *vi = dev_get_drvdata(&vpdev->dev); in vop_driver_remove()
733 if (vpdev->dnode) { in vop_driver_remove()
737 vpdev->hw_ops->get_remote_dp(vpdev); in vop_driver_remove()
740 vpdev->hw_ops->free_irq(vpdev, vi->cookie, vi); in vop_driver_remove()
742 vop_scan_devices(vi, vpdev, REMOVE_DEVICES); in vop_driver_remove()