Commit 9baee415 authored by Hakan Jansson's avatar Hakan Jansson Committed by Luiz Augusto von Dentz

Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode

Always prevent trying to set device baudrate before calling setup() when
using autobaud mode.

This was previously happening for devices which had device specific data
with member no_early_set_baudrate set to 0.
Signed-off-by: default avatarHakan Jansson <hakan.jansson@infineon.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent f8cad620
...@@ -484,7 +484,7 @@ static int bcm_open(struct hci_uart *hu) ...@@ -484,7 +484,7 @@ static int bcm_open(struct hci_uart *hu)
/* If oper_speed is set, ldisc/serdev will set the baudrate /* If oper_speed is set, ldisc/serdev will set the baudrate
* before calling setup() * before calling setup()
*/ */
if (!bcm->dev->no_early_set_baudrate) if (!bcm->dev->no_early_set_baudrate && !bcm->dev->use_autobaud_mode)
hu->oper_speed = bcm->dev->oper_speed; hu->oper_speed = bcm->dev->oper_speed;
err = bcm_gpio_set_power(bcm->dev, true); err = bcm_gpio_set_power(bcm->dev, true);
...@@ -1204,9 +1204,6 @@ static int bcm_of_probe(struct bcm_device *bdev) ...@@ -1204,9 +1204,6 @@ static int bcm_of_probe(struct bcm_device *bdev)
{ {
bdev->use_autobaud_mode = device_property_read_bool(bdev->dev, bdev->use_autobaud_mode = device_property_read_bool(bdev->dev,
"brcm,requires-autobaud-mode"); "brcm,requires-autobaud-mode");
if (bdev->use_autobaud_mode)
bdev->no_early_set_baudrate = true;
device_property_read_u32(bdev->dev, "max-speed", &bdev->oper_speed); device_property_read_u32(bdev->dev, "max-speed", &bdev->oper_speed);
device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params", device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params",
bdev->pcm_int_params, 5); bdev->pcm_int_params, 5);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment