[PATCH v2 7/8] mtd: spi-nor: spansion: Set params->addr_mode_nbytes = 4 for multi-die parts
tudor.ambarus at linaro.org
Wed Mar 1 22:41:52 PST 2023
On 08.02.2023 07:53, tkuw584924 at gmail.com wrote:
> From: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
> The params->addr_mode_nbytes is set to 3 during BFPT parse in case of
> BFPT_DWORD1_ADDRESS_BYTES_3_OR_4. Infineon SEMPER multi-chip devices are
> in 3- or 4-byte address mode by factory default, depending on model number.
are the models differentiated by unique IDs?
> 3-byte address mode is for backward compatibility for some SoCs. Since we
> cannot access to registers in 2nd die by 3-byte addressing. We assume post
> BootRom programs change the address mode to 4 before hand-off.
no, we can't make this assumption. The only assumption that we may
accept is that the flash is at the factory default settings. But this is
fragile too, because one can configure the flash in a non volatile way
and change the factory default settings. You can't add support for
flashes that come with 3 byte address mode by default without
discovering the address mode at run-time.
More information about the linux-mtd