[PATCH v2 0/7] introduce NVM XIP block storage emulation
    Abdellatif El Khlifi 
    abdellatif.elkhlifi at arm.com
       
    Mon Apr 17 11:11:51 CEST 2023
    
    
  
Adding block storage emulation for NVM XIP flash devices.
Some paltforms such as Corstone-1000 need to see NVM XIP raw flash
as a block storage device with read only capability.
Here NVM flash devices are devices with addressable
memory (e.g: QSPI NOR flash).
The NVM XIP block storage emulation provides the following features:
- Emulate NVM XIP raw flash as a block storage device with read only capability
- Being generic by design and can be used by any platform
- Device tree node
- Platforms can use multiple NVM XIP devices at the same time by defining a
  DT node for each one of them
- A generic NVMXIP block driver allowing to read from the XIP flash
- A generic NVMXIP Uclass driver for binding the block device
- A generic NVMXIP QSPI driver
- Implemented on top of memory-mapped IO (using readq macro)
- Enabling NVMXIP in sandbox64
- A sandbox test case
- Enabling NVMXIP in Corstone1000 platform as a use case
For more details please refer to the readme [A].
Changelog of the major changes:
===========================
v2:
* move the drivers under drivers/mtd
* shorten the block device name
* rename nvmxip_init() to nvmxip_post_bind(), call it from the uclass when
   a new device is bound
* use uclass_id_count() in place of nvmxip_bdev_max_devs
* moving the NVMXIP QSPI driver to a seperate commit
* address nits
v1: [1]
* introduce the new feature
Cheers,
Abdellatif
List of previous patches:
[1]: https://lore.kernel.org/all/20230116172832.1946-1-abdellatif.elkhlifi@arm.com/
More details:
[A]: doc/develop/driver-model/nvmxip.rst
Cc: Tom Rini <trini at konsulko.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Drew Reed <Drew.Reed at arm.com>
Cc: Xueliang Zhong <Xueliang.Zhong at arm.com>
Cc: Rui Miguel Silva <rui.silva at linaro.org>
Abdellatif El Khlifi (7):
  drivers/mtd/nvmxip: introduce NVM XIP block storage emulation
  drivers/mtd/nvmxip: introduce QSPI XIP driver
  sandbox64: fix: return unsigned long in readq()
  sandbox64: add support for NVMXIP QSPI
  corstone1000: add NVM XIP QSPI device tree node
  corstone1000: enable NVM XIP QSPI flash
  sandbox64: add a test case for UCLASS_NVMXIP
 MAINTAINERS                                   |   8 +
 arch/arm/dts/corstone1000.dtsi                |   9 +-
 arch/sandbox/cpu/cpu.c                        |   2 +-
 arch/sandbox/dts/sandbox64.dts                |  13 ++
 arch/sandbox/dts/test.dts                     |  14 ++
 arch/sandbox/include/asm/io.h                 |   2 +-
 configs/corstone1000_defconfig                |   1 +
 configs/sandbox64_defconfig                   |   1 +
 doc/develop/driver-model/index.rst            |   1 +
 doc/develop/driver-model/nvmxip.rst           |  91 +++++++++++
 .../nvmxip/nvmxip_qspi.txt                    |  56 +++++++
 drivers/block/blk-uclass.c                    |   1 +
 drivers/mtd/Kconfig                           |   2 +
 drivers/mtd/Makefile                          |   1 +
 drivers/mtd/nvmxip/Kconfig                    |  19 +++
 drivers/mtd/nvmxip/Makefile                   |   8 +
 drivers/mtd/nvmxip/nvmxip-uclass.c            |  74 +++++++++
 drivers/mtd/nvmxip/nvmxip.c                   | 119 ++++++++++++++
 drivers/mtd/nvmxip/nvmxip.h                   |  32 ++++
 drivers/mtd/nvmxip/nvmxip_qspi.c              |  70 +++++++++
 include/dm/uclass-id.h                        |   1 +
 test/dm/Makefile                              |   5 +
 test/dm/nvmxip.c                              | 145 ++++++++++++++++++
 23 files changed, 672 insertions(+), 3 deletions(-)
 create mode 100644 doc/develop/driver-model/nvmxip.rst
 create mode 100644 doc/device-tree-bindings/nvmxip/nvmxip_qspi.txt
 create mode 100644 drivers/mtd/nvmxip/Kconfig
 create mode 100644 drivers/mtd/nvmxip/Makefile
 create mode 100644 drivers/mtd/nvmxip/nvmxip-uclass.c
 create mode 100644 drivers/mtd/nvmxip/nvmxip.c
 create mode 100644 drivers/mtd/nvmxip/nvmxip.h
 create mode 100644 drivers/mtd/nvmxip/nvmxip_qspi.c
 create mode 100644 test/dm/nvmxip.c
-- 
2.25.1
    
    
More information about the U-Boot
mailing list