[PATCH 1/2] spi: sunxi: drop max_hz handling
Andre Przywara
andre.przywara at arm.com
Tue Jul 16 16:20:38 CEST 2024
On Tue, 16 Jul 2024 08:58:14 +0200
"Michael Walle" <mwalle at kernel.org> wrote:
> 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.
Just this one for now, as I was preparing the pull request. It's a fix, so
I can send it anytime later, it doesn't have to wait for anything.
I was hoping we can fix that other calculation issue at the same time.
Cheers,
Andre.
More information about the U-Boot
mailing list