* [PATCH] nvmem: qfprom: remove incorrect write support
@ 2020-05-22 11:33 Srinivas Kandagatla
2020-05-26 22:33 ` Doug Anderson
0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Kandagatla @ 2020-05-22 11:33 UTC (permalink / raw)
To: srini, gregkh; +Cc: linux-arm-msm, linux-kernel, dianders, Srinivas Kandagatla
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>
---
drivers/nvmem/qfprom.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index d057f1bfb2e9..8a91717600be 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -27,25 +27,11 @@ static int qfprom_reg_read(void *context,
return 0;
}
-static int qfprom_reg_write(void *context,
- unsigned int reg, void *_val, size_t bytes)
-{
- struct qfprom_priv *priv = context;
- u8 *val = _val;
- int i = 0, words = bytes;
-
- while (words--)
- writeb(*val++, priv->base + reg + i++);
-
- return 0;
-}
-
static struct nvmem_config econfig = {
.name = "qfprom",
.stride = 1,
.word_size = 1,
.reg_read = qfprom_reg_read,
- .reg_write = qfprom_reg_write,
};
static int qfprom_probe(struct platform_device *pdev)
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvmem: qfprom: remove incorrect write support
2020-05-22 11:33 [PATCH] nvmem: qfprom: remove incorrect write support Srinivas Kandagatla
@ 2020-05-26 22:33 ` Doug Anderson
0 siblings, 0 replies; 2+ messages in thread
From: Doug Anderson @ 2020-05-26 22:33 UTC (permalink / raw)
To: Srinivas Kandagatla; +Cc: srini, Greg Kroah-Hartman, linux-arm-msm, LKML
Hi,
On Fri, May 22, 2020 at 4:34 AM Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
>
> 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>
> ---
> drivers/nvmem/qfprom.c | 14 --------------
> 1 file changed, 14 deletions(-)
Reviewed-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-26 22:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 11:33 [PATCH] nvmem: qfprom: remove incorrect write support Srinivas Kandagatla
2020-05-26 22:33 ` Doug Anderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.