[PATCH 18/25] ARM: i.MX: romapi: rename functions to *romapi*
Sascha Hauer
s.hauer at pengutronix.de
Fri Nov 10 04:57:53 PST 2023
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 at 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
More information about the barebox
mailing list