RFC spi: dw: Add support for XIP mode
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest0 of 13 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 13 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 00/13] spi: dw: Add support for XIP mode
Quoted 12 lines · Sean Anderson
This adds support for memory-mapped ("DIRMAP") reads (called XIP by the datasheet). In theory, these have better performance than regular reads. In practice, the CPU is already fast enough to max out the performance of this peripheral.
The real end-goal is to be able to boot a XIP kernel. This SoC has just barely enough SRAM to boot Linux, and using a XIP kernel would decrease the memory pressure to something tolerable. It would also probably absolutely *tank* the performance, since not only is SPI flash ~8x slower than regular memory, there is no cache to mitigate that latency. So it remains to be seen whether this is worth it at all.
Quoted 3 lines
This series is RFC because it currently reads all 1s on one board I have. On the other board I have, it reads and writes fine. I will try and investigate this, but I expect any changes to occur in "spi: dw: Add support for DIRMAP".
Forgot to mention, but this series depends on [1]. A git branch with this complete series is available at [2].
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=228123
[2] https://github.com/Forty-Bot/u-boot/tree/maix_xip
Quoted 30 lines
Sean Anderson (13):
linux err: Synchronize with Linux 5.10
spi-mem: Add dirmap API from Linux
mtd: spi-nor: use spi-mem dirmap API
core: ofnode: Fix inconsistent returns of*_read_u32_array
mux: Inline mux functions whenCONFIG_MUXis disabled
mux: Define a stub formux_get_by_indexifCONFIG_MUXis disabled
mux: mmio: Only complain about idle-states if it is malformed
spi: dw: Define XIP registers
spi: dw: Add XIP andXIP_CONCURRENTcaps
spi: dw: Use a mux to access registers
spi: dw: Add support for DIRMAP
riscv: k210: Increase SPI3 bus clock to CPU speed
riscv: k210: Add bindings for SPI XIParch/riscv/dts/k210.dtsi | 25 ++- drivers/core/ofnode.c | 15 +- drivers/mtd/spi/sf_probe.c | 79 ++++++++ drivers/mtd/spi/spi-nor-core.c | 45 +++-- drivers/mux/mmio.c | 5 +- drivers/spi/Kconfig | 10 + drivers/spi/designware_spi.c | 337 +++++++++++++++++++++++++++++++-- drivers/spi/spi-mem.c | 270 ++++++++++++++++++++++++++ include/linux/err.h | 21 +- include/linux/mtd/spi-nor.h | 6 + include/mux.h | 25 ++- include/spi-mem.h | 99 ++++++++++ 12 files changed, 889 insertions(+), 48 deletions(-)