3,17 → 3,15 |
#include <ll/i386/hw-arch.h> |
#include <ll/i386/hw-io.h> |
#include <ll/i386/cons.h> |
#include <ll/i386/error.h> |
#include <ll/i386/mem.h> |
|
#include <ll/stdlib.h> |
|
|
|
#include <drivers/llpci.h> |
#include <drivers/pci.h> |
#include <drivers/linuxpci.h> |
#include <kernel/log.h> |
|
//#define DEBUG_PCISCAN |
|
static struct pci_dev pci_devs[N_MAX_DEVS]; |
|
static struct pci_bus pci_root; |
146,7 → 144,9 |
*/ |
child = kmalloc(sizeof(*child), GFP_ATOMIC); |
if(child==NULL) { |
error(KERN_ERR "pci: out of memory for bridge.\n"); |
#ifdef DEBUG_PCISCAN |
printk(KERN_ERR "pci: out of memory for bridge.\n"); |
#endif |
continue; |
} |
memset(child, 0, sizeof(*child)); |
221,11 → 221,15 |
pcibios_init(); |
|
if (!pci_present()) { |
error("PCI: No PCI bus detected\n"); |
#ifdef DEBUG_PCISCAN |
printk("PCI: No PCI bus detected\n"); |
#endif |
return; |
} |
|
error("PCI: Probing PCI hardware\n"); |
#ifdef DEBUG_PCISCAN |
printk("PCI: Probing PCI hardware\n"); |
#endif |
memset(&pci_root, 0, sizeof(pci_root)); |
pci_root.subordinate = pci_scan_bus(&pci_root); |
} |