]> git.baikalelectronics.ru Git - uboot.git/commit
imx_common: detect USB serial downloader reliably
authorStefan Agner <stefan.agner@toradex.com>
Wed, 13 Sep 2017 21:29:45 +0000 (14:29 -0700)
committerStefano Babic <sbabic@denx.de>
Mon, 18 Sep 2017 15:15:22 +0000 (17:15 +0200)
commit050f43fa24de492ef4a0740871edfa52a30c8338
treea689d3da8a1e6d5cde2eda5b7355758211e96b74
parentcbd90f186be55b57b6fa03f98376a564d7ec52a5
imx_common: detect USB serial downloader reliably

The current mechanism using SCR/GPR registers work well when
the serial downloader boot mode has been selected explicitly
(either via boot mode pins or using bmode command). However,
in case the system entered boot ROM due to unbootable primary
boot devices (e.g. empty eMMC), the SPL fails to detect that
it has been downloaded through serial loader and tries to
continue booting from eMMC:
  Trying to boot from MMC1
  mmc_load_image_raw_sector: mmc block read error
  SPL: failed to boot from all boot devices
  ### ERROR ### Please RESET the board ###

The only known way to reliably detect USB serial downloader
is by checking the USB PHY receiver block power state...

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
arch/arm/mach-imx/spl.c