mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/2] ARM: i.MX: bbu: fix i.MX9 eMMC boot bbu handler
Date: Thu,  8 Feb 2024 08:52:17 +0100	[thread overview]
Message-ID: <20240208075217.697668-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20240208075217.697668-1-s.hauer@pengutronix.de>

The i.MX9 eMMC boot bbu handler does not work currently, because the
code expects a i.MX image which is not what we need on i.MX9.
The code is also full of i.MX image specific quirks which we don't need
on i.MX9, so use the just created
imx_bbu_internal_mmcboot_register_handler() for i.MX9.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/imx-bbu-internal.c |  5 -----
 include/mach/imx/bbu.h               | 16 +++++++---------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-imx/imx-bbu-internal.c b/arch/arm/mach-imx/imx-bbu-internal.c
index e26317e8bf..8cdaab5c16 100644
--- a/arch/arm/mach-imx/imx-bbu-internal.c
+++ b/arch/arm/mach-imx/imx-bbu-internal.c
@@ -617,11 +617,6 @@ int imx8m_bbu_internal_mmcboot_register_handler(const char *name,
 						 unsigned long flags)
 	__alias(imx_bbu_internal_mmcboot_register_handler);
 
-int imx9_bbu_internal_mmcboot_register_handler(const char *name,
-						 const char *devicefile,
-						 unsigned long flags)
-	__alias(imx_bbu_internal_mmcboot_register_handler);
-
 /*
  * Register an i.MX53 internal boot update handler for i2c/spi
  * EEPROMs / flashes. Nearly the same as MMC/SD, but we do not need to
diff --git a/include/mach/imx/bbu.h b/include/mach/imx/bbu.h
index f6397a9dd7..9a35b0074d 100644
--- a/include/mach/imx/bbu.h
+++ b/include/mach/imx/bbu.h
@@ -82,8 +82,6 @@ int imx8m_bbu_internal_mmc_register_handler(const char *name, const char *device
 					    unsigned long flags);
 int imx8m_bbu_internal_mmcboot_register_handler(const char *name, const char *devicefile,
 						unsigned long flags);
-int imx9_bbu_internal_mmcboot_register_handler(const char *name, const char *devicefile,
-					       unsigned long flags);
 
 int imx_bbu_external_nor_register_handler(const char *name, const char *devicefile,
 		unsigned long flags);
@@ -184,13 +182,6 @@ static inline int imx8m_bbu_internal_mmcboot_register_handler(const char *name,
 	return -ENOSYS;
 }
 
-static inline int imx9_bbu_internal_mmcboot_register_handler(const char *name,
-							      const char *devicefile,
-							      unsigned long flags)
-{
-	return -ENOSYS;
-}
-
 static inline int imx_bbu_external_nor_register_handler(const char *name, const char *devicefile,
 		unsigned long flags)
 {
@@ -231,4 +222,11 @@ static inline int imx_bbu_external_nand_register_handler(const char *name, const
 }
 #endif
 
+static inline int imx9_bbu_internal_mmcboot_register_handler(const char *name,
+							      const char *devicefile,
+							      unsigned long flags)
+{
+	return bbu_mmcboot_register_handler(name, devicefile, flags);
+}
+
 #endif /* __MACH_IMX_BBU_H */
-- 
2.39.2




  reply	other threads:[~2024-02-08  7:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08  7:52 [PATCH 1/2] bbu: create a standard bbu handler for eMMC boot Sascha Hauer
2024-02-08  7:52 ` Sascha Hauer [this message]
2024-02-09 12:34 ` Sascha Hauer

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=20240208075217.697668-2-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox