aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorSimon Glass2023-09-07 09:58:13 -0600
committerBin Meng2023-09-22 06:03:46 +0800
commit15a23b6f167ac89d9be8c1c676309253865e446f (patch)
tree4a0d4c3572f849426c81ef11d87607a6b8dd2486 /include/asm-generic
parent9804e572cf1ade7a0aae000740e6159a1e5394fd (diff)
dm: core: Allow marking driver model as dead
On x86 devices we use CAR (Cache-As-RAM) to hold the malloc() region in SPL, since SDRAM is not set up yet. This means that driver model stores its tables in this region. When preparing to jump from SPL to U-Boot proper, we must disable CAR, so that the CPU can uses the caches normally. This means that driver model tables become inaccessible. From there until we jump to U-Boot proper, we must avoid using driver model. This is only a problem on boards which operate this way, for example chromebook_link64 Add a flag to indicate that driver model is dead and should not be used. It can be used in SPL to avoid hanging the machine. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/global_data.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index d364f1b965e..d47c674c742 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -674,6 +674,11 @@ enum gd_flags {
* @GD_FLG_OF_TAG_MIGRATE: Device tree has old u-boot,dm- tags
*/
GD_FLG_OF_TAG_MIGRATE = 0x200000,
+ /**
+ * @GD_FLG_DM_DEAD: Driver model is not accessible. This can be set when
+ * the memory used to holds its tables has been mapped out.
+ */
+ GD_FLG_DM_DEAD = 0x400000,
};
#endif /* __ASSEMBLY__ */