summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/spl/spl.c2
-rw-r--r--include/asm-generic/global_data.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 0062f3f45d9..045a5e89625 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -800,7 +800,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
IS_ENABLED(CONFIG_SPL_ATF))
dram_init_banksize();
- if (CONFIG_IS_ENABLED(PCI)) {
+ if (CONFIG_IS_ENABLED(PCI) && !(gd->flags & GD_FLG_DM_DEAD)) {
ret = pci_init();
if (ret)
puts(SPL_TPL_PROMPT "Cannot initialize PCI\n");
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__ */