[U-Boot] ARM: sama5d2: Implement boot device autodetection

Andreas Bießmann andreas at biessmann.org
Tue May 3 13:38:36 CEST 2016


Dear Marek Vasut,

Marek Vasut <marex at denx.de> writes:
>Implement support for saving ARM register R4 early during boot using
>save_boot_params . Implement support for decoding the stored register
>R4 value in spl_boot_device() to obtain boot device from which the
>SoC booted. This way, the SPL will always load U-Boot from the same
>device from which the SPL itself booted instead of using hard-coded
>boot device.
>
>This functionality is useful for example when booting sama5d2-xplained
>from SD card, where by default the SPL would try loading the U-Boot
>from eMMC and fail. This is because eMMC is on SDHCI0 (BOOT_DEVICE_MMC1),
>while SD slot is on SDHCI1 (BOOT_DEVICE_MMC2) and the SPL was hard-wired
>to always boot from BOOT_DEVICE_MMC1.
>
>Signed-off-by: Marek Vasut <marex at denx.de>
>Cc: Andreas Bießmann <andreas.devel at googlemail.com>
>Cc: Wenyou Yang <wenyou.yang at atmel.com>
>Reviewed-by: Andreas Bießmann <andreas at biessmann.org>
>---
> arch/arm/mach-at91/Makefile               |  2 +-
> arch/arm/mach-at91/bootparams_atmel.S     | 18 ++++++++++++++++
> arch/arm/mach-at91/include/mach/sama5d2.h | 12 +++++++++++
> arch/arm/mach-at91/spl.c                  | 36 +++++++++++++++++++++++++++++++
> 4 files changed, 67 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm/mach-at91/bootparams_atmel.S

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann


More information about the U-Boot mailing list