devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] block: implement NVMEM provider
@ 2024-03-21 19:31 Daniel Golle
  2024-03-21 19:32 ` [PATCH 1/8] dt-bindings: block: add basic bindings for block devices Daniel Golle
                   ` (10 more replies)
  0 siblings, 11 replies; 29+ messages in thread
From: Daniel Golle @ 2024-03-21 19:31 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
	Jens Axboe, Daniel Golle, Dave Chinner, Jan Kara,
	Thomas Weißschuh, Damien Le Moal, Li Lingfeng,
	Christian Brauner, Christian Heusel, Min Li, Adrian Hunter,
	Avri Altman, Hannes Reinecke, Christian Loehle, Bean Huo, Yeqi Fu,
	Victor Shih, Christophe JAILLET, Dominique Martinet,
	Ricardo B. Marliere, devicetree, linux-kernel, linux-mmc,
	linux-block

On embedded devices using an eMMC it is common that one or more (hw/sw)
partitions on the eMMC are used to store MAC addresses and Wi-Fi
calibration EEPROM data.

Implement an NVMEM provider backed by a block device as typically the
NVMEM framework is used to have kernel drivers read and use binary data
from EEPROMs, efuses, flash memory (MTD), ...

In order to be able to reference hardware partitions on an eMMC, add code
to bind each hardware partition to a specific firmware subnode.

Overall, this enables uniform handling across practially all flash
storage types used for this purpose (MTD, UBI, and now also MMC).

As part of this series it was necessary to define a device tree schema
for block devices and partitions on them, which (similar to how it now
works also for UBI volumes) can be matched by one or more properties.

---
This series has previously been submitted as RFC on July 19th 2023[1]
and most of the basic idea did not change since. Another round of RFC
was submitted on March 5th 2024[2] which has received overall positive
feedback and only minor corrections have been done since (see
changelog below).

[1]: https://patchwork.kernel.org/project/linux-block/list/?series=767565
[2]: https://patchwork.kernel.org/project/linux-block/list/?series=832705

Changes since RFC:
 * Use 'partuuid' instead of reserved 'uuid' keyword to match against
   PARTUUID.
 * Simplify blk_nvmem_init(void) function.

Daniel Golle (8):
  dt-bindings: block: add basic bindings for block devices
  block: partitions: populate fwnode
  block: add new genhd flag GENHD_FL_NVMEM
  block: implement NVMEM provider
  dt-bindings: mmc: mmc-card: add block device nodes
  mmc: core: set card fwnode_handle
  mmc: block: set fwnode of disk devices
  mmc: block: set GENHD_FL_NVMEM

 .../bindings/block/block-device.yaml          |  22 +++
 .../devicetree/bindings/block/partition.yaml  |  51 ++++++
 .../devicetree/bindings/block/partitions.yaml |  20 +++
 .../devicetree/bindings/mmc/mmc-card.yaml     |  45 +++++
 MAINTAINERS                                   |   5 +
 block/Kconfig                                 |   9 +
 block/Makefile                                |   1 +
 block/blk-nvmem.c                             | 169 ++++++++++++++++++
 block/partitions/core.c                       |  41 +++++
 drivers/mmc/core/block.c                      |   8 +
 drivers/mmc/core/bus.c                        |   2 +
 include/linux/blkdev.h                        |   2 +
 12 files changed, 375 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/block/block-device.yaml
 create mode 100644 Documentation/devicetree/bindings/block/partition.yaml
 create mode 100644 Documentation/devicetree/bindings/block/partitions.yaml
 create mode 100644 block/blk-nvmem.c

-- 
2.44.0

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

end of thread, other threads:[~2024-04-18 22:52 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 19:31 [PATCH 0/8] block: implement NVMEM provider Daniel Golle
2024-03-21 19:32 ` [PATCH 1/8] dt-bindings: block: add basic bindings for block devices Daniel Golle
2024-03-21 19:39   ` Bart Van Assche
2024-03-21 20:26     ` Daniel Golle
2024-03-21 19:33 ` [PATCH 2/8] block: partitions: populate fwnode Daniel Golle
2024-03-21 19:33 ` [PATCH 3/8] block: add new genhd flag GENHD_FL_NVMEM Daniel Golle
2024-03-22 17:49   ` Bart Van Assche
2024-03-22 18:07     ` Daniel Golle
2024-03-22 19:22       ` Bart Van Assche
2024-04-18 22:51         ` Daniel Golle
2024-03-21 19:34 ` [PATCH 4/8] block: implement NVMEM provider Daniel Golle
2024-03-21 19:44   ` Bart Van Assche
2024-03-21 20:22     ` Daniel Golle
2024-03-22 17:52       ` Bart Van Assche
2024-03-22 18:11         ` Daniel Golle
2024-03-21 19:34 ` [PATCH 5/8] dt-bindings: mmc: mmc-card: add block device nodes Daniel Golle
2024-03-21 19:35 ` [PATCH 6/8] mmc: core: set card fwnode_handle Daniel Golle
2024-03-21 19:35 ` [PATCH 7/8] mmc: block: set fwnode of disk devices Daniel Golle
2024-03-21 19:36 ` [PATCH 8/8] mmc: block: set GENHD_FL_NVMEM Daniel Golle
2024-03-22 17:52 ` [PATCH 0/8] block: implement NVMEM provider Bart Van Assche
2024-03-22 18:02   ` Daniel Golle
2024-03-22 19:19     ` Bart Van Assche
2024-03-25 15:10 ` Rob Herring
2024-03-25 15:38   ` Daniel Golle
2024-03-26 20:24     ` Rob Herring
2024-03-26 21:28       ` Daniel Golle
2024-03-27 12:33         ` Rob Herring
2024-03-25 15:12 ` Rob Herring
2024-03-25 15:46   ` Daniel Golle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).