[PATCH 3/5] spi: spi-qpic: Add qpic spi nand driver support
Mark Brown
broonie at kernel.org
Tue Feb 20 08:04:40 PST 2024
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20240220/3632f89f/attachment.sig>
More information about the linux-mtd
mailing list