Re: [PATCH 02/24] spi: spi-mem: Add a new controller capability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mark,

Thanks a lot for the testing and sorry for being slow.

On 01/11/2024 at 20:17:33 GMT, Mark Brown <broonie@xxxxxxxxxx> wrote:

> On Fri, Oct 25, 2024 at 06:14:39PM +0200, Miquel Raynal wrote:
>> There are spi devices with multiple frequency limitations depending on
>> the invoked command. We probably do not want to afford running at the
>> lowest supported frequency all the time, so if we want to get the most
>> of our hardware, we need to allow per-operation frequency limitations.
>
> After applying this patch (I bisected the series) my Avenger96 board
> started failing to probe the SPI NOR flash it has:
>
> [    3.567876] spi-nor spi0.0: probe with driver spi-nor failed with
> error -95

This is an EOPNOTSUPP so maybe there is a new check that is breaking
your board. I checked the hardware manual, they talk about a NOR
flash. Looking at the code, I believe I forgot the SPI-NOR case which
currently does not (yet?) use the op->max_freq parameter.

> Full job:
>
>    https://lava.sirena.org.uk/scheduler/job/925156
>
> I didn't spot anything with the code on a recheck but it's late on a
> Friday so I've not looked too hard.  My other boards are all fine though
> there's limited coverage.

Would you mind testing the series with this change on top and tell me if
that fixes it?

--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -184,7 +184,7 @@ bool spi_mem_default_supports_op(struct spi_mem *mem,
                        return false;
        }
 
-       if (op->max_freq < mem->spi->max_speed_hz) {
+       if (op->max_freq && op->max_freq < mem->spi->max_speed_hz) {
                if (!spi_mem_controller_is_capable(ctlr, per_op_freq))
                        return false;
        }

I don't know how easy it is for you to make that test with lava, let me
know if you prefer me to send a fixup! patch or even resend the whole
series (but it's a bit big).

Thanks,
Miquèl





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux