Lines 259-268
Link Here
|
259 |
|
259 |
|
260 |
show_slot_name(d); |
260 |
show_slot_name(d); |
261 |
printf(" %s: %s", |
261 |
printf(" %s: %s", |
262 |
pci_lookup_name(pacc, classbuf, sizeof(classbuf), |
262 |
pci_lookup_name(pacc, (char *)classbuf, sizeof(classbuf), |
263 |
PCI_LOOKUP_CLASS, |
263 |
PCI_LOOKUP_CLASS, |
264 |
get_conf_word(d, PCI_CLASS_DEVICE)), |
264 |
get_conf_word(d, PCI_CLASS_DEVICE)), |
265 |
pci_lookup_name(pacc, devbuf, sizeof(devbuf), |
265 |
pci_lookup_name(pacc, (char *)devbuf, sizeof(devbuf), |
266 |
PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE, |
266 |
PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE, |
267 |
p->vendor_id, p->device_id)); |
267 |
p->vendor_id, p->device_id)); |
268 |
if (c = get_conf_byte(d, PCI_REVISION_ID)) |
268 |
if (c = get_conf_byte(d, PCI_REVISION_ID)) |
Lines 271-277
Link Here
|
271 |
{ |
271 |
{ |
272 |
char *x; |
272 |
char *x; |
273 |
c = get_conf_byte(d, PCI_CLASS_PROG); |
273 |
c = get_conf_byte(d, PCI_CLASS_PROG); |
274 |
x = pci_lookup_name(pacc, devbuf, sizeof(devbuf), |
274 |
x = pci_lookup_name(pacc, (char *)devbuf, sizeof(devbuf), |
275 |
PCI_LOOKUP_PROGIF | PCI_LOOKUP_NO_NUMBERS, |
275 |
PCI_LOOKUP_PROGIF | PCI_LOOKUP_NO_NUMBERS, |
276 |
get_conf_word(d, PCI_CLASS_DEVICE), c); |
276 |
get_conf_word(d, PCI_CLASS_DEVICE), c); |
277 |
if (c || x) |
277 |
if (c || x) |
Lines 533-539
Link Here
|
533 |
static void |
533 |
static void |
534 |
show_pcix_bridge(struct device *d, int where) |
534 |
show_pcix_bridge(struct device *d, int where) |
535 |
{ |
535 |
{ |
536 |
static const byte * const sec_clock_freq[8] = { "conv", "66MHz", "100MHz", "133MHz", "?4", "?5", "?6", "?7" }; |
536 |
static const byte * const sec_clock_freq[8] = { |
|
|
537 |
(unsigned char *)"conv", |
538 |
(unsigned char *)"66MHz", |
539 |
(unsigned char *)"100MHz", |
540 |
(unsigned char *)"133MHz", |
541 |
(unsigned char *)"?4", |
542 |
(unsigned char *)"?5", |
543 |
(unsigned char *)"?6", |
544 |
(unsigned char *)"?7" |
545 |
}; |
537 |
u16 secstatus; |
546 |
u16 secstatus; |
538 |
u32 status, upstcr, downstcr; |
547 |
u32 status, upstcr, downstcr; |
539 |
|
548 |
|
Lines 2002-2008
Link Here
|
2002 |
{ |
2011 |
{ |
2003 |
*p++ = '\n'; |
2012 |
*p++ = '\n'; |
2004 |
*p = 0; |
2013 |
*p = 0; |
2005 |
fputs(line, stdout); |
2014 |
fputs((char *)line, stdout); |
2006 |
for(p=line; *p; p++) |
2015 |
for(p=line; *p; p++) |
2007 |
if (*p == '+' || *p == '|') |
2016 |
if (*p == '+' || *p == '|') |
2008 |
*p = '|'; |
2017 |
*p = '|'; |
Lines 2019-2037
Link Here
|
2019 |
struct bridge *b; |
2028 |
struct bridge *b; |
2020 |
char namebuf[256]; |
2029 |
char namebuf[256]; |
2021 |
|
2030 |
|
2022 |
p += sprintf(p, "%02x.%x", q->dev, q->func); |
2031 |
p += sprintf((char *)p, "%02x.%x", q->dev, q->func); |
2023 |
for(b=&host_bridge; b; b=b->chain) |
2032 |
for(b=&host_bridge; b; b=b->chain) |
2024 |
if (b->br_dev == d) |
2033 |
if (b->br_dev == d) |
2025 |
{ |
2034 |
{ |
2026 |
if (b->secondary == b->subordinate) |
2035 |
if (b->secondary == b->subordinate) |
2027 |
p += sprintf(p, "-[%04x:%02x]-", b->domain, b->secondary); |
2036 |
p += sprintf((char *)p, "-[%04x:%02x]-", b->domain, b->secondary); |
2028 |
else |
2037 |
else |
2029 |
p += sprintf(p, "-[%04x:%02x-%02x]-", b->domain, b->secondary, b->subordinate); |
2038 |
p += sprintf((char *)p, "-[%04x:%02x-%02x]-", b->domain, b->secondary, b->subordinate); |
2030 |
show_tree_bridge(b, line, p); |
2039 |
show_tree_bridge(b, line, p); |
2031 |
return; |
2040 |
return; |
2032 |
} |
2041 |
} |
2033 |
if (verbose) |
2042 |
if (verbose) |
2034 |
p += sprintf(p, " %s", |
2043 |
p += sprintf((char *)p, " %s", |
2035 |
pci_lookup_name(pacc, namebuf, sizeof(namebuf), |
2044 |
pci_lookup_name(pacc, namebuf, sizeof(namebuf), |
2036 |
PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE, |
2045 |
PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE, |
2037 |
q->vendor_id, q->device_id)); |
2046 |
q->vendor_id, q->device_id)); |
Lines 2072-2078
Link Here
|
2072 |
if (!b->first_bus->sibling) |
2081 |
if (!b->first_bus->sibling) |
2073 |
{ |
2082 |
{ |
2074 |
if (b == &host_bridge) |
2083 |
if (b == &host_bridge) |
2075 |
p += sprintf(p, "[%04x:%02x]-", b->domain, b->first_bus->number); |
2084 |
p += sprintf((char *)p, "[%04x:%02x]-", b->domain, b->first_bus->number); |
2076 |
show_tree_bus(b->first_bus, line, p); |
2085 |
show_tree_bus(b->first_bus, line, p); |
2077 |
} |
2086 |
} |
2078 |
else |
2087 |
else |
Lines 2082-2092
Link Here
|
2082 |
|
2091 |
|
2083 |
while (u->sibling) |
2092 |
while (u->sibling) |
2084 |
{ |
2093 |
{ |
2085 |
k = p + sprintf(p, "+-[%04x:%02x]-", u->domain, u->number); |
2094 |
k = p + sprintf((char *)p, "+-[%04x:%02x]-", u->domain, u->number); |
2086 |
show_tree_bus(u, line, k); |
2095 |
show_tree_bus(u, line, k); |
2087 |
u = u->sibling; |
2096 |
u = u->sibling; |
2088 |
} |
2097 |
} |
2089 |
k = p + sprintf(p, "\\-[%04x:%02x]-", u->domain, u->number); |
2098 |
k = p + sprintf((char *)p, "\\-[%04x:%02x]-", u->domain, u->number); |
2090 |
show_tree_bus(u, line, k); |
2099 |
show_tree_bus(u, line, k); |
2091 |
} |
2100 |
} |
2092 |
} |
2101 |
} |
Lines 2094-2100
Link Here
|
2094 |
static void |
2103 |
static void |
2095 |
show_forest(void) |
2104 |
show_forest(void) |
2096 |
{ |
2105 |
{ |
2097 |
char line[256]; |
2106 |
unsigned char line[256]; |
2098 |
|
2107 |
|
2099 |
grow_tree(); |
2108 |
grow_tree(); |
2100 |
show_tree_bridge(&host_bridge, line, line); |
2109 |
show_tree_bridge(&host_bridge, line, line); |