summaryrefslogtreecommitdiff
path: root/env/fat.c
diff options
context:
space:
mode:
Diffstat (limited to 'env/fat.c')
-rw-r--r--env/fat.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/env/fat.c b/env/fat.c
index 65ee1c8e086..58c279ff769 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -14,8 +14,10 @@
#include <memalign.h>
#include <search.h>
#include <errno.h>
+#include <init.h>
#include <fat.h>
#include <mmc.h>
+#include <nvme.h>
#include <scsi.h>
#include <virtio.h>
#include <asm/cache.h>
@@ -129,13 +131,21 @@ static int env_fat_load(void)
#endif
#ifndef CONFIG_XPL_BUILD
#if defined(CONFIG_AHCI) || defined(CONFIG_SCSI)
- if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "scsi"))
+ if (!strcmp(ifname, "scsi"))
scsi_scan(true);
#endif
#if defined(CONFIG_VIRTIO)
if (!strcmp(ifname, "virtio"))
virtio_init();
#endif
+#if defined(CONFIG_NVME)
+ if (!strcmp(ifname, "nvme")) {
+ if (IS_ENABLED(CONFIG_PCI))
+ pci_init();
+
+ nvme_scan_namespace();
+ }
+#endif
#endif
part = blk_get_device_part_str(ifname, dev_and_part,
&dev_desc, &info, 1);