Files
zephyr/drivers/virtio/virtio_common.h
TOKITA Hiroshi c6608fcd80 drivers: virtio: Separate macros into a common header
Move macros derived from the VIRTIO specification to a shared include.
This change allows the VIRTIO standard definitions to be referenced
from outside the driver implementation.

The following definitions have also been added:

- VIRTIO_F_VERSION_1
- VIRTIO_F_ACCESS_PLATFORM
- VIRTIO_RING_F_INDIRECT_DESC
- VIRTIO_RING_F_EVENT_IDX
- VIRTQ_AVAIL_F_NO_INTERRUPT
- VIRTQ_USED_F_NO_NOTIFY

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-09-26 20:45:00 -04:00

22 lines
543 B
C

/*
* Copyright (c) 2025 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_VIRTIO_VIRTIO_COMMON_H_
#define ZEPHYR_VIRTIO_VIRTIO_COMMON_H_
#include <zephyr/drivers/virtio/virtio_config.h>
/**
* Common virtio isr
*
* @param dev virtio device it operates on
* @param isr_status value of isr status register
* @param virtqueue_count amount of available virtqueues
*/
void virtio_isr(const struct device *dev, uint8_t isr_status, uint16_t virtqueue_count);
#endif /*ZEPHYR_VIRTIO_VIRTIO_COMMON_H_*/