1 | ␊ |
2 | //#include "libsaio.h"␊ |
3 | //#include "bootstruct.h"␊ |
4 | #include "boot.h"␊ |
5 | #include "pci.h"␊ |
6 | #include "modules.h"␊ |
7 | //#include "nvidia.h"␊ |
8 | //#include "ati.h"␊ |
9 | //#include "gma.h" //Azi:autoresolution␊ |
10 | ␊ |
11 | extern void set_eth_builtin(pci_dt_t *eth_dev);␊ |
12 | extern void notify_usb_dev(pci_dt_t *pci_dev);␊ |
13 | extern void force_enable_hpet(pci_dt_t *lpc_dev);␊ |
14 | ␊ |
15 | void setup_pci_devs(pci_dt_t *pci_dt)␊ |
16 | {␊ |
17 | ␉bool do_eth_devprop, do_enable_hpet;␊ |
18 | ␉pci_dt_t *current = pci_dt;␊ |
19 | ␊ |
20 | ␉do_eth_devprop = do_enable_hpet = false;␊ |
21 | ␊ |
22 | ␉getBoolForKey(kEthernetBuiltInKey, &do_eth_devprop, &bootInfo->bootConfig);␊ |
23 | ␉getBoolForKey(kForceHPETKey, &do_enable_hpet, &bootInfo->bootConfig);␊ |
24 | ␊ |
25 | ␉while (current)␊ |
26 | ␉{␊ |
27 | ␉␉execute_hook("PCIDevice", current, NULL, NULL, NULL);␊ |
28 | ␉␉␊ |
29 | ␉␉switch (current->class_id)␊ |
30 | ␉␉{␊ |
31 | ␉␉␉case PCI_CLASS_NETWORK_ETHERNET: ␊ |
32 | ␉␉␉␉if (do_eth_devprop)␊ |
33 | ␉␉␉␉␉set_eth_builtin(current);␊ |
34 | ␉␉␉␉break;␊ |
35 | ␊ |
36 | ␉␉␉case PCI_CLASS_SERIAL_USB:␊ |
37 | ␉␉␉␉notify_usb_dev(current);␊ |
38 | ␉␉␉␉break;␊ |
39 | ␊ |
40 | ␉␉␉case PCI_CLASS_BRIDGE_ISA:␊ |
41 | ␉␉␉␉if (do_enable_hpet)␊ |
42 | ␉␉␉␉␉force_enable_hpet(current);␊ |
43 | ␉␉␉␉break;␊ |
44 | ␉␉}␊ |
45 | ␉␉␊ |
46 | ␉␉setup_pci_devs(current->children);␊ |
47 | ␉␉current = current->next;␊ |
48 | ␉}␊ |
49 | }␊ |
50 | |