Re: [PATCH] spi: intel: only check locked opmenu for SW sequencer operations
From: Mark Brown
Date: Sun Nov 08 2026 - 07:20:50 EST
> On controllers that use the software sequencer for register access (LPT
> and BYT), intel_spi_supports_mem_op() rejects any operation whose opcode
> is not in the BIOS-locked OPMENU. However the check is applied to every
> operation, including normal data reads and writes which are always
> executed by the hardware sequencer and never consult the OPMENU.
> +static bool intel_spi_op_uses_swseq(const struct intel_spi *ispi,
> + const struct intel_spi_mem_op *iop)
> +{
> + if (iop->exec_op == intel_spi_read_reg ||
> + iop->exec_op == intel_spi_write_reg)
> + return ispi->swseq_reg;
This will match for SPINOR_OP_WREN and SPINOR_OP_WRDI, should this be
something like this:
if (iop->exec_op == intel_spi_write_reg &&
(iop->mem_op.cmd.opcode == SPINOR_OP_WREN ||
iop->mem_op.cmd.opcode == SPINOR_OP_WRDI))
return false;
Sashiko has some analysis:
https://sashiko.dev/#/message/20261101200313.16411-1-rosenp@xxxxxxxxx
--
Mark Brown <broonie@xxxxxxxxxx>