Skip to content

Commit 75f8c72

Browse files
yangshuyongxiaoxiang781216
authored andcommitted
drivers/pci/pci_qemu_edu: update qemu edu driver code
Signed-off-by: yangshuyong <[email protected]> Signed-off-by: Bowen Wang <[email protected]> Signed-off-by: lipengfei28 <[email protected]>
1 parent 9c07b36 commit 75f8c72

File tree

11 files changed

+569
-531
lines changed

11 files changed

+569
-531
lines changed

drivers/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ source "drivers/dma/Kconfig"
6060
source "drivers/devicetree/Kconfig"
6161
source "drivers/reset/Kconfig"
6262
source "drivers/pci/Kconfig"
63-
source "drivers/virt/Kconfig"

drivers/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ include segger/Make.defs
7878
include usrsock/Make.defs
7979
include reset/Make.defs
8080
include pci/Make.defs
81-
include virt/Make.defs
8281

8382
ifeq ($(CONFIG_SPECIFIC_DRIVERS),y)
8483
-include platform/Make.defs

drivers/pci/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ config PCI_QEMU_TEST
2525
---help---
2626
Driver for QEMU PCI test device
2727

28+
config PCI_QEMU_EDU
29+
bool "Driver for QEMU EDU test device"
30+
default n
31+
---help---
32+
Driver for QEMU EDU test device
33+
2834
endif # PCI

drivers/pci/Make.defs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ ifeq ($(CONFIG_PCI_QEMU_TEST),y)
2525
CSRCS += pci_qemu_test.c
2626
endif
2727

28+
ifeq ($(CONFIG_PCI_QEMU_EDU),y)
29+
CSRCS += pci_qemu_edu.c
30+
endif
31+
2832
# Include PCI device driver build support
2933

3034
DEPPATH += --dep-path pci

drivers/pci/pci_drivers.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <debug.h>
2626

2727
#include <nuttx/pci/pci.h>
28+
#include <nuttx/pci/pci_qemu_edu.h>
2829
#include <nuttx/pci/pci_qemu_test.h>
2930

3031
/****************************************************************************
@@ -53,6 +54,16 @@ int pci_register_drivers(void)
5354
}
5455
#endif
5556

57+
/* Initialization qemu edu driver */
58+
59+
#ifdef CONFIG_PCI_QEMU_EDU
60+
ret = pci_register_qemu_edu_driver();
61+
if (ret < 0)
62+
{
63+
pcierr("pci_register_qemu_edu_driver failed, ret=%d\n", ret);
64+
}
65+
#endif
66+
5667
UNUSED(ret);
5768
return ret;
5869
}

0 commit comments

Comments
 (0)