From: Binbin Zhou <zhoubinbin@loongson.cn>
To: Binbin Zhou <zhoubb.aaron@gmail.com>,
Huacai Chen <chenhuacai@loongson.cn>,
Yinbo Zhu <zhuyinbo@loongson.cn>, Mark Brown <broonie@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>,
Xuerui Wang <kernel@xen0n.name>,
loongarch@lists.linux.dev, linux-spi@vger.kernel.org,
Binbin Zhou <zhoubinbin@loongson.cn>
Subject: [PATCH 0/8] spi: loongson: Fixes, cleanup and IRQ support
Date: Tue, 3 Nov 2026 15:07:47 +0800 [thread overview]
Message-ID: <cover.1793689461.git.zhoubinbin@loongson.cn> (raw)
Hi all:
This series fixes several long-standing bugs in the Loongson SPI
controller driver, cleans up the core driver, and adds interrupt-driven
transfers with a polling fallback.
The series is grouped as follows:
Bug fixes (suitable for stable):
1. Fix the SPI mode caching logic so mode bits can be cleared.
2. Fix the chip-select idle level for SPI_CS_HIGH devices.
3. Separate PM register state from runtime register usage.
4. Fix the clock divider calculation with an explicit divider table.
Robustness and cleanup:
5. Support the ACPI "clock-frequency" property and validate the
input clock rate during probe.
6. Move private register definitions and the private controller
structure into the core driver.
7. Convert the driver to the regmap-mmio API.
New feature:
8. Add interrupt-driven transfers, keeping polling as a fallback
when no IRQ is available.
The IRQ path also brings a significant performance improvement. On a
Loongson-2K3000 board, reading SPI flash with dd improved from about
50 kB/s in polling mode to about 382 kB/s with IRQ-driven transfers,
roughly 7.6x faster.
Binbin.
Thanks.
Binbin Zhou (8):
spi: loongson: Fix incorrect SPI mode caching logic
spi: loongson: Fix CS idle state for SPI_CS_HIGH devices
spi: loongson: Make suspend/resume registers PM-specific
spi: loongson: Fix clock divider calculation with explicit table
spi: loongson: Support ACPI clock-frequency and add error handling
spi: loongson: Move private definitions into the core driver
spi: loongson: Convert to regmap API
spi: loongson: Add interrupt support for SPI controller
drivers/spi/spi-loongson-core.c | 566 ++++++++++++++++++++++++--------
drivers/spi/spi-loongson-pci.c | 25 +-
drivers/spi/spi-loongson-plat.c | 17 +-
drivers/spi/spi-loongson.h | 48 +--
4 files changed, 457 insertions(+), 199 deletions(-)
base-commit: 8ab8c079820e6134bc0d8c312244644afb66ae9c
--
2.52.0
next reply other threads:[~2026-11-03 7:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 7:07 Binbin Zhou [this message]
2026-11-03 7:07 ` [PATCH 1/8] spi: loongson: Fix incorrect SPI mode caching logic Binbin Zhou
2026-11-03 7:07 ` [PATCH 2/8] spi: loongson: Fix CS idle state for SPI_CS_HIGH devices Binbin Zhou
2026-11-03 7:07 ` [PATCH 3/8] spi: loongson: Make suspend/resume registers PM-specific Binbin Zhou
2026-11-04 10:02 ` Huacai Chen
2026-11-03 7:08 ` [PATCH 4/8] spi: loongson: Fix clock divider calculation with explicit table Binbin Zhou
2026-11-03 7:08 ` [PATCH 5/8] spi: loongson: Support ACPI clock-frequency and add error handling Binbin Zhou
2026-11-03 7:08 ` [PATCH 6/8] spi: loongson: Move private definitions into the core driver Binbin Zhou
2026-11-04 10:04 ` Huacai Chen
2026-11-03 7:08 ` [PATCH 7/8] spi: loongson: Convert to regmap API Binbin Zhou
2026-11-03 7:08 ` [PATCH 8/8] spi: loongson: Add interrupt support for SPI controller Binbin Zhou
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=cover.1793689461.git.zhoubinbin@loongson.cn \
--to=zhoubinbin@loongson.cn \
--cc=broonie@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=kernel@xen0n.name \
--cc=linux-spi@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=zhoubb.aaron@gmail.com \
--cc=zhuyinbo@loongson.cn \
/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