On Tue, 10 Jun 2025 at 02:28, Guenter Roeck <li...@roeck-us.net> wrote: > > In some situations it is desirable to be able to specify the flash type > connected to a board. For example, the target operating system may not > support the default flash type, its support may be broken, or the qemu > emulation is insufficient and the default flash is not detected. > On top of that, the ability to test various flash types improves > testability since a single emulated board can be used to test a variety > of flash chips with the controller supported by that board. > > The aspeed emulation supports an option to specify the flash type. Use > the same mechanism to configure the flash type for Nuvoton 7xx boards. > > Signed-off-by: Guenter Roeck <li...@roeck-us.net> > --- > I don't know if there is interest in this, but I figured I should at least > submit it. Background is that Macronix flash support is broken when running > upstream Linux v6.16-rc1, thanks to upstream Linux commit 947c86e481a027e > ("mtd: spi-nor: macronix: Drop the redundant flash info fields"). I needed > a workaround, and using a different flash model was the easiest solution.
I think the question I would have here is "is this the flash device the hardware actually has?". If QEMU's using the wrong flash type, we should fix that. If QEMU's modelling the right flash type and the kernel doesn't implement it, then that's a kernel bug and the right fix is to get the kernel to handle that flash type. thanks -- PMM