mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 22:23:27 +00:00
323072f3a6
They add NVMEM layouts support. It allows handling NVMEM content independently of NVMEM device access. Skip U-Boot env data patch for now as it break our downstream MAC hacks. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
69 lines
2.3 KiB
Diff
69 lines
2.3 KiB
Diff
From 011e40a166fdaa65fb9946b7cd91efec85b70dbb Mon Sep 17 00:00:00 2001
|
|
From: Michael Walle <michael@walle.cc>
|
|
Date: Tue, 4 Apr 2023 18:21:27 +0100
|
|
Subject: [PATCH] nvmem: cell: drop global cell_post_process
|
|
|
|
There are no users anymore for the global cell_post_process callback
|
|
anymore. New users should use proper nvmem layouts.
|
|
|
|
Signed-off-by: Michael Walle <michael@walle.cc>
|
|
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
|
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
|
Link: https://lore.kernel.org/r/20230404172148.82422-20-srinivas.kandagatla@linaro.org
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
---
|
|
drivers/nvmem/core.c | 9 ---------
|
|
include/linux/nvmem-provider.h | 2 --
|
|
2 files changed, 11 deletions(-)
|
|
|
|
--- a/drivers/nvmem/core.c
|
|
+++ b/drivers/nvmem/core.c
|
|
@@ -39,7 +39,6 @@ struct nvmem_device {
|
|
unsigned int nkeepout;
|
|
nvmem_reg_read_t reg_read;
|
|
nvmem_reg_write_t reg_write;
|
|
- nvmem_cell_post_process_t cell_post_process;
|
|
struct gpio_desc *wp_gpio;
|
|
struct nvmem_layout *layout;
|
|
void *priv;
|
|
@@ -903,7 +902,6 @@ struct nvmem_device *nvmem_register(cons
|
|
nvmem->type = config->type;
|
|
nvmem->reg_read = config->reg_read;
|
|
nvmem->reg_write = config->reg_write;
|
|
- nvmem->cell_post_process = config->cell_post_process;
|
|
nvmem->keepout = config->keepout;
|
|
nvmem->nkeepout = config->nkeepout;
|
|
if (config->of_node)
|
|
@@ -1575,13 +1573,6 @@ static int __nvmem_cell_read(struct nvme
|
|
if (rc)
|
|
return rc;
|
|
}
|
|
-
|
|
- if (nvmem->cell_post_process) {
|
|
- rc = nvmem->cell_post_process(nvmem->priv, id, index,
|
|
- cell->offset, buf, cell->bytes);
|
|
- if (rc)
|
|
- return rc;
|
|
- }
|
|
|
|
if (len)
|
|
*len = cell->bytes;
|
|
--- a/include/linux/nvmem-provider.h
|
|
+++ b/include/linux/nvmem-provider.h
|
|
@@ -85,7 +85,6 @@ struct nvmem_cell_info {
|
|
* @no_of_node: Device should not use the parent's of_node even if it's !NULL.
|
|
* @reg_read: Callback to read data.
|
|
* @reg_write: Callback to write data.
|
|
- * @cell_post_process: Callback for vendor specific post processing of cell data
|
|
* @size: Device size.
|
|
* @word_size: Minimum read/write access granularity.
|
|
* @stride: Minimum read/write access stride.
|
|
@@ -118,7 +117,6 @@ struct nvmem_config {
|
|
bool no_of_node;
|
|
nvmem_reg_read_t reg_read;
|
|
nvmem_reg_write_t reg_write;
|
|
- nvmem_cell_post_process_t cell_post_process;
|
|
int size;
|
|
int word_size;
|
|
int stride;
|