summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_qca.c
diff options
context:
space:
mode:
authorBalakrishna Godavarthi <bgodavar@codeaurora.org>2018-08-03 15:16:28 +0300
committerMarcel Holtmann <marcel@holtmann.org>2018-08-03 15:44:06 +0300
commitaadebac4639d84ee51a12f2a1706fea1e4760b81 (patch)
treeab3d8140bce8bdd12c66bdf348ecc090e24ea880 /drivers/bluetooth/hci_qca.c
parentba493d4fbcb84bd14842c61cc077ffb5b3f7ecb1 (diff)
downloadlinux-aadebac4639d84ee51a12f2a1706fea1e4760b81.tar.xz
Bluetooth: btqca: Redefine qca_uart_setup() to generic function.
Redefinition of qca_uart_setup will help future Qualcomm Bluetooth SoC, to use the same function instead of duplicating the function. Added new arguments soc_type and soc_ver to the functions. These arguments will help to decide type of firmware files to be loaded into Bluetooth chip. soc_type holds the Bluetooth chip connected to APPS processor. soc_ver holds the Bluetooth chip version. Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_qca.c')
-rw-r--r--drivers/bluetooth/hci_qca.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 59d9953011a5..6bc8cfb982a9 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -929,6 +929,7 @@ static int qca_setup(struct hci_uart *hu)
struct qca_data *qca = hu->priv;
unsigned int speed, qca_baudrate = QCA_BAUDRATE_115200;
int ret;
+ int soc_ver = 0;
bt_dev_info(hdev, "ROME setup");
@@ -965,8 +966,15 @@ static int qca_setup(struct hci_uart *hu)
host_set_baudrate(hu, speed);
}
+ /* Get QCA version information */
+ ret = qca_read_soc_version(hdev, &soc_ver);
+ if (ret)
+ return ret;
+
+ bt_dev_info(hdev, "QCA controller version 0x%08x", soc_ver);
+
/* Setup patch / NVM configurations */
- ret = qca_uart_setup(hdev, qca_baudrate);
+ ret = qca_uart_setup(hdev, qca_baudrate, QCA_ROME, soc_ver);
if (!ret) {
set_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags);
qca_debugfs_init(hdev);