Rev 1029 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1029 | Rev 1430 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | static Bool FindPciDevice() |
1 | Bool FindPciDevice() |
2 | { |
2 | { |
3 | Bool retval = FALSE; |
3 | Bool retval = FALSE; |
4 | u32_t bus, last_bus; |
4 | u32_t bus, last_bus; |
5 | PCITAG tag; |
5 | PCITAG tag; |
Line 18... | Line 18... | ||
18 | u32_t id; |
18 | u32_t id; |
Line 19... | Line 19... | ||
19 | u16_t pcicmd; |
19 | u16_t pcicmd; |
20 | u16_t devclass; |
20 | u16_t devclass; |
21 | int i; |
21 | u8_t interface; |
- | 22 | int i; |
|
22 | 23 | ||
Line -... | Line 24... | ||
- | 24 | interface = PciRead8(bus,devfn, 0x09); |
|
23 | devclass = PciRead16(bus,devfn, 0x0A); |
25 | devclass = PciRead16(bus,devfn, 0x0A); |
24 | - | ||
25 | if( devclass != 0x0C03) |
26 | if( devclass != 0x0C03) |
26 | continue; |
27 | continue; |
Line -... | Line 28... | ||
- | 28 | ||
- | 29 | if( interface != 0) |
|
- | 30 | continue; |
|
27 | 31 | ||
28 | pcicmd = PciRead16(bus,devfn, PCI_COMMAND); |
32 | pcicmd = PciRead16(bus,devfn, PCI_COMMAND); |
29 | if (! pcicmd & PCI_COMMAND_IO) |
33 | if (! pcicmd & PCI_COMMAND_IO) |
Line 30... | Line 34... | ||
30 | continue; |
34 | continue; |