From: Peng Fan Date: Fri, 28 Apr 2023 04:08:34 +0000 (+0800) Subject: imx9: use i.MX generic rom api function X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/git-favicon.png?a=commitdiff_plain;h=8e9c0a14f9b81726b98ce5f749234fb52c6a71ab;p=u-boot.git 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 --- 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");