From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Alvin Zhou <alvinzhou.tw@gmail.com>
Cc: linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org, pratyush@kernel.org,
mwalle@kernel.org, miquel.raynal@bootlin.com, richard@nod.at,
vigneshr@ti.com, broonie@kernel.org, chengminglin@mxic.com.tw,
leoyu@mxic.com.tw, AlvinZhou <alvinzhou@mxic.com.tw>,
JaimeLiao <jaimeliao@mxic.com.tw>
Subject: Re: [PATCH v10 1/6] mtd: spi-nor: add Octal DTR support for Macronix flash
Date: Fri, 4 Oct 2024 10:58:55 +0100 [thread overview]
Message-ID: <890c1926-2778-41e3-bca6-d08a5a493708@linaro.org> (raw)
In-Reply-To: <CAPhrvRQirexA9QJzBSqjfmPnbnF62-hzg-neQ-cZX2hnkP_Zwg@mail.gmail.com>
On 10/4/24 10:05 AM, Alvin Zhou wrote:
>>> + /* Read flash ID to make sure the switch was successful. */
>>> + ret = spi_nor_read_id(nor, 4, 4, buf, SNOR_PROTO_8_8_8_DTR);
>> can we use nor->addr_nbytes for the second argument? Please test and
>> confirm. No need to resend for this, just confirm and I can amend when
>> applying.
> The following is the process of spi_nor_scan()
> int spi_nor_scan(...)
> {
> ......
> ret = spi_nor_init_params(nor);
> ......
> ret = spi_nor_setup(nor, hwcaps);
> ......
> }
> First, within the spi_nor_parse_sfdp() function inside
> spi_nor_init_params(): nor->params->addr_nbytes is set based on the
> SFDP, while nor->addr_nbytes is not available. Therefore, the second
> argument cannot use nor->addr_nbytes but can use
> nor->params->addr_nbytes. Additionally, For Macronix Octal NOR Flash
nor->addr_nbytes is set in spi_nor_setup().
spi_nor_set_octal_dtr() is called after spi_nor_setup(), thus you can
use nor->addr_nbytes.
> in Octal DDR mode, both the address and dummy cycles are fixed at 4
> in READID, so setting the second and third argument to 4 is also valid.
but we don't want magic numbers or states that are not tracked, so use
the parameters set
> Moreover, nor->addr_nbytes is set within the spi_nor_setup() function.
yep, use it then.
next prev parent reply other threads:[~2024-10-04 9:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 14:19 [PATCH v10 0/6] Add octal " AlvinZhou
2024-09-26 14:19 ` [PATCH v10 1/6] mtd: spi-nor: add Octal " AlvinZhou
2024-10-02 7:16 ` Tudor Ambarus
2024-10-04 9:05 ` Alvin Zhou
2024-10-04 9:58 ` Tudor Ambarus [this message]
2024-10-04 16:22 ` Alvin Zhou
2024-09-26 14:19 ` [PATCH v10 2/6] spi: spi-mem: Allow specifying the byte order in Octal DTR mode AlvinZhou
2024-09-26 14:19 ` [PATCH v10 3/6] mtd: spi-nor: core: " AlvinZhou
2024-10-02 7:21 ` Tudor Ambarus
2024-09-26 14:19 ` [PATCH v10 4/6] mtd: spi-nor: sfdp: Get the 8D-8D-8D byte order from BFPT AlvinZhou
2024-10-02 7:28 ` Tudor Ambarus
2024-09-26 14:19 ` [PATCH v10 5/6] spi: mxic: Add support for swapping byte AlvinZhou
2024-09-26 14:19 ` [PATCH v10 6/6] mtd: spi-nor: add support for Macronix Octal flash AlvinZhou
2024-10-02 7:45 ` Tudor Ambarus
2024-10-08 3:38 ` Alvin Zhou
2024-10-04 7:55 ` [PATCH v10 0/6] Add octal DTR support for Macronix flash Tudor Ambarus
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=890c1926-2778-41e3-bca6-d08a5a493708@linaro.org \
--to=tudor.ambarus@linaro.org \
--cc=alvinzhou.tw@gmail.com \
--cc=alvinzhou@mxic.com.tw \
--cc=broonie@kernel.org \
--cc=chengminglin@mxic.com.tw \
--cc=jaimeliao@mxic.com.tw \
--cc=leoyu@mxic.com.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=mwalle@kernel.org \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
/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
all inboxes | Powered by JetHome®