linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2
@ 2019-04-13 10:32 Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 01/20] dt-bindings: imx-ocotp: Add i.MX8MQ compatible Srinivas Kandagatla
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

Resending this with cc to linux-kernel@vger.kernel.org

Hi Greg,

Here are some nvmem patches for 5.2 which includes:
- adding support to new stm32, sunix and imx providers
- few general cleanups
- fix for in place buffer reads.

Can you please pick these for 5.2.

thanks,
srini

Anson Huang (3):
  nvmem: imx-ocotp: use devm_platform_ioremap_resource() to simplify
    code
  nvmem: mxs-ocotp: use devm_platform_ioremap_resource() to simplify
    code
  nvmem: imx-iim: use devm_platform_ioremap_resource() to simplify code

Chen-Yu Tsai (5):
  nvmem: sunxi_sid: Read out SID for randomness without looping
  nvmem: sunxi_sid: Optimize register read-out method
  nvmem: sunxi_sid: Dynamically allocate nvmem_config structure
  nvmem: sunxi_sid: Read out data in native format
  nvmem: sunxi_sid: Support SID on A83T and H5

Fabrice Gasnier (4):
  dt-bindings: nvmem: Add STM32 factory-programmed romem
  nvmem: Add driver for STM32 factory-programmed read only mem
  nvmem: stm32: add support for STM32MP15 BSEC to control OTP data
  nvmem: core: add nvmem_cell_read_u16

Jorge Ramirez-Ortiz (1):
  nvmem: core: fix read buffer in place

Lucas Stach (3):
  dt-bindings: imx-ocotp: Add i.MX8MQ compatible
  nvmem: imx-ocotp: add support for imx8mq
  nvmem: imx-ocotp: broaden Kconfig dependency

Yangtao Li (4):
  nvmem: sunxi-sid: fix wrong description in kernel doc
  nvmem: sunxi-sid: add binding for H6's SID controller
  nvmem: sunxi-sid: convert to SPDX license tags
  nvmem: sunxi_sid: Support SID on H6

 .../bindings/nvmem/allwinner,sunxi-sid.txt    |   3 +-
 .../devicetree/bindings/nvmem/imx-ocotp.txt   |   4 +-
 .../bindings/nvmem/st,stm32-romem.txt         |  31 +++
 drivers/nvmem/Kconfig                         |  14 +-
 drivers/nvmem/Makefile                        |   2 +
 drivers/nvmem/core.c                          |  52 ++++-
 drivers/nvmem/imx-iim.c                       |   4 +-
 drivers/nvmem/imx-ocotp.c                     |  11 +-
 drivers/nvmem/mxs-ocotp.c                     |   4 +-
 drivers/nvmem/stm32-romem.c                   | 202 ++++++++++++++++++
 drivers/nvmem/sunxi_sid.c                     | 115 ++++------
 include/linux/nvmem-consumer.h                |   7 +
 12 files changed, 362 insertions(+), 87 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/nvmem/st,stm32-romem.txt
 create mode 100644 drivers/nvmem/stm32-romem.c

-- 
2.21.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RESEND PATCH 01/20] dt-bindings: imx-ocotp: Add i.MX8MQ compatible
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 02/20] nvmem: imx-ocotp: add support for imx8mq Srinivas Kandagatla
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Lucas Stach <l.stach@pengutronix.de>

Add compatible for i.MX8MQ and add i.MX7D/S, i.MX7ULP and i.M8MQ
to the description.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
index 7a999a135e56..68f7d6fdd140 100644
--- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
+++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
@@ -1,7 +1,8 @@
 Freescale i.MX6 On-Chip OTP Controller (OCOTP) device tree bindings
 
 This binding represents the on-chip eFuse OTP controller found on
-i.MX6Q/D, i.MX6DL/S, i.MX6SL, i.MX6SX, i.MX6UL, i.MX6ULL/ULZ and i.MX6SLL SoCs.
+i.MX6Q/D, i.MX6DL/S, i.MX6SL, i.MX6SX, i.MX6UL, i.MX6ULL/ULZ, i.MX6SLL,
+i.MX7D/S, i.MX7ULP and i.MX8MQ SoCs.
 
 Required properties:
 - compatible: should be one of
@@ -13,6 +14,7 @@ Required properties:
 	"fsl,imx7d-ocotp" (i.MX7D/S),
 	"fsl,imx6sll-ocotp" (i.MX6SLL),
 	"fsl,imx7ulp-ocotp" (i.MX7ULP),
+	"fsl,imx8mq-ocotp" (i.MX8MQ),
 	followed by "syscon".
 - #address-cells : Should be 1
 - #size-cells : Should be 1
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 02/20] nvmem: imx-ocotp: add support for imx8mq
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 01/20] dt-bindings: imx-ocotp: Add i.MX8MQ compatible Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 03/20] nvmem: imx-ocotp: broaden Kconfig dependency Srinivas Kandagatla
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Lucas Stach <l.stach@pengutronix.de>

The i.MX8MQ uses the same OCOTP block as the i.MX7D, but with
fourfold increase in fuse banks.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/imx-ocotp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index 08a9b1ef8ae4..e0b22b6c045b 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -444,6 +444,12 @@ static const struct ocotp_params imx7ulp_params = {
 	.bank_address_words = 0,
 };
 
+static const struct ocotp_params imx8mq_params = {
+	.nregs = 256,
+	.bank_address_words = 4,
+	.set_timing = imx_ocotp_set_imx7_timing,
+};
+
 static const struct of_device_id imx_ocotp_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-ocotp",  .data = &imx6q_params },
 	{ .compatible = "fsl,imx6sl-ocotp", .data = &imx6sl_params },
@@ -453,6 +459,7 @@ static const struct of_device_id imx_ocotp_dt_ids[] = {
 	{ .compatible = "fsl,imx7d-ocotp",  .data = &imx7d_params },
 	{ .compatible = "fsl,imx6sll-ocotp", .data = &imx6sll_params },
 	{ .compatible = "fsl,imx7ulp-ocotp", .data = &imx7ulp_params },
+	{ .compatible = "fsl,imx8mq-ocotp", .data = &imx8mq_params },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 03/20] nvmem: imx-ocotp: broaden Kconfig dependency
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 01/20] dt-bindings: imx-ocotp: Add i.MX8MQ compatible Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 02/20] nvmem: imx-ocotp: add support for imx8mq Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 04/20] nvmem: sunxi_sid: Read out SID for randomness without looping Srinivas Kandagatla
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Lucas Stach <l.stach@pengutronix.de>

The i.MX OCOTP controller is used in numerous Freescale/NXP
SoCs from the MXC family, so the strict dependency on the
i.MX6 SoC is too narrow. Broaden it to cover all the MXC
familiy members.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index 530d570724c9..9e1d83643e9c 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -25,8 +25,8 @@ config NVMEM_IMX_IIM
 	  will be called nvmem-imx-iim.
 
 config NVMEM_IMX_OCOTP
-	tristate "i.MX6 On-Chip OTP Controller support"
-	depends on SOC_IMX6 || SOC_IMX7D || COMPILE_TEST
+	tristate "i.MX 6/7/8 On-Chip OTP Controller support"
+	depends on ARCH_MXC || COMPILE_TEST
 	depends on HAS_IOMEM
 	help
 	  This is a driver for the On-Chip OTP Controller (OCOTP) available on
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 04/20] nvmem: sunxi_sid: Read out SID for randomness without looping
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (2 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 03/20] nvmem: imx-ocotp: broaden Kconfig dependency Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 05/20] nvmem: sunxi_sid: Optimize register read-out method Srinivas Kandagatla
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Chen-Yu Tsai <wens@csie.org>

Since the reg_read callbacks already support arbitrary, but 4-byte
aligned. offsets and lengths into the SID, there is no need for another
for loop just to use it to read 1 byte at a time.

Read out the whole SID block in one go.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/sunxi_sid.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 570a2e354f30..704c35edf796 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -154,7 +154,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct nvmem_device *nvmem;
 	struct sunxi_sid *sid;
-	int i, size;
+	int size;
 	char *randomness;
 	const struct sunxi_sid_cfg *cfg;
 
@@ -189,8 +189,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
 	if (!randomness)
 		return -ENOMEM;
 
-	for (i = 0; i < size; i++)
-		econfig.reg_read(sid, i, &randomness[i], 1);
+	econfig.reg_read(sid, 0, randomness, size);
 
 	add_device_randomness(randomness, size);
 	kfree(randomness);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 05/20] nvmem: sunxi_sid: Optimize register read-out method
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (3 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 04/20] nvmem: sunxi_sid: Read out SID for randomness without looping Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 06/20] nvmem: sunxi_sid: Dynamically allocate nvmem_config structure Srinivas Kandagatla
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Chen-Yu Tsai <wens@csie.org>

SID cells are 32-bit aligned, and a multiple of 32 bits in length. The
only outlier is the thermal sensor calibration data, which is 16 bits
per sensor. However a whole 64 bits is allocated for this purpose, so
we could consider it conforming to the rule above.

Also, the register read-out method assumes native endian, unlike the
direct MMIO method, which assumes big endian. Thus no endian conversion
is involved.

Under these assumptions, the register read-out method can be slightly
optimized. Instead of reading one word then discarding 3 bytes, read
the whole word directly into the buffer. However, for reads under 4
bytes or trailing bytes, we still use a scratch buffer to extract the
requested bytes.

We could go one step further if .word_size was 4, but changing that
would affect the sysfs interface's behavior.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/sunxi_sid.c | 38 ++++++++++++++++++--------------------
 1 file changed, 18 insertions(+), 20 deletions(-)

diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 704c35edf796..15fbfab62595 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -115,36 +115,34 @@ static int sun8i_sid_register_readout(const struct sunxi_sid *sid,
  * to be not reliable at all.
  * Read by the registers instead.
  */
-static int sun8i_sid_read_byte_by_reg(const struct sunxi_sid *sid,
-				      const unsigned int offset,
-				      u8 *out)
-{
-	u32 word;
-	int ret;
-
-	ret = sun8i_sid_register_readout(sid, offset & ~0x03, &word);
-
-	if (ret)
-		return ret;
-
-	*out = (word >> ((offset & 0x3) * 8)) & 0xff;
-
-	return 0;
-}
-
 static int sun8i_sid_read_by_reg(void *context, unsigned int offset,
 				 void *val, size_t bytes)
 {
 	struct sunxi_sid *sid = context;
-	u8 *buf = val;
+	u32 word;
 	int ret;
 
-	while (bytes--) {
-		ret = sun8i_sid_read_byte_by_reg(sid, offset++, buf++);
+	/* .stride = 4 so offset is guaranteed to be aligned */
+	while (bytes >= 4) {
+		ret = sun8i_sid_register_readout(sid, offset, val);
 		if (ret)
 			return ret;
+
+		val += 4;
+		offset += 4;
+		bytes -= 4;
 	}
 
+	if (!bytes)
+		return 0;
+
+	/* Handle any trailing bytes */
+	ret = sun8i_sid_register_readout(sid, offset, &word);
+	if (ret)
+		return ret;
+
+	memcpy(val, &word, bytes);
+
 	return 0;
 }
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 06/20] nvmem: sunxi_sid: Dynamically allocate nvmem_config structure
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (4 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 05/20] nvmem: sunxi_sid: Optimize register read-out method Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 07/20] nvmem: sunxi_sid: Read out data in native format Srinivas Kandagatla
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Chen-Yu Tsai <wens@csie.org>

The sunxi_sid driver currently uses a statically allocated nvmem_config
structure that is updated at probe time. This is sub-optimal as it
limits the driver to one instance, and also takes up space even if the
device is not present.

Modify the driver to allocate the nvmem_config structure at probe time,
plugging in the desired parameters along the way.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/sunxi_sid.c | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 15fbfab62595..75c1f48cb3d0 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -35,13 +35,6 @@
 #define SUN8I_SID_OP_LOCK	(0xAC << 8)
 #define SUN8I_SID_READ		BIT(1)
 
-static struct nvmem_config econfig = {
-	.name = "sunxi-sid",
-	.read_only = true,
-	.stride = 4,
-	.word_size = 1,
-};
-
 struct sunxi_sid_cfg {
 	u32	value_offset;
 	u32	size;
@@ -150,6 +143,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct resource *res;
+	struct nvmem_config *nvmem_cfg;
 	struct nvmem_device *nvmem;
 	struct sunxi_sid *sid;
 	int size;
@@ -172,14 +166,23 @@ static int sunxi_sid_probe(struct platform_device *pdev)
 
 	size = cfg->size;
 
-	econfig.size = size;
-	econfig.dev = dev;
+	nvmem_cfg = devm_kzalloc(dev, sizeof(*nvmem_cfg), GFP_KERNEL);
+	if (!nvmem_cfg)
+		return -ENOMEM;
+
+	nvmem_cfg->dev = dev;
+	nvmem_cfg->name = "sunxi-sid";
+	nvmem_cfg->read_only = true;
+	nvmem_cfg->size = cfg->size;
+	nvmem_cfg->word_size = 1;
+	nvmem_cfg->stride = 4;
+	nvmem_cfg->priv = sid;
 	if (cfg->need_register_readout)
-		econfig.reg_read = sun8i_sid_read_by_reg;
+		nvmem_cfg->reg_read = sun8i_sid_read_by_reg;
 	else
-		econfig.reg_read = sunxi_sid_read;
-	econfig.priv = sid;
-	nvmem = devm_nvmem_register(dev, &econfig);
+		nvmem_cfg->reg_read = sunxi_sid_read;
+
+	nvmem = devm_nvmem_register(dev, nvmem_cfg);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
@@ -187,8 +190,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
 	if (!randomness)
 		return -ENOMEM;
 
-	econfig.reg_read(sid, 0, randomness, size);
-
+	nvmem_cfg->reg_read(sid, 0, randomness, size);
 	add_device_randomness(randomness, size);
 	kfree(randomness);
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 07/20] nvmem: sunxi_sid: Read out data in native format
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (5 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 06/20] nvmem: sunxi_sid: Dynamically allocate nvmem_config structure Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 08/20] nvmem: sunxi_sid: Support SID on A83T and H5 Srinivas Kandagatla
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Chen-Yu Tsai <wens@csie.org>

Originally the SID e-fuses were thought to be in big-endian format.
Later sources show that they are in fact native or little-endian.
The most compelling evidence is the thermal sensor calibration data,
which is a set of one to three 16-bit values. In native-endian they
are in 16-bit cells with increasing offsets, whereas with big-endian
they are in the wrong order, and a gap with no data will show if there
are one or three cells.

Switch to a native endian representation for the nvmem device. For the
H3, the register read-out method was already returning data in native
endian. This only affects the other SoCs.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/sunxi_sid.c | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 75c1f48cb3d0..14c114620ed6 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -46,33 +46,12 @@ struct sunxi_sid {
 	u32			value_offset;
 };
 
-/* We read the entire key, due to a 32 bit read alignment requirement. Since we
- * want to return the requested byte, this results in somewhat slower code and
- * uses 4 times more reads as needed but keeps code simpler. Since the SID is
- * only very rarely probed, this is not really an issue.
- */
-static u8 sunxi_sid_read_byte(const struct sunxi_sid *sid,
-			      const unsigned int offset)
-{
-	u32 sid_key;
-
-	sid_key = ioread32be(sid->base + round_down(offset, 4));
-	sid_key >>= (offset % 4) * 8;
-
-	return sid_key; /* Only return the last byte */
-}
-
 static int sunxi_sid_read(void *context, unsigned int offset,
 			  void *val, size_t bytes)
 {
 	struct sunxi_sid *sid = context;
-	u8 *buf = val;
-
-	/* Offset the read operation to the real position of SID */
-	offset += sid->value_offset;
 
-	while (bytes--)
-		*buf++ = sunxi_sid_read_byte(sid, offset++);
+	memcpy_fromio(val, sid->base + sid->value_offset + offset, bytes);
 
 	return 0;
 }
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 08/20] nvmem: sunxi_sid: Support SID on A83T and H5
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (6 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 07/20] nvmem: sunxi_sid: Read out data in native format Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 09/20] dt-bindings: nvmem: Add STM32 factory-programmed romem Srinivas Kandagatla
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Chen-Yu Tsai <wens@csie.org>

The device tree binding already lists compatible strings for these two
SoCs. They don't have the defect as seen on the H3, and the size and
register layout is the same as the A64. Furthermore, the driver does
not include nvmem cell definitions.

Add support for these two compatible strings, re-using the config for
the A64.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/sunxi_sid.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 14c114620ed6..e7936380ce89 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -200,8 +200,10 @@ static const struct sunxi_sid_cfg sun50i_a64_cfg = {
 static const struct of_device_id sunxi_sid_of_match[] = {
 	{ .compatible = "allwinner,sun4i-a10-sid", .data = &sun4i_a10_cfg },
 	{ .compatible = "allwinner,sun7i-a20-sid", .data = &sun7i_a20_cfg },
+	{ .compatible = "allwinner,sun8i-a83t-sid", .data = &sun50i_a64_cfg },
 	{ .compatible = "allwinner,sun8i-h3-sid", .data = &sun8i_h3_cfg },
 	{ .compatible = "allwinner,sun50i-a64-sid", .data = &sun50i_a64_cfg },
+	{ .compatible = "allwinner,sun50i-h5-sid", .data = &sun50i_a64_cfg },
 	{/* sentinel */},
 };
 MODULE_DEVICE_TABLE(of, sunxi_sid_of_match);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 09/20] dt-bindings: nvmem: Add STM32 factory-programmed romem
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (7 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 08/20] nvmem: sunxi_sid: Support SID on A83T and H5 Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 10/20] nvmem: Add driver for STM32 factory-programmed read only mem Srinivas Kandagatla
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Fabrice Gasnier <fabrice.gasnier@st.com>

Add documentation for STMicroelectronics STM32 Factory-programmed
read only memory area.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 .../bindings/nvmem/st,stm32-romem.txt         | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/st,stm32-romem.txt

diff --git a/Documentation/devicetree/bindings/nvmem/st,stm32-romem.txt b/Documentation/devicetree/bindings/nvmem/st,stm32-romem.txt
new file mode 100644
index 000000000000..142a51d5a9be
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/st,stm32-romem.txt
@@ -0,0 +1,31 @@
+STMicroelectronics STM32 Factory-programmed data device tree bindings
+
+This represents STM32 Factory-programmed read only non-volatile area: locked
+flash, OTP, read-only HW regs... This contains various information such as:
+analog calibration data for temperature sensor (e.g. TS_CAL1, TS_CAL2),
+internal vref (VREFIN_CAL), unique device ID...
+
+Required properties:
+- compatible:		Should be one of:
+			"st,stm32f4-otp"
+			"st,stm32mp15-bsec"
+- reg:			Offset and length of factory-programmed area.
+- #address-cells:	Should be '<1>'.
+- #size-cells:		Should be '<1>'.
+
+Optional Data cells:
+- Must be child nodes as described in nvmem.txt.
+
+Example on stm32f4:
+	romem: nvmem@1fff7800 {
+		compatible = "st,stm32f4-otp";
+		reg = <0x1fff7800 0x400>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		/* Data cells: ts_cal1 at 0x1fff7a2c */
+		ts_cal1: calib@22c {
+			reg = <0x22c 0x2>;
+		};
+		...
+	};
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 10/20] nvmem: Add driver for STM32 factory-programmed read only mem
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (8 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 09/20] dt-bindings: nvmem: Add STM32 factory-programmed romem Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 11/20] nvmem: stm32: add support for STM32MP15 BSEC to control OTP data Srinivas Kandagatla
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Fabrice Gasnier <fabrice.gasnier@st.com>

Add a read only nvmem driver for STM32 factory-programmed memory area
(on-chip non-volatile storage).

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/Kconfig       | 10 +++++
 drivers/nvmem/Makefile      |  2 +
 drivers/nvmem/stm32-romem.c | 78 +++++++++++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+)
 create mode 100644 drivers/nvmem/stm32-romem.c

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index 9e1d83643e9c..a90e9a1ebe55 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -113,6 +113,16 @@ config NVMEM_BCM_OCOTP
 	  This driver can also be built as a module. If so, the module
 	  will be called nvmem-bcm-ocotp.
 
+config NVMEM_STM32_ROMEM
+	tristate "STMicroelectronics STM32 factory-programmed memory support"
+	depends on ARCH_STM32 || COMPILE_TEST
+	help
+	  Say y here to enable read-only access for STMicroelectronics STM32
+	  factory-programmed memory area.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called nvmem-stm32-romem.
+
 config NVMEM_SUNXI_SID
 	tristate "Allwinner SoCs SID support"
 	depends on ARCH_SUNXI
diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile
index 2ece8ffffdda..4c7ba12a7005 100644
--- a/drivers/nvmem/Makefile
+++ b/drivers/nvmem/Makefile
@@ -26,6 +26,8 @@ nvmem_qfprom-y			:= qfprom.o
 obj-$(CONFIG_ROCKCHIP_EFUSE)	+= nvmem_rockchip_efuse.o
 nvmem_rockchip_efuse-y		:= rockchip-efuse.o
 obj-$(CONFIG_NVMEM_SUNXI_SID)	+= nvmem_sunxi_sid.o
+nvmem_stm32_romem-y 		:= stm32-romem.o
+obj-$(CONFIG_NVMEM_STM32_ROMEM) += nvmem_stm32_romem.o
 nvmem_sunxi_sid-y		:= sunxi_sid.o
 obj-$(CONFIG_UNIPHIER_EFUSE)	+= nvmem-uniphier-efuse.o
 nvmem-uniphier-efuse-y		:= uniphier-efuse.o
diff --git a/drivers/nvmem/stm32-romem.c b/drivers/nvmem/stm32-romem.c
new file mode 100644
index 000000000000..07e98b53b391
--- /dev/null
+++ b/drivers/nvmem/stm32-romem.c
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * STM32 Factory-programmed memory read access driver
+ *
+ * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
+ * Author: Fabrice Gasnier <fabrice.gasnier@st.com> for STMicroelectronics.
+ */
+
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/nvmem-provider.h>
+#include <linux/of_device.h>
+
+struct stm32_romem_priv {
+	void __iomem *base;
+	struct nvmem_config cfg;
+};
+
+static int stm32_romem_read(void *context, unsigned int offset, void *buf,
+			    size_t bytes)
+{
+	struct stm32_romem_priv *priv = context;
+	u8 *buf8 = buf;
+	int i;
+
+	for (i = offset; i < offset + bytes; i++)
+		*buf8++ = readb_relaxed(priv->base + i);
+
+	return 0;
+}
+
+static int stm32_romem_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct stm32_romem_priv *priv;
+	struct resource *res;
+
+	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	priv->base = devm_ioremap_resource(dev, res);
+	if (IS_ERR(priv->base))
+		return PTR_ERR(priv->base);
+
+	priv->cfg.name = "stm32-romem";
+	priv->cfg.read_only = true;
+	priv->cfg.word_size = 1;
+	priv->cfg.stride = 1;
+	priv->cfg.size = resource_size(res);
+	priv->cfg.reg_read = stm32_romem_read;
+	priv->cfg.dev = dev;
+	priv->cfg.priv = priv;
+	priv->cfg.owner = THIS_MODULE;
+
+	return PTR_ERR_OR_ZERO(devm_nvmem_register(dev, &priv->cfg));
+}
+
+static const struct of_device_id stm32_romem_of_match[] = {
+	{ .compatible = "st,stm32f4-otp", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, stm32_romem_of_match);
+
+static struct platform_driver stm32_romem_driver = {
+	.probe = stm32_romem_probe,
+	.driver = {
+		.name = "stm32-romem",
+		.of_match_table = of_match_ptr(stm32_romem_of_match),
+	},
+};
+module_platform_driver(stm32_romem_driver);
+
+MODULE_AUTHOR("Fabrice Gasnier <fabrice.gasnier@st.com>");
+MODULE_DESCRIPTION("STMicroelectronics STM32 RO-MEM");
+MODULE_ALIAS("platform:nvmem-stm32-romem");
+MODULE_LICENSE("GPL v2");
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 11/20] nvmem: stm32: add support for STM32MP15 BSEC to control OTP data
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (9 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 10/20] nvmem: Add driver for STM32 factory-programmed read only mem Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 12/20] nvmem: core: add nvmem_cell_read_u16 Srinivas Kandagatla
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Fabrice Gasnier <fabrice.gasnier@st.com>

On STM32MP15, OTP area may be read/written by using BSEC (boot, security
and OTP control). BSEC registers set is composed of various regions, among
which control registers and OTP shadow registers.
Secure monitor calls are involved in this process to allow (or deny)
access to the full range of OTP data.
This adds support for reading and writing OTP data using SMC services.
Data content can be aligned on 16-bits or 8-bits. Then take care of it,
since BSEC data is 32-bits wide.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/stm32-romem.c | 134 ++++++++++++++++++++++++++++++++++--
 1 file changed, 129 insertions(+), 5 deletions(-)

diff --git a/drivers/nvmem/stm32-romem.c b/drivers/nvmem/stm32-romem.c
index 07e98b53b391..354be526897f 100644
--- a/drivers/nvmem/stm32-romem.c
+++ b/drivers/nvmem/stm32-romem.c
@@ -6,11 +6,29 @@
  * Author: Fabrice Gasnier <fabrice.gasnier@st.com> for STMicroelectronics.
  */
 
+#include <linux/arm-smccc.h>
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/nvmem-provider.h>
 #include <linux/of_device.h>
 
+/* BSEC secure service access from non-secure */
+#define STM32_SMC_BSEC			0x82001003
+#define STM32_SMC_READ_SHADOW		0x01
+#define STM32_SMC_PROG_OTP		0x02
+#define STM32_SMC_WRITE_SHADOW		0x03
+#define STM32_SMC_READ_OTP		0x04
+
+/* shadow registers offest */
+#define STM32MP15_BSEC_DATA0		0x200
+
+/* 32 (x 32-bits) lower shadow registers */
+#define STM32MP15_BSEC_NUM_LOWER	32
+
+struct stm32_romem_cfg {
+	int size;
+};
+
 struct stm32_romem_priv {
 	void __iomem *base;
 	struct nvmem_config cfg;
@@ -29,8 +47,98 @@ static int stm32_romem_read(void *context, unsigned int offset, void *buf,
 	return 0;
 }
 
+static int stm32_bsec_smc(u8 op, u32 otp, u32 data, u32 *result)
+{
+#if IS_ENABLED(CONFIG_HAVE_ARM_SMCCC)
+	struct arm_smccc_res res;
+
+	arm_smccc_smc(STM32_SMC_BSEC, op, otp, data, 0, 0, 0, 0, &res);
+	if (res.a0)
+		return -EIO;
+
+	if (result)
+		*result = (u32)res.a1;
+
+	return 0;
+#else
+	return -ENXIO;
+#endif
+}
+
+static int stm32_bsec_read(void *context, unsigned int offset, void *buf,
+			   size_t bytes)
+{
+	struct stm32_romem_priv *priv = context;
+	struct device *dev = priv->cfg.dev;
+	u32 roffset, rbytes, val;
+	u8 *buf8 = buf, *val8 = (u8 *)&val;
+	int i, j = 0, ret, skip_bytes, size;
+
+	/* Round unaligned access to 32-bits */
+	roffset = rounddown(offset, 4);
+	skip_bytes = offset & 0x3;
+	rbytes = roundup(bytes + skip_bytes, 4);
+
+	if (roffset + rbytes > priv->cfg.size)
+		return -EINVAL;
+
+	for (i = roffset; (i < roffset + rbytes); i += 4) {
+		u32 otp = i >> 2;
+
+		if (otp < STM32MP15_BSEC_NUM_LOWER) {
+			/* read lower data from shadow registers */
+			val = readl_relaxed(
+				priv->base + STM32MP15_BSEC_DATA0 + i);
+		} else {
+			ret = stm32_bsec_smc(STM32_SMC_READ_SHADOW, otp, 0,
+					     &val);
+			if (ret) {
+				dev_err(dev, "Can't read data%d (%d)\n", otp,
+					ret);
+				return ret;
+			}
+		}
+		/* skip first bytes in case of unaligned read */
+		if (skip_bytes)
+			size = min(bytes, (size_t)(4 - skip_bytes));
+		else
+			size = min(bytes, (size_t)4);
+		memcpy(&buf8[j], &val8[skip_bytes], size);
+		bytes -= size;
+		j += size;
+		skip_bytes = 0;
+	}
+
+	return 0;
+}
+
+static int stm32_bsec_write(void *context, unsigned int offset, void *buf,
+			    size_t bytes)
+{
+	struct stm32_romem_priv *priv = context;
+	struct device *dev = priv->cfg.dev;
+	u32 *buf32 = buf;
+	int ret, i;
+
+	/* Allow only writing complete 32-bits aligned words */
+	if ((bytes % 4) || (offset % 4))
+		return -EINVAL;
+
+	for (i = offset; i < offset + bytes; i += 4) {
+		ret = stm32_bsec_smc(STM32_SMC_PROG_OTP, i >> 2, *buf32++,
+				     NULL);
+		if (ret) {
+			dev_err(dev, "Can't write data%d (%d)\n", i >> 2, ret);
+			return ret;
+		}
+	}
+
+	return 0;
+}
+
 static int stm32_romem_probe(struct platform_device *pdev)
 {
+	const struct stm32_romem_cfg *cfg;
 	struct device *dev = &pdev->dev;
 	struct stm32_romem_priv *priv;
 	struct resource *res;
@@ -45,21 +153,37 @@ static int stm32_romem_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->base);
 
 	priv->cfg.name = "stm32-romem";
-	priv->cfg.read_only = true;
 	priv->cfg.word_size = 1;
 	priv->cfg.stride = 1;
-	priv->cfg.size = resource_size(res);
-	priv->cfg.reg_read = stm32_romem_read;
 	priv->cfg.dev = dev;
 	priv->cfg.priv = priv;
 	priv->cfg.owner = THIS_MODULE;
 
+	cfg = (const struct stm32_romem_cfg *)
+		of_match_device(dev->driver->of_match_table, dev)->data;
+	if (!cfg) {
+		priv->cfg.read_only = true;
+		priv->cfg.size = resource_size(res);
+		priv->cfg.reg_read = stm32_romem_read;
+	} else {
+		priv->cfg.size = cfg->size;
+		priv->cfg.reg_read = stm32_bsec_read;
+		priv->cfg.reg_write = stm32_bsec_write;
+	}
+
 	return PTR_ERR_OR_ZERO(devm_nvmem_register(dev, &priv->cfg));
 }
 
+static const struct stm32_romem_cfg stm32mp15_bsec_cfg = {
+	.size = 384, /* 96 x 32-bits data words */
+};
+
 static const struct of_device_id stm32_romem_of_match[] = {
-	{ .compatible = "st,stm32f4-otp", },
-	{},
+	{ .compatible = "st,stm32f4-otp", }, {
+		.compatible = "st,stm32mp15-bsec",
+		.data = (void *)&stm32mp15_bsec_cfg,
+	}, {
+	},
 };
 MODULE_DEVICE_TABLE(of, stm32_romem_of_match);
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 12/20] nvmem: core: add nvmem_cell_read_u16
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (10 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 11/20] nvmem: stm32: add support for STM32MP15 BSEC to control OTP data Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 13/20] nvmem: core: fix read buffer in place Srinivas Kandagatla
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Fabrice Gasnier <fabrice.gasnier@st.com>

Add nvmem_cell_read_u16() helper to ease read of an u16 value on consumer
side. This is inspired by nvmem_cell_read_u32() function.
This helper is useful on stm32 that has 16 bits data cells stored in non
volatile memory.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/core.c           | 37 ++++++++++++++++++++++++++++++++++
 include/linux/nvmem-consumer.h |  7 +++++++
 2 files changed, 44 insertions(+)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index f24008b66826..1d00f5671368 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -1334,6 +1334,43 @@ int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len)
 }
 EXPORT_SYMBOL_GPL(nvmem_cell_write);
 
+/**
+ * nvmem_cell_read_u16() - Read a cell value as an u16
+ *
+ * @dev: Device that requests the nvmem cell.
+ * @cell_id: Name of nvmem cell to read.
+ * @val: pointer to output value.
+ *
+ * Return: 0 on success or negative errno.
+ */
+int nvmem_cell_read_u16(struct device *dev, const char *cell_id, u16 *val)
+{
+	struct nvmem_cell *cell;
+	void *buf;
+	size_t len;
+
+	cell = nvmem_cell_get(dev, cell_id);
+	if (IS_ERR(cell))
+		return PTR_ERR(cell);
+
+	buf = nvmem_cell_read(cell, &len);
+	if (IS_ERR(buf)) {
+		nvmem_cell_put(cell);
+		return PTR_ERR(buf);
+	}
+	if (len != sizeof(*val)) {
+		kfree(buf);
+		nvmem_cell_put(cell);
+		return -EINVAL;
+	}
+	memcpy(val, buf, sizeof(*val));
+	kfree(buf);
+	nvmem_cell_put(cell);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(nvmem_cell_read_u16);
+
 /**
  * nvmem_cell_read_u32() - Read a cell value as an u32
  *
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 312bfa5efd80..8f8be5b00060 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -61,6 +61,7 @@ void nvmem_cell_put(struct nvmem_cell *cell);
 void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell);
 void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len);
 int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len);
+int nvmem_cell_read_u16(struct device *dev, const char *cell_id, u16 *val);
 int nvmem_cell_read_u32(struct device *dev, const char *cell_id, u32 *val);
 
 /* direct nvmem device read/write interface */
@@ -122,6 +123,12 @@ static inline int nvmem_cell_write(struct nvmem_cell *cell,
 	return -EOPNOTSUPP;
 }
 
+static inline int nvmem_cell_read_u16(struct device *dev,
+				      const char *cell_id, u16 *val)
+{
+	return -EOPNOTSUPP;
+}
+
 static inline int nvmem_cell_read_u32(struct device *dev,
 				      const char *cell_id, u32 *val)
 {
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 13/20] nvmem: core: fix read buffer in place
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (11 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 12/20] nvmem: core: add nvmem_cell_read_u16 Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:32 ` [RESEND PATCH 14/20] nvmem: imx-ocotp: use devm_platform_ioremap_resource() to simplify code Srinivas Kandagatla
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>

When the bit_offset in the cell is zero, the pointer to the msb will
not be properly initialized (ie, will still be pointing to the first
byte in the buffer).

This being the case, if there are bits to clear in the msb, those will
be left untouched while the mask will incorrectly clear bit positions
on the first byte.

This commit also makes sure that any byte unused in the cell is
cleared.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/core.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 1d00f5671368..5abebf2128b8 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -1166,7 +1166,7 @@ EXPORT_SYMBOL_GPL(nvmem_cell_put);
 static void nvmem_shift_read_buffer_in_place(struct nvmem_cell *cell, void *buf)
 {
 	u8 *p, *b;
-	int i, bit_offset = cell->bit_offset;
+	int i, extra, bit_offset = cell->bit_offset;
 
 	p = b = buf;
 	if (bit_offset) {
@@ -1181,11 +1181,16 @@ static void nvmem_shift_read_buffer_in_place(struct nvmem_cell *cell, void *buf)
 			p = b;
 			*b++ >>= bit_offset;
 		}
-
-		/* result fits in less bytes */
-		if (cell->bytes != DIV_ROUND_UP(cell->nbits, BITS_PER_BYTE))
-			*p-- = 0;
+	} else {
+		/* point to the msb */
+		p += cell->bytes - 1;
 	}
+
+	/* result fits in less bytes */
+	extra = cell->bytes - DIV_ROUND_UP(cell->nbits, BITS_PER_BYTE);
+	while (--extra >= 0)
+		*p-- = 0;
+
 	/* clear msb bits if any leftover in the last byte */
 	*p &= GENMASK((cell->nbits%BITS_PER_BYTE) - 1, 0);
 }
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 14/20] nvmem: imx-ocotp: use devm_platform_ioremap_resource() to simplify code
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (12 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 13/20] nvmem: core: fix read buffer in place Srinivas Kandagatla
@ 2019-04-13 10:32 ` Srinivas Kandagatla
  2019-04-13 10:33 ` [RESEND PATCH 15/20] nvmem: mxs-ocotp: " Srinivas Kandagatla
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:32 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Anson Huang <anson.huang@nxp.com>

Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/imx-ocotp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index e0b22b6c045b..4cf7b61e4bf5 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -467,7 +467,6 @@ MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);
 static int imx_ocotp_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	struct ocotp_priv *priv;
 	struct nvmem_device *nvmem;
 
@@ -477,8 +476,7 @@ static int imx_ocotp_probe(struct platform_device *pdev)
 
 	priv->dev = dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->base = devm_ioremap_resource(dev, res);
+	priv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->base))
 		return PTR_ERR(priv->base);
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 15/20] nvmem: mxs-ocotp: use devm_platform_ioremap_resource() to simplify code
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (13 preceding siblings ...)
  2019-04-13 10:32 ` [RESEND PATCH 14/20] nvmem: imx-ocotp: use devm_platform_ioremap_resource() to simplify code Srinivas Kandagatla
@ 2019-04-13 10:33 ` Srinivas Kandagatla
  2019-04-13 10:33 ` [RESEND PATCH 16/20] nvmem: imx-iim: " Srinivas Kandagatla
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:33 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Anson Huang <anson.huang@nxp.com>

Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/mxs-ocotp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/nvmem/mxs-ocotp.c b/drivers/nvmem/mxs-ocotp.c
index 53122f59c4b2..fbb7db6ee1f5 100644
--- a/drivers/nvmem/mxs-ocotp.c
+++ b/drivers/nvmem/mxs-ocotp.c
@@ -145,7 +145,6 @@ static int mxs_ocotp_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	const struct mxs_data *data;
 	struct mxs_ocotp *otp;
-	struct resource *res;
 	const struct of_device_id *match;
 	int ret;
 
@@ -157,8 +156,7 @@ static int mxs_ocotp_probe(struct platform_device *pdev)
 	if (!otp)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	otp->base = devm_ioremap_resource(dev, res);
+	otp->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(otp->base))
 		return PTR_ERR(otp->base);
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 16/20] nvmem: imx-iim: use devm_platform_ioremap_resource() to simplify code
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (14 preceding siblings ...)
  2019-04-13 10:33 ` [RESEND PATCH 15/20] nvmem: mxs-ocotp: " Srinivas Kandagatla
@ 2019-04-13 10:33 ` Srinivas Kandagatla
  2019-04-13 10:33 ` [RESEND PATCH 17/20] nvmem: sunxi-sid: fix wrong description in kernel doc Srinivas Kandagatla
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:33 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Anson Huang <anson.huang@nxp.com>

Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/imx-iim.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/nvmem/imx-iim.c b/drivers/nvmem/imx-iim.c
index 6651e4cdc002..34582293b985 100644
--- a/drivers/nvmem/imx-iim.c
+++ b/drivers/nvmem/imx-iim.c
@@ -104,7 +104,6 @@ static int imx_iim_probe(struct platform_device *pdev)
 {
 	const struct of_device_id *of_id;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	struct iim_priv *iim;
 	struct nvmem_device *nvmem;
 	struct nvmem_config cfg = {};
@@ -114,8 +113,7 @@ static int imx_iim_probe(struct platform_device *pdev)
 	if (!iim)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	iim->base = devm_ioremap_resource(dev, res);
+	iim->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(iim->base))
 		return PTR_ERR(iim->base);
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 17/20] nvmem: sunxi-sid: fix wrong description in kernel doc
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (15 preceding siblings ...)
  2019-04-13 10:33 ` [RESEND PATCH 16/20] nvmem: imx-iim: " Srinivas Kandagatla
@ 2019-04-13 10:33 ` Srinivas Kandagatla
  2019-04-13 10:33 ` [RESEND PATCH 18/20] nvmem: sunxi-sid: add binding for H6's SID controller Srinivas Kandagatla
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:33 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Yangtao Li <tiny.windzz@gmail.com>

qfprom->sunxi-sid

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
index 99c4ba6a3f61..d37017e343b1 100644
--- a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
+++ b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
@@ -12,7 +12,7 @@ Required properties:
 - reg: Should contain registers location and length
 
 = Data cells =
-Are child nodes of qfprom, bindings of which as described in
+Are child nodes of sunxi-sid, bindings of which as described in
 bindings/nvmem/nvmem.txt
 
 Example for sun4i:
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 18/20] nvmem: sunxi-sid: add binding for H6's SID controller
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (16 preceding siblings ...)
  2019-04-13 10:33 ` [RESEND PATCH 17/20] nvmem: sunxi-sid: fix wrong description in kernel doc Srinivas Kandagatla
@ 2019-04-13 10:33 ` Srinivas Kandagatla
  2019-04-13 10:33 ` [RESEND PATCH 19/20] nvmem: sunxi-sid: convert to SPDX license tags Srinivas Kandagatla
  2019-04-13 10:33 ` [RESEND PATCH 20/20] nvmem: sunxi_sid: Support SID on H6 Srinivas Kandagatla
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:33 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Yangtao Li <tiny.windzz@gmail.com>

Add a binding for H6's SID controller.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
index d37017e343b1..cfb18b4ef8f7 100644
--- a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
+++ b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
@@ -8,6 +8,7 @@ Required properties:
   "allwinner,sun8i-h3-sid"
   "allwinner,sun50i-a64-sid"
   "allwinner,sun50i-h5-sid"
+  "allwinner,sun50i-h6-sid"
 
 - reg: Should contain registers location and length
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 19/20] nvmem: sunxi-sid: convert to SPDX license tags
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (17 preceding siblings ...)
  2019-04-13 10:33 ` [RESEND PATCH 18/20] nvmem: sunxi-sid: add binding for H6's SID controller Srinivas Kandagatla
@ 2019-04-13 10:33 ` Srinivas Kandagatla
  2019-04-13 10:33 ` [RESEND PATCH 20/20] nvmem: sunxi_sid: Support SID on H6 Srinivas Kandagatla
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:33 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Yangtao Li <tiny.windzz@gmail.com>

Updates license to use SPDX-License-Identifier.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/sunxi_sid.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index e7936380ce89..7013f9cc43c7 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -1,18 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Allwinner sunXi SoCs Security ID support.
  *
  * Copyright (c) 2013 Oliver Schinagl <oliver@schinagl.nl>
  * Copyright (C) 2014 Maxime Ripard <maxime.ripard@free-electrons.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 
 #include <linux/device.h>
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [RESEND PATCH 20/20] nvmem: sunxi_sid: Support SID on H6
  2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
                   ` (18 preceding siblings ...)
  2019-04-13 10:33 ` [RESEND PATCH 19/20] nvmem: sunxi-sid: convert to SPDX license tags Srinivas Kandagatla
@ 2019-04-13 10:33 ` Srinivas Kandagatla
  19 siblings, 0 replies; 21+ messages in thread
From: Srinivas Kandagatla @ 2019-04-13 10:33 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, srinivas.kandagatla

From: Yangtao Li <tiny.windzz@gmail.com>

Add support for H6's SID controller. It supports 4K-bit
EFUSE, bigger than before.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/sunxi_sid.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 7013f9cc43c7..a079a80ddf2c 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -188,6 +188,11 @@ static const struct sunxi_sid_cfg sun50i_a64_cfg = {
 	.size = 0x100,
 };
 
+static const struct sunxi_sid_cfg sun50i_h6_cfg = {
+	.value_offset = 0x200,
+	.size = 0x200,
+};
+
 static const struct of_device_id sunxi_sid_of_match[] = {
 	{ .compatible = "allwinner,sun4i-a10-sid", .data = &sun4i_a10_cfg },
 	{ .compatible = "allwinner,sun7i-a20-sid", .data = &sun7i_a20_cfg },
@@ -195,6 +200,7 @@ static const struct of_device_id sunxi_sid_of_match[] = {
 	{ .compatible = "allwinner,sun8i-h3-sid", .data = &sun8i_h3_cfg },
 	{ .compatible = "allwinner,sun50i-a64-sid", .data = &sun50i_a64_cfg },
 	{ .compatible = "allwinner,sun50i-h5-sid", .data = &sun50i_a64_cfg },
+	{ .compatible = "allwinner,sun50i-h6-sid", .data = &sun50i_h6_cfg },
 	{/* sentinel */},
 };
 MODULE_DEVICE_TABLE(of, sunxi_sid_of_match);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-04-13 10:34 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-13 10:32 [RESEND PATCH 00/20] nvmem: patches(set 1) for 5.2 Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 01/20] dt-bindings: imx-ocotp: Add i.MX8MQ compatible Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 02/20] nvmem: imx-ocotp: add support for imx8mq Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 03/20] nvmem: imx-ocotp: broaden Kconfig dependency Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 04/20] nvmem: sunxi_sid: Read out SID for randomness without looping Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 05/20] nvmem: sunxi_sid: Optimize register read-out method Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 06/20] nvmem: sunxi_sid: Dynamically allocate nvmem_config structure Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 07/20] nvmem: sunxi_sid: Read out data in native format Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 08/20] nvmem: sunxi_sid: Support SID on A83T and H5 Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 09/20] dt-bindings: nvmem: Add STM32 factory-programmed romem Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 10/20] nvmem: Add driver for STM32 factory-programmed read only mem Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 11/20] nvmem: stm32: add support for STM32MP15 BSEC to control OTP data Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 12/20] nvmem: core: add nvmem_cell_read_u16 Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 13/20] nvmem: core: fix read buffer in place Srinivas Kandagatla
2019-04-13 10:32 ` [RESEND PATCH 14/20] nvmem: imx-ocotp: use devm_platform_ioremap_resource() to simplify code Srinivas Kandagatla
2019-04-13 10:33 ` [RESEND PATCH 15/20] nvmem: mxs-ocotp: " Srinivas Kandagatla
2019-04-13 10:33 ` [RESEND PATCH 16/20] nvmem: imx-iim: " Srinivas Kandagatla
2019-04-13 10:33 ` [RESEND PATCH 17/20] nvmem: sunxi-sid: fix wrong description in kernel doc Srinivas Kandagatla
2019-04-13 10:33 ` [RESEND PATCH 18/20] nvmem: sunxi-sid: add binding for H6's SID controller Srinivas Kandagatla
2019-04-13 10:33 ` [RESEND PATCH 19/20] nvmem: sunxi-sid: convert to SPDX license tags Srinivas Kandagatla
2019-04-13 10:33 ` [RESEND PATCH 20/20] nvmem: sunxi_sid: Support SID on H6 Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).