diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2022-09-14 14:20:38 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2022-09-14 14:41:23 +0200 |
commit | 94372ab6e4f05d90e663c3b648d6048bc49afd60 (patch) | |
tree | 7f1a574ebfccd92ec9ed3902c3e396e039b76eec /target/linux/generic | |
parent | cae4d089bc1d3125d8b35d6bf93c31dbe5827421 (diff) | |
download | upstream-94372ab6e4f05d90e663c3b648d6048bc49afd60.tar.gz upstream-94372ab6e4f05d90e663c3b648d6048bc49afd60.tar.bz2 upstream-94372ab6e4f05d90e663c3b648d6048bc49afd60.zip |
bcm53xx: update NVMEM driver for NVRAM
Include support for NVMEM cells.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 2f50c53f1772f24e4687e960e21c5b392fb522f0)
Diffstat (limited to 'target/linux/generic')
-rw-r--r-- | target/linux/generic/backport-5.10/802-v5.19-nvmem-core-support-passing-DT-node-in-cell-info.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.10/802-v5.19-nvmem-core-support-passing-DT-node-in-cell-info.patch b/target/linux/generic/backport-5.10/802-v5.19-nvmem-core-support-passing-DT-node-in-cell-info.patch new file mode 100644 index 0000000000..b7870eef4b --- /dev/null +++ b/target/linux/generic/backport-5.10/802-v5.19-nvmem-core-support-passing-DT-node-in-cell-info.patch @@ -0,0 +1,41 @@ +From dbc2f62061c6bfba0aee93161ee3194dcee84bd0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> +Date: Fri, 29 Apr 2022 17:26:46 +0100 +Subject: [PATCH] nvmem: core: support passing DT node in cell info +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some hardware may have NVMEM cells described in Device Tree using +individual nodes. Let drivers pass such nodes to the NVMEM subsystem so +they can be later used by NVMEM consumers. + +Signed-off-by: Rafał Miłecki <rafal@milecki.pl> +Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +Link: https://lore.kernel.org/r/20220429162701.2222-2-srinivas.kandagatla@linaro.org +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/nvmem/core.c | 1 + + include/linux/nvmem-consumer.h | 1 + + 2 files changed, 2 insertions(+) + +--- a/drivers/nvmem/core.c ++++ b/drivers/nvmem/core.c +@@ -374,6 +374,7 @@ static int nvmem_cell_info_to_nvmem_cell + + cell->bit_offset = info->bit_offset; + cell->nbits = info->nbits; ++ cell->np = info->np; + + if (cell->nbits) + cell->bytes = DIV_ROUND_UP(cell->nbits + cell->bit_offset, +--- a/include/linux/nvmem-consumer.h ++++ b/include/linux/nvmem-consumer.h +@@ -25,6 +25,7 @@ struct nvmem_cell_info { + unsigned int bytes; + unsigned int bit_offset; + unsigned int nbits; ++ struct device_node *np; + }; + + /** |