diff mbox series

[29/42] imx9: use i.MX generic rom api function

Message ID 20230428040847.10841-30-peng.fan@oss.nxp.com
State Accepted
Commit 8e9c0a14f9b81726b98ce5f749234fb52c6a71ab
Delegated to: Stefano Babic
Headers show
Series imx: i.MX9 update | expand

Commit Message

Peng Fan (OSS) April 28, 2023, 4:08 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

There is no need to save gd with using the generic rom api function, so
simplify code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/mach-imx/imx9/soc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Stefano Babic May 21, 2023, 5:12 p.m. UTC | #1
> From: Peng Fan <peng.fan@nxp.com>
> There is no need to save gd with using the generic rom api function, so
> simplify code.
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c
index f91f838e41a..22152172169 100644
--- a/arch/arm/mach-imx/imx9/soc.c
+++ b/arch/arm/mach-imx/imx9/soc.c
@@ -49,15 +49,12 @@  __weak int board_mmc_get_env_dev(int devno)
 
 int mmc_get_env_dev(void)
 {
-	volatile gd_t *pgd = gd;
 	int ret;
 	u32 boot;
 	u16 boot_type;
 	u8 boot_instance;
 
-	ret = g_rom_api->query_boot_infor(QUERY_BT_DEV, &boot,
-					  ((uintptr_t)&boot) ^ QUERY_BT_DEV);
-	set_gd(pgd);
+	ret = rom_api_query_boot_infor(QUERY_BT_DEV, &boot);
 
 	if (ret != ROM_API_OKAY) {
 		puts("ROMAPI: failure at query_boot_info\n");