public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [RFC PATCH 00/13] spi: dw: Add support for XIP mode
@ 2021-02-05  4:39 Sean Anderson
  2021-02-05  4:39 ` [RFC PATCH 01/13] linux err: Synchronize with Linux 5.10 Sean Anderson
                   ` (13 more replies)
  0 siblings, 14 replies; 21+ messages in thread
From: Sean Anderson @ 2021-02-05  4:39 UTC (permalink / raw)
  To: u-boot

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.

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".


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 when CONFIG_MUX is disabled
  mux: Define a stub for mux_get_by_index if CONFIG_MUX is disabled
  mux: mmio: Only complain about idle-states if it is malformed
  spi: dw: Define XIP registers
  spi: dw: Add XIP and XIP_CONCURRENT caps
  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 XIP

 arch/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(-)

-- 
2.29.2

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-02-07 14:37 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-05  4:39 [RFC PATCH 00/13] spi: dw: Add support for XIP mode Sean Anderson
2021-02-05  4:39 ` [RFC PATCH 01/13] linux err: Synchronize with Linux 5.10 Sean Anderson
2021-02-07 14:37   ` Simon Glass
2021-02-05  4:39 ` [RFC PATCH 02/13] spi-mem: Add dirmap API from Linux Sean Anderson
2021-02-05  4:39 ` [RFC PATCH 03/13] mtd: spi-nor: use spi-mem dirmap API Sean Anderson
2021-02-05  4:39 ` [RFC PATCH 04/13] core: ofnode: Fix inconsistent returns of *_read_u32_array Sean Anderson
2021-02-07 14:37   ` Simon Glass
2021-02-05  4:39 ` [RFC PATCH 05/13] mux: Inline mux functions when CONFIG_MUX is disabled Sean Anderson
2021-02-05  7:32   ` Pratyush Yadav
2021-02-05  4:39 ` [RFC PATCH 06/13] mux: Define a stub for mux_get_by_index if " Sean Anderson
2021-02-05 10:53   ` Pratyush Yadav
2021-02-05  4:39 ` [RFC PATCH 07/13] mux: mmio: Only complain about idle-states if it is malformed Sean Anderson
2021-02-05 11:06   ` Pratyush Yadav
2021-02-05 13:28     ` Sean Anderson
2021-02-05  4:39 ` [RFC PATCH 08/13] spi: dw: Define XIP registers Sean Anderson
2021-02-05  4:39 ` [RFC PATCH 09/13] spi: dw: Add XIP and XIP_CONCURRENT caps Sean Anderson
2021-02-05  4:39 ` [RFC PATCH 10/13] spi: dw: Use a mux to access registers Sean Anderson
2021-02-05  4:39 ` [RFC PATCH 11/13] spi: dw: Add support for DIRMAP Sean Anderson
2021-02-05  4:39 ` [RFC PATCH 12/13] riscv: k210: Increase SPI3 bus clock to CPU speed Sean Anderson
2021-02-05  4:39 ` [RFC PATCH 13/13] riscv: k210: Add bindings for SPI XIP Sean Anderson
2021-02-05  4:43 ` [RFC PATCH 00/13] spi: dw: Add support for XIP mode Sean Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox