mirror of
https://github.com/corundum/corundum.git
synced 2025-01-16 08:12:53 +08:00
lib/mqnic: Add mqnic_print_fw_id
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
parent
e6c18cfb68
commit
c58585036e
@ -485,3 +485,22 @@ void mqnic_close(struct mqnic *dev)
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
void mqnic_print_fw_id(struct mqnic *dev)
|
||||
{
|
||||
printf("FPGA ID: 0x%08x\n", dev->fpga_id);
|
||||
printf("FPGA part: %s\n", dev->fpga_part);
|
||||
printf("FW ID: 0x%08x\n", dev->fw_id);
|
||||
printf("FW version: %d.%d.%d.%d\n", dev->fw_ver >> 24,
|
||||
(dev->fw_ver >> 16) & 0xff,
|
||||
(dev->fw_ver >> 8) & 0xff,
|
||||
dev->fw_ver & 0xff);
|
||||
printf("Board ID: 0x%08x\n", dev->board_id);
|
||||
printf("Board version: %d.%d.%d.%d\n", dev->board_ver >> 24,
|
||||
(dev->board_ver >> 16) & 0xff,
|
||||
(dev->board_ver >> 8) & 0xff,
|
||||
dev->board_ver & 0xff);
|
||||
printf("Build date: %s UTC (raw 0x%08x)\n", dev->build_date_str, dev->build_date);
|
||||
printf("Git hash: %08x\n", dev->git_hash);
|
||||
printf("Release info: %08x\n", dev->rel_info);
|
||||
}
|
||||
|
@ -167,6 +167,7 @@ struct mqnic {
|
||||
// mqnic.c
|
||||
struct mqnic *mqnic_open(const char *dev_name);
|
||||
void mqnic_close(struct mqnic *dev);
|
||||
void mqnic_print_fw_id(struct mqnic *dev);
|
||||
|
||||
// mqnic_if.c
|
||||
struct mqnic_if *mqnic_if_open(struct mqnic *dev, int index, volatile uint8_t *regs);
|
||||
|
@ -235,20 +235,7 @@ int main(int argc, char *argv[])
|
||||
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,
|
||||
(dev->fw_ver >> 16) & 0xff,
|
||||
(dev->fw_ver >> 8) & 0xff,
|
||||
dev->fw_ver & 0xff);
|
||||
printf("Board ID: 0x%08x\n", dev->board_id);
|
||||
printf("Board version: %d.%d.%d.%d\n", dev->board_ver >> 24,
|
||||
(dev->board_ver >> 16) & 0xff,
|
||||
(dev->board_ver >> 8) & 0xff,
|
||||
dev->board_ver & 0xff);
|
||||
printf("Build date: %08x\n", dev->build_date);
|
||||
printf("Git hash: %08x\n", dev->git_hash);
|
||||
printf("Release info: %08x\n", dev->rel_info);
|
||||
mqnic_print_fw_id(dev);
|
||||
|
||||
if ((bmc_rb = find_reg_block(dev->rb_list, MQNIC_RB_ALVEO_BMC_TYPE, MQNIC_RB_ALVEO_BMC_VER, 0)))
|
||||
{
|
||||
|
@ -152,20 +152,7 @@ int main(int argc, char *argv[])
|
||||
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,
|
||||
(dev->fw_ver >> 16) & 0xff,
|
||||
(dev->fw_ver >> 8) & 0xff,
|
||||
dev->fw_ver & 0xff);
|
||||
printf("Board ID: 0x%08x\n", dev->board_id);
|
||||
printf("Board version: %d.%d.%d.%d\n", dev->board_ver >> 24,
|
||||
(dev->board_ver >> 16) & 0xff,
|
||||
(dev->board_ver >> 8) & 0xff,
|
||||
dev->board_ver & 0xff);
|
||||
printf("Build date: %s UTC (raw 0x%08x)\n", dev->build_date_str, dev->build_date);
|
||||
printf("Git hash: %08x\n", dev->git_hash);
|
||||
printf("Release info: %08x\n", dev->rel_info);
|
||||
mqnic_print_fw_id(dev);
|
||||
|
||||
if (!dev->phc_rb)
|
||||
{
|
||||
|
@ -118,20 +118,7 @@ int main(int argc, char *argv[])
|
||||
printf(" type 0x%08x (v %d.%d.%d.%d)\n", rb->type, rb->version >> 24,
|
||||
(rb->version >> 16) & 0xff, (rb->version >> 8) & 0xff, rb->version & 0xff);
|
||||
|
||||
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,
|
||||
(dev->fw_ver >> 16) & 0xff,
|
||||
(dev->fw_ver >> 8) & 0xff,
|
||||
dev->fw_ver & 0xff);
|
||||
printf("Board ID: 0x%08x\n", dev->board_id);
|
||||
printf("Board version: %d.%d.%d.%d\n", dev->board_ver >> 24,
|
||||
(dev->board_ver >> 16) & 0xff,
|
||||
(dev->board_ver >> 8) & 0xff,
|
||||
dev->board_ver & 0xff);
|
||||
printf("Build date: %s UTC (raw 0x%08x)\n", dev->build_date_str, dev->build_date);
|
||||
printf("Git hash: %08x\n", dev->git_hash);
|
||||
printf("Release info: %08x\n", dev->rel_info);
|
||||
mqnic_print_fw_id(dev);
|
||||
|
||||
printf("IF offset: 0x%08x\n", dev->if_offset);
|
||||
printf("IF count: %d\n", dev->if_count);
|
||||
|
@ -653,29 +653,7 @@ int main(int argc, char *argv[])
|
||||
printf("PCIe ID (device): %s\n", strrchr(pci_device_path, '/')+1);
|
||||
printf("PCIe ID (upstream port): %s\n", strrchr(pci_port_path, '/')+1);
|
||||
|
||||
uint32_t flash_format = 0;
|
||||
|
||||
uint8_t flash_configuration = 0;
|
||||
uint8_t flash_data_width = 0;
|
||||
uint8_t flash_default_segment = 0;
|
||||
uint8_t flash_fallback_segment = 0;
|
||||
uint32_t flash_segment0_length = 0;
|
||||
|
||||
printf("FPGA ID: 0x%08x\n", dev->fpga_id);
|
||||
printf("FPGA part: %s\n", dev->fpga_part);
|
||||
printf("FW ID: 0x%08x\n", dev->fw_id);
|
||||
printf("FW version: %d.%d.%d.%d\n", dev->fw_ver >> 24,
|
||||
(dev->fw_ver >> 16) & 0xff,
|
||||
(dev->fw_ver >> 8) & 0xff,
|
||||
dev->fw_ver & 0xff);
|
||||
printf("Board ID: 0x%08x\n", dev->board_id);
|
||||
printf("Board version: %d.%d.%d.%d\n", dev->board_ver >> 24,
|
||||
(dev->board_ver >> 16) & 0xff,
|
||||
(dev->board_ver >> 8) & 0xff,
|
||||
dev->board_ver & 0xff);
|
||||
printf("Build date: %s UTC (raw 0x%08x)\n", dev->build_date_str, dev->build_date);
|
||||
printf("Git hash: %08x\n", dev->git_hash);
|
||||
printf("Release info: %08x\n", dev->rel_info);
|
||||
mqnic_print_fw_id(dev);
|
||||
|
||||
if (dev->fpga_id == 0 || dev->fpga_id == 0xffffffff)
|
||||
{
|
||||
@ -684,6 +662,14 @@ int main(int argc, char *argv[])
|
||||
goto skip_flash;
|
||||
}
|
||||
|
||||
uint32_t flash_format = 0;
|
||||
|
||||
uint8_t flash_configuration = 0;
|
||||
uint8_t flash_data_width = 0;
|
||||
uint8_t flash_default_segment = 0;
|
||||
uint8_t flash_fallback_segment = 0;
|
||||
uint32_t flash_segment0_length = 0;
|
||||
|
||||
int bitswap = 0;
|
||||
int word_size = 8;
|
||||
int dual_qspi = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user