[PATCH v11 3/3] mtd: spi-nor: spansion: Add s25hl-t/s25hs-t IDs and fixups
Takahiro Kuwano
tkuw584924 at gmail.com
Wed Apr 20 23:58:06 PDT 2022
On 4/20/2022 5:46 PM, Tudor.Ambarus at microchip.com wrote:
> On 4/20/22 11:38, Takahiro Kuwano wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> On 4/20/2022 5:11 PM, Tudor.Ambarus at microchip.com wrote:
>>> On 4/20/22 10:50, Takahiro Kuwano wrote:
[...]
>>> I agree with Pratyush that we shouldn't change the state of the flash at parsing
>>> time. So to solve this we could introduce nor->params->addr_width to set it at
>>> parsing time, and use the default nor->addr_width for ops at parsing time for
>>> all the parsers.
>>>
>> The default nor->addr_width comes from BFPT parse (no change in BFPT parse).
>> In 4bait parse, nor->params->addr_width is updated instead of nor->addr_width.
>> Then,
>>
>> static int spi_nor_set_addr_width(struct spi_nor *nor)
>> {
>> + if (nor->params->addr_width)
>> + nor->addr_width = nor->params->addr_width;
>
> remove the above and
>>
>> if (nor->addr_width) {
> replace the if condition with:
> if (nor->params->addr_width)
> nor->addr_width = nor->params->addr_width;
> else if {
>
> and the behavior should be kept as before
>
>> /* already configured from SFDP */
>> } else if (nor->read_proto == SNOR_PROTO_8_8_8_DTR) {
>>
>> Is this something we are going to do?
>
> sounds good on a first read, yes
Hi Tudor,
As Pratyush mentioned in that thread, we already have SNOR_F_HAS_4BAIT flag.
Please see new patch in revised series.
https://patchwork.ozlabs.org/project/linux-mtd/patch/d705a2c1fc8d0a59c93454aa05642aafe4fc960b.1650519576.git.Takahiro.Kuwano@infineon.com/
Best Regards,
Takahiro
More information about the linux-mtd
mailing list