From: Michael Walle <michael@walle.cc>
To: liao jaime <jaimeliao.tw@gmail.com>
Cc: linux-mtd@lists.infradead.org, tudor.ambarus@linaro.org,
pratyush@kernel.org, miquel.raynal@bootlin.com,
leoyu@mxic.com.tw, jaimeliao@mxic.com.tw
Subject: Re: [PATCH] mtd: spi-nor: core: Introduce spi_nor_abort_octal_dtr()
Date: Tue, 12 Dec 2023 14:37:17 +0100 [thread overview]
Message-ID: <e08b45ea59a0ba96de99a42ddf7b6769@walle.cc> (raw)
In-Reply-To: <CAAQoYR=8b7NR8h0SHz=bp9=XHzZebDQhPUOc20b0eAF6Vd1kAw@mail.gmail.com>
Hi,
>> > Some flashes contains 8D_8D_8D information in SFDP but did not enter
>> > octal DTR mode if conditions are not satisfied.
>>
>> What exactly are these conditions? Rather than "abort" the octal mode,
>> the flash shouldn't have that capability in the first place.
> "Abort" is not a good word.
> Is it better for using "discard"?
> 3 conditions should be satisfied before enable octal dtr mode.
> 1. function hook in nor->params->set_octal_dtr
> 2. nor->read_proto and nor->write_proto are SNOR_PROTO_8_8_8_DTR
> 3. nor->flags & SNOR_F_IO_MODE_EN_VOLATILE
> Flash driver still bring 8D_8D_8D protocol instructions in 1s-1s-1s
> mode if
> conditions are not satisfied.
> In a case, flash ID didn't include in vendor's ID table.
> It will be "spi-nor-generic".
> 8D-8D-8D information could be parsed in SFDP but
> nor->params->set_octal_dtr
> didn't hook vendor specific function for enabling octal dtr mode.
> So that it still bring 8D protocol in 1s-1s-1s mode and have no chance
> to select 1-1-8 protocol.
> I think it may better to re-select a suitable protocol for this case.
Just that we are on the same page. You are using the spi-nor-generic
driver, but that driver will elect the 8d8d8d protocol but that won't
work, because we don't have a .set_octal_dtr. Therefore, the fallback
is 1s1s1s. Correct?
To me it seems, that spi_nor_select_{read,pp,erase}() will select
the wrong commands/proto. So it should be fixed there. Probably
shared_mask is wrong.
-michael
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2023-12-12 13:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 7:51 [PATCH] mtd: spi-nor: core: Introduce spi_nor_abort_octal_dtr() Jaime Liao
2023-12-11 10:51 ` Michael Walle
2023-12-12 9:05 ` liao jaime
2023-12-12 13:37 ` Michael Walle [this message]
2023-12-13 2:37 ` liao jaime
2023-12-13 8:48 ` Michael Walle
2023-12-13 9:05 ` liao jaime
2023-12-13 9:10 ` Michael Walle
2023-12-13 9:16 ` liao jaime
2024-01-29 13:01 ` Pratyush Yadav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e08b45ea59a0ba96de99a42ddf7b6769@walle.cc \
--to=michael@walle.cc \
--cc=jaimeliao.tw@gmail.com \
--cc=jaimeliao@mxic.com.tw \
--cc=leoyu@mxic.com.tw \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=pratyush@kernel.org \
--cc=tudor.ambarus@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox