summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorJun Zhu <junzhu@nxp.com>2017-06-29 10:14:55 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-06 14:38:14 +0100
commit1b09ea369054489de6dd33e1228603679676f050 (patch)
tree82f4f19b8677160ab98d18e69d7bfbe7bff0b5ab /meta/recipes-connectivity
parent5422b0cc38c33bd995e8aca606ef97639e056d5c (diff)
downloadpoky-1b09ea369054489de6dd33e1228603679676f050.tar.gz
bluez: Correct the timer count for bcm43xx firmware download
bcm43xx failed as time out for firmware downloading. The root cause is that it need wait 50ms to download firmware, but the value of 50us is set to the timer. (From OE-Core rev: bb8bc17ab8d71e3a30e2f0b655c42434dd968ea4) Signed-off-by: Jun Zhu <junzhu@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5.inc1
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch36
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index f267c6626d..bf1b1ca251 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -49,6 +49,7 @@ SRC_URI = "\
49 file://run-ptest \ 49 file://run-ptest \
50 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ 50 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
51 file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ 51 file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
52 file://0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch \
52" 53"
53S = "${WORKDIR}/bluez-${PV}" 54S = "${WORKDIR}/bluez-${PV}"
54 55
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch
new file mode 100644
index 0000000000..7bd5bbcbbb
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5/0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch
@@ -0,0 +1,36 @@
1From 3b341fb421ef61db7782bf1314ec693828467de9 Mon Sep 17 00:00:00 2001
2From: Andy Duan <fugang.duan@nxp.com>
3Date: Wed, 23 Nov 2016 17:12:12 +0800
4Subject: [PATCH] hciattach: bcm43xx: fix the delay timer for firmware download
5
6From the log in .bcm43xx_load_firmware():
7 /* Wait 50ms to let the firmware placed in download mode */
8 nanosleep(&tm_mode, NULL);
9
10But timespec tm_mode is real is 50us. Correct the delayed timer count.
11
12Upstream-Status: Pending
13
14Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
15---
16 tools/hciattach_bcm43xx.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
20index 81f38cb..ac1b3c1 100644
21--- a/tools/hciattach_bcm43xx.c
22+++ b/tools/hciattach_bcm43xx.c
23@@ -228,8 +228,8 @@ static int bcm43xx_set_speed(int fd, struct termios *ti, uint32_t speed)
24 static int bcm43xx_load_firmware(int fd, const char *fw)
25 {
26 unsigned char cmd[] = { HCI_COMMAND_PKT, 0x2e, 0xfc, 0x00 };
27- struct timespec tm_mode = { 0, 50000 };
28- struct timespec tm_ready = { 0, 2000000 };
29+ struct timespec tm_mode = { 0, 50000000 };
30+ struct timespec tm_ready = { 0, 200000000 };
31 unsigned char resp[CC_MIN_SIZE];
32 unsigned char tx_buf[1024];
33 int len, fd_fw, n;
34--
351.9.1
36