All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <dave.jones@canonical.com>
To: Bluetooth Kernel Mailing List <linux-bluetooth@vger.kernel.org>
Cc: Dave Jones <dave.jones@canonical.com>
Subject: [PATCH v1 3/3] hciattach: Enable loading BCM43xx firmware on RPi
Date: Fri, 18 Dec 2020 19:06:09 +0000	[thread overview]
Message-ID: <20201218190609.107898-4-dave.jones@canonical.com> (raw)
In-Reply-To: <20201218190609.107898-1-dave.jones@canonical.com>

Corrects the location of the firmware from /etc/firmware to
/lib/firmware, and disables setting the UART interface speed prior to
loading the firmware. An already existing later call to
bcm43xx_set_speed still sets the speed of the interface as requested.

For certain bluetooth devices, in particular that on the Raspberry Pi
400, setting the UART speed prior to loading the firmware causes the
firmware load to fail.

Signed-off-by: Dave Jones <dave.jones@canonical.com>
---
 tools/hciattach_bcm43xx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index dbb5a3fe3..ddf9b4037 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -31,7 +31,7 @@
 #include "hciattach.h"
 
 #ifndef FIRMWARE_DIR
-#define FIRMWARE_DIR "/etc/firmware"
+#define FIRMWARE_DIR "/lib/firmware"
 #endif
 
 #define FW_EXT ".hcd"
@@ -356,9 +356,6 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
 	if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
 		fprintf(stderr, "Patch not found, continue anyway\n");
 	} else {
-		if (bcm43xx_set_speed(fd, ti, speed))
-			return -1;
-
 		if (bcm43xx_load_firmware(fd, fw_path))
 			return -1;
 
-- 
2.27.0


      parent reply	other threads:[~2020-12-18 19:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 19:06 [PATCH v1 0/3] Support patches for Raspberry Pi boards Dave Jones
2020-12-18 19:06 ` [PATCH v1 1/3] hciattach: Add BCM43xx 3-wire variant Dave Jones
2020-12-18 19:37   ` Support patches for Raspberry Pi boards bluez.test.bot
2020-12-18 19:06 ` [PATCH v1 2/3] bdaddr: Treat Cypress devices as Broadcom Dave Jones
2020-12-18 19:06 ` Dave Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201218190609.107898-4-dave.jones@canonical.com \
    --to=dave.jones@canonical.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.