[PATCH] spi: dw: Fix broken dw_spi_mem_ops()
Niklas Cassel
Niklas.Cassel at wdc.com
Tue Mar 1 12:33:34 CET 2022
On Thu, Feb 24, 2022 at 01:41:38PM +0530, Jagan Teki wrote:
> On Wed, Feb 9, 2022 at 4:22 AM Niklas Cassel <Niklas.Cassel at wdc.com> wrote:
> >
> > From: Niklas Cassel <niklas.cassel at wdc.com>
> >
> > The driver is currently using sizeof(op->cmd.opcode) in the op_len
> > calculation. Commit d15de623013c ("spi: spi-mem: allow specifying a
> > command's extension") changed op->cmd.opcode from one byte to two.
> >
> > Instead, a new struct member op->cmd.nbytes is supposed to be used.
> > For regular commands op->cmd.nbytes will be one.
> >
> > Commit d15de623013c ("spi: spi-mem: allow specifying a command's
> > extension") did update some drivers that overload the generic mem_ops()
> > implementation, but forgot to update dw_spi_mem_ops().
> >
> > Calculating op_len incorrectly causes dw_spi_mem_ops() to misbehave, since
> > op_len is used to determine how many bytes that should be read/written.
> >
> > On the canaan k210 board, this causes the probe of the SPI flash to fail.
> >
> > Fix the op_len calculation in dw_spi_mem_ops(). Doing so results in
> > working SPI flash on the canaan k210 board.
> >
> > Fixes: d15de623013c ("spi: spi-mem: allow specifying a command's extension")
> > Signed-off-by: Niklas Cassel <niklas.cassel at wdc.com>
> > ---
>
> Applied to u-boot-spi/master
Hello Jagan,
I still don't see this in git://git.denx.de/u-boot-spi.git master branch.
I can see that we are in v2022.04-rc3.
Any chance that this will make it into v2022.04 final?
Kind regards,
Niklas
More information about the U-Boot
mailing list