Skip to content

Commit 9dc9500

Browse files
lipengfei28xiaoxiang781216
authored andcommitted
pci add register drivers
Signed-off-by: lipengfei28 <[email protected]>
1 parent c25f839 commit 9dc9500

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

drivers/drivers_initialize.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <nuttx/net/tun.h>
3737
#include <nuttx/net/telnet.h>
3838
#include <nuttx/note/note_driver.h>
39+
#include <nuttx/pci/pci.h>
3940
#include <nuttx/power/pm.h>
4041
#include <nuttx/power/regulator.h>
4142
#include <nuttx/segger/rtt.h>
@@ -253,6 +254,10 @@ void drivers_initialize(void)
253254
mtd_loop_register();
254255
#endif
255256

257+
#ifdef CONFIG_PCI
258+
pci_register_drivers();
259+
#endif
260+
256261
#ifdef CONFIG_DRIVERS_VIRTIO
257262
virtio_register_drivers();
258263
#endif

include/nuttx/pci/pci.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,4 +742,14 @@ int pci_bus_write_config_word(FAR struct pci_bus_s *bus, unsigned int devfn,
742742
int pci_bus_write_config_dword(FAR struct pci_bus_s *bus, unsigned int devfn,
743743
int where, uint32_t val);
744744

745+
/****************************************************************************
746+
* Name: pci_register_drivers
747+
*
748+
* Description:
749+
* Register all the pci drivers to pci bus
750+
*
751+
****************************************************************************/
752+
753+
int pci_register_drivers(void);
754+
745755
#endif /* __INCLUDE_NUTTX_PCI_PCI_H */

0 commit comments

Comments
 (0)