Skip to content
Snippets Groups Projects
Commit ecd85579 authored by Dileep Katta's avatar Dileep Katta Committed by Tom Rini
Browse files

fastboot: ARM: OMAP5: Enable reboot-bootloader

Implemented fb_set_reboot_flag() for OMAP5 to set
an environment variable 'dofastboot' when reboot-bootloader called.

This environment variable will be checked in boot command and fastboot
will be called if the variable is set.
If the bootcmd env variable of OMAP5 common is overwritten with board-specific
command, then these changes will not apply.

This was originally intended for DRA7 platform, but now applies to all OMAP5.

Ref:
http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=19da2e436e9806259cf1f4988b9e046ab256bf2c



Signed-off-by: default avatarAngela Stegmaier <angelabaker@ti.com>
Signed-off-by: default avatarDileep Katta <dileep.katta@linaro.org>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
[trini: Make it check for !CONFIG_ENV_IS_NOWHERE as we can't saveenv()
in that case]
Signed-off-by: default avatarTom Rini <trini@konsulko.com>
parent f12467d1
Branches
Tags
No related merge requests found
...@@ -162,3 +162,13 @@ void arch_preboot_os(void) ...@@ -162,3 +162,13 @@ void arch_preboot_os(void)
ahci_reset((void __iomem *)DWC_AHSATA_BASE); ahci_reset((void __iomem *)DWC_AHSATA_BASE);
} }
#endif #endif
#if defined(CONFIG_CMD_FASTBOOT) && !defined(CONFIG_ENV_IS_NOWHERE)
int fb_set_reboot_flag(void)
{
printf("Setting reboot to fastboot flag ...\n");
setenv("dofastboot", "1");
saveenv();
return 0;
}
#endif
...@@ -144,13 +144,20 @@ ...@@ -144,13 +144,20 @@
"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \ "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
DFUARGS \ DFUARGS \
#define CONFIG_BOOTCOMMAND \ #define CONFIG_BOOTCOMMAND \
"if test ${dofastboot} -eq 1; then " \
"echo Boot fastboot requested, resetting dofastboot ...;" \
"setenv dofastboot 0; saveenv;" \
"echo Booting into fastboot ...; fastboot;" \
"fi;" \
"run findfdt; " \ "run findfdt; " \
"run mmcboot;" \ "run mmcboot;" \
"setenv mmcdev 1; " \ "setenv mmcdev 1; " \
"setenv bootpart 1:2; " \ "setenv bootpart 1:2; " \
"setenv mmcroot /dev/mmcblk0p2 rw; " \ "setenv mmcroot /dev/mmcblk0p2 rw; " \
"run mmcboot;" \ "run mmcboot;" \
""
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment