]> git.ipfire.org Git - thirdparty/linux.git/commit
spi: cadence-xspi: Support 32bit and 64bit slave dma interface
authorJisheng Zhang <jszhang@kernel.org>
Tue, 2 Jun 2026 23:58:25 +0000 (07:58 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 4 Jun 2026 10:27:44 +0000 (11:27 +0100)
commit4954d4eca469419339452cb5fea26dd0fc678c54
treef74bde9ed3b5a7668c3fc879703b5dd8affd7469
parentf469138a77ac5ab685dfe15dfed7dccb9d5c33e5
spi: cadence-xspi: Support 32bit and 64bit slave dma interface

The cdns xspi controller slave dma interface may support wider data
width. Wider I/O width can benefit performance. We can know the width
by checking the CTRL_FEATURES_REG's DMA_DATA_WIDTH bit, 0 means 32bit
1 means 64bit.

A simple test with QSPI nor flash on one arm64 platform:

Use 8bit slave dma data width (now):
 # dd if=/dev/mtdblock0 of=/dev/null bs=8192 count=1000
 1000+0 records in
 1000+0 records out
 8192000 bytes (7.8MB) copied, 1.368735 seconds, 5.7MB/s

Use 32bit slave dma data width:
 # dd if=/dev/mtdblock0 of=/dev/null bs=8192 count=1000
 1000+0 records in
 1000+0 records out
 8192000 bytes (7.8MB) copied, 1.088787 seconds, 7.2MB/s

Improved by 26.3%!

Use 64bit slave dma data width:
 # dd if=/dev/mtdblock0 of=/dev/null bs=8192 count=1000
 1000+0 records in
 1000+0 records out
 8192000 bytes (7.8MB) copied, 0.831104 seconds, 9.4MB/s

Improved by 64.9%!

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://patch.msgid.link/20260602235825.28614-1-jszhang@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-xspi.c