Chameleon

Chameleon Svn Source Tree

Root/branches/azimutz/Chazi/i386/libsaio/pci_setup.c

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

Archive Download this file

Revision: 977