Commit 3e063518 authored by Chris Lu's avatar Chris Lu Committed by Luiz Augusto von Dentz

Bluetooth: btmtk: add printing firmware information

Add printing firmware information part when driver loading firmware that
user can get mediatek bluetooth information.
Co-developed-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarChris Lu <chris.lu@mediatek.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent bb925bf9
...@@ -57,6 +57,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname, ...@@ -57,6 +57,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
wmt_cmd_sync_func_t wmt_cmd_sync) wmt_cmd_sync_func_t wmt_cmd_sync)
{ {
struct btmtk_hci_wmt_params wmt_params; struct btmtk_hci_wmt_params wmt_params;
struct btmtk_patch_header *hdr;
struct btmtk_global_desc *globaldesc = NULL; struct btmtk_global_desc *globaldesc = NULL;
struct btmtk_section_map *sectionmap; struct btmtk_section_map *sectionmap;
const struct firmware *fw; const struct firmware *fw;
...@@ -75,9 +76,13 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname, ...@@ -75,9 +76,13 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
fw_ptr = fw->data; fw_ptr = fw->data;
fw_bin_ptr = fw_ptr; fw_bin_ptr = fw_ptr;
hdr = (struct btmtk_patch_header *)fw_ptr;
globaldesc = (struct btmtk_global_desc *)(fw_ptr + MTK_FW_ROM_PATCH_HEADER_SIZE); globaldesc = (struct btmtk_global_desc *)(fw_ptr + MTK_FW_ROM_PATCH_HEADER_SIZE);
section_num = le32_to_cpu(globaldesc->section_num); section_num = le32_to_cpu(globaldesc->section_num);
bt_dev_info(hdev, "HW/SW Version: 0x%04x%04x, Build Time: %s",
le16_to_cpu(hdr->hwver), le16_to_cpu(hdr->swver), hdr->datetime);
for (i = 0; i < section_num; i++) { for (i = 0; i < section_num; i++) {
first_block = 1; first_block = 1;
fw_ptr = fw_bin_ptr; fw_ptr = fw_bin_ptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment