Re: [PATCH 3/3] x86: emulation: enable cfi flash drivers
Simon Glass <[email protected]> Mon, 3 Aug 2026 13:25:36 -0600
| Newsgroups | gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <CAFLszThnAfwivMS7ReoXkfrfXsFpmnwT0KGR68kLrQPuw+ENMg@mail.gmail.com> |
Hi Elliot, On 2026-07-30T19:37:45, Elliot Berman <[email protected]> wrote: > x86: emulation: enable cfi flash drivers > > Enable MTD/CFI so the pflash node just added for qemu-x86/qemu-x86_64 > can be probed, matching the flash config qemu_arm64_defconfig. > > Signed-off-by: Elliot Berman <[email protected]> > > configs/qemu-x86_64_defconfig | 13 +++++++++++++ > configs/qemu-x86_defconfig | 13 +++++++++++++ > 2 files changed, 26 insertions(+) > diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig > @@ -76,6 +79,16 @@ CONFIG_ATAPI=y > CONFIG_LBA48=y > CONFIG_SYS_64BIT_LBA=y > CONFIG_CPU=y > +CONFIG_DFU_MTD=y > +CONFIG_DM_MTD=y > +CONFIG_MTD_NOR_FLASH=y > +CONFIG_CFI_FLASH=y > +CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y > +CONFIG_FLASH_CFI_MTD=y > +CONFIG_SYS_FLASH_CFI=y > +CONFIG_SYS_MAX_FLASH_SECT=1024 > +CONFIG_SYS_MAX_FLASH_BANKS=2 > +CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y CONFIG_SYS_FLASH_CFI is only referenced by a handful of legacy m68k board headers - it has no effect for a DM CFI-flash setup, so please drop it. qemu_arm64_defconfig doesn't set it either. > diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig > @@ -76,6 +79,16 @@ CONFIG_ATAPI=y > +CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y qemu_arm64_defconfig doesn't enable this and the emulated CFI pflash handles single-word writes fine. Please drop it too so the two defconfigs really do match. > diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig > @@ -48,7 +48,9 @@ CONFIG_CMD_CPU=y > CONFIG_CMD_BOOTEFI_SELFTEST=y > CONFIG_CMD_NVEDIT_EFY=y > CONFIG_CMD_MEM_SEARCH=y > +CONFIG_CMD_DFU=y > CONFIG_CMD_IDE=y > +CONFIG_CMD_MTD=y The commit message says this enables MTD/CFI so the pflash node can be probed, but you are also turning on DFU, MTD and MTDPARTS commands plus DFU_MTD, which exist to make patch 2's capsule wiring work. Please either update the commit message to describe the full scope, or split the DFU/MTDPARTS bits out. Regards, Simon