From 8e9c0a14f9b81726b98ce5f749234fb52c6a71ab Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 28 Apr 2023 12:08:34 +0800 Subject: [PATCH] imx9: use i.MX generic rom api function There is no need to save gd with using the generic rom api function, so simplify code. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx9/soc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c index 07d1bb20d5..6ae7e70489 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"); -- 2.39.5