[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8422fb6a-edd4-4911-89b7-2974c197981b@sirena.org.uk>
Date: Tue, 20 Feb 2024 16:04:40 +0000
From: Mark Brown <broonie@...nel.org>
To: Md Sadre Alam <quic_mdalam@...cinc.com>
Cc: andersson@...nel.org, konrad.dybcio@...aro.org, robh@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
miquel.raynal@...tlin.com, richard@....at, vigneshr@...com,
manivannan.sadhasivam@...aro.org, linux-arm-msm@...r.kernel.org,
linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
quic_srichara@...cinc.com, quic_varada@...cinc.com
Subject: Re: [PATCH 3/5] spi: spi-qpic: Add qpic spi nand driver support
On Tue, Feb 20, 2024 at 05:24:43PM +0530, Md Sadre Alam wrote:
> On 2/15/2024 7:44 PM, Mark Brown wrote:
> > On Thu, Feb 15, 2024 at 07:18:54PM +0530, Md Sadre Alam wrote:
> > > + if (op->cmd.opcode == SPINAND_READID) {
> > > + snandc->buf_count = 4;
> > > + read_reg_dma(snandc, NAND_READ_ID, 1, NAND_BAM_NEXT_SGL);
> > > +
> > > + ret = submit_descs(snandc);
> > > + if (ret)
> > > + dev_err(snandc->dev, "failure in submitting descriptor for readid\n");
> > > +
> > > + nandc_read_buffer_sync(snandc, true);
> > > + memcpy(op->data.buf.in, snandc->reg_read_buf, snandc->buf_count);
> > These memcpy()s don't seem great, why aren't we just reading directly
> > into the output buffer?
> This reg_read_buf is being used in common API so that it will be used by both
> serial nand as well raw nand, so I can't directly use the output buffer since
> internally CW mechanism I have to maintain in common API.
We have control over all the source code in the kernel so if there's
problems with the internal interfaces we can improve them.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists