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
8
9extern void set_eth_builtin(pci_dt_t *eth_dev);
10extern void notify_usb_dev(pci_dt_t *pci_dev);
11
12
13void setup_pci_devs(pci_dt_t *pci_dt)
14{
15bool do_eth_devprop;
16pci_dt_t *current = pci_dt;
17
18do_eth_devprop = false;
19
20getBoolForKey(kEthernetBuiltInKey, &do_eth_devprop, &bootInfo->bootConfig);
21
22while (current)
23{
24execute_hook("PCIDevice", current, NULL, NULL, NULL);
25
26switch (current->class_id)
27{
28case PCI_CLASS_NETWORK_ETHERNET:
29if (do_eth_devprop)
30set_eth_builtin(current);
31break;
32
33case PCI_CLASS_SERIAL_USB:
34notify_usb_dev(current);
35break;
36}
37
38setup_pci_devs(current->children);
39current = current->next;
40}
41}
42

Archive Download this file

Revision: 625