Files
Yongrong Wang a286287f4e drivers/virtio and vhost: auto-select parent config from sub-drivers
Change DRIVERS_VIRTIO and DRIVERS_VHOST from menuconfig to hidden config
options. Each virtio/vhost sub-driver now automatically selects its parent
config, eliminating the need to manually enable DRIVERS_VIRTIO or
DRIVERS_VHOST in defconfig files.

This simplifies board configuration by removing redundant CONFIG_DRIVERS_VIRTIO
entries from affected defconfig files.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-02-04 02:32:02 +08:00

141 lines
3.2 KiB
Plaintext

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
config DRIVERS_VIRTIO
bool
select OPENAMP
default n
config DRIVERS_VIRTIO_MMIO
bool "Virtio MMIO Device Support"
default n
select DRIVERS_VIRTIO
config DRIVERS_VIRTIO_MMIO_QUEUE_LEN
int "Virtio MMIO Virtio Queue Length"
default 0
range 0 1024
depends on DRIVERS_VIRTIO_MMIO
---help---
If this value equals to 0, use the max queue length get from
mmio register.
config DRIVERS_VIRTIO_PCI
bool "Virtio PCI Device Support"
default n
select DRIVERS_VIRTIO
config DRIVERS_VIRTIO_PCI_POLLING_PERIOD
int "Virtio PCI Polling Period (us)"
depends on DRIVERS_VIRTIO_PCI
default 0
---help---
if Polling Period <= 0, not support polling mode.
if Polling Period > 0, support polling mode, and it represent
polling period (us).
config DRIVERS_VIRTIO_BLK
bool "Virtio block support"
depends on !DISABLE_MOUNTPOINT
default n
select DRIVERS_VIRTIO
config DRIVERS_VIRTIO_GPU
bool "Virtio gpu support"
default n
depends on VIDEO_FB
select FB_UPDATE
select DRIVERS_VIRTIO
config DRIVERS_VIRTIO_INPUT
bool "Virtio input support"
depends on INPUT
select INPUT_TOUCHSCREEN
select INPUT_KEYBOARD
select INPUT_MOUSE
default n
select DRIVERS_VIRTIO
config DRIVERS_VIRTIO_NET
bool "Virtio network support"
depends on NETDEVICES
default n
select ARCH_HAVE_NETDEV_STATISTICS
select NETDEV_LATEINIT
select DRIVERS_VIRTIO
config DRIVERS_VIRTIO_NET_BUFNUM
int "Virtio network driver buffer number"
default 0
depends on DRIVERS_VIRTIO_NET
---help---
The buffer number in each virtqueue. (We have 2 virtqueues.)
If this value equals to 0, use CONFIG_IOB_NBUFFERS / 4 for each.
Normally we get just a little improvement for >8 buffers, and very little for >32.
config DRIVERS_VIRTIO_RNG
bool "Virtio rng support"
default n
select ARCH_HAVE_RNG
select DRIVERS_VIRTIO
config DRIVERS_VIRTIO_RPMB
bool "Virtio RPMB support"
default n
select DRIVERS_VIRTIO
config DRIVERS_VIRTIO_RPMSG
bool "Virtio Rpmsg support"
default n
select RPMSG_VIRTIO
select DRIVERS_VIRTIO
config DRIVERS_VIRTIO_SERIAL
bool "Virtio serial support"
depends on SERIAL
default n
select SERIAL_RXDMA
select SERIAL_TXDMA
select DRIVERS_VIRTIO
if DRIVERS_VIRTIO_SERIAL
config DRIVERS_VIRTIO_SERIAL_BUFSIZE
int "Virtio serial driver buffer size"
default 256
config DRIVERS_VIRTIO_SERIAL_CONSOLE
bool "Virtio serial console"
default n
select SERIAL_CONSOLE
---help---
This enables using first virtio serial device as console.
config DRIVERS_VIRTIO_SERIAL_NAME
string "Virtio serial driver name"
default ""
---help---
Using this config to custom the virtio serial registered device name,
using ";" to split the names.
For example, if DRIVERS_VIRTIO_SERIAL_NAME = "ttyBT;ttyTEL" and pass
three virtio-serial devices to the qemu, we will get three uart devices
with names: "/dev/ttyBT", "/dev/ttyTEL", "/dev/ttyV2"
endif
config DRIVERS_VIRTIO_SOUND
bool "Virtio sound support"
default n
depends on DRIVERS_AUDIO
select DRIVERS_VIRTIO
if DRIVERS_VIRTIO_SOUND
config DRIVERS_VIRTIO_SOUND_PERIOD_TIME
int "Virtio snd driver period time"
default 40
config DRIVERS_VIRTIO_SND_BUFFER_COUNT
int "Virtio snd driver buffer count"
default 6
endif