1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
5 * VirtIO PCI bus transport driver
6 * Ported from Linux drivers/virtio/virtio_pci*.c
12 #include <virtio_types.h>
14 #include <virtio_ring.h>
15 #include <dm/device.h>
16 #include <linux/bug.h>
17 #include <linux/compat.h>
18 #include <linux/err.h>
20 #include "virtio_pci.h"
22 #define VIRTIO_PCI_DRV_NAME "virtio-pci.m"
24 /* PCI device ID in the range 0x1040 to 0x107f */
25 #define VIRTIO_PCI_VENDOR_ID 0x1af4
26 #define VIRTIO_PCI_DEVICE_ID00 0x1040
27 #define VIRTIO_PCI_DEVICE_ID01 0x1041
28 #define VIRTIO_PCI_DEVICE_ID02 0x1042
29 #define VIRTIO_PCI_DEVICE_ID03 0x1043
30 #define VIRTIO_PCI_DEVICE_ID04 0x1044
31 #define VIRTIO_PCI_DEVICE_ID05 0x1045
32 #define VIRTIO_PCI_DEVICE_ID06 0x1046
33 #define VIRTIO_PCI_DEVICE_ID07 0x1047
34 #define VIRTIO_PCI_DEVICE_ID08 0x1048
35 #define VIRTIO_PCI_DEVICE_ID09 0x1049
36 #define VIRTIO_PCI_DEVICE_ID0A 0x104a
37 #define VIRTIO_PCI_DEVICE_ID0B 0x104b
38 #define VIRTIO_PCI_DEVICE_ID0C 0x104c
39 #define VIRTIO_PCI_DEVICE_ID0D 0x104d
40 #define VIRTIO_PCI_DEVICE_ID0E 0x104e
41 #define VIRTIO_PCI_DEVICE_ID0F 0x104f
42 #define VIRTIO_PCI_DEVICE_ID10 0x1050
43 #define VIRTIO_PCI_DEVICE_ID11 0x1051
44 #define VIRTIO_PCI_DEVICE_ID12 0x1052
45 #define VIRTIO_PCI_DEVICE_ID13 0x1053
46 #define VIRTIO_PCI_DEVICE_ID14 0x1054
47 #define VIRTIO_PCI_DEVICE_ID15 0x1055
48 #define VIRTIO_PCI_DEVICE_ID16 0x1056
49 #define VIRTIO_PCI_DEVICE_ID17 0x1057
50 #define VIRTIO_PCI_DEVICE_ID18 0x1058
51 #define VIRTIO_PCI_DEVICE_ID19 0x1059
52 #define VIRTIO_PCI_DEVICE_ID1A 0x105a
53 #define VIRTIO_PCI_DEVICE_ID1B 0x105b
54 #define VIRTIO_PCI_DEVICE_ID1C 0x105c
55 #define VIRTIO_PCI_DEVICE_ID1D 0x105d
56 #define VIRTIO_PCI_DEVICE_ID1E 0x105e
57 #define VIRTIO_PCI_DEVICE_ID1F 0x105f
58 #define VIRTIO_PCI_DEVICE_ID20 0x1060
59 #define VIRTIO_PCI_DEVICE_ID21 0x1061
60 #define VIRTIO_PCI_DEVICE_ID22 0x1062
61 #define VIRTIO_PCI_DEVICE_ID23 0x1063
62 #define VIRTIO_PCI_DEVICE_ID24 0x1064
63 #define VIRTIO_PCI_DEVICE_ID25 0x1065
64 #define VIRTIO_PCI_DEVICE_ID26 0x1066
65 #define VIRTIO_PCI_DEVICE_ID27 0x1067
66 #define VIRTIO_PCI_DEVICE_ID28 0x1068
67 #define VIRTIO_PCI_DEVICE_ID29 0x1069
68 #define VIRTIO_PCI_DEVICE_ID2A 0x106a
69 #define VIRTIO_PCI_DEVICE_ID2B 0x106b
70 #define VIRTIO_PCI_DEVICE_ID2C 0x106c
71 #define VIRTIO_PCI_DEVICE_ID2D 0x106d
72 #define VIRTIO_PCI_DEVICE_ID2E 0x106e
73 #define VIRTIO_PCI_DEVICE_ID2F 0x106f
74 #define VIRTIO_PCI_DEVICE_ID30 0x1070
75 #define VIRTIO_PCI_DEVICE_ID31 0x1071
76 #define VIRTIO_PCI_DEVICE_ID32 0x1072
77 #define VIRTIO_PCI_DEVICE_ID33 0x1073
78 #define VIRTIO_PCI_DEVICE_ID34 0x1074
79 #define VIRTIO_PCI_DEVICE_ID35 0x1075
80 #define VIRTIO_PCI_DEVICE_ID36 0x1076
81 #define VIRTIO_PCI_DEVICE_ID37 0x1077
82 #define VIRTIO_PCI_DEVICE_ID38 0x1078
83 #define VIRTIO_PCI_DEVICE_ID39 0x1079
84 #define VIRTIO_PCI_DEVICE_ID3A 0x107a
85 #define VIRTIO_PCI_DEVICE_ID3B 0x107b
86 #define VIRTIO_PCI_DEVICE_ID3C 0x107c
87 #define VIRTIO_PCI_DEVICE_ID3D 0x107d
88 #define VIRTIO_PCI_DEVICE_ID3E 0x107e
89 #define VIRTIO_PCI_DEVICE_ID3F 0x107f
92 * virtio pci transport driver private data
94 * @common: pci transport device common register block base
95 * @notify_base: pci transport device notify register block base
96 * @device: pci transport device device-specific register block base
97 * @device_len: pci transport device device-specific register block length
98 * @notify_offset_multiplier: multiply queue_notify_off by this value
100 struct virtio_pci_priv {
101 struct virtio_pci_common_cfg __iomem *common;
102 void __iomem *notify_base;
103 void __iomem *device;
105 u32 notify_offset_multiplier;
108 static int virtio_pci_get_config(struct udevice *udev, unsigned int offset,
109 void *buf, unsigned int len)
111 struct virtio_pci_priv *priv = dev_get_priv(udev);
116 WARN_ON(offset + len > priv->device_len);
120 b = ioread8(priv->device + offset);
121 memcpy(buf, &b, sizeof(b));
124 w = cpu_to_le16(ioread16(priv->device + offset));
125 memcpy(buf, &w, sizeof(w));
128 l = cpu_to_le32(ioread32(priv->device + offset));
129 memcpy(buf, &l, sizeof(l));
132 l = cpu_to_le32(ioread32(priv->device + offset));
133 memcpy(buf, &l, sizeof(l));
134 l = cpu_to_le32(ioread32(priv->device + offset + sizeof(l)));
135 memcpy(buf + sizeof(l), &l, sizeof(l));
144 static int virtio_pci_set_config(struct udevice *udev, unsigned int offset,
145 const void *buf, unsigned int len)
147 struct virtio_pci_priv *priv = dev_get_priv(udev);
152 WARN_ON(offset + len > priv->device_len);
156 memcpy(&b, buf, sizeof(b));
157 iowrite8(b, priv->device + offset);
160 memcpy(&w, buf, sizeof(w));
161 iowrite16(le16_to_cpu(w), priv->device + offset);
164 memcpy(&l, buf, sizeof(l));
165 iowrite32(le32_to_cpu(l), priv->device + offset);
168 memcpy(&l, buf, sizeof(l));
169 iowrite32(le32_to_cpu(l), priv->device + offset);
170 memcpy(&l, buf + sizeof(l), sizeof(l));
171 iowrite32(le32_to_cpu(l), priv->device + offset + sizeof(l));
180 static int virtio_pci_generation(struct udevice *udev, u32 *counter)
182 struct virtio_pci_priv *priv = dev_get_priv(udev);
184 *counter = ioread8(&priv->common->config_generation);
189 static int virtio_pci_get_status(struct udevice *udev, u8 *status)
191 struct virtio_pci_priv *priv = dev_get_priv(udev);
193 *status = ioread8(&priv->common->device_status);
198 static int virtio_pci_set_status(struct udevice *udev, u8 status)
200 struct virtio_pci_priv *priv = dev_get_priv(udev);
202 /* We should never be setting status to 0 */
203 WARN_ON(status == 0);
205 iowrite8(status, &priv->common->device_status);
210 static int virtio_pci_reset(struct udevice *udev)
212 struct virtio_pci_priv *priv = dev_get_priv(udev);
214 /* 0 status means a reset */
215 iowrite8(0, &priv->common->device_status);
218 * After writing 0 to device_status, the driver MUST wait for a read
219 * of device_status to return 0 before reinitializing the device.
220 * This will flush out the status write, and flush in device writes,
221 * including MSI-X interrupts, if any.
223 while (ioread8(&priv->common->device_status))
229 static int virtio_pci_get_features(struct udevice *udev, u64 *features)
231 struct virtio_pci_priv *priv = dev_get_priv(udev);
233 iowrite32(0, &priv->common->device_feature_select);
234 *features = ioread32(&priv->common->device_feature);
235 iowrite32(1, &priv->common->device_feature_select);
236 *features |= ((u64)ioread32(&priv->common->device_feature) << 32);
241 static int virtio_pci_set_features(struct udevice *udev)
243 struct virtio_pci_priv *priv = dev_get_priv(udev);
244 struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev);
246 if (!__virtio_test_bit(udev, VIRTIO_F_VERSION_1)) {
247 debug("virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1\n");
251 iowrite32(0, &priv->common->guest_feature_select);
252 iowrite32((u32)uc_priv->features, &priv->common->guest_feature);
253 iowrite32(1, &priv->common->guest_feature_select);
254 iowrite32(uc_priv->features >> 32, &priv->common->guest_feature);
259 static struct virtqueue *virtio_pci_setup_vq(struct udevice *udev,
262 struct virtio_pci_priv *priv = dev_get_priv(udev);
263 struct virtio_pci_common_cfg __iomem *cfg = priv->common;
264 struct virtqueue *vq;
269 if (index >= ioread16(&cfg->num_queues))
270 return ERR_PTR(-ENOENT);
272 /* Select the queue we're interested in */
273 iowrite16(index, &cfg->queue_select);
275 /* Check if queue is either not available or already active */
276 num = ioread16(&cfg->queue_size);
277 if (!num || ioread16(&cfg->queue_enable))
278 return ERR_PTR(-ENOENT);
280 if (num & (num - 1)) {
281 printf("(%s): bad queue size %u", udev->name, num);
282 return ERR_PTR(-EINVAL);
285 /* Create the vring */
286 vq = vring_create_virtqueue(index, num, VIRTIO_PCI_VRING_ALIGN, udev);
289 goto error_available;
292 /* Activate the queue */
293 iowrite16(virtqueue_get_vring_size(vq), &cfg->queue_size);
295 addr = virtqueue_get_desc_addr(vq);
296 iowrite32((u32)addr, &cfg->queue_desc_lo);
297 iowrite32(addr >> 32, &cfg->queue_desc_hi);
299 addr = virtqueue_get_avail_addr(vq);
300 iowrite32((u32)addr, &cfg->queue_avail_lo);
301 iowrite32(addr >> 32, &cfg->queue_avail_hi);
303 addr = virtqueue_get_used_addr(vq);
304 iowrite32((u32)addr, &cfg->queue_used_lo);
305 iowrite32(addr >> 32, &cfg->queue_used_hi);
307 iowrite16(1, &cfg->queue_enable);
315 static void virtio_pci_del_vq(struct virtqueue *vq)
317 struct virtio_pci_priv *priv = dev_get_priv(vq->vdev);
318 unsigned int index = vq->index;
320 iowrite16(index, &priv->common->queue_select);
322 /* Select and deactivate the queue */
323 iowrite16(0, &priv->common->queue_enable);
325 vring_del_virtqueue(vq);
328 static int virtio_pci_del_vqs(struct udevice *udev)
330 struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev);
331 struct virtqueue *vq, *n;
333 list_for_each_entry_safe(vq, n, &uc_priv->vqs, list)
334 virtio_pci_del_vq(vq);
339 static int virtio_pci_find_vqs(struct udevice *udev, unsigned int nvqs,
340 struct virtqueue *vqs[])
344 for (i = 0; i < nvqs; ++i) {
345 vqs[i] = virtio_pci_setup_vq(udev, i);
346 if (IS_ERR(vqs[i])) {
347 virtio_pci_del_vqs(udev);
348 return PTR_ERR(vqs[i]);
355 static int virtio_pci_notify(struct udevice *udev, struct virtqueue *vq)
357 struct virtio_pci_priv *priv = dev_get_priv(udev);
360 /* Select the queue we're interested in */
361 iowrite16(vq->index, &priv->common->queue_select);
363 /* get offset of notification word for this vq */
364 off = ioread16(&priv->common->queue_notify_off);
367 * We write the queue's selector into the notification register
368 * to signal the other end
371 priv->notify_base + off * priv->notify_offset_multiplier);
377 * virtio_pci_find_capability - walk capabilities to find device info
379 * @udev: the transport device
380 * @cfg_type: the VIRTIO_PCI_CAP_* value we seek
382 * @return offset of the configuration structure
384 static int virtio_pci_find_capability(struct udevice *udev, u8 cfg_type)
390 for (pos = dm_pci_find_capability(udev, PCI_CAP_ID_VNDR);
392 pos = dm_pci_find_next_capability(udev, pos, PCI_CAP_ID_VNDR)) {
393 offset = pos + offsetof(struct virtio_pci_cap, cfg_type);
394 dm_pci_read_config8(udev, offset, &type);
395 offset = pos + offsetof(struct virtio_pci_cap, bar);
396 dm_pci_read_config8(udev, offset, &bar);
398 /* Ignore structures with reserved BAR values */
402 if (type == cfg_type)
410 * virtio_pci_map_capability - map base address of the capability
412 * @udev: the transport device
413 * @off: offset of the configuration structure
415 * @return base address of the capability
417 static void __iomem *virtio_pci_map_capability(struct udevice *udev, int off)
427 offset = off + offsetof(struct virtio_pci_cap, bar);
428 dm_pci_read_config8(udev, offset, &bar);
429 offset = off + offsetof(struct virtio_pci_cap, offset);
430 dm_pci_read_config32(udev, offset, &offset);
433 * TODO: adding 64-bit BAR support
435 * Per spec, the BAR is permitted to be either 32-bit or 64-bit.
436 * For simplicity, only read the BAR address as 32-bit.
438 base = dm_pci_read_bar32(udev, bar);
439 p = (void __iomem *)base + offset;
444 static int virtio_pci_bind(struct udevice *udev)
449 /* Create a unique device name */
450 sprintf(name, "%s#%u", VIRTIO_PCI_DRV_NAME, num_devs++);
451 device_set_name(udev, name);
456 static int virtio_pci_probe(struct udevice *udev)
458 struct pci_child_platdata *pplat = dev_get_parent_platdata(udev);
459 struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev);
460 struct virtio_pci_priv *priv = dev_get_priv(udev);
463 int common, notify, device;
466 /* We only own devices >= 0x1040 and <= 0x107f: leave the rest. */
467 if (pplat->device < 0x1040 || pplat->device > 0x107f)
470 /* Transitional devices must not have a PCI revision ID of 0 */
471 dm_pci_read_config8(udev, PCI_REVISION_ID, &revision);
473 /* Modern devices: simply use PCI device id, but start from 0x1040. */
474 uc_priv->device = pplat->device - 0x1040;
475 dm_pci_read_config16(udev, PCI_SUBSYSTEM_VENDOR_ID, &subvendor);
476 uc_priv->vendor = subvendor;
478 /* Check for a common config: if not, use legacy mode (bar 0) */
479 common = virtio_pci_find_capability(udev, VIRTIO_PCI_CAP_COMMON_CFG);
481 printf("(%s): leaving for legacy driver\n", udev->name);
485 /* If common is there, notify should be too */
486 notify = virtio_pci_find_capability(udev, VIRTIO_PCI_CAP_NOTIFY_CFG);
488 printf("(%s): missing capabilities %i/%i\n", udev->name,
494 * Device capability is only mandatory for devices that have
495 * device-specific configuration.
497 device = virtio_pci_find_capability(udev, VIRTIO_PCI_CAP_DEVICE_CFG);
499 offset = notify + offsetof(struct virtio_pci_cap, length);
500 dm_pci_read_config32(udev, offset, &priv->device_len);
503 /* Map configuration structures */
504 priv->common = virtio_pci_map_capability(udev, common);
505 priv->notify_base = virtio_pci_map_capability(udev, notify);
506 priv->device = virtio_pci_map_capability(udev, device);
507 debug("(%p): common @ %p, notify base @ %p, device @ %p\n",
508 udev, priv->common, priv->notify_base, priv->device);
510 /* Read notify_off_multiplier from config space */
511 offset = notify + offsetof(struct virtio_pci_notify_cap,
512 notify_off_multiplier);
513 dm_pci_read_config32(udev, offset, &priv->notify_offset_multiplier);
515 debug("(%s): device (%d) vendor (%08x) version (%d)\n", udev->name,
516 uc_priv->device, uc_priv->vendor, revision);
521 static const struct dm_virtio_ops virtio_pci_ops = {
522 .get_config = virtio_pci_get_config,
523 .set_config = virtio_pci_set_config,
524 .generation = virtio_pci_generation,
525 .get_status = virtio_pci_get_status,
526 .set_status = virtio_pci_set_status,
527 .reset = virtio_pci_reset,
528 .get_features = virtio_pci_get_features,
529 .set_features = virtio_pci_set_features,
530 .find_vqs = virtio_pci_find_vqs,
531 .del_vqs = virtio_pci_del_vqs,
532 .notify = virtio_pci_notify,
535 U_BOOT_DRIVER(virtio_pci_modern) = {
536 .name = VIRTIO_PCI_DRV_NAME,
538 .ops = &virtio_pci_ops,
539 .bind = virtio_pci_bind,
540 .probe = virtio_pci_probe,
541 .priv_auto_alloc_size = sizeof(struct virtio_pci_priv),
544 static struct pci_device_id virtio_pci_supported[] = {
545 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID00) },
546 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID01) },
547 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID02) },
548 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID03) },
549 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID04) },
550 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID05) },
551 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID06) },
552 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID07) },
553 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID08) },
554 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID09) },
555 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID0A) },
556 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID0B) },
557 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID0C) },
558 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID0D) },
559 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID0E) },
560 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID0F) },
561 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID10) },
562 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID11) },
563 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID12) },
564 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID13) },
565 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID14) },
566 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID15) },
567 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID16) },
568 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID17) },
569 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID18) },
570 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID19) },
571 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID1A) },
572 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID1B) },
573 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID1C) },
574 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID1D) },
575 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID1E) },
576 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID1F) },
577 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID20) },
578 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID21) },
579 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID22) },
580 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID23) },
581 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID24) },
582 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID25) },
583 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID26) },
584 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID27) },
585 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID28) },
586 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID29) },
587 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID2A) },
588 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID2B) },
589 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID2C) },
590 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID2D) },
591 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID2E) },
592 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID2F) },
593 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID30) },
594 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID31) },
595 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID32) },
596 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID33) },
597 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID34) },
598 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID35) },
599 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID36) },
600 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID37) },
601 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID38) },
602 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID39) },
603 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID3A) },
604 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID3B) },
605 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID3C) },
606 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID3D) },
607 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID3E) },
608 { PCI_DEVICE(VIRTIO_PCI_VENDOR_ID, VIRTIO_PCI_DEVICE_ID3F) },
612 U_BOOT_PCI_DEVICE(virtio_pci_modern, virtio_pci_supported);