]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
imx94_evk: Get ownership of XSPI control registers protected by GMID in SPL
authorYe Li <ye.li@nxp.com>
Thu, 12 Mar 2026 00:57:24 +0000 (08:57 +0800)
committerFabio Estevam <festevam@gmail.com>
Mon, 16 Mar 2026 21:44:58 +0000 (18:44 -0300)
To gain access to certain registers that are protected by GMID, the SPL
must release XSPI ownership to the current core.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
board/nxp/imx94_evk/spl.c

index cc5b7f9ef0f06f84b99a7ce550ddad7610c6bc9a..6eb0fff99f4690070d89fe25564746ed5579c320 100644 (file)
@@ -46,6 +46,16 @@ void spl_board_init(void)
                printf("Fail to start RNG: %d\n", ret);
 }
 
+static void xspi_nor_reset(void)
+{
+       int ret;
+       u32 resp = 0;
+
+       ret = ele_set_gmid(&resp);
+       if (ret)
+               printf("Fail to set GMID: %d, resp 0x%x\n", ret, resp);
+}
+
 /* SCMI support by default */
 void board_init_f(ulong dummy)
 {
@@ -76,5 +86,7 @@ void board_init_f(ulong dummy)
 
        get_reset_reason(true, false);
 
+       xspi_nor_reset();
+
        board_init_r(NULL, 0);
 }