diff options
author | Steve Kondik <shade@chemlab.org> | 2013-07-05 10:40:01 -0700 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-07-05 10:40:01 -0700 |
commit | 6747b2697931fe6eb2b9f92b787be64f2f548690 (patch) | |
tree | 146be832f2148cb073e719101e132cd0f08b6395 /libbt/src/bt_vendor_brcm.c | |
parent | 201208b201b9dfe79d7469b73c1b48b6a3e8b21f (diff) | |
download | device_common-6747b2697931fe6eb2b9f92b787be64f2f548690.zip device_common-6747b2697931fe6eb2b9f92b787be64f2f548690.tar.gz device_common-6747b2697931fe6eb2b9f92b787be64f2f548690.tar.bz2 |
libbt: Add btlock support
* Concurrent WiFi/BT firmware loading can cause a chip crash.
* Kernel supports a btlock device which is a simple semaphore that can
protect from this situation.
* Add support in the Bluedroid vendor lib for this on the BT side, as
WiFi is already done directly in the kernel.
Change-Id: I8b9d3b1ccd06cc5d5528c7d6d685048c258d9887
Diffstat (limited to 'libbt/src/bt_vendor_brcm.c')
-rw-r--r-- | libbt/src/bt_vendor_brcm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libbt/src/bt_vendor_brcm.c b/libbt/src/bt_vendor_brcm.c index 9bd8922..eb9856d 100644 --- a/libbt/src/bt_vendor_brcm.c +++ b/libbt/src/bt_vendor_brcm.c @@ -53,6 +53,9 @@ void hw_lpm_set_wake_state(uint8_t wake_assert); void hw_sco_config(void); #endif void vnd_load_conf(const char *p_path); +#if (USE_AXI_BRIDGE_LOCK == TRUE) +void axi_bridge_lock(int locked); +#endif /****************************************************************************** ** Variables @@ -137,8 +140,12 @@ static int op(bt_vendor_opcode_t opcode, void *param) int *state = (int *) param; if (*state == BT_VND_PWR_OFF) upio_set_bluetooth_power(UPIO_BT_POWER_OFF); - else if (*state == BT_VND_PWR_ON) + else if (*state == BT_VND_PWR_ON) { +#if (USE_AXI_BRIDGE_LOCK == TRUE) + axi_bridge_lock(1); +#endif upio_set_bluetooth_power(UPIO_BT_POWER_ON); + } } break; |