Subversion Repositories HelenOS

Rev

Rev 3022 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3022 Rev 4204
Line 39... Line 39...
39
    printf("%s: HelenOS PCI driver\n", NAME);
39
    printf("%s: HelenOS PCI driver\n", NAME);
40
 
40
 
41
    /*
41
    /*
42
     * Gain control over PCI configuration ports.
42
     * Gain control over PCI configuration ports.
43
     */
43
     */
-
 
44
    void * addr;
44
    iospace_enable(task_get_id(), (void *) PCI_CONF1, PCI_CONF1_SIZE);
45
    pio_enable((void *) PCI_CONF1, PCI_CONF1_SIZE, &addr); 
45
 
46
 
46
    pacc = pci_alloc();           /* Get the pci_access structure */
47
    pacc = pci_alloc();           /* Get the pci_access structure */   
47
    pci_init(pacc);               /* Initialize the PCI library */
48
    pci_init(pacc);               /* Initialize the PCI library */
48
    pci_scan_bus(pacc);           /* We want to get the list of devices */
49
    pci_scan_bus(pacc);           /* We want to get the list of devices */
49
    for(dev=pacc->devices; dev; dev=dev->next) {   /* Iterate over all devices */
50
    for(dev=pacc->devices; dev; dev=dev->next) {   /* Iterate over all devices */
50
        pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_IRQ);
51
        pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_IRQ);
51
        c = pci_read_word(dev, PCI_CLASS_DEVICE); /* Read config register directly */
52
        c = pci_read_word(dev, PCI_CLASS_DEVICE); /* Read config register directly */