* [Buildroot] [PATCH 1/2] bluez5_utils: define FIRMWARE_DIR for hciattach_bcm43xx
@ 2017-08-31 9:49 Jörg Krause
2017-08-31 9:49 ` [Buildroot] [PATCH 2/2] bluez5_utils: add upstream patch to fix timeout issue with fw download Jörg Krause
0 siblings, 1 reply; 4+ messages in thread
From: Jörg Krause @ 2017-08-31 9:49 UTC (permalink / raw)
To: buildroot
The tool hciattach_bcm43xx defines the default firmware path in `/etc/firmware`,
but the Broadcom firmware blobs are usually stored in `/lib/firmware`.
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
package/bluez5_utils/bluez5_utils.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk
index 13658cd050..af3dfbe38d 100644
--- a/package/bluez5_utils/bluez5_utils.mk
+++ b/package/bluez5_utils/bluez5_utils.mk
@@ -80,6 +80,10 @@ define BLUEZ5_UTILS_INSTALL_GATTTOOL
$(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool
endef
BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL
+# hciattach_bcm43xx defines default firmware path in `/etc/firmware`, but
+# Broadcom firmware blobs are usually located in `/lib/firmware`.
+BLUEZ5_UTILS_CONF_ENV += \
+ CPPFLAGS='$(TARGET_CPPFLAGS) -DFIRMWARE_DIR=\"/lib/firmware\"'
BLUEZ5_UTILS_CONF_OPTS += --enable-deprecated
else
BLUEZ5_UTILS_CONF_OPTS += --disable-deprecated
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] bluez5_utils: add upstream patch to fix timeout issue with fw download
2017-08-31 9:49 [Buildroot] [PATCH 1/2] bluez5_utils: define FIRMWARE_DIR for hciattach_bcm43xx Jörg Krause
@ 2017-08-31 9:49 ` Jörg Krause
2017-09-16 8:44 ` Bernd Kuhls
0 siblings, 1 reply; 4+ messages in thread
From: Jörg Krause @ 2017-08-31 9:49 UTC (permalink / raw)
To: buildroot
Add upstream patch [1] for the hciattach tool to fix timeout issue when
downloading firmware to Broadcom bluetooth chips.
[1] https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=76255f732d68aef2b90d36d9c7be51a9e1739ce7
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
...cm43xx-fix-the-delay-timer-for-firmware-d.patch | 38 ++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 package/bluez5_utils/0002-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch
diff --git a/package/bluez5_utils/0002-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch b/package/bluez5_utils/0002-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch
new file mode 100644
index 0000000000..2802510b98
--- /dev/null
+++ b/package/bluez5_utils/0002-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch
@@ -0,0 +1,38 @@
+From 3b341fb421ef61db7782bf1314ec693828467de9 Mon Sep 17 00:00:00 2001
+From: Andy Duan <fugang.duan@nxp.com>
+Date: Wed, 23 Nov 2016 17:12:12 +0800
+Subject: [PATCH] hciattach: bcm43xx: fix the delay timer for firmware download
+
+From the log in .bcm43xx_load_firmware():
+ /* Wait 50ms to let the firmware placed in download mode */
+ nanosleep(&tm_mode, NULL);
+
+But timespec tm_mode is real is 50us. Correct the delayed timer count.
+
+Backported from:
+https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=76255f732d68aef2b90d36d9c7be51a9e1739ce7
+
+Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
+Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
+---
+ tools/hciattach_bcm43xx.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
+index 81f38cb..ac1b3c1 100644
+--- a/tools/hciattach_bcm43xx.c
++++ b/tools/hciattach_bcm43xx.c
+@@ -228,8 +228,8 @@ static int bcm43xx_set_speed(int fd, struct termios *ti, uint32_t speed)
+ static int bcm43xx_load_firmware(int fd, const char *fw)
+ {
+ unsigned char cmd[] = { HCI_COMMAND_PKT, 0x2e, 0xfc, 0x00 };
+- struct timespec tm_mode = { 0, 50000 };
+- struct timespec tm_ready = { 0, 2000000 };
++ struct timespec tm_mode = { 0, 50000000 };
++ struct timespec tm_ready = { 0, 200000000 };
+ unsigned char resp[CC_MIN_SIZE];
+ unsigned char tx_buf[1024];
+ int len, fd_fw, n;
+--
+1.9.1
+
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] bluez5_utils: add upstream patch to fix timeout issue with fw download
2017-08-31 9:49 ` [Buildroot] [PATCH 2/2] bluez5_utils: add upstream patch to fix timeout issue with fw download Jörg Krause
@ 2017-09-16 8:44 ` Bernd Kuhls
2017-10-22 14:55 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Bernd Kuhls @ 2017-09-16 8:44 UTC (permalink / raw)
To: buildroot
Am Thu, 31 Aug 2017 11:49:32 +0200 schrieb J?rg Krause:
> Add upstream patch [1] for the hciattach tool to fix timeout issue when
> downloading firmware to Broadcom bluetooth chips.
>
> [1]
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?
id=76255f732d68aef2b90d36d9c7be51a9e1739ce7
Hi,
this patch was is included in upstream release 5.47 and can be marked as
superseded by this patch: http://patchwork.ozlabs.org/patch/814482/
Regards, Bernd
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] bluez5_utils: add upstream patch to fix timeout issue with fw download
2017-09-16 8:44 ` Bernd Kuhls
@ 2017-10-22 14:55 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-10-22 14:55 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 16 Sep 2017 10:44:20 +0200, Bernd Kuhls wrote:
> > Add upstream patch [1] for the hciattach tool to fix timeout issue when
> > downloading firmware to Broadcom bluetooth chips.
> >
> > [1]
> > https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?
> id=76255f732d68aef2b90d36d9c7be51a9e1739ce7
>
> Hi,
>
> this patch was is included in upstream release 5.47 and can be marked as
> superseded by this patch: http://patchwork.ozlabs.org/patch/814482/
Thanks, I've marked J?rg's patch as Superseded.
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-22 14:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 9:49 [Buildroot] [PATCH 1/2] bluez5_utils: define FIRMWARE_DIR for hciattach_bcm43xx Jörg Krause
2017-08-31 9:49 ` [Buildroot] [PATCH 2/2] bluez5_utils: add upstream patch to fix timeout issue with fw download Jörg Krause
2017-09-16 8:44 ` Bernd Kuhls
2017-10-22 14:55 ` Thomas Petazzoni
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.