mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-20 08:52:12 +01:00
Merge patch series "env: fat: Add support for NVME"
This series from Fabio Estevam <festevam@gmail.com> adds support for having the environment be found on an NVMe device that contains a FAT filesystem. Link: https://lore.kernel.org/r/20250812174612.1159634-1-festevam@gmail.com
This commit is contained in:
commit
b436af0641
10
env/ext4.c
vendored
10
env/ext4.c
vendored
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
|
#include <init.h>
|
||||||
#include <env_internal.h>
|
#include <env_internal.h>
|
||||||
#include <linux/stddef.h>
|
#include <linux/stddef.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
@ -30,6 +31,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <ext4fs.h>
|
#include <ext4fs.h>
|
||||||
#include <mmc.h>
|
#include <mmc.h>
|
||||||
|
#include <nvme.h>
|
||||||
#include <scsi.h>
|
#include <scsi.h>
|
||||||
#include <virtio.h>
|
#include <virtio.h>
|
||||||
#include <asm/global_data.h>
|
#include <asm/global_data.h>
|
||||||
@ -156,6 +158,14 @@ static int env_ext4_load(void)
|
|||||||
virtio_init();
|
virtio_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_NVME)
|
||||||
|
if (!strcmp(ifname, "nvme")) {
|
||||||
|
if (IS_ENABLED(CONFIG_PCI))
|
||||||
|
pci_init();
|
||||||
|
|
||||||
|
nvme_scan_namespace();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
part = blk_get_device_part_str(ifname, dev_and_part,
|
part = blk_get_device_part_str(ifname, dev_and_part,
|
||||||
&dev_desc, &info, 1);
|
&dev_desc, &info, 1);
|
||||||
if (part < 0)
|
if (part < 0)
|
||||||
|
|||||||
12
env/fat.c
vendored
12
env/fat.c
vendored
@ -14,8 +14,10 @@
|
|||||||
#include <memalign.h>
|
#include <memalign.h>
|
||||||
#include <search.h>
|
#include <search.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <init.h>
|
||||||
#include <fat.h>
|
#include <fat.h>
|
||||||
#include <mmc.h>
|
#include <mmc.h>
|
||||||
|
#include <nvme.h>
|
||||||
#include <scsi.h>
|
#include <scsi.h>
|
||||||
#include <virtio.h>
|
#include <virtio.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
@ -129,13 +131,21 @@ static int env_fat_load(void)
|
|||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_XPL_BUILD
|
#ifndef CONFIG_XPL_BUILD
|
||||||
#if defined(CONFIG_AHCI) || defined(CONFIG_SCSI)
|
#if defined(CONFIG_AHCI) || defined(CONFIG_SCSI)
|
||||||
if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "scsi"))
|
if (!strcmp(ifname, "scsi"))
|
||||||
scsi_scan(true);
|
scsi_scan(true);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_VIRTIO)
|
#if defined(CONFIG_VIRTIO)
|
||||||
if (!strcmp(ifname, "virtio"))
|
if (!strcmp(ifname, "virtio"))
|
||||||
virtio_init();
|
virtio_init();
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_NVME)
|
||||||
|
if (!strcmp(ifname, "nvme")) {
|
||||||
|
if (IS_ENABLED(CONFIG_PCI))
|
||||||
|
pci_init();
|
||||||
|
|
||||||
|
nvme_scan_namespace();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
part = blk_get_device_part_str(ifname, dev_and_part,
|
part = blk_get_device_part_str(ifname, dev_and_part,
|
||||||
&dev_desc, &info, 1);
|
&dev_desc, &info, 1);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user