提交 99fba8e3 编写于 作者: V Venkata Lakshmi Narayana Gubba 提交者: Marcel Holtmann

Bluetooth: btqca: Moved extracting rom version info to common place

Moved extracting rom version info to common place as this code is
common in all if else ladder in qca_uart_setup.
Signed-off-by: NVenkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 ecf6b2d9
...@@ -546,24 +546,20 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, ...@@ -546,24 +546,20 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
config.user_baud_rate = baudrate; config.user_baud_rate = baudrate;
/* Firmware files to download are based on ROM version.
* ROM version is derived from last two bytes of soc_ver.
*/
rom_ver = ((soc_ver & 0x00000f00) >> 0x04) | (soc_ver & 0x0000000f);
/* Download rampatch file */ /* Download rampatch file */
config.type = TLV_TYPE_PATCH; config.type = TLV_TYPE_PATCH;
if (qca_is_wcn399x(soc_type)) { if (qca_is_wcn399x(soc_type)) {
/* Firmware files to download are based on ROM version.
* ROM version is derived from last two bytes of soc_ver.
*/
rom_ver = ((soc_ver & 0x00000f00) >> 0x04) |
(soc_ver & 0x0000000f);
snprintf(config.fwname, sizeof(config.fwname), snprintf(config.fwname, sizeof(config.fwname),
"qca/crbtfw%02x.tlv", rom_ver); "qca/crbtfw%02x.tlv", rom_ver);
} else if (soc_type == QCA_QCA6390) { } else if (soc_type == QCA_QCA6390) {
rom_ver = ((soc_ver & 0x00000f00) >> 0x04) |
(soc_ver & 0x0000000f);
snprintf(config.fwname, sizeof(config.fwname), snprintf(config.fwname, sizeof(config.fwname),
"qca/htbtfw%02x.tlv", rom_ver); "qca/htbtfw%02x.tlv", rom_ver);
} else if (soc_type == QCA_WCN6750) { } else if (soc_type == QCA_WCN6750) {
rom_ver = ((soc_ver & 0x00000f00) >> 0x04) |
(soc_ver & 0x0000000f);
/* Choose mbn file by default.If mbn file is not found /* Choose mbn file by default.If mbn file is not found
* then choose tlv file * then choose tlv file
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册