]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: dm: Mark driver model as dead when disabling CAR
authorSimon Glass <sjg@chromium.org>
Thu, 7 Sep 2023 15:58:20 +0000 (09:58 -0600)
committerBin Meng <bmeng@tinylab.org>
Thu, 21 Sep 2023 22:03:46 +0000 (06:03 +0800)
When turning off CAR, set the flag to make sure that nothing tries to use
driver model in SPL before jumping to U-Bot proper, since its tables are
in CAR.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/spl.c

index 335dacf47fd04a3f5db201c60cf095f32ce143d8..c15f11f8cdf44209058ae35235589a1cb95093ac 100644 (file)
@@ -230,6 +230,9 @@ void board_init_f_r(void)
        mtrr_commit(false);
        init_cache();
        gd->flags &= ~GD_FLG_SERIAL_READY;
+
+       /* make sure driver model is not accessed from now on */
+       gd->flags |= GD_FLG_DM_DEAD;
        debug("cache status %d\n", dcache_status());
        board_init_r(gd, 0);
 }