* [PATCH 1/3] env: fat: Add support for NVME
@ 2025-08-12 17:46 Fabio Estevam
2025-08-12 17:46 ` [PATCH 2/3] env: ext4: " Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fabio Estevam @ 2025-08-12 17:46 UTC (permalink / raw)
To: trini; +Cc: joe.hershberger, otavio, u-boot, Fabio Estevam
Add support for retrieving the FAT environment from an NVME device, the
same way it can be retrieved from MMC, SCSI, or VIRTIO.
To use the FAT environment from an NVME device, pass
CONFIG_ENV_FAT_INTERFACE="nvme" in the defconfig.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
env/fat.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/env/fat.c b/env/fat.c
index 65ee1c8e086d..412d95dc3057 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>
@@ -136,6 +138,14 @@ static int env_fat_load(void)
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);
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/3] env: ext4: Add support for NVME
2025-08-12 17:46 [PATCH 1/3] env: fat: Add support for NVME Fabio Estevam
@ 2025-08-12 17:46 ` Fabio Estevam
2025-08-12 17:46 ` [PATCH 3/3] env: fat: Standardize the interface type check Fabio Estevam
2025-08-20 23:13 ` [PATCH 1/3] env: fat: Add support for NVME Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2025-08-12 17:46 UTC (permalink / raw)
To: trini; +Cc: joe.hershberger, otavio, u-boot, Fabio Estevam
Add support for retrieving the EXT4 environment from an NVME device, the
same way it can be retrieved from MMC, SCSI, or VIRTIO.
To use the EXT4 environment from an NVME device, pass
CONFIG_ENV_EXT4_INTERFACE="nvme" in the defconfig.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
env/ext4.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/env/ext4.c b/env/ext4.c
index d92c844ea6c0..c8122b4d22cb 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -22,6 +22,7 @@
#include <command.h>
#include <env.h>
+#include <init.h>
#include <env_internal.h>
#include <linux/stddef.h>
#include <malloc.h>
@@ -30,6 +31,7 @@
#include <errno.h>
#include <ext4fs.h>
#include <mmc.h>
+#include <nvme.h>
#include <scsi.h>
#include <virtio.h>
#include <asm/global_data.h>
@@ -156,6 +158,14 @@ static int env_ext4_load(void)
virtio_init();
#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,
&dev_desc, &info, 1);
if (part < 0)
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/3] env: fat: Standardize the interface type check
2025-08-12 17:46 [PATCH 1/3] env: fat: Add support for NVME Fabio Estevam
2025-08-12 17:46 ` [PATCH 2/3] env: ext4: " Fabio Estevam
@ 2025-08-12 17:46 ` Fabio Estevam
2025-08-20 23:13 ` [PATCH 1/3] env: fat: Add support for NVME Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2025-08-12 17:46 UTC (permalink / raw)
To: trini; +Cc: joe.hershberger, otavio, u-boot, Fabio Estevam
Make the interface type check consistent among the other interface types
by checking it agains the ifname string.
The ifname string contains the string returned by env_fat_get_intf(), which
returns the CONFIG_ENV_FAT_INTERFACE value.
No functional change.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
env/fat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/env/fat.c b/env/fat.c
index 412d95dc3057..58c279ff7690 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -131,7 +131,7 @@ 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)
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] env: fat: Add support for NVME
2025-08-12 17:46 [PATCH 1/3] env: fat: Add support for NVME Fabio Estevam
2025-08-12 17:46 ` [PATCH 2/3] env: ext4: " Fabio Estevam
2025-08-12 17:46 ` [PATCH 3/3] env: fat: Standardize the interface type check Fabio Estevam
@ 2025-08-20 23:13 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2025-08-20 23:13 UTC (permalink / raw)
To: Fabio Estevam; +Cc: joe.hershberger, otavio, u-boot
On Tue, 12 Aug 2025 14:46:10 -0300, Fabio Estevam wrote:
> Add support for retrieving the FAT environment from an NVME device, the
> same way it can be retrieved from MMC, SCSI, or VIRTIO.
>
> To use the FAT environment from an NVME device, pass
> CONFIG_ENV_FAT_INTERFACE="nvme" in the defconfig.
>
>
> [...]
Applied to u-boot/next, thanks!
[1/3] env: fat: Add support for NVME
commit: afbed1ba2f8776b06ef821212b14a3e34bdcd2bd
[2/3] env: ext4: Add support for NVME
commit: 7b21bf086053679c5ef1ea612072a78018370281
[3/3] env: fat: Standardize the interface type check
commit: 82444e3ecd0ea8404ed6fd1dd3710bfd8d641f52
--
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-20 23:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 17:46 [PATCH 1/3] env: fat: Add support for NVME Fabio Estevam
2025-08-12 17:46 ` [PATCH 2/3] env: ext4: " Fabio Estevam
2025-08-12 17:46 ` [PATCH 3/3] env: fat: Standardize the interface type check Fabio Estevam
2025-08-20 23:13 ` [PATCH 1/3] env: fat: Add support for NVME Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.