diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2020-05-22 12:33:41 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-11 09:22:22 +0200 |
commit | 10873fe64e9d7181c3576134341b6f4d24b32048 (patch) | |
tree | 09981b9746400379e780a99faa025db8993a082b /drivers/nvmem | |
parent | ed9a878378533250b0290e32ff4361ce420690c1 (diff) | |
download | linux-stable-10873fe64e9d7181c3576134341b6f4d24b32048.tar.gz linux-stable-10873fe64e9d7181c3576134341b6f4d24b32048.tar.bz2 linux-stable-10873fe64e9d7181c3576134341b6f4d24b32048.zip |
nvmem: qfprom: remove incorrect write support
commit 8d9eb0d6d59a5d7028c80a30831143d3e75515a7 upstream.
qfprom has different address spaces for read and write. Reads are
always done from corrected address space, where as writes are done
on raw address space.
Writing to corrected address space is invalid and ignored, so it
does not make sense to have this support in the driver which only
supports corrected address space regions at the moment.
Fixes: 4ab11996b489 ("nvmem: qfprom: Add Qualcomm QFPROM support.")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200522113341.7728-1-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r-- | drivers/nvmem/qfprom.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c index b5305f08b184..05b1c4f36b7b 100644 --- a/drivers/nvmem/qfprom.c +++ b/drivers/nvmem/qfprom.c @@ -30,19 +30,6 @@ static int qfprom_reg_read(void *context, return 0; } -static int qfprom_reg_write(void *context, - unsigned int reg, void *_val, size_t bytes) -{ - void __iomem *base = context; - u32 *val = _val; - int i = 0, words = bytes / 4; - - while (words--) - writel(*val++, base + reg + (i++ * 4)); - - return 0; -} - static int qfprom_remove(struct platform_device *pdev) { struct nvmem_device *nvmem = platform_get_drvdata(pdev); @@ -56,7 +43,6 @@ static struct nvmem_config econfig = { .stride = 4, .word_size = 1, .reg_read = qfprom_reg_read, - .reg_write = qfprom_reg_write, }; static int qfprom_probe(struct platform_device *pdev) |