]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx9: use i.MX generic rom api function
authorPeng Fan <peng.fan@nxp.com>
Fri, 28 Apr 2023 04:08:34 +0000 (12:08 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 21 May 2023 14:54:41 +0000 (16:54 +0200)
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

index 07d1bb20d58087383abdb0f7b6ba0a985624e3bb..6ae7e704895f636f04ae2f3dc007764e73761785 100644 (file)
@@ -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");