All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Kiernan <alex.kiernan@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 11/13] ti: fastboot: Move weak overrides to board files
Date: Mon, 14 May 2018 09:09:06 +0000	[thread overview]
Message-ID: <1526288948-24977-12-git-send-email-alex.kiernan@gmail.com> (raw)
In-Reply-To: <1526288948-24977-1-git-send-email-alex.kiernan@gmail.com>

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>
---

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 --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
-- 
2.7.4

  parent reply	other threads:[~2018-05-14  9:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14  9:08 [U-Boot] [PATCH v3 00/13] Add fastboot UDP support Alex Kiernan
2018-05-14  9:08 ` [U-Boot] [PATCH v3 01/13] fastboot: Move fastboot to drivers/fastboot Alex Kiernan
2018-05-14  9:08 ` [U-Boot] [PATCH v3 02/13] fastboot: Switch dependencies on FASTBOOT to USB_FUNCTION_FASTBOOT Alex Kiernan
2018-05-14  9:08 ` [U-Boot] [PATCH v3 03/13] fastboot: Refactor fastboot_okay/fail to take response Alex Kiernan
2018-05-14  9:08 ` [U-Boot] [PATCH v3 04/13] fastboot: Extract fastboot_okay/fail to fb_common.c Alex Kiernan
2018-05-14  9:09 ` [U-Boot] [PATCH v3 05/13] fastboot: Correct dependencies in FASTBOOT_FLASH Alex Kiernan
2018-05-14  9:09 ` [U-Boot] [PATCH v3 06/13] fastboot: Add missing newlines Alex Kiernan
2018-05-14  9:09 ` [U-Boot] [PATCH v3 07/13] fastboot: Remove FIXME for CONFIG_FASTBOOT_...NAME Alex Kiernan
2018-05-14 19:52   ` Simon Glass
2018-05-14  9:09 ` [U-Boot] [PATCH v3 08/13] fastboot: Fix parameter types in _fb_nand_write Alex Kiernan
2018-05-14 19:52   ` Simon Glass
2018-05-14  9:09 ` [U-Boot] [PATCH v3 09/13] fastboot: Rename fb_set_reboot_flag to fastboot_set_reboot_flag Alex Kiernan
2018-05-14 19:52   ` Simon Glass
2018-05-14  9:09 ` [U-Boot] [PATCH v3 10/13] fastboot: Extract common definitions from USB fastboot Alex Kiernan
2018-05-14 19:52   ` Simon Glass
2018-05-14 20:39     ` Alex Kiernan
2018-05-14  9:09 ` Alex Kiernan [this message]
2018-05-14 19:53   ` [U-Boot] [PATCH v3 11/13] ti: fastboot: Move weak overrides to board files Simon Glass
2018-05-14  9:09 ` [U-Boot] [PATCH v3 12/13] fs: Add fs_get_type_name to return current filesystem name Alex Kiernan
2018-05-14 19:53   ` Simon Glass
2018-05-14  9:09 ` [U-Boot] [PATCH v3 13/13] net: fastboot: Merge AOSP UDP fastboot Alex Kiernan
2018-05-14 19:53   ` Simon Glass
2018-05-14 21:11     ` Alex Kiernan
2018-05-15 16:05       ` Simon Glass
2018-05-16 15:37         ` Alex Kiernan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1526288948-24977-12-git-send-email-alex.kiernan@gmail.com \
    --to=alex.kiernan@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.