#define __VIRTIO_H__
#include <virtio_types.h>
+#include <dm/device.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/typecheck.h>
#define VIRTIO_ID_NET 1 /* virtio net */
#define VIRTIO_ID_BLOCK 2 /* virtio block */
#define VIRTIO_ID_RNG 4 /* virtio rng */
* @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);
* @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);
*
* @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);
*
* @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);
*
* @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);
* 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);
*
* @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);
* 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);
* @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[]);
* 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);
*
* @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);
* 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);
/**
* 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);