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

Archive Download this file

Revision: 527