From: Md Sadre Alam <md.alam@oss.qualcomm.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Md Sadre Alam <mdalam@qti.qualcomm.com>
Subject: Re: [PATCH 2/3] spi: spi-qpic-snand: add quad mode support
Date: Fri, 7 Aug 2026 21:52:38 +0530 [thread overview]
Message-ID: <anYGTr31beVXVBoJ@hu-mdalam-blr.qualcomm.com> (raw)
In-Reply-To: <a9595e1c-fa08-4d1d-a13b-3ea89a27519a@sirena.org.uk>
On Wed, Jul 29, 2026 at 03:46:43PM +0100, Mark Brown wrote:
> On Thu, Jul 16, 2026 at 10:57:46AM +0530, Md Sadre Alam wrote:
> > Add support for quad (x4) transfer mode in the QPIC SPI NAND driver.
> > The controller supports both single (x1) and quad (x4) SPI transfers,
> > but the driver currently operates only in x1 mode.
>
> > @@ -1025,12 +1040,16 @@ static int qcom_spi_cmd_mapping(struct qcom_nand_controller *snandc, u32 opcode,
> > *cmd = SPINAND_WRITE_EN;
> > break;
> > case SPINAND_PROGRAM_EXECUTE:
> > - *cmd = (PAGE_ACC | LAST_PAGE | SPI_TRANSFER_MODE_x1 |
> > - SPI_WP | SPI_HOLD | OP_PROGRAM_PAGE);
> > + if (snandc->qspi->quad_mode)
> > + *cmd = (PAGE_ACC | LAST_PAGE | transfer_mode |
> > + SPI_WP | SPI_HOLD | OP_PROGRAM_PAGE);
>
> This succeeds but does not initialize cmd, previously we'd accept and
> use x1.
>
> > @@ -1042,6 +1061,15 @@ static int qcom_spi_cmd_mapping(struct qcom_nand_controller *snandc, u32 opcode,
> > static int qcom_spi_read_page(struct qcom_nand_controller *snandc,
> > const struct spi_mem_op *op)
> > {
> > + int ret;
> > + u32 cmd;
> > + /* Call mapping once again to update the quad mode based on
> > + * buswidth
> > + */
> > + ret = qcom_spi_cmd_mapping(snandc, op, &cmd);
> > + if (ret < 0)
> > + return ret;
> > +
> > if (snandc->qspi->page_rw && snandc->qspi->raw_rw)
> > return qcom_spi_read_page_raw(snandc, op);
>
> We never reference cmd in the rest of the function, either we didn't
> need to do the mapping or there's a missing update.
I have addressed both the comments in revision 2 [1]. Please review.
Thanks
Alam
1 - https://lore.kernel.org/linux-arm-msm/20260807-quad-v2-0-8ec821e2f22b@oss.qualcomm.com/
next prev parent reply other threads:[~2026-08-07 16:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 5:27 [PATCH 0/3] Add quad mode support for QPIC SNAND Md Sadre Alam
2026-07-16 5:27 ` [PATCH 1/3] spi: spi-qpic-snand: move command mapping helper Md Sadre Alam
2026-07-16 5:27 ` [PATCH 2/3] spi: spi-qpic-snand: add quad mode support Md Sadre Alam
2026-07-29 14:46 ` Mark Brown
2026-08-07 16:22 ` Md Sadre Alam [this message]
2026-07-16 5:27 ` [PATCH 3/3] spi: spi-qpic-snand: Handle Macronix quad read opcode 0x6b Md Sadre Alam
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=anYGTr31beVXVBoJ@hu-mdalam-blr.qualcomm.com \
--to=md.alam@oss.qualcomm.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mdalam@qti.qualcomm.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