mbox series

[0/4] nvmem: add and use generic MMIO NVMEM

Message ID 20230201064717.18410-1-zajec5@gmail.com (mailing list archive)
Headers show
Series nvmem: add and use generic MMIO NVMEM | expand

Message

Rafał Miłecki Feb. 1, 2023, 6:47 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

MMIO accessible NVMEM devices should be simple enough to allow using a
single binding & driver for them.

I already replaced two existing drivers. With NVMEM layouts introduced I
can also replace Broadcom's NVRAM driver but that work depends on my
pending U-Boot patchset (it provides required helpers).

Rafał Miłecki (4):
  dt-bindings: nvmem: mmio: new binding for MMIO accessible NVMEM
    devices
  nvmem: add generic driver for devices with MMIO access
  nvmem: mtk-efuse: replace driver with a generic MMIO one
  nvmem: uniphier-efuse: replace driver with a generic MMIO one

 .../devicetree/bindings/nvmem/mmio.yaml       | 46 +++++++++
 drivers/nvmem/Kconfig                         | 24 +++--
 drivers/nvmem/Makefile                        |  6 +-
 drivers/nvmem/mmio.c                          | 84 ++++++++++++++++
 drivers/nvmem/mtk-efuse.c                     | 97 -------------------
 drivers/nvmem/uniphier-efuse.c                | 78 ---------------
 6 files changed, 148 insertions(+), 187 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/nvmem/mmio.yaml
 create mode 100644 drivers/nvmem/mmio.c
 delete mode 100644 drivers/nvmem/mtk-efuse.c
 delete mode 100644 drivers/nvmem/uniphier-efuse.c

Comments

Rafał Miłecki Feb. 1, 2023, 7:50 a.m. UTC | #1
On 1.02.2023 07:47, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> MMIO accessible NVMEM devices should be simple enough to allow using a
> single binding & driver for them.
> 
> I already replaced two existing drivers. With NVMEM layouts introduced I
> can also replace Broadcom's NVRAM driver but that work depends on my
> pending U-Boot patchset (it provides required helpers).

This was meant to be marked as V2.

Changes:
1. Replaced io with mmio to be clear
2. Replaced 2 existing drivers with generic implementation