nuttx-mirror/drivers
wangmingrong1 eed302b8bb virtio: Add virtio version check
In the source code of qemu or linux, there is a check for the virtio version
/* Check device version */
priv->version = readl(priv->base + VIRTIO_MMIO_VERSION);
if (priv->version < 1 || priv->version > 2) {
	debug("(%s): version %d not supported!\n",
	udev->name, priv->version);
	return 0;
}
/* Check device ID */
uc_priv->device = readl(priv->base + VIRTIO_MMIO_DEVICE_ID);
if (uc_priv->device == 0) {
	/*
	* virtio-mmio device with an ID 0 is a (dummy) placeholder
	* with no function. End probing now with no error reported.
	*/
	return 0;
}

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-04 19:49:26 +08:00
..
1wire drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
aie drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
analog drivers/adc: Rename up_ads1255initialize to ads1255_initialize 2024-11-16 17:39:27 +01:00
audio drivers/audio/wm8994.c: Include nuttx/arch.h to fix compilation (up_mdelay prototype) 2024-12-02 13:14:22 +02:00
bch drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
can com/can: Remove unnecessary judgment logic 2024-12-03 08:48:18 +08:00
clk drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
contactless drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
coresight drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
crypto crypto/se05x: Allow set_enable_pin to be NULL and fix error handling 2024-11-07 11:37:58 +08:00
devicetree pci: pci res have pci addr and cpu addr, ecam use map translation pci 2024-11-29 11:12:54 +08:00
dma drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dummy drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
eeprom drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
efuse drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
i2c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
i2s drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
i3c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
input drivers/input: fix compliation warn in aw86225 2024-11-14 23:35:07 +08:00
ioexpander sim/configs/rpserver/rpproxy_virtio: Change the sim 32bit to 64bit compilation 2024-11-15 14:01:11 +08:00
ipcc drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
lcd st7789: add configuration option to set default background color 2024-11-29 18:32:22 +08:00
leds drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
loop drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
math drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
misc drivers/misc: fix rpmsg dev poll assert crash 2024-11-12 14:58:53 +08:00
mmcsd drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
modem drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
motor drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mtd fix nxstyle 2024-11-28 20:40:13 +08:00
net drivers/net/{e1000|igc}: limit no packet is transmit after carrier off 2024-11-27 02:46:04 +08:00
note note: Remove enter_critical_section from the sched_note module to avoid recursive calls. 2024-11-26 10:14:02 +08:00
pci pci: pci res have pci addr and cpu addr, ecam use map translation pci 2024-11-29 11:12:54 +08:00
pinctrl drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pipes Revert "drivers/pipes: return after short write if buffer is full" 2024-11-26 11:08:02 -03:00
power Revert "drivers/pm: pm_smp remove sched_lock" 2024-11-18 19:10:14 +08:00
rc drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
regmap drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
reset drivers/reset/core.c: fix gcc14 error 2024-11-17 08:31:08 -03:00
rf drivers/rf: migrate license to ASF 2024-11-06 19:46:13 +08:00
rmt drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsg drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rptun drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
segger spelling: fix spelling typo premption -> preemption 2024-11-25 22:05:05 +08:00
sensors sensors/fakesensor_uorb: Using different nbuffer for each topic of GNSS 2024-11-30 14:10:57 +08:00
serial Reapply "SYSLOG_DEFAULT: wrap up_putc/up_nputs calls with critical section" 2024-11-18 13:52:53 +08:00
spi drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
syslog drivers/syslog/syslog_channel.c: remove a duplicated comment 2024-11-18 19:10:24 +08:00
thermal drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
timers drivers/timers: export arch timer api to support higher resolution 2024-12-04 10:52:26 +01:00
usbdev drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
usbhost drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
usbmisc driver for STUSB4500 2024-11-30 08:40:08 -03:00
usbmonitor drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
usrsock drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
vhost drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
video video/fb: fix integer overflow issue 2024-12-02 13:30:50 +08:00
virtio virtio: Add virtio version check 2024-12-04 19:49:26 +08:00
wireless Fix Kconfig style 2024-11-20 16:45:40 -03:00
.gitignore build: Remve the unnecessary .gitignore 2020-05-23 18:00:40 +01:00
CMakeLists.txt drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
drivers_initialize.c Fix some minor style issues 2024-11-20 10:51:07 +01:00
Kconfig AI engine driver 2024-10-16 13:57:23 +08:00
Makefile drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00