btqca.c (91de76e661a266731fc2889a398ad1694df9d523) | btqca.c (2064ee332e4c1b7495cf68b84355c213d8fe71fd) |
---|---|
1/* 2 * Bluetooth supports for Qualcomm Atheros chips 3 * 4 * Copyright (c) 2015 The Linux Foundation. All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 8 * as published by the Free Software Foundation --- 273 unchanged lines hidden (view full) --- 282} 283 284static int rome_download_firmware(struct hci_dev *hdev, 285 struct rome_config *config) 286{ 287 const struct firmware *fw; 288 int ret; 289 | 1/* 2 * Bluetooth supports for Qualcomm Atheros chips 3 * 4 * Copyright (c) 2015 The Linux Foundation. All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 8 * as published by the Free Software Foundation --- 273 unchanged lines hidden (view full) --- 282} 283 284static int rome_download_firmware(struct hci_dev *hdev, 285 struct rome_config *config) 286{ 287 const struct firmware *fw; 288 int ret; 289 |
290 BT_INFO("%s: ROME Downloading %s", hdev->name, config->fwname); | 290 bt_dev_info(hdev, "ROME Downloading %s", config->fwname); |
291 292 ret = request_firmware(&fw, config->fwname, &hdev->dev); 293 if (ret) { 294 BT_ERR("%s: Failed to request file: %s (%d)", hdev->name, 295 config->fwname, ret); 296 return ret; 297 } 298 --- 47 unchanged lines hidden (view full) --- 346 347 /* Get ROME version information */ 348 err = rome_patch_ver_req(hdev, &rome_ver); 349 if (err < 0 || rome_ver == 0) { 350 BT_ERR("%s: Failed to get version 0x%x", hdev->name, err); 351 return err; 352 } 353 | 291 292 ret = request_firmware(&fw, config->fwname, &hdev->dev); 293 if (ret) { 294 BT_ERR("%s: Failed to request file: %s (%d)", hdev->name, 295 config->fwname, ret); 296 return ret; 297 } 298 --- 47 unchanged lines hidden (view full) --- 346 347 /* Get ROME version information */ 348 err = rome_patch_ver_req(hdev, &rome_ver); 349 if (err < 0 || rome_ver == 0) { 350 BT_ERR("%s: Failed to get version 0x%x", hdev->name, err); 351 return err; 352 } 353 |
354 BT_INFO("%s: ROME controller version 0x%08x", hdev->name, rome_ver); | 354 bt_dev_info(hdev, "ROME controller version 0x%08x", rome_ver); |
355 356 /* Download rampatch file */ 357 config.type = TLV_TYPE_PATCH; 358 snprintf(config.fwname, sizeof(config.fwname), "qca/rampatch_%08x.bin", 359 rome_ver); 360 err = rome_download_firmware(hdev, &config); 361 if (err < 0) { 362 BT_ERR("%s: Failed to download patch (%d)", hdev->name, err); --- 12 unchanged lines hidden (view full) --- 375 376 /* Perform HCI reset */ 377 err = rome_reset(hdev); 378 if (err < 0) { 379 BT_ERR("%s: Failed to run HCI_RESET (%d)", hdev->name, err); 380 return err; 381 } 382 | 355 356 /* Download rampatch file */ 357 config.type = TLV_TYPE_PATCH; 358 snprintf(config.fwname, sizeof(config.fwname), "qca/rampatch_%08x.bin", 359 rome_ver); 360 err = rome_download_firmware(hdev, &config); 361 if (err < 0) { 362 BT_ERR("%s: Failed to download patch (%d)", hdev->name, err); --- 12 unchanged lines hidden (view full) --- 375 376 /* Perform HCI reset */ 377 err = rome_reset(hdev); 378 if (err < 0) { 379 BT_ERR("%s: Failed to run HCI_RESET (%d)", hdev->name, err); 380 return err; 381 } 382 |
383 BT_INFO("%s: ROME setup on UART is completed", hdev->name); | 383 bt_dev_info(hdev, "ROME setup on UART is completed"); |
384 385 return 0; 386} 387EXPORT_SYMBOL_GPL(qca_uart_setup_rome); 388 389MODULE_AUTHOR("Ben Young Tae Kim <ytkim@qca.qualcomm.com>"); 390MODULE_DESCRIPTION("Bluetooth support for Qualcomm Atheros family ver " VERSION); 391MODULE_VERSION(VERSION); 392MODULE_LICENSE("GPL"); | 384 385 return 0; 386} 387EXPORT_SYMBOL_GPL(qca_uart_setup_rome); 388 389MODULE_AUTHOR("Ben Young Tae Kim <ytkim@qca.qualcomm.com>"); 390MODULE_DESCRIPTION("Bluetooth support for Qualcomm Atheros family ver " VERSION); 391MODULE_VERSION(VERSION); 392MODULE_LICENSE("GPL"); |