3,15 → 3,13 |
#include <ll/i386/hw-arch.h> |
#include <ll/i386/hw-io.h> |
#include <ll/i386/cons.h> |
|
#include <ll/stdlib.h> |
|
|
|
#include <drivers/llpci.h> |
#include <drivers/pci.h> |
#include <drivers/linuxpci.h> |
|
#include <kernel/log.h> |
|
static int ndev = 0; |
static struct pci_des pci_devs[N_MAX_DEVS]; |
|
108,7 → 106,10 |
{ |
|
if (pci_class(class_code, index, bus, dev) != NULL) { |
cprintf("PCIBIOS_FIND_CLASS: found at bus %d, dev %d\n", *bus, *dev); |
#ifdef DEBUG_PCI |
printk(KERN_DEBUG "PCIBIOS_FIND_CLASS:" |
"found at bus %d, dev %d\n", *bus, *dev); |
#endif |
return PCIBIOS_SUCCESSFUL; |
} else { |
return PCIBIOS_DEVICE_NOT_FOUND; |
122,14 → 123,15 |
int i; |
struct pci_regs *r; |
|
cprintf(" DevLib PCI support\n\n"); |
cprintf(" PCI config type %d\n", pcibios_present()); |
cprintf(" %d PCI devices found:\n\n", ndev); |
printk(KERN_INFO "DevLib PCI support\n\n"); |
printk(KERN_INFO "PCI config type %d\n", pcibios_present()); |
printk(KERN_INFO "%d PCI devices found:\n\n", ndev); |
for(i = 0; i < ndev; i++) { |
cprintf(" %d: bus %d dev %d\n",i , pci_devs[i].bus, pci_devs[i].dev); |
r = (struct pci_regs *) pci_devs[i].mem; |
cprintf(" Vendor: %s", pci_strvendor(r->VendorId)); |
cprintf(" Class: %s\n", pci_strclass(r->ClassCode << 8)); |
printk(KERN_INFO "%d: bus %d dev %d\n", |
i, pci_devs[i].bus, pci_devs[i].dev); |
printk(KERN_INFO "Vendor: %s", pci_strvendor(r->VendorId)); |
printk(KERN_INFO "Class: %s\n", pci_strclass(r->ClassCode << 8)); |
} |
} |
|