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 18/25] ARM: i.MX: romapi: rename functions to *romapi*
Date: Fri, 10 Nov 2023 13:57:53 +0100	[thread overview]
Message-ID: <20231110125800.1901232-19-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20231110125800.1901232-1-s.hauer@pengutronix.de>

The file the romapi is implemented in is named romapi and that's also
the name the i.MX ROM API is normally referred to, so rename the
functions accordingly.
While at it, rename some internal functions from imx8m_* to imx_* as
they can and will also be used by upcoming i.MX9 support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/atf.c    |  4 ++--
 arch/arm/mach-imx/romapi.c | 14 +++++++-------
 include/mach/imx/romapi.h  |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-imx/atf.c b/arch/arm/mach-imx/atf.c
index d6d1aa3d68..1a0ac72fff 100644
--- a/arch/arm/mach-imx/atf.c
+++ b/arch/arm/mach-imx/atf.c
@@ -157,7 +157,7 @@ void imx8mp_load_bl33(void *bl33)
 		imx8mp_esdhc_load_image(instance, false);
 		break;
 	case BOOTSOURCE_SERIAL:
-		imx8mp_bootrom_load_image();
+		imx8mp_romapi_load_image();
 		break;
 	case BOOTSOURCE_SPI:
 		imx8mp_qspi_load_image(instance, false);
@@ -221,7 +221,7 @@ void imx8mn_load_bl33(void *bl33)
 		imx8mn_esdhc_load_image(instance, false);
 		break;
 	case BOOTSOURCE_SERIAL:
-		imx8mn_bootrom_load_image();
+		imx8mn_romapi_load_image();
 		break;
 	case BOOTSOURCE_SPI:
 		imx8mn_qspi_load_image(instance, false);
diff --git a/arch/arm/mach-imx/romapi.c b/arch/arm/mach-imx/romapi.c
index aef0ff0534..29c2d4005c 100644
--- a/arch/arm/mach-imx/romapi.c
+++ b/arch/arm/mach-imx/romapi.c
@@ -14,7 +14,7 @@
 #include <init.h>
 #include <pbl.h>
 
-static int imx8m_bootrom_load(struct rom_api *rom_api, void *adr, size_t size)
+static int imx_romapi_load(struct rom_api *rom_api, void *adr, size_t size)
 {
 	while (size) {
 		size_t chunksize = min(size, (size_t)1024);
@@ -35,25 +35,25 @@ static int imx8m_bootrom_load(struct rom_api *rom_api, void *adr, size_t size)
 }
 
 /* read piggydata via a bootrom callback and place it behind our copy in SDRAM */
-static int imx8m_bootrom_load_image(struct rom_api *rom_api)
+static int imx_romapi_load_image(struct rom_api *rom_api)
 {
-	return imx8m_bootrom_load(rom_api,
+	return imx_romapi_load(rom_api,
 				  (void *)MX8M_ATF_BL33_BASE_ADDR + barebox_pbl_size,
 				  __image_end - __piggydata_start);
 }
 
-int imx8mp_bootrom_load_image(void)
+int imx8mp_romapi_load_image(void)
 {
 	struct rom_api *rom_api = (void *)0x980;
 
 	OPTIMIZER_HIDE_VAR(rom_api);
 
-	return imx8m_bootrom_load_image(rom_api);
+	return imx_romapi_load_image(rom_api);
 }
 
-int imx8mn_bootrom_load_image(void)
+int imx8mn_romapi_load_image(void)
 {
-	return imx8mp_bootrom_load_image();
+	return imx8mp_romapi_load_image();
 }
 
 const u32 *imx8m_get_bootrom_log(void)
diff --git a/include/mach/imx/romapi.h b/include/mach/imx/romapi.h
index 2243fdcf6d..8ea7fbfb04 100644
--- a/include/mach/imx/romapi.h
+++ b/include/mach/imx/romapi.h
@@ -35,8 +35,8 @@ enum boot_dev_type_e {
 
 #define ROM_API_OKAY		0xF0
 
-int imx8mp_bootrom_load_image(void);
-int imx8mn_bootrom_load_image(void);
+int imx8mp_romapi_load_image(void);
+int imx8mn_romapi_load_image(void);
 
 /* only call after DRAM has been configured */
 void imx8m_save_bootrom_log(void *dst);
-- 
2.39.2




  parent reply	other threads:[~2023-11-10 12:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10 12:57 [PATCH 00/25] Add i.MX93 support Sascha Hauer
2023-11-10 12:57 ` [PATCH 01/25] ARM: initial i.MX9 support Sascha Hauer
2023-11-10 12:57 ` [PATCH 02/25] ARM: i.MX: Add i.MX93 s4mu support Sascha Hauer
2023-11-13  7:25   ` Ahmad Fatoum
2023-11-10 12:57 ` [PATCH 03/25] ARM: i.MX: Add i.MX93 trdc support Sascha Hauer
2023-11-13  7:24   ` Ahmad Fatoum
2023-11-13  8:11     ` Sascha Hauer
2023-11-10 12:57 ` [PATCH 04/25] scripts: Add imx9image tool Sascha Hauer
2023-11-10 12:57 ` [PATCH 05/25] scripts: imx9image: Add PBL size option Sascha Hauer
2023-11-10 12:57 ` [PATCH 06/25] clk: Add i.MX93 clock support Sascha Hauer
2023-11-10 12:57 ` [PATCH 07/25] clk: imx: clk-fracn-gppll: make usable from PBL Sascha Hauer
2023-11-10 12:57 ` [PATCH 08/25] gpio-vf610: Add i.MX93 support Sascha Hauer
2023-11-10 12:57 ` [PATCH 09/25] iomux: " Sascha Hauer
2023-11-10 12:57 ` [PATCH 10/25] watchdog: Add ULP wdog support Sascha Hauer
2023-11-10 12:57 ` [PATCH 11/25] I2c: Add i2c_8bit_addr_from_msg() Sascha Hauer
2023-11-10 12:57 ` [PATCH 12/25] i2c: Add lpi2c support Sascha Hauer
2023-11-10 12:57 ` [PATCH 13/25] ARM: Add imx93.dtsi for USB Sascha Hauer
2023-11-10 12:57 ` [PATCH 14/25] serial: Add lpuart32 driver Sascha Hauer
2023-11-10 12:57 ` [PATCH 15/25] ARM: i.MX: add i.MX9 debug_ll support Sascha Hauer
2023-11-10 12:57 ` [PATCH 16/25] ARM: Add TQ MBA9XXXCA board support Sascha Hauer
2023-11-10 12:57 ` [PATCH 17/25] ARM: i.MX93: Add DDR size read support Sascha Hauer
2023-11-10 12:57 ` Sascha Hauer [this message]
2023-11-10 12:57 ` [PATCH 19/25] ARM: i.MX: romapi: Implement i.MX93 support Sascha Hauer
2023-11-10 12:57 ` [PATCH 20/25] ARM: i.MX: atf: add imx93_load_and_start_image_via_tfa() Sascha Hauer
2023-11-10 12:57 ` [PATCH 21/25] imx-usb-loader: Add i.MX9 support Sascha Hauer
2023-11-10 12:57 ` [PATCH 22/25] spi: spi-nxp-fspi: Enable for i.MX9 Sascha Hauer
2023-11-10 12:57 ` [PATCH 23/25] usb: i.MX chipidea: Enable usbmisc driver " Sascha Hauer
2023-11-10 12:57 ` [PATCH 24/25] ARM: Update imx_v8_defconfig Sascha Hauer
2023-11-10 12:58 ` [PATCH 25/25] ARM: multi_v8_defconfig: enable i.MX9 boards 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=20231110125800.1901232-19-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