1 | #include "libsaio.h"␊ |
2 | #include "boot.h"␊ |
3 | #include "bootstruct.h"␊ |
4 | #include "pci.h"␊ |
5 | #include "modules.h"␊ |
6 | ␊ |
7 | #define DEBUG_PCI 0␊ |
8 | ␊ |
9 | #if DEBUG_PCI␊ |
10 | #define DBG(x...) msglog(x)␊ |
11 | #else␊ |
12 | #define DBG(x...)␊ |
13 | #endif␊ |
14 | ␊ |
15 | ␊ |
16 | void setup_pci_devs(pci_dt_t *pci_dt)␊ |
17 | {␊ |
18 | ␉pci_dt_t *current = pci_dt;␊ |
19 | ␊ |
20 | ␊ |
21 | ␉while (current)␊ |
22 | ␉{␊ |
23 | ␉␉execute_hook("PCIDevice", current, NULL, NULL, NULL);␊ |
24 | ␉␉DBG("setup_pci_devs current devID=%08x\n", current->device_id);␊ |
25 | ␉␉setup_pci_devs(current->children);␊ |
26 | ␉␉DBG("setup_pci_devs children devID=%08x\n", current->device_id);␉␉␊ |
27 | ␉␉current = current->next;␊ |
28 | ␉}␊ |
29 | }␊ |
30 | |