From: "Michael Walle" <mwalle@kernel.org>
To: "Andre Przywara" <andre.przywara@arm.com>
Cc: "Jagan Teki" <jagan@amarulasolutions.com>,
"Tom Rini" <trini@konsulko.com>, "Simon Glass" <sjg@chromium.org>,
<u-boot@lists.denx.de>
Subject: Re: [PATCH 1/2] spi: sunxi: drop max_hz handling
Date: Tue, 16 Jul 2024 08:58:14 +0200 [thread overview]
Message-ID: <D2QRO88MEAKU.2AJR76UULNW16@kernel.org> (raw)
In-Reply-To: <20240716010541.745a6c09@minigeek.lan>
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@kernel.org>
>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> Tested-by: Andre Przywara <andre.przywara@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
next prev parent reply other threads:[~2024-07-16 6:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 17:14 [PATCH 0/2] spi: sunxi: Improve the loading speed Michael Walle
2024-07-12 17:14 ` [PATCH 1/2] spi: sunxi: drop max_hz handling Michael Walle
2024-07-16 0:05 ` Andre Przywara
2024-07-16 6:58 ` Michael Walle [this message]
2024-07-16 14:20 ` Andre Przywara
2024-07-12 17:14 ` [PATCH 2/2] spi: sunxi: fix clock divider calculation for max frequency setting Michael Walle
2024-07-16 0:39 ` Andre Przywara
2024-07-16 7:18 ` Michael Walle
2024-07-12 17:28 ` [PATCH 0/2] spi: sunxi: Improve the loading speed Peter Robinson
2024-07-12 18:11 ` Michael Walle
2024-07-16 0:32 ` Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D2QRO88MEAKU.2AJR76UULNW16@kernel.org \
--to=mwalle@kernel.org \
--cc=andre.przywara@arm.com \
--cc=jagan@amarulasolutions.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox