You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/06 02:01:25 UTC
(nuttx) 08/13: pci add register drivers
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 9dc9500aaf0783c7e027f7b08c6bb1ce8e63a0aa
Author: lipengfei28 <li...@xiaomi.com>
AuthorDate: Tue Aug 27 12:08:33 2024 +0800
pci add register drivers
Signed-off-by: lipengfei28 <li...@xiaomi.com>
---
drivers/drivers_initialize.c | 5 +++++
include/nuttx/pci/pci.h | 10 ++++++++++
2 files changed, 15 insertions(+)
diff --git a/drivers/drivers_initialize.c b/drivers/drivers_initialize.c
index d87281c622..702fdd0069 100644
--- a/drivers/drivers_initialize.c
+++ b/drivers/drivers_initialize.c
@@ -36,6 +36,7 @@
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/note/note_driver.h>
+#include <nuttx/pci/pci.h>
#include <nuttx/power/pm.h>
#include <nuttx/power/regulator.h>
#include <nuttx/segger/rtt.h>
@@ -253,6 +254,10 @@ void drivers_initialize(void)
mtd_loop_register();
#endif
+#ifdef CONFIG_PCI
+ pci_register_drivers();
+#endif
+
#ifdef CONFIG_DRIVERS_VIRTIO
virtio_register_drivers();
#endif
diff --git a/include/nuttx/pci/pci.h b/include/nuttx/pci/pci.h
index 1058e51cfc..6d995bc9a5 100644
--- a/include/nuttx/pci/pci.h
+++ b/include/nuttx/pci/pci.h
@@ -742,4 +742,14 @@ int pci_bus_write_config_word(FAR struct pci_bus_s *bus, unsigned int devfn,
int pci_bus_write_config_dword(FAR struct pci_bus_s *bus, unsigned int devfn,
int where, uint32_t val);
+/****************************************************************************
+ * Name: pci_register_drivers
+ *
+ * Description:
+ * Register all the pci drivers to pci bus
+ *
+ ****************************************************************************/
+
+int pci_register_drivers(void);
+
#endif /* __INCLUDE_NUTTX_PCI_PCI_H */