X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fvirtio.h;h=062a24630ce98f5380e561f83a0b39ddbb6e86b6;hb=6786ce1ce14feb4d02854a0c04bc0cce505be46e;hp=10a9c073ba1183547054b3cf5ec4bcebc60f85a0;hpb=b0b13f4114d30b6756e0f6f3b5819d78de22541e;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/virtio.h b/include/virtio.h index 10a9c07..062a246 100644 --- a/include/virtio.h +++ b/include/virtio.h @@ -20,6 +20,7 @@ #ifndef __VIRTIO_H__ #define __VIRTIO_H__ +#include #include #include #define VIRTIO_ID_NET 1 /* virtio net */ @@ -227,7 +228,7 @@ struct virtio_dev_priv { * @offset: the offset of the configuration field * @buf: the buffer to write the field value into * @len: the length of the buffer - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_get_config(struct udevice *vdev, unsigned int offset, void *buf, unsigned int len); @@ -239,7 +240,7 @@ int virtio_get_config(struct udevice *vdev, unsigned int offset, * @offset: the offset of the configuration field * @buf: the buffer to read the field value from * @len: the length of the buffer - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_set_config(struct udevice *vdev, unsigned int offset, void *buf, unsigned int len); @@ -249,7 +250,7 @@ int virtio_set_config(struct udevice *vdev, unsigned int offset, * * @vdev: the real virtio device * @counter: the returned config generation counter - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_generation(struct udevice *vdev, u32 *counter); @@ -258,7 +259,7 @@ int virtio_generation(struct udevice *vdev, u32 *counter); * * @vdev: the real virtio device * @status: the returned status byte - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_get_status(struct udevice *vdev, u8 *status); @@ -267,7 +268,7 @@ int virtio_get_status(struct udevice *vdev, u8 *status); * * @vdev: the real virtio device * @status: the new status byte - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_set_status(struct udevice *vdev, u8 status); @@ -275,7 +276,7 @@ int virtio_set_status(struct udevice *vdev, u8 status); * virtio_reset() - reset the device * * @vdev: the real virtio device - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_reset(struct udevice *vdev); @@ -284,7 +285,7 @@ int virtio_reset(struct udevice *vdev); * * @vdev: the real virtio device * @features: the first 32 feature bits (all we currently need) - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_get_features(struct udevice *vdev, u64 *features); @@ -292,7 +293,7 @@ int virtio_get_features(struct udevice *vdev, u64 *features); * virtio_set_features() - confirm what device features we'll be using * * @vdev: the real virtio device - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_set_features(struct udevice *vdev); @@ -302,7 +303,7 @@ int virtio_set_features(struct udevice *vdev); * @vdev: the real virtio device * @nvqs: the number of virtqueues to find * @vqs: on success, includes new virtqueues - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_find_vqs(struct udevice *vdev, unsigned int nvqs, struct virtqueue *vqs[]); @@ -311,7 +312,7 @@ int virtio_find_vqs(struct udevice *vdev, unsigned int nvqs, * virtio_del_vqs() - free virtqueues found by find_vqs() * * @vdev: the real virtio device - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_del_vqs(struct udevice *vdev); @@ -320,7 +321,7 @@ int virtio_del_vqs(struct udevice *vdev); * * @vdev: the real virtio device * @vq: virtqueue to process - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_notify(struct udevice *vdev, struct virtqueue *vq); @@ -336,7 +337,7 @@ void virtio_add_status(struct udevice *vdev, u8 status); * virtio_finalize_features() - helper to finalize features * * @vdev: the real virtio device - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_finalize_features(struct udevice *vdev); @@ -365,7 +366,7 @@ void virtio_driver_features_init(struct virtio_dev_priv *priv, /** * virtio_init() - helper to enumerate all known virtio devices * - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int virtio_init(void); @@ -492,7 +493,7 @@ static inline void __virtio_clear_bit(struct udevice *udev, unsigned int fbit) */ static inline bool virtio_has_feature(struct udevice *vdev, unsigned int fbit) { - if (!(vdev->flags & DM_FLAG_BOUND)) + if (!(dev_get_flags(vdev) & DM_FLAG_BOUND)) WARN_ON(true); return __virtio_test_bit(vdev->parent, fbit);