Subversion Repositories Kolibri OS

Rev

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

Rev 1605 Rev 1613
Line 7... Line 7...
7
    if( (last_bus = PciApi(1))==-1)
7
    if( (last_bus = PciApi(1))==-1)
Line 8... Line 8...
8
        return retval;
8
        return retval;
9
 
9
 
Line -... Line 10...
-
 
10
    dbgprintf("last bus %x\n", last_bus);
-
 
11
 
10
    for(bus=0;bus<=last_bus;bus++)
12
    for(bus=0;bus<=last_bus;bus++)
11
    {
13
    {
12
        u32_t devfn;
14
        u32_t devfn;
Line 13... Line 15...
13
 
15
 
Line 35... Line 37...
35
 
37
 
36
            hc = (hc_t*)kmalloc(sizeof(hc_t), 0);
38
            hc = (hc_t*)kmalloc(sizeof(hc_t), 0);
Line 37... Line 39...
37
            INIT_LIST_HEAD(&hc->list);
39
            INIT_LIST_HEAD(&hc->list);
38
 
40
            INIT_LIST_HEAD(&hc->rq_list);
-
 
41
 
Line 39... Line 42...
39
            hc->pciId  = PciRead32(bus,devfn, 0);
42
            hc->pciId  = PciRead32(bus,devfn, 0);
40
            hc->PciTag = pciTag(bus,(devfn>>3)&0x1F,devfn&0x7);
43
            hc->PciTag = pciTag(bus,(devfn>>3)&0x1F,devfn&0x7);
Line 41... Line 44...
41
 
44
 
42
            hc->irq_line = PciRead32(bus,devfn, 0x3C) & 0xFF;
-
 
Line 43... Line 45...
43
            dbgprintf("Host IRQ %d\n", hc->irq_line);
45
            hc->irq_line = PciRead32(bus,devfn, 0x3C) & 0xFF;
44
 
46
 
45
            for (i = 0; i < 6; i++)
47
            for (i = 0; i < 6; i++)
46
            {
48
            {
Line 59... Line 61...
59
                    }
61
                    }
60
                }
62
                }
61
            };
63
            };
62
            list_add_tail(&hc->list, &hc_list);
64
            dbgprintf("host controller %x bus %x devfn %x, IRQ %d\n",
63
            retval = true;
65
                       hc->pciId, bus, devfn, hc->irq_line);
-
 
66
 
-
 
67
            list_add_tail(&hc->list, &hc_list);
-
 
68
            retval = true;
64
        };
69
        };
65
    };
70
    };
66
    return retval;
71
    return retval;
67
};
72
};
68
 
73