On 04/17/2015 10:01 AM, Daniel Thompson wrote:
On 17/04/15 12:25, Jorge Ramirez-Ortiz wrote:
On 04/17/2015 04:37 AM, Daniel Thompson wrote:
On 17/04/15 02:58, Jorge Ramirez-Ortiz wrote:
On 04/16/2015 08:58 PM, Scott Bambrough wrote:
BT works, I get this on 258, 260 -- hadn't seen it before.
it means that BT is taken longer to initialize - ie: user space (UIM) is taking longer to run measured from the time the btwilink.ko is modprobed by udev.
Forgive my interfering but I'm not sure all this comes from userspace (although the cause could be in userspace).
please everyone more than welcome to interfere.
I had a look at the ti driver code earlier in the week and first four messages looked to me like a failure to get the TI device into firmware loading mode.
yes - well kind of.
when the driver is loaded, st_kim_start waits for the line discipline to be installed. [0]https://github.com/96boards/linux/blob/hikey/drivers/misc/ti-st/st_kim.c#L46...
the completion is waiting for is usermode opening the tty[1] and the completion being executed (from st_tty_open) [2] [1] https://github.com/96boards/uim/blob/master/uim.c#L289 [2] https://github.com/96boards/linux/blob/hikey/drivers/misc/ti-st/st_core.c#L7...
once opened, the line discipline is installed and the firmarware version present in the device is read at dhe default settings (115kbps) The driver reads "TIInit_11.8.32.bts" - meaning the that device is accessible and healthy.
After this has happened, usermode then takes control (UIM) and changes the baud rate command in the firmware to the value presented by the device tree to the user via sysfs. https://github.com/96boards/uim/blob/master/uim.c#L356
this is done by sending 0xFF36 opcode (see here): https://github.com/96boards/uim/blob/master/uim.c#L356
and I think this is pretty much what is happening.
Thanks for the detailed reply.
As you probably guessed I could see the tiny details but not the bigger picture. Your e-mail is very clear.
I had to review the BT stack a few months ago so I kind of remembered it a little. btw I am not saying there is not a problem somewhere: just that I dont think it is BT related and that the messages look OK.
However the fact that UIM is running late is probably not a good sign (since the UIM hasnt changed in a while it must be something else) if the problem continues to happen I can spend some time tracing it.