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>
This commit is contained in:

committed by
Marcel Holtmann

parent
ba493d4fbc
commit
aadebac463
@@ -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);
|
||||
|
Reference in New Issue
Block a user