mirror of
https://github.com/corundum/corundum.git
synced 2025-01-16 08:12:53 +08:00
Print PCIe device ID, if available
This commit is contained in:
parent
d9e79c9923
commit
d5f1da7f08
@ -228,6 +228,13 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (dev->pci_device_path)
|
||||
{
|
||||
char *ptr = strrchr(dev->pci_device_path, '/');
|
||||
if (ptr)
|
||||
printf("PCIe ID: %s\n", ptr+1);
|
||||
}
|
||||
|
||||
printf("FPGA ID: 0x%08x\n", dev->fpga_id);
|
||||
printf("FW ID: 0x%08x\n", dev->fw_id);
|
||||
printf("FW version: %d.%d.%d.%d\n", dev->fw_ver >> 24,
|
||||
|
@ -144,6 +144,13 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (dev->pci_device_path)
|
||||
{
|
||||
char *ptr = strrchr(dev->pci_device_path, '/');
|
||||
if (ptr)
|
||||
printf("PCIe ID: %s\n", ptr+1);
|
||||
}
|
||||
|
||||
printf("FPGA ID: 0x%08x\n", dev->fpga_id);
|
||||
printf("FW ID: 0x%08x\n", dev->fw_id);
|
||||
printf("FW version: %d.%d.%d.%d\n", dev->fw_ver >> 24,
|
||||
|
@ -99,6 +99,13 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (dev->pci_device_path)
|
||||
{
|
||||
char *ptr = strrchr(dev->pci_device_path, '/');
|
||||
if (ptr)
|
||||
printf("PCIe ID: %s\n", ptr+1);
|
||||
}
|
||||
|
||||
printf("Device-level register blocks:\n");
|
||||
for (struct reg_block *rb = dev->rb_list; rb->type && rb->version; rb++)
|
||||
printf(" type 0x%08x (v %d.%d.%d.%d)\n", rb->type, rb->version >> 24,
|
||||
|
Loading…
x
Reference in New Issue
Block a user