[PATCH v2] ARM: i.MX6: boot: detect USB serial downloader more reliable

Sascha Hauer sha at pengutronix.de
Tue Aug 17 21:51:31 PDT 2021


On Thu, Aug 12, 2021 at 10:36:51AM +0200, Marco Felsch wrote:
> The problem with the BootROM is that the SRC registers are not set
> accordingly in case of a failed primary boot. E.g. if the device is
> configured to boot from an eMMC and the eMMC is empty or image is
> corrupt, the BootROM goes into 'recovery boot mode' (reference manual
> Figure 8-1) and the last possible recovery option is the serial
> downloader. In such case the SRC registers still indicate that the
> device was booted from an eMMC instead of serial-download.
> 
> This commit ports the U-Boot commit [1] with slightly adaptions suggested
> by Ahmad to Barebox. Also we need to reorder the imx6_init() else we
> reset the otg-controller to early.
> 
> [1] https://source.denx.de/u-boot/u-boot/-/commit/e203dcf23e9eabc2e4f3d0b079457cd1516f2081
> 
> Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
> Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
>  arch/arm/mach-imx/boot.c  | 27 +++++++++++++++++++++++++++
>  arch/arm/mach-imx/imx6.c  |  9 +++++++--
>  include/soc/fsl/fsl_udc.h | 11 +++++++++++
>  3 files changed, 45 insertions(+), 2 deletions(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list