Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1029 | serge | 1 | |
2 | |||
3 | |||
4 | int cap, int *ttl) |
||
5 | { |
||
6 | u8_t id; |
||
7 | |||
8 | |||
9 | { |
||
10 | pos = pciReadByte(pciTag, pos); |
||
11 | if (pos < 0x40) |
||
12 | break; |
||
13 | pos &= ~3; |
||
14 | id = pciReadByte(pciTag, pos + PCI_CAP_LIST_ID); |
||
15 | if (id == 0xff) |
||
16 | break; |
||
17 | if (id == cap) |
||
18 | return pos; |
||
19 | pos += PCI_CAP_LIST_NEXT; |
||
20 | } |
||
21 | return 0; |
||
22 | } |
||
23 | |||
24 | |||
25 | { |
||
26 | int ttl = PCI_FIND_CAP_TTL; |
||
27 | |||
28 | |||
29 | } |
||
30 | |||
31 | |||
32 | { |
||
33 | u16_t status; |
||
34 | u8_t hdr_type; |
||
35 | |||
36 | |||
37 | if (!(status & PCI_STATUS_CAP_LIST)) |
||
38 | return 0; |
||
39 | |||
40 | |||
41 | switch (hdr_type) |
||
42 | { |
||
43 | case PCI_HEADER_TYPE_NORMAL: |
||
44 | case PCI_HEADER_TYPE_BRIDGE: |
||
45 | return PCI_CAPABILITY_LIST; |
||
46 | case PCI_HEADER_TYPE_CARDBUS: |
||
47 | return PCI_CB_CAPABILITY_LIST; |
||
48 | default: |
||
49 | return 0; |
||
50 | } |
||
51 | return 0; |
||
52 | } |
||
53 | |||
54 | |||
55 | |||
56 | { |
||
57 | int pos; |
||
58 | |||
59 | |||
60 | if (pos) |
||
61 | pos = __pci_find_next_cap(pciTag, pos, cap); |
||
62 | |||
63 | |||
64 | } |
||
65 | |||
66 | |||
67 | |||
68 | { |
||
69 | u32_t bus, last_bus; |
||
70 | PCITAG tag; |
||
71 | |||
72 | |||
73 | return -1; |
||
74 | |||
75 | |||
76 | { |
||
77 | u32_t devfn; |
||
78 | |||
79 | |||
80 | { |
||
81 | u16_t devclass; |
||
82 | |||
83 | |||
84 | |||
85 | |||
86 | continue; |
||
87 | |||
88 | |||
89 | }; |
||
90 | }; |
||
91 | return -1; |
||
92 | }; |
||
93 | |||
94 | |||
95 | |||
96 | { |
||
97 | u32_t bus, last_bus; |
||
98 | u32_t devfn; |
||
99 | |||
100 | |||
101 | return -1; |
||
102 | |||
103 | |||
104 | devfn = PCI_DFN_FROM_TAG(from); |
||
105 | |||
106 | |||
107 | |||
108 | |||
109 | { |
||
110 | for(;devfn < 256;devfn++) |
||
111 | { |
||
112 | u32_t tmp; |
||
113 | u32_t dev_vendor; |
||
114 | u32_t dev_id; |
||
115 | |||
116 | |||
117 | |||
118 | |||
119 | dev_id = tmp >> 16; |
||
120 | |||
121 | |||
122 | return pciTag(bus,(devfn>>3)&0x1F,devfn&0x7); |
||
123 | }; |
||
124 | }; |
||
125 | return -1; |
||
126 | }>=last_bus;>256;devfn++) |
||
127 | >=last_bus;bus++) |
||
128 |