commit | 47e5aa312712b2085d71174674613e4e9d2311e5 | [log] [tgz] |
---|---|---|
author | Paul Kocialkowski <contact@paulk.fr> | Sat Jul 04 16:46:16 2015 +0200 |
committer | David Pursell <dpursell@google.com> | Tue Jan 07 12:51:36 2025 -0800 |
tree | 1ed471d1f2ae1d91e51dc4664896ad6de30ddeb5 | |
parent | 9caaf499895700cd21c2df92a2780cb332d285cc [diff] |
usb: gadget: fastboot: Dequeue the previous IN request for the current request Recent versions of the fastboot tool will query the partition type before doing an operation on a partition (such as erase, flash, etc). It will then submit the operation as soon as the response for the partition type is received. Usually, the MUSB controller will see that the partition type request return status was read by the host at the very same time as the actual operation request is submitted by the host. However, the operation will be read first (int_rx is handled first in musb_interrupt) and after it is completed, the fastboot USB gadget driver will send another return status. Hence, this happens before the musb gadget framework has had a chance to handle the previous acknowledgement that the host read the return status and dequeue the request. The host will then usually empty the FIFO by the time musb_interrupt gets around handling the return status acknowledgement (for the previous request, this is still on the same musb_interrupt call), so no other interrupt is generated and the most recent return status acknowledgement remains unaccounted for. It will then be used as a response for the next command, and the proper response for it will be delayed to the next command, and so on. Dequeuing the previous IN request in the fastboot code ensures that no previous return status remains. It is acceptable to do it since there is no callback to it anyways. --- This patch was sourced from https://github.com/u-boot/u-boot/commit/bc9071c9f318aa69c815927b3828096d1976de1b. Bug: 374762462 Change-Id: Id53140e095c2e274aa6a70ab42ebefeb68228e1a Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://turquoise-internal-review.googlesource.com/c/third_party/u-boot/+/923363 Reviewed-by: David Pursell <dpursell@google.com> GitOrigin-RevId: 7963bb3826b86b0192a024876a33d3a62dc18c7e
This is a version of u-boot, modified to support Fuchsia on the Khadas vim3
To build the vim3 bootloader for Fuchsia:
Prerequisites - arm and aarch64 toolchains. On Debian/Ubuntu systems, for example:
apt-get install gcc-arm-none-eabi gcc-aarch64-linux-gnu
Run the build script from repo root
./build_uboot_vim3_zircon.sh
You now have a build/u-boot.bin.unsigned
that you can flash to a target using fastboot.