diff mbox series

[U-Boot,v4,11/14] ti: fastboot: Move weak overrides to board files

Message ID 1526395734-333-12-git-send-email-alex.kiernan@gmail.com
State Superseded
Delegated to: Joe Hershberger
Headers show
Series Add fastboot UDP support | expand

Commit Message

Alex Kiernan May 15, 2018, 2:48 p.m. UTC
Overriding fastboot_set_reboot_flag() in arch/arm/mach-omap2/boot-common.c
leaves it applying all boards that derive from this, not just the ones which
have support for Android bootloader flow. Move the weak function override to
the relevant board files.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

Changes in v4: None
Changes in v3:
- new

Changes in v2: None

 arch/arm/mach-omap2/boot-common.c | 10 ----------
 board/ti/am57xx/board.c           | 10 ++++++++++
 board/ti/dra7xx/evm.c             | 10 ++++++++++
 3 files changed, 20 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index b22b671..d4a1e2e 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -236,13 +236,3 @@  void arch_preboot_os(void)
 	ahci_reset((void __iomem *)DWC_AHSATA_BASE);
 }
 #endif
-
-#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE)
-int fastboot_set_reboot_flag(void)
-{
-	printf("Setting reboot to fastboot flag ...\n");
-	env_set("dofastboot", "1");
-	env_save();
-	return 0;
-}
-#endif
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index fd9d207..177a324 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -1178,5 +1178,15 @@  void board_tee_image_process(ulong tee_image, size_t tee_size)
 	secure_tee_install((u32)tee_image);
 }
 
+#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE)
+int fastboot_set_reboot_flag(void)
+{
+	printf("Setting reboot to fastboot flag ...\n");
+	env_set("dofastboot", "1");
+	env_save();
+	return 0;
+}
+#endif
+
 U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TEE, board_tee_image_process);
 #endif
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 6918f4d..bbe5445 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -1188,5 +1188,15 @@  void board_tee_image_process(ulong tee_image, size_t tee_size)
 	secure_tee_install((u32)tee_image);
 }
 
+#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE)
+int fastboot_set_reboot_flag(void)
+{
+	printf("Setting reboot to fastboot flag ...\n");
+	env_set("dofastboot", "1");
+	env_save();
+	return 0;
+}
+#endif
+
 U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TEE, board_tee_image_process);
 #endif