Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 1 | From 96e5e5eef04c6c4ae83d4d822a536cfa87605ae2 Mon Sep 17 00:00:00 2001 |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 2 | From: Phil Elwell <phil@raspberrypi.org> |
| 3 | Date: Tue, 16 Feb 2016 16:39:09 +0000 |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 4 | Subject: [PATCH] bcm43xx: The UART speed must be reset after the firmware |
| 5 | download |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 6 | |
| 7 | --- |
| 8 | tools/hciattach_bcm43xx.c | 6 ++---- |
| 9 | 1 file changed, 2 insertions(+), 4 deletions(-) |
| 10 | |
| 11 | diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 12 | index b89fc1b50..de01a6aea 100644 |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 13 | --- a/tools/hciattach_bcm43xx.c |
| 14 | +++ b/tools/hciattach_bcm43xx.c |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 15 | @@ -350,11 +350,8 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti, |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 16 | return -1; |
| 17 | |
| 18 | if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) { |
| 19 | - fprintf(stderr, "Patch not found, continue anyway\n"); |
| 20 | + fprintf(stderr, "Patch not found for %s, continue anyway\n", chip_name); |
| 21 | } else { |
| 22 | - if (bcm43xx_set_speed(fd, ti, speed)) |
| 23 | - return -1; |
| 24 | - |
| 25 | if (bcm43xx_load_firmware(fd, fw_path)) |
| 26 | return -1; |
| 27 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 28 | @@ -364,6 +361,7 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti, |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 29 | return -1; |
| 30 | } |
| 31 | |
| 32 | + sleep(1); |
| 33 | if (bcm43xx_reset(fd)) |
| 34 | return -1; |
| 35 | } |