]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Bluetooth: hci_bcm: Fix RTS handling during startup
authorStefan Wahren <wahrenst@gmx.net>
Sun, 6 Oct 2019 15:28:19 +0000 (17:28 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 21 Oct 2019 15:05:14 +0000 (17:05 +0200)
The RPi 4 uses the hardware handshake lines for CYW43455, but the chip
doesn't react to HCI requests during DT probe. The reason is the inproper
handling of the RTS line during startup. According to the startup
signaling sequence in the CYW43455 datasheet, the hosts RTS line must
be driven after BT_REG_ON and BT_HOST_WAKE.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c

index 7646636f2d183d5c38cdf8d5412afd2373d9886d..0f73f6a686cb791b77f1ba9e495fbd4bc4426171 100644 (file)
@@ -445,9 +445,11 @@ static int bcm_open(struct hci_uart *hu)
 
 out:
        if (bcm->dev) {
+               hci_uart_set_flow_control(hu, true);
                hu->init_speed = bcm->dev->init_speed;
                hu->oper_speed = bcm->dev->oper_speed;
                err = bcm_gpio_set_power(bcm->dev, true);
+               hci_uart_set_flow_control(hu, false);
                if (err)
                        goto err_unset_hu;
        }