[PATCH 1/2] spi: sunxi: drop max_hz handling
Michael Walle
mwalle at kernel.org
Tue Jul 16 08:58:14 CEST 2024
Hi,
> > The driver is trying to read the "spi-max-frequency" property of the
> > *controller* driver node. There is no such property. The
> > "spi-max-frequency" property belongs to the SPI devices on the bus.
>
> Ah, indeed, good catch! Many thanks for sending this!
>
> > Right now, the driver will always fall back to the default value of 1MHz
> > and thus flash reads are very slow with just about 215kb/s.
>
> That's even slower, right? I guess around 125 KB/s?
Yes of course :) 1Mhz/8 at most. I was fooled by the "sf update"
command which will skip the same sectors and then the overall speed
will be faster.
> > In fact, the SPI uclass will already take care of everything and we just
> > have to clamp the frequency to the values the driver/hardware supports.
> > Thus, drop the whole max_hz handling.
>
> Looks good to me, I verified this by timing the read, this patch indeed
> significantly increases the performance. Also changing the limit in the
> DT gets reflected in the driver and in the read speed. Also verified
> that the values read from the SPI flash are the same in all cases.
>
> > Signed-off-by: Michael Walle <mwalle at kernel.org>
>
> Reviewed-by: Andre Przywara <andre.przywara at arm.com>
> Tested-by: Andre Przywara <andre.przywara at arm.com>
>
> I will make this part of the first 2024.10 PR.
This means just 1/2 or both? Because there was no Rb on the second
patch.
-michael
More information about the U-Boot
mailing list