* [PATCH 00/22] nvmem: patches for v6.6
@ 2023-08-14 16:52 Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 01/22] dt-bindings: nvmem: fixed-cell: add compatible for MAC cells Srinivas Kandagatla
` (22 more replies)
0 siblings, 23 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla
Here are some nvmem patches slightly more than usual for 6.6 that includes
- Support for NXP eFuse, qcom secure qfprom, QCM2290 nvmem providers
- core level cleanup around error handling and layout creation.
- few minor cleanups across providers drivers to use better
apis and a typo fix.
Can you please queue them up for 6.6.
Thanks,
Srini
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Atul Raut (1):
nvmem: u-boot-env:: Replace zero-length array with
DECLARE_FLEX_ARRAY() helper
Diederik de Haas (1):
nvmem: Kconfig: Fix typo "drive" -> "driver"
Komal Bajaj (2):
dt-bindings: nvmem: sec-qfprom: Add bindings for secure qfprom
nvmem: sec-qfprom: Add Qualcomm secure QFPROM support
Konrad Dybcio (1):
dt-bindings: nvmem: Add compatible for QCM2290
Matti Lehtimäki (1):
dt-bindings: nvmem: qfprom: Add compatible for MSM8226
Miquel Raynal (4):
nvmem: core: Create all cells before adding the nvmem device
nvmem: core: Return NULL when no nvmem layout is found
nvmem: core: Do not open-code existing functions
nvmem: core: Notify when a new layout is registered
Rafał Miłecki (1):
dt-bindings: nvmem: fixed-cell: add compatible for MAC cells
Richard Alpe (2):
dt-bindings: nvmem: Add t1023-sfp efuse support
nvmem: add new NXP QorIQ eFuse driver
Rob Herring (1):
nvmem: Explicitly include correct DT includes
Yangtao Li (8):
nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource()
nvmem: brcm_nvram: Use devm_platform_get_and_ioremap_resource()
nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource()
nvmem: meson-mx-efuse: Convert to devm_platform_ioremap_resource()
nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource()
nvmem: stm32-romem: Use devm_platform_get_and_ioremap_resource()
nvmem: qfprom: do some cleanup
nvmem: uniphier: Use devm_platform_get_and_ioremap_resource()
.../bindings/nvmem/fsl,t1023-sfp.yaml | 37 +++++++
.../bindings/nvmem/layouts/fixed-cell.yaml | 26 +++++
.../bindings/nvmem/layouts/fixed-layout.yaml | 12 +++
.../devicetree/bindings/nvmem/nvmem.yaml | 5 +-
.../bindings/nvmem/qcom,qfprom.yaml | 2 +
.../bindings/nvmem/qcom,sec-qfprom.yaml | 55 +++++++++++
drivers/nvmem/Kconfig | 31 +++++-
drivers/nvmem/Makefile | 4 +
drivers/nvmem/bcm-ocotp.c | 1 -
drivers/nvmem/brcm_nvram.c | 3 +-
drivers/nvmem/core.c | 19 ++--
drivers/nvmem/imx-iim.c | 1 -
drivers/nvmem/imx-ocotp-ele.c | 2 +-
drivers/nvmem/imx-ocotp-scu.c | 2 +-
drivers/nvmem/imx-ocotp.c | 1 -
drivers/nvmem/lpc18xx_otp.c | 5 +-
drivers/nvmem/meson-mx-efuse.c | 5 +-
drivers/nvmem/qcom-spmi-sdam.c | 2 +-
drivers/nvmem/qfprom.c | 17 +---
drivers/nvmem/qoriq-efuse.c | 78 +++++++++++++++
drivers/nvmem/rave-sp-eeprom.c | 2 +-
drivers/nvmem/rockchip-efuse.c | 3 +-
drivers/nvmem/sc27xx-efuse.c | 1 -
drivers/nvmem/sec-qfprom.c | 97 +++++++++++++++++++
drivers/nvmem/snvs_lpgpr.c | 3 +-
drivers/nvmem/sprd-efuse.c | 2 +-
drivers/nvmem/stm32-romem.c | 3 +-
drivers/nvmem/sunplus-ocotp.c | 2 +-
drivers/nvmem/sunxi_sid.c | 5 +-
drivers/nvmem/u-boot-env.c | 4 +-
drivers/nvmem/uniphier-efuse.c | 3 +-
include/linux/nvmem-consumer.h | 4 +-
32 files changed, 379 insertions(+), 58 deletions(-)
create mode 100644 Documentation/devicetree/bindings/nvmem/fsl,t1023-sfp.yaml
create mode 100644 Documentation/devicetree/bindings/nvmem/qcom,sec-qfprom.yaml
create mode 100644 drivers/nvmem/qoriq-efuse.c
create mode 100644 drivers/nvmem/sec-qfprom.c
--
2.25.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 01/22] dt-bindings: nvmem: fixed-cell: add compatible for MAC cells
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 02/22] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource() Srinivas Kandagatla
` (21 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh
Cc: linux-kernel, Rafał Miłecki, Rob Herring,
Srinivas Kandagatla
From: Rafał Miłecki <rafal@milecki.pl>
A lot of home routers have NVMEM fixed cells containing MAC address that
need some further processing. In ~99% cases MAC needs to be:
1. Optionally parsed from ASCII format
2. Increased by a vendor-picked value
There was already an attempt to design a binding for that at NVMEM
device level in the past. It wasn't accepted though as it didn't really
fit NVMEM device layer.
The introduction of NVMEM fixed-cells layout seems to be an opportunity
to provide a relevant binding in a clean way.
This commit adds a *generic* compatible string: "mac-base". As always it
needs to be carefully reviewed.
OpenWrt project currently supports ~300 home routers that have NVMEM
cell with binary-stored base MAC.T hose devices are manufactured by
multiple vendors. There are TP-Link devices (76 of them), Netgear (19),
D-Link (11), OpenMesh (9), EnGenius (8), GL.iNet (8), ZTE (7),
Xiaomi (5), Ubiquiti (6) and more. Those devices don't share an
architecture or SoC.
Another 200 devices have base MAC stored in an ASCII format (not all
those devices have been converted to DT though).
It would be impractical to provide unique "compatible" strings for NVMEM
layouts of all those devices. It seems like a valid case for allowing a
generic binding instead. Even if this binding will not be sufficient for
some further devices it seems to be useful enough as it is.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
.../bindings/nvmem/layouts/fixed-cell.yaml | 26 +++++++++++++++++++
.../bindings/nvmem/layouts/fixed-layout.yaml | 12 +++++++++
.../devicetree/bindings/nvmem/nvmem.yaml | 5 +++-
3 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml b/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
index e698098450e1..ac2381e66027 100644
--- a/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
+++ b/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
@@ -11,6 +11,15 @@ maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
properties:
+ compatible:
+ oneOf:
+ - const: mac-base
+ description: >
+ Cell with base MAC address to be used for calculating extra relative
+ addresses.
+ It can be stored in a plain binary format (cell length 6) or as an
+ ASCII text like "00:11:22:33:44:55" (cell length 17).
+
reg:
maxItems: 1
@@ -25,6 +34,23 @@ properties:
description:
Size in bit within the address range specified by reg.
+allOf:
+ - if:
+ required: [ compatible ]
+ then:
+ if:
+ properties:
+ compatible:
+ contains:
+ const: mac-base
+ then:
+ properties:
+ "#nvmem-cell-cells":
+ description: The first argument is a MAC address offset.
+ const: 1
+ required:
+ - "#nvmem-cell-cells"
+
required:
- reg
diff --git a/Documentation/devicetree/bindings/nvmem/layouts/fixed-layout.yaml b/Documentation/devicetree/bindings/nvmem/layouts/fixed-layout.yaml
index c271537d0714..9bd34bd5af30 100644
--- a/Documentation/devicetree/bindings/nvmem/layouts/fixed-layout.yaml
+++ b/Documentation/devicetree/bindings/nvmem/layouts/fixed-layout.yaml
@@ -44,6 +44,18 @@ examples:
#address-cells = <1>;
#size-cells = <1>;
+ mac@100 {
+ compatible = "mac-base";
+ reg = <0x100 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+
+ mac@110 {
+ compatible = "mac-base";
+ reg = <0x110 0x11>;
+ #nvmem-cell-cells = <1>;
+ };
+
calibration@4000 {
reg = <0x4000 0x100>;
};
diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation/devicetree/bindings/nvmem/nvmem.yaml
index 980244100690..9f921d940142 100644
--- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml
+++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml
@@ -49,7 +49,10 @@ properties:
patternProperties:
"@[0-9a-f]+(,[0-7])?$":
type: object
- $ref: layouts/fixed-cell.yaml
+ allOf:
+ - $ref: layouts/fixed-cell.yaml
+ - properties:
+ compatible: false
deprecated: true
additionalProperties: true
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 02/22] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource()
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 01/22] dt-bindings: nvmem: fixed-cell: add compatible for MAC cells Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 03/22] nvmem: brcm_nvram: Use devm_platform_get_and_ioremap_resource() Srinivas Kandagatla
` (20 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Yangtao Li, Jernej Skrabec, Srinivas Kandagatla
From: Yangtao Li <frank.li@vivo.com>
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/sunxi_sid.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index a970f1741cc6..6bfe02ab169a 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -125,7 +125,6 @@ static int sun8i_sid_read_by_reg(void *context, unsigned int offset,
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;
@@ -142,8 +141,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
return -EINVAL;
sid->value_offset = cfg->value_offset;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- sid->base = devm_ioremap_resource(dev, res);
+ sid->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sid->base))
return PTR_ERR(sid->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 03/22] nvmem: brcm_nvram: Use devm_platform_get_and_ioremap_resource()
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 01/22] dt-bindings: nvmem: fixed-cell: add compatible for MAC cells Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 02/22] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource() Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 04/22] nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource() Srinivas Kandagatla
` (19 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Yangtao Li, Srinivas Kandagatla
From: Yangtao Li <frank.li@vivo.com>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/brcm_nvram.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nvmem/brcm_nvram.c b/drivers/nvmem/brcm_nvram.c
index 4567c597c87f..9737104f3b76 100644
--- a/drivers/nvmem/brcm_nvram.c
+++ b/drivers/nvmem/brcm_nvram.c
@@ -159,8 +159,7 @@ static int brcm_nvram_probe(struct platform_device *pdev)
return -ENOMEM;
priv->dev = dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->base = devm_ioremap_resource(dev, res);
+ priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 04/22] nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource()
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (2 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 03/22] nvmem: brcm_nvram: Use devm_platform_get_and_ioremap_resource() Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 05/22] nvmem: meson-mx-efuse: " Srinivas Kandagatla
` (18 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Yangtao Li, Srinivas Kandagatla
From: Yangtao Li <frank.li@vivo.com>
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/lpc18xx_otp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nvmem/lpc18xx_otp.c b/drivers/nvmem/lpc18xx_otp.c
index 16c92ea85d49..8faed05e3cbe 100644
--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -68,14 +68,12 @@ static int lpc18xx_otp_probe(struct platform_device *pdev)
{
struct nvmem_device *nvmem;
struct lpc18xx_otp *otp;
- struct resource *res;
otp = devm_kzalloc(&pdev->dev, sizeof(*otp), GFP_KERNEL);
if (!otp)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- otp->base = devm_ioremap_resource(&pdev->dev, res);
+ otp->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(otp->base))
return PTR_ERR(otp->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 05/22] nvmem: meson-mx-efuse: Convert to devm_platform_ioremap_resource()
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (3 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 04/22] nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource() Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 06/22] nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource() Srinivas Kandagatla
` (17 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Yangtao Li, Srinivas Kandagatla
From: Yangtao Li <frank.li@vivo.com>
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/meson-mx-efuse.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 13eb14316f46..461e3ad87bcd 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -194,7 +194,6 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
{
const struct meson_mx_efuse_platform_data *drvdata;
struct meson_mx_efuse *efuse;
- struct resource *res;
drvdata = of_device_get_match_data(&pdev->dev);
if (!drvdata)
@@ -204,8 +203,7 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
if (!efuse)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- efuse->base = devm_ioremap_resource(&pdev->dev, res);
+ efuse->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(efuse->base))
return PTR_ERR(efuse->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 06/22] nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource()
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (4 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 05/22] nvmem: meson-mx-efuse: " Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 07/22] nvmem: stm32-romem: " Srinivas Kandagatla
` (16 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Yangtao Li, Heiko Stuebner, Srinivas Kandagatla
From: Yangtao Li <frank.li@vivo.com>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/rockchip-efuse.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index e4579de5d014..4004c5bece42 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -267,8 +267,7 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
if (!efuse)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- efuse->base = devm_ioremap_resource(dev, res);
+ efuse->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(efuse->base))
return PTR_ERR(efuse->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 07/22] nvmem: stm32-romem: Use devm_platform_get_and_ioremap_resource()
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (5 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 06/22] nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource() Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 08/22] nvmem: qfprom: do some cleanup Srinivas Kandagatla
` (15 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Yangtao Li, Srinivas Kandagatla
From: Yangtao Li <frank.li@vivo.com>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/stm32-romem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nvmem/stm32-romem.c b/drivers/nvmem/stm32-romem.c
index 38d0bf557129..0f84044bd1ad 100644
--- a/drivers/nvmem/stm32-romem.c
+++ b/drivers/nvmem/stm32-romem.c
@@ -196,8 +196,7 @@ static int stm32_romem_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->base = devm_ioremap_resource(dev, res);
+ priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 08/22] nvmem: qfprom: do some cleanup
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (6 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 07/22] nvmem: stm32-romem: " Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 09/22] nvmem: uniphier: Use devm_platform_get_and_ioremap_resource() Srinivas Kandagatla
` (14 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Yangtao Li, Srinivas Kandagatla
From: Yangtao Li <frank.li@vivo.com>
Use devm_platform_ioremap_resource() and
devm_platform_get_and_ioremap_resource() to simplify code.
BTW convert to use dev_err_probe() instead of open it.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/qfprom.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index c1e893c8a247..14814cba2dd6 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -374,8 +374,7 @@ static int qfprom_probe(struct platform_device *pdev)
return -ENOMEM;
/* The corrected section is always provided */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->qfpcorrected = devm_ioremap_resource(dev, res);
+ priv->qfpcorrected = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(priv->qfpcorrected))
return PTR_ERR(priv->qfpcorrected);
@@ -402,12 +401,10 @@ static int qfprom_probe(struct platform_device *pdev)
priv->qfpraw = devm_ioremap_resource(dev, res);
if (IS_ERR(priv->qfpraw))
return PTR_ERR(priv->qfpraw);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
- priv->qfpconf = devm_ioremap_resource(dev, res);
+ priv->qfpconf = devm_platform_ioremap_resource(pdev, 2);
if (IS_ERR(priv->qfpconf))
return PTR_ERR(priv->qfpconf);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
- priv->qfpsecurity = devm_ioremap_resource(dev, res);
+ priv->qfpsecurity = devm_platform_ioremap_resource(pdev, 3);
if (IS_ERR(priv->qfpsecurity))
return PTR_ERR(priv->qfpsecurity);
@@ -427,12 +424,8 @@ static int qfprom_probe(struct platform_device *pdev)
return PTR_ERR(priv->vcc);
priv->secclk = devm_clk_get(dev, "core");
- if (IS_ERR(priv->secclk)) {
- ret = PTR_ERR(priv->secclk);
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "Error getting clock: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(priv->secclk))
+ return dev_err_probe(dev, PTR_ERR(priv->secclk), "Error getting clock\n");
/* Only enable writing if we have SoC data. */
if (priv->soc_data)
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 09/22] nvmem: uniphier: Use devm_platform_get_and_ioremap_resource()
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (7 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 08/22] nvmem: qfprom: do some cleanup Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 10/22] dt-bindings: nvmem: qfprom: Add compatible for MSM8226 Srinivas Kandagatla
` (13 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Yangtao Li, Srinivas Kandagatla
From: Yangtao Li <frank.li@vivo.com>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/uniphier-efuse.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nvmem/uniphier-efuse.c b/drivers/nvmem/uniphier-efuse.c
index aca910b3b6f8..0a1dbb80537e 100644
--- a/drivers/nvmem/uniphier-efuse.c
+++ b/drivers/nvmem/uniphier-efuse.c
@@ -41,8 +41,7 @@ static int uniphier_efuse_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->base = devm_ioremap_resource(dev, res);
+ priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 10/22] dt-bindings: nvmem: qfprom: Add compatible for MSM8226
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (8 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 09/22] nvmem: uniphier: Use devm_platform_get_and_ioremap_resource() Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 11/22] dt-bindings: nvmem: Add t1023-sfp efuse support Srinivas Kandagatla
` (12 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh
Cc: linux-kernel, Matti Lehtimäki, Luca Weiss,
Krzysztof Kozlowski, Srinivas Kandagatla
From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Document QFPROM compatible for MSM8226.
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Reviewed-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
index 6cd4682a167d..bdfc6d36a400 100644
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -23,6 +23,7 @@ properties:
- qcom,ipq8064-qfprom
- qcom,ipq8074-qfprom
- qcom,ipq9574-qfprom
+ - qcom,msm8226-qfprom
- qcom,msm8916-qfprom
- qcom,msm8974-qfprom
- qcom,msm8976-qfprom
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 11/22] dt-bindings: nvmem: Add t1023-sfp efuse support
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (9 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 10/22] dt-bindings: nvmem: qfprom: Add compatible for MSM8226 Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 12/22] nvmem: add new NXP QorIQ eFuse driver Srinivas Kandagatla
` (11 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Richard Alpe, Krzysztof Kozlowski,
Srinivas Kandagatla
From: Richard Alpe <richard@bit42.se>
Add a schema for the NVMEM eFuse (SFP) layout on the NXP QorIQ SOC.
Signed-off-by: Richard Alpe <richard@bit42.se>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
.../bindings/nvmem/fsl,t1023-sfp.yaml | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 Documentation/devicetree/bindings/nvmem/fsl,t1023-sfp.yaml
diff --git a/Documentation/devicetree/bindings/nvmem/fsl,t1023-sfp.yaml b/Documentation/devicetree/bindings/nvmem/fsl,t1023-sfp.yaml
new file mode 100644
index 000000000000..df826b40d8ca
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/fsl,t1023-sfp.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/fsl,t1023-sfp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP QorIQ eFuse support
+
+maintainers:
+ - Richard Alpe <richard@bit42.se>
+
+description:
+ Read support for the eFuses (SFP) on NXP QorIQ series SoC's.
+
+allOf:
+ - $ref: nvmem.yaml#
+
+properties:
+ compatible:
+ const: fsl,t1023-sfp
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ efuse@e8000 {
+ compatible = "fsl,t1023-sfp";
+ reg = <0xe8000 0x1000>;
+ };
+...
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 12/22] nvmem: add new NXP QorIQ eFuse driver
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (10 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 11/22] dt-bindings: nvmem: Add t1023-sfp efuse support Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 13/22] nvmem: Explicitly include correct DT includes Srinivas Kandagatla
` (10 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh
Cc: linux-kernel, Richard Alpe, Niklas Söderlund,
Srinivas Kandagatla
From: Richard Alpe <richard@bit42.se>
Add SFP (Security Fuse Processor) read support for NXP (Freescale)
QorIQ series SOC's.
This patch adds support for the T1023 SOC using the SFP offset from
the existing T1023 device tree. In theory this should also work for
T1024, T1014 and T1013 which uses the same SFP base offset.
Signed-off-by: Richard Alpe <richard@bit42.se>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/Kconfig | 12 ++++++
drivers/nvmem/Makefile | 2 +
drivers/nvmem/qoriq-efuse.c | 78 +++++++++++++++++++++++++++++++++++++
3 files changed, 92 insertions(+)
create mode 100644 drivers/nvmem/qoriq-efuse.c
diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index da9befa3d6c4..5c5d7414f78c 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -392,4 +392,16 @@ config NVMEM_ZYNQMP
If sure, say yes. If unsure, say no.
+config NVMEM_QORIQ_EFUSE
+ tristate "NXP QorIQ eFuse support"
+ depends on PPC_85xx || COMPILE_TEST
+ depends on HAS_IOMEM
+ help
+ This driver provides read support for the eFuses (SFP) on NXP QorIQ
+ series SoC's. This includes secure boot settings, the globally unique
+ NXP ID 'FUIDR' and the OEM unique ID 'OUIDR'.
+
+ This driver can also be built as a module. If so, the module
+ will be called nvmem_qoriq_efuse.
+
endif
diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile
index cc23ce4ffb1f..e0e67a942c4f 100644
--- a/drivers/nvmem/Makefile
+++ b/drivers/nvmem/Makefile
@@ -77,3 +77,5 @@ obj-$(CONFIG_NVMEM_VF610_OCOTP) += nvmem-vf610-ocotp.o
nvmem-vf610-ocotp-y := vf610-ocotp.o
obj-$(CONFIG_NVMEM_ZYNQMP) += nvmem_zynqmp_nvmem.o
nvmem_zynqmp_nvmem-y := zynqmp_nvmem.o
+obj-$(CONFIG_NVMEM_QORIQ_EFUSE) += nvmem-qoriq-efuse.o
+nvmem-qoriq-efuse-y := qoriq-efuse.o
diff --git a/drivers/nvmem/qoriq-efuse.c b/drivers/nvmem/qoriq-efuse.c
new file mode 100644
index 000000000000..e7fd04d6dd94
--- /dev/null
+++ b/drivers/nvmem/qoriq-efuse.c
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Westermo Network Technologies AB
+ */
+
+#include <linux/device.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/mod_devicetable.h>
+#include <linux/nvmem-provider.h>
+#include <linux/platform_device.h>
+
+struct qoriq_efuse_priv {
+ void __iomem *base;
+};
+
+static int qoriq_efuse_read(void *context, unsigned int offset, void *val,
+ size_t bytes)
+{
+ struct qoriq_efuse_priv *priv = context;
+
+ /* .stride = 4 so offset is guaranteed to be aligned */
+ __ioread32_copy(val, priv->base + offset, bytes / 4);
+
+ /* Ignore trailing bytes (there shouldn't be any) */
+
+ return 0;
+}
+
+static int qoriq_efuse_probe(struct platform_device *pdev)
+{
+ struct nvmem_config config = {
+ .dev = &pdev->dev,
+ .read_only = true,
+ .reg_read = qoriq_efuse_read,
+ .stride = sizeof(u32),
+ .word_size = sizeof(u32),
+ .name = "qoriq_efuse_read",
+ .id = NVMEM_DEVID_AUTO,
+ .root_only = true,
+ };
+ struct qoriq_efuse_priv *priv;
+ struct nvmem_device *nvmem;
+ struct resource *res;
+
+ priv = devm_kzalloc(config.dev, sizeof(*priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
+ if (IS_ERR(priv->base))
+ return PTR_ERR(priv->base);
+
+ config.size = resource_size(res);
+ config.priv = priv;
+ nvmem = devm_nvmem_register(config.dev, &config);
+
+ return PTR_ERR_OR_ZERO(nvmem);
+}
+
+static const struct of_device_id qoriq_efuse_of_match[] = {
+ { .compatible = "fsl,t1023-sfp", },
+ {/* sentinel */},
+};
+MODULE_DEVICE_TABLE(of, qoriq_efuse_of_match);
+
+static struct platform_driver qoriq_efuse_driver = {
+ .probe = qoriq_efuse_probe,
+ .driver = {
+ .name = "qoriq-efuse",
+ .of_match_table = qoriq_efuse_of_match,
+ },
+};
+module_platform_driver(qoriq_efuse_driver);
+
+MODULE_AUTHOR("Richard Alpe <richard.alpe@bit42.se>");
+MODULE_DESCRIPTION("NXP QorIQ Security Fuse Processor (SFP) Reader");
+MODULE_LICENSE("GPL");
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 13/22] nvmem: Explicitly include correct DT includes
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (11 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 12/22] nvmem: add new NXP QorIQ eFuse driver Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 14/22] nvmem: Kconfig: Fix typo "drive" -> "driver" Srinivas Kandagatla
` (9 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Rob Herring, Srinivas Kandagatla
From: Rob Herring <robh@kernel.org>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/bcm-ocotp.c | 1 -
drivers/nvmem/core.c | 1 -
drivers/nvmem/imx-iim.c | 1 -
drivers/nvmem/imx-ocotp-ele.c | 2 +-
drivers/nvmem/imx-ocotp-scu.c | 2 +-
drivers/nvmem/imx-ocotp.c | 1 -
drivers/nvmem/lpc18xx_otp.c | 1 -
drivers/nvmem/meson-mx-efuse.c | 1 -
drivers/nvmem/qcom-spmi-sdam.c | 2 +-
drivers/nvmem/rave-sp-eeprom.c | 2 +-
drivers/nvmem/sc27xx-efuse.c | 1 -
drivers/nvmem/snvs_lpgpr.c | 3 ++-
drivers/nvmem/sprd-efuse.c | 2 +-
drivers/nvmem/sunplus-ocotp.c | 2 +-
drivers/nvmem/sunxi_sid.c | 1 -
drivers/nvmem/u-boot-env.c | 2 +-
16 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/drivers/nvmem/bcm-ocotp.c b/drivers/nvmem/bcm-ocotp.c
index 0c1fa0c4feb2..2490f44caa40 100644
--- a/drivers/nvmem/bcm-ocotp.c
+++ b/drivers/nvmem/bcm-ocotp.c
@@ -8,7 +8,6 @@
#include <linux/module.h>
#include <linux/nvmem-provider.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
/*
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 3f8c7718412b..2251103b2c5f 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -17,7 +17,6 @@
#include <linux/nvmem-provider.h>
#include <linux/gpio/consumer.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/slab.h>
struct nvmem_device {
diff --git a/drivers/nvmem/imx-iim.c b/drivers/nvmem/imx-iim.c
index c86339a7f583..f13bbd164086 100644
--- a/drivers/nvmem/imx-iim.c
+++ b/drivers/nvmem/imx-iim.c
@@ -14,7 +14,6 @@
#include <linux/module.h>
#include <linux/nvmem-provider.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/clk.h>
diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c
index f1cbbc9afeb8..cf920542f939 100644
--- a/drivers/nvmem/imx-ocotp-ele.c
+++ b/drivers/nvmem/imx-ocotp-ele.c
@@ -9,7 +9,7 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/nvmem-provider.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
diff --git a/drivers/nvmem/imx-ocotp-scu.c b/drivers/nvmem/imx-ocotp-scu.c
index 399e1eb8b4c1..c38d9c1c3f48 100644
--- a/drivers/nvmem/imx-ocotp-scu.c
+++ b/drivers/nvmem/imx-ocotp-scu.c
@@ -11,7 +11,7 @@
#include <linux/firmware/imx/sci.h>
#include <linux/module.h>
#include <linux/nvmem-provider.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index ab556c011f3e..a223d9537f22 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -20,7 +20,6 @@
#include <linux/module.h>
#include <linux/nvmem-provider.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/delay.h>
diff --git a/drivers/nvmem/lpc18xx_otp.c b/drivers/nvmem/lpc18xx_otp.c
index 8faed05e3cbe..adc9948e7b2e 100644
--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -14,7 +14,6 @@
#include <linux/module.h>
#include <linux/nvmem-provider.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 461e3ad87bcd..d6d7aeda31f9 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -14,7 +14,6 @@
#include <linux/module.h>
#include <linux/nvmem-provider.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/sizes.h>
#include <linux/slab.h>
diff --git a/drivers/nvmem/qcom-spmi-sdam.c b/drivers/nvmem/qcom-spmi-sdam.c
index f822790db49e..70f2d4f2efbf 100644
--- a/drivers/nvmem/qcom-spmi-sdam.c
+++ b/drivers/nvmem/qcom-spmi-sdam.c
@@ -6,8 +6,8 @@
#include <linux/device.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_platform.h>
#include <linux/nvmem-provider.h>
+#include <linux/platform_device.h>
#include <linux/regmap.h>
#define SDAM_MEM_START 0x40
diff --git a/drivers/nvmem/rave-sp-eeprom.c b/drivers/nvmem/rave-sp-eeprom.c
index c456011b75e8..df6a1c594b78 100644
--- a/drivers/nvmem/rave-sp-eeprom.c
+++ b/drivers/nvmem/rave-sp-eeprom.c
@@ -10,7 +10,7 @@
#include <linux/mfd/rave-sp.h>
#include <linux/module.h>
#include <linux/nvmem-provider.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/sizes.h>
diff --git a/drivers/nvmem/sc27xx-efuse.c b/drivers/nvmem/sc27xx-efuse.c
index c825fc902d10..2210da40dfbd 100644
--- a/drivers/nvmem/sc27xx-efuse.c
+++ b/drivers/nvmem/sc27xx-efuse.c
@@ -4,7 +4,6 @@
#include <linux/hwspinlock.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/nvmem-provider.h>
diff --git a/drivers/nvmem/snvs_lpgpr.c b/drivers/nvmem/snvs_lpgpr.c
index 4692aa985bd6..89c27112320f 100644
--- a/drivers/nvmem/snvs_lpgpr.c
+++ b/drivers/nvmem/snvs_lpgpr.c
@@ -7,7 +7,8 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/nvmem-provider.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
#include <linux/regmap.h>
#define IMX6Q_SNVS_HPLR 0x00
diff --git a/drivers/nvmem/sprd-efuse.c b/drivers/nvmem/sprd-efuse.c
index 4f1fcbfec394..7e6e31db4baa 100644
--- a/drivers/nvmem/sprd-efuse.c
+++ b/drivers/nvmem/sprd-efuse.c
@@ -7,7 +7,7 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/nvmem-provider.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#define SPRD_EFUSE_ENABLE 0x20
diff --git a/drivers/nvmem/sunplus-ocotp.c b/drivers/nvmem/sunplus-ocotp.c
index f85350b17d67..f3a18aa0a6c7 100644
--- a/drivers/nvmem/sunplus-ocotp.c
+++ b/drivers/nvmem/sunplus-ocotp.c
@@ -13,8 +13,8 @@
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/nvmem-provider.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
/*
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 6bfe02ab169a..5d364d85347f 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -12,7 +12,6 @@
#include <linux/module.h>
#include <linux/nvmem-provider.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/random.h>
diff --git a/drivers/nvmem/u-boot-env.c b/drivers/nvmem/u-boot-env.c
index ee9fd9989b6e..80c5382b361c 100644
--- a/drivers/nvmem/u-boot-env.c
+++ b/drivers/nvmem/u-boot-env.c
@@ -11,7 +11,7 @@
#include <linux/mtd/mtd.h>
#include <linux/nvmem-consumer.h>
#include <linux/nvmem-provider.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 14/22] nvmem: Kconfig: Fix typo "drive" -> "driver"
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (12 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 13/22] nvmem: Explicitly include correct DT includes Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 15/22] dt-bindings: nvmem: Add compatible for QCM2290 Srinivas Kandagatla
` (8 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Diederik de Haas, Heiko Stuebner,
Srinivas Kandagatla
From: Diederik de Haas <didi.debian@cknow.org>
Fix typo where "driver" was meant instead of "drive".
While at it, also capitalize "OTP".
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/Kconfig | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index 5c5d7414f78c..7ab12fc1044c 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -247,7 +247,7 @@ config NVMEM_ROCKCHIP_EFUSE
depends on ARCH_ROCKCHIP || COMPILE_TEST
depends on HAS_IOMEM
help
- This is a simple drive to dump specified values of Rockchip SoC
+ This is a simple driver to dump specified values of Rockchip SoC
from eFuse, such as cpu-leakage.
This driver can also be built as a module. If so, the module
@@ -258,8 +258,8 @@ config NVMEM_ROCKCHIP_OTP
depends on ARCH_ROCKCHIP || COMPILE_TEST
depends on HAS_IOMEM
help
- This is a simple drive to dump specified values of Rockchip SoC
- from otp, such as cpu-leakage.
+ This is a simple driver to dump specified values of Rockchip SoC
+ from OTP, such as cpu-leakage.
This driver can also be built as a module. If so, the module
will be called nvmem_rockchip_otp.
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 15/22] dt-bindings: nvmem: Add compatible for QCM2290
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (13 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 14/22] nvmem: Kconfig: Fix typo "drive" -> "driver" Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 16/22] dt-bindings: nvmem: sec-qfprom: Add bindings for secure qfprom Srinivas Kandagatla
` (7 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh
Cc: linux-kernel, Konrad Dybcio, Krzysztof Kozlowski,
Srinivas Kandagatla
From: Konrad Dybcio <konrad.dybcio@linaro.org>
Docuemnt the QFPROM on QCM2290.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
index bdfc6d36a400..8740938c32eb 100644
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -29,6 +29,7 @@ properties:
- qcom,msm8976-qfprom
- qcom,msm8996-qfprom
- qcom,msm8998-qfprom
+ - qcom,qcm2290-qfprom
- qcom,qcs404-qfprom
- qcom,sc7180-qfprom
- qcom,sc7280-qfprom
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 16/22] dt-bindings: nvmem: sec-qfprom: Add bindings for secure qfprom
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (14 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 15/22] dt-bindings: nvmem: Add compatible for QCM2290 Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 17/22] nvmem: sec-qfprom: Add Qualcomm secure QFPROM support Srinivas Kandagatla
` (6 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Komal Bajaj, Krzysztof Kozlowski,
Srinivas Kandagatla
From: Komal Bajaj <quic_kbajaj@quicinc.com>
This patch adds bindings for secure qfprom found in QCOM SOCs.
Secure QFPROM driver is based on simple nvmem framework.
Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
.../bindings/nvmem/qcom,sec-qfprom.yaml | 55 +++++++++++++++++++
1 file changed, 55 insertions(+)
create mode 100644 Documentation/devicetree/bindings/nvmem/qcom,sec-qfprom.yaml
diff --git a/Documentation/devicetree/bindings/nvmem/qcom,sec-qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,sec-qfprom.yaml
new file mode 100644
index 000000000000..9b133f783d29
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/qcom,sec-qfprom.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/qcom,sec-qfprom.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies Inc, Secure QFPROM Efuse
+
+maintainers:
+ - Komal Bajaj <quic_kbajaj@quicinc.com>
+
+description:
+ For some of the Qualcomm SoC's, it is possible that the qfprom region is
+ protected from non-secure access. In such situations, the OS have to use
+ secure calls to read the region.
+
+allOf:
+ - $ref: nvmem.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - qcom,qdu1000-sec-qfprom
+ - const: qcom,sec-qfprom
+
+ reg:
+ items:
+ - description: The secure qfprom corrected region.
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ efuse@221c8000 {
+ compatible = "qcom,qdu1000-sec-qfprom", "qcom,sec-qfprom";
+ reg = <0 0x221c8000 0 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ multi_chan_ddr: multi-chan-ddr@12b {
+ reg = <0x12b 0x1>;
+ bits = <0 2>;
+ };
+ };
+ };
+
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 17/22] nvmem: sec-qfprom: Add Qualcomm secure QFPROM support
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (15 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 16/22] dt-bindings: nvmem: sec-qfprom: Add bindings for secure qfprom Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 18/22] nvmem: u-boot-env:: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Srinivas Kandagatla
` (5 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Komal Bajaj, Srinivas Kandagatla
From: Komal Bajaj <quic_kbajaj@quicinc.com>
For some of the Qualcomm SoC's, it is possible that
some of the fuse regions or entire qfprom region is
protected from non-secure access. In such situations,
the OS will have to use secure calls to read the region.
With that motivation, add secure qfprom driver.
Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/Kconfig | 13 +++++
drivers/nvmem/Makefile | 2 +
drivers/nvmem/sec-qfprom.c | 97 ++++++++++++++++++++++++++++++++++++++
3 files changed, 112 insertions(+)
create mode 100644 drivers/nvmem/sec-qfprom.c
diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index 7ab12fc1044c..5bc9c4874fe3 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -226,6 +226,19 @@ config NVMEM_QCOM_QFPROM
This driver can also be built as a module. If so, the module
will be called nvmem_qfprom.
+config NVMEM_QCOM_SEC_QFPROM
+ tristate "QCOM SECURE QFPROM Support"
+ depends on ARCH_QCOM || COMPILE_TEST
+ depends on HAS_IOMEM
+ depends on OF
+ select QCOM_SCM
+ help
+ Say y here to enable secure QFPROM support. The secure QFPROM provides access
+ functions for QFPROM data to rest of the drivers via nvmem interface.
+
+ This driver can also be built as a module. If so, the module will be called
+ nvmem_sec_qfprom.
+
config NVMEM_RAVE_SP_EEPROM
tristate "Rave SP EEPROM Support"
depends on RAVE_SP_CORE
diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile
index e0e67a942c4f..423baf089515 100644
--- a/drivers/nvmem/Makefile
+++ b/drivers/nvmem/Makefile
@@ -46,6 +46,8 @@ obj-$(CONFIG_NVMEM_NINTENDO_OTP) += nvmem-nintendo-otp.o
nvmem-nintendo-otp-y := nintendo-otp.o
obj-$(CONFIG_NVMEM_QCOM_QFPROM) += nvmem_qfprom.o
nvmem_qfprom-y := qfprom.o
+obj-$(CONFIG_NVMEM_QCOM_SEC_QFPROM) += nvmem_sec_qfprom.o
+nvmem_sec_qfprom-y := sec-qfprom.o
obj-$(CONFIG_NVMEM_RAVE_SP_EEPROM) += nvmem-rave-sp-eeprom.o
nvmem-rave-sp-eeprom-y := rave-sp-eeprom.o
obj-$(CONFIG_NVMEM_RMEM) += nvmem-rmem.o
diff --git a/drivers/nvmem/sec-qfprom.c b/drivers/nvmem/sec-qfprom.c
new file mode 100644
index 000000000000..868a91c81197
--- /dev/null
+++ b/drivers/nvmem/sec-qfprom.c
@@ -0,0 +1,97 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#include <linux/firmware/qcom/qcom_scm.h>
+#include <linux/mod_devicetable.h>
+#include <linux/nvmem-provider.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
+
+/**
+ * struct sec_qfprom - structure holding secure qfprom attributes
+ *
+ * @base: starting physical address for secure qfprom corrected address space.
+ * @dev: qfprom device structure.
+ */
+struct sec_qfprom {
+ phys_addr_t base;
+ struct device *dev;
+};
+
+static int sec_qfprom_reg_read(void *context, unsigned int reg, void *_val, size_t bytes)
+{
+ struct sec_qfprom *priv = context;
+ unsigned int i;
+ u8 *val = _val;
+ u32 read_val;
+ u8 *tmp;
+
+ for (i = 0; i < bytes; i++, reg++) {
+ if (i == 0 || reg % 4 == 0) {
+ if (qcom_scm_io_readl(priv->base + (reg & ~3), &read_val)) {
+ dev_err(priv->dev, "Couldn't access fuse register\n");
+ return -EINVAL;
+ }
+ tmp = (u8 *)&read_val;
+ }
+
+ val[i] = tmp[reg & 3];
+ }
+
+ return 0;
+}
+
+static int sec_qfprom_probe(struct platform_device *pdev)
+{
+ struct nvmem_config econfig = {
+ .name = "sec-qfprom",
+ .stride = 1,
+ .word_size = 1,
+ .id = NVMEM_DEVID_AUTO,
+ .reg_read = sec_qfprom_reg_read,
+ };
+ struct device *dev = &pdev->dev;
+ struct nvmem_device *nvmem;
+ struct sec_qfprom *priv;
+ struct resource *res;
+ int ret;
+
+ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -EINVAL;
+
+ priv->base = res->start;
+
+ econfig.size = resource_size(res);
+ econfig.dev = dev;
+ econfig.priv = priv;
+
+ priv->dev = dev;
+
+ nvmem = devm_nvmem_register(dev, &econfig);
+
+ return PTR_ERR_OR_ZERO(nvmem);
+}
+
+static const struct of_device_id sec_qfprom_of_match[] = {
+ { .compatible = "qcom,sec-qfprom" },
+ {/* sentinel */},
+};
+MODULE_DEVICE_TABLE(of, sec_qfprom_of_match);
+
+static struct platform_driver qfprom_driver = {
+ .probe = sec_qfprom_probe,
+ .driver = {
+ .name = "qcom_sec_qfprom",
+ .of_match_table = sec_qfprom_of_match,
+ },
+};
+module_platform_driver(qfprom_driver);
+MODULE_DESCRIPTION("Qualcomm Secure QFPROM driver");
+MODULE_LICENSE("GPL");
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 18/22] nvmem: u-boot-env:: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (16 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 17/22] nvmem: sec-qfprom: Add Qualcomm secure QFPROM support Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 19/22] nvmem: core: Create all cells before adding the nvmem device Srinivas Kandagatla
` (4 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Atul Raut, Srinivas Kandagatla
From: Atul Raut <rauji.raut@gmail.com>
We are moving toward replacing zero-length arrays with C99 flexible-array
members since they are deprecated. Therefore, the new DECLARE_FLEX_ARRAY()
helper macro should be used to replace the zero-length array declaration.
This fixes warnings such as:
./drivers/nvmem/u-boot-env.c:50:9-13: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
Signed-off-by: Atul Raut <rauji.raut@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/u-boot-env.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/u-boot-env.c b/drivers/nvmem/u-boot-env.c
index 80c5382b361c..c4ae94af4af7 100644
--- a/drivers/nvmem/u-boot-env.c
+++ b/drivers/nvmem/u-boot-env.c
@@ -47,7 +47,7 @@ struct u_boot_env_image_broadcom {
__le32 magic;
__le32 len;
__le32 crc32;
- uint8_t data[0];
+ DECLARE_FLEX_ARRAY(uint8_t, data);
} __packed;
static int u_boot_env_read(void *context, unsigned int offset, void *val,
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 19/22] nvmem: core: Create all cells before adding the nvmem device
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (17 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 18/22] nvmem: u-boot-env:: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 20/22] nvmem: core: Return NULL when no nvmem layout is found Srinivas Kandagatla
` (3 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Miquel Raynal, Michael Walle, Srinivas Kandagatla
From: Miquel Raynal <miquel.raynal@bootlin.com>
Let's pack all the cells creation in one place, so they are all created
before we add the nvmem device.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 2251103b2c5f..bc7ea001a446 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -997,17 +997,17 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
if (rval)
goto err_remove_cells;
- dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name);
-
- rval = device_add(&nvmem->dev);
+ rval = nvmem_add_cells_from_fixed_layout(nvmem);
if (rval)
goto err_remove_cells;
- rval = nvmem_add_cells_from_fixed_layout(nvmem);
+ rval = nvmem_add_cells_from_layout(nvmem);
if (rval)
goto err_remove_cells;
- rval = nvmem_add_cells_from_layout(nvmem);
+ dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name);
+
+ rval = device_add(&nvmem->dev);
if (rval)
goto err_remove_cells;
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 20/22] nvmem: core: Return NULL when no nvmem layout is found
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (18 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 19/22] nvmem: core: Create all cells before adding the nvmem device Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 21/22] nvmem: core: Do not open-code existing functions Srinivas Kandagatla
` (2 subsequent siblings)
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh
Cc: linux-kernel, Miquel Raynal, kernel test robot, Dan Carpenter,
Michael Walle, Srinivas Kandagatla
From: Miquel Raynal <miquel.raynal@bootlin.com>
Currently, of_nvmem_layout_get_container() returns NULL on error, or an
error pointer if either CONFIG_NVMEM or CONFIG_OF is turned off. We
should likely avoid this kind of mix for two reasons: to clarify the
intend and anyway fix the !CONFIG_OF which will likely always if we use
this helper somewhere else. Let's just return NULL when no layout is
found, we don't need an error value here.
Link: https://staticthinking.wordpress.com/2022/08/01/mixing-error-pointers-and-null/
Fixes: 266570f496b9 ("nvmem: core: introduce NVMEM layouts")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202308030002.DnSFOrMB-lkp@intel.com/
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
include/linux/nvmem-consumer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index fa030d93b768..27373024856d 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -256,7 +256,7 @@ static inline struct nvmem_device *of_nvmem_device_get(struct device_node *np,
static inline struct device_node *
of_nvmem_layout_get_container(struct nvmem_device *nvmem)
{
- return ERR_PTR(-EOPNOTSUPP);
+ return NULL;
}
#endif /* CONFIG_NVMEM && CONFIG_OF */
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 21/22] nvmem: core: Do not open-code existing functions
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (19 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 20/22] nvmem: core: Return NULL when no nvmem layout is found Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 22/22] nvmem: core: Notify when a new layout is registered Srinivas Kandagatla
2023-08-22 14:34 ` [PATCH 00/22] nvmem: patches for v6.6 Greg KH
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Miquel Raynal, Michael Walle, Srinivas Kandagatla
From: Miquel Raynal <miquel.raynal@bootlin.com>
Use of_nvmem_layout_get_container() instead of hardcoding it.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index bc7ea001a446..12d05aea0b41 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -785,10 +785,10 @@ EXPORT_SYMBOL_GPL(nvmem_layout_unregister);
static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem)
{
- struct device_node *layout_np, *np = nvmem->dev.of_node;
+ struct device_node *layout_np;
struct nvmem_layout *l, *layout = ERR_PTR(-EPROBE_DEFER);
- layout_np = of_get_child_by_name(np, "nvmem-layout");
+ layout_np = of_nvmem_layout_get_container(nvmem);
if (!layout_np)
return NULL;
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 22/22] nvmem: core: Notify when a new layout is registered
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (20 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 21/22] nvmem: core: Do not open-code existing functions Srinivas Kandagatla
@ 2023-08-14 16:52 ` Srinivas Kandagatla
2023-08-22 14:34 ` [PATCH 00/22] nvmem: patches for v6.6 Greg KH
22 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-14 16:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Miquel Raynal, Srinivas Kandagatla
From: Miquel Raynal <miquel.raynal@bootlin.com>
Tell listeners a new layout was introduced and is now available.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/core.c | 4 ++++
include/linux/nvmem-consumer.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 12d05aea0b41..eaf6a3fe8ca6 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -771,12 +771,16 @@ int __nvmem_layout_register(struct nvmem_layout *layout, struct module *owner)
list_add(&layout->node, &nvmem_layouts);
spin_unlock(&nvmem_layout_lock);
+ blocking_notifier_call_chain(&nvmem_notifier, NVMEM_LAYOUT_ADD, layout);
+
return 0;
}
EXPORT_SYMBOL_GPL(__nvmem_layout_register);
void nvmem_layout_unregister(struct nvmem_layout *layout)
{
+ blocking_notifier_call_chain(&nvmem_notifier, NVMEM_LAYOUT_REMOVE, layout);
+
spin_lock(&nvmem_layout_lock);
list_del(&layout->node);
spin_unlock(&nvmem_layout_lock);
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 27373024856d..4523e4e83319 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -43,6 +43,8 @@ enum {
NVMEM_REMOVE,
NVMEM_CELL_ADD,
NVMEM_CELL_REMOVE,
+ NVMEM_LAYOUT_ADD,
+ NVMEM_LAYOUT_REMOVE,
};
#if IS_ENABLED(CONFIG_NVMEM)
--
2.25.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 00/22] nvmem: patches for v6.6
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
` (21 preceding siblings ...)
2023-08-14 16:52 ` [PATCH 22/22] nvmem: core: Notify when a new layout is registered Srinivas Kandagatla
@ 2023-08-22 14:34 ` Greg KH
2023-08-22 14:35 ` Greg KH
2023-08-22 17:29 ` Srinivas Kandagatla
22 siblings, 2 replies; 31+ messages in thread
From: Greg KH @ 2023-08-22 14:34 UTC (permalink / raw)
To: Srinivas Kandagatla; +Cc: linux-kernel
On Mon, Aug 14, 2023 at 05:52:30PM +0100, Srinivas Kandagatla wrote:
> Here are some nvmem patches slightly more than usual for 6.6 that includes
>
> - Support for NXP eFuse, qcom secure qfprom, QCM2290 nvmem providers
> - core level cleanup around error handling and layout creation.
> - few minor cleanups across providers drivers to use better
> apis and a typo fix.
>
> Can you please queue them up for 6.6.
I did, thanks, but your email system needs to be fixed:
Link: https://lore.kernel.org/r/20230818124338.37880-1-yuehaibing@huawei.com
Base: applies clean to current tree
git checkout -b 20230818_yuehaibing_huawei_com HEAD
Applying: greybus: svc: Remove unused declarations
Press any key to continue...
Grabbing thread from lore.kernel.org/all/20230814165252.93422-1-srinivas.kandagatla@linaro.org/t.mbox.gz
Analyzing 23 messages in the thread
Checking attestation on all messages, may take a moment...
---
✗ [PATCH 1/22] dt-bindings: nvmem: fixed-cell: add compatible for MAC cells
✗ [PATCH 2/22] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource()
✗ [PATCH 3/22] nvmem: brcm_nvram: Use devm_platform_get_and_ioremap_resource()
✗ [PATCH 4/22] nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource()
✗ [PATCH 5/22] nvmem: meson-mx-efuse: Convert to devm_platform_ioremap_resource()
✗ [PATCH 6/22] nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource()
✗ [PATCH 7/22] nvmem: stm32-romem: Use devm_platform_get_and_ioremap_resource()
✗ [PATCH 8/22] nvmem: qfprom: do some cleanup
✗ [PATCH 9/22] nvmem: uniphier: Use devm_platform_get_and_ioremap_resource()
✗ [PATCH 10/22] dt-bindings: nvmem: qfprom: Add compatible for MSM8226
✗ [PATCH 11/22] dt-bindings: nvmem: Add t1023-sfp efuse support
✗ [PATCH 12/22] nvmem: add new NXP QorIQ eFuse driver
✗ [PATCH 13/22] nvmem: Explicitly include correct DT includes
✗ [PATCH 14/22] nvmem: Kconfig: Fix typo "drive" -> "driver"
✗ [PATCH 15/22] dt-bindings: nvmem: Add compatible for QCM2290
✗ [PATCH 16/22] dt-bindings: nvmem: sec-qfprom: Add bindings for secure qfprom
✗ [PATCH 17/22] nvmem: sec-qfprom: Add Qualcomm secure QFPROM support
✗ [PATCH 18/22] nvmem: u-boot-env:: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
✗ [PATCH 19/22] nvmem: core: Create all cells before adding the nvmem device
✗ [PATCH 20/22] nvmem: core: Return NULL when no nvmem layout is found
✗ [PATCH 21/22] nvmem: core: Do not open-code existing functions
✗ [PATCH 22/22] nvmem: core: Notify when a new layout is registered
---
✗ BADSIG: DKIM/linaro.org
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 00/22] nvmem: patches for v6.6
2023-08-22 14:34 ` [PATCH 00/22] nvmem: patches for v6.6 Greg KH
@ 2023-08-22 14:35 ` Greg KH
2023-08-22 14:50 ` Srinivas Kandagatla
2023-08-22 17:29 ` Srinivas Kandagatla
1 sibling, 1 reply; 31+ messages in thread
From: Greg KH @ 2023-08-22 14:35 UTC (permalink / raw)
To: Srinivas Kandagatla; +Cc: linux-kernel
On Tue, Aug 22, 2023 at 04:34:32PM +0200, Greg KH wrote:
> On Mon, Aug 14, 2023 at 05:52:30PM +0100, Srinivas Kandagatla wrote:
> > Here are some nvmem patches slightly more than usual for 6.6 that includes
> >
> > - Support for NXP eFuse, qcom secure qfprom, QCM2290 nvmem providers
> > - core level cleanup around error handling and layout creation.
> > - few minor cleanups across providers drivers to use better
> > apis and a typo fix.
> >
> > Can you please queue them up for 6.6.
>
> I did, thanks, but your email system needs to be fixed:
Oops, no, I've dropped them as I get the following build warning which
turns into an error, and you can't break the build. How did you test
these?
drivers/nvmem/sec-qfprom.c: In function ‘sec_qfprom_probe’:
drivers/nvmem/sec-qfprom.c:59:13: error: unused variable ‘ret’ [-Werror=unused-variable]
59 | int ret;
| ^~~
cc1: all warnings being treated as errors
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 00/22] nvmem: patches for v6.6
2023-08-22 14:35 ` Greg KH
@ 2023-08-22 14:50 ` Srinivas Kandagatla
0 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-22 14:50 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
On 22/08/2023 15:35, Greg KH wrote:
> On Tue, Aug 22, 2023 at 04:34:32PM +0200, Greg KH wrote:
>> On Mon, Aug 14, 2023 at 05:52:30PM +0100, Srinivas Kandagatla wrote:
>>> Here are some nvmem patches slightly more than usual for 6.6 that includes
>>>
>>> - Support for NXP eFuse, qcom secure qfprom, QCM2290 nvmem providers
>>> - core level cleanup around error handling and layout creation.
>>> - few minor cleanups across providers drivers to use better
>>> apis and a typo fix.
>>>
>>> Can you please queue them up for 6.6.
>>
>> I did, thanks, but your email system needs to be fixed:
>
> Oops, no, I've dropped them as I get the following build warning which
> turns into an error, and you can't break the build. How did you test
> these?
>
> drivers/nvmem/sec-qfprom.c: In function ‘sec_qfprom_probe’:
> drivers/nvmem/sec-qfprom.c:59:13: error: unused variable ‘ret’ [-Werror=unused-variable]
> 59 | int ret;
> | ^~~
> cc1: all warnings being treated as errors
Sorry, my bad, There is already a fix for this [1] which I forgot to push.
Let me send a v2 wrapping that fix into the original patch.
--srini
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git/commit/?h=for-next
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 00/22] nvmem: patches for v6.6
2023-08-22 14:34 ` [PATCH 00/22] nvmem: patches for v6.6 Greg KH
2023-08-22 14:35 ` Greg KH
@ 2023-08-22 17:29 ` Srinivas Kandagatla
2023-08-22 17:37 ` Greg KH
1 sibling, 1 reply; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-22 17:29 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
On 22/08/2023 15:34, Greg KH wrote:
> On Mon, Aug 14, 2023 at 05:52:30PM +0100, Srinivas Kandagatla wrote:
>> Here are some nvmem patches slightly more than usual for 6.6 that includes
>>
>> - Support for NXP eFuse, qcom secure qfprom, QCM2290 nvmem providers
>> - core level cleanup around error handling and layout creation.
>> - few minor cleanups across providers drivers to use better
>> apis and a typo fix.
>>
>> Can you please queue them up for 6.6.
>
> I did, thanks, but your email system needs to be fixed:
Do you mean Attestation failing part or something else?
--srini
>
> Link: https://lore.kernel.org/r/20230818124338.37880-1-yuehaibing@huawei.com
> Base: applies clean to current tree
> git checkout -b 20230818_yuehaibing_huawei_com HEAD
> Applying: greybus: svc: Remove unused declarations
> Press any key to continue...
> Grabbing thread from lore.kernel.org/all/20230814165252.93422-1-srinivas.kandagatla@linaro.org/t.mbox.gz
> Analyzing 23 messages in the thread
> Checking attestation on all messages, may take a moment...
> ---
> ✗ [PATCH 1/22] dt-bindings: nvmem: fixed-cell: add compatible for MAC cells
> ✗ [PATCH 2/22] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource()
> ✗ [PATCH 3/22] nvmem: brcm_nvram: Use devm_platform_get_and_ioremap_resource()
> ✗ [PATCH 4/22] nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource()
> ✗ [PATCH 5/22] nvmem: meson-mx-efuse: Convert to devm_platform_ioremap_resource()
> ✗ [PATCH 6/22] nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource()
> ✗ [PATCH 7/22] nvmem: stm32-romem: Use devm_platform_get_and_ioremap_resource()
> ✗ [PATCH 8/22] nvmem: qfprom: do some cleanup
> ✗ [PATCH 9/22] nvmem: uniphier: Use devm_platform_get_and_ioremap_resource()
> ✗ [PATCH 10/22] dt-bindings: nvmem: qfprom: Add compatible for MSM8226
> ✗ [PATCH 11/22] dt-bindings: nvmem: Add t1023-sfp efuse support
> ✗ [PATCH 12/22] nvmem: add new NXP QorIQ eFuse driver
> ✗ [PATCH 13/22] nvmem: Explicitly include correct DT includes
> ✗ [PATCH 14/22] nvmem: Kconfig: Fix typo "drive" -> "driver"
> ✗ [PATCH 15/22] dt-bindings: nvmem: Add compatible for QCM2290
> ✗ [PATCH 16/22] dt-bindings: nvmem: sec-qfprom: Add bindings for secure qfprom
> ✗ [PATCH 17/22] nvmem: sec-qfprom: Add Qualcomm secure QFPROM support
> ✗ [PATCH 18/22] nvmem: u-boot-env:: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
> ✗ [PATCH 19/22] nvmem: core: Create all cells before adding the nvmem device
> ✗ [PATCH 20/22] nvmem: core: Return NULL when no nvmem layout is found
> ✗ [PATCH 21/22] nvmem: core: Do not open-code existing functions
> ✗ [PATCH 22/22] nvmem: core: Notify when a new layout is registered
> ---
> ✗ BADSIG: DKIM/linaro.org
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 00/22] nvmem: patches for v6.6
2023-08-22 17:29 ` Srinivas Kandagatla
@ 2023-08-22 17:37 ` Greg KH
2023-08-23 8:54 ` Srinivas Kandagatla
0 siblings, 1 reply; 31+ messages in thread
From: Greg KH @ 2023-08-22 17:37 UTC (permalink / raw)
To: Srinivas Kandagatla; +Cc: linux-kernel
On Tue, Aug 22, 2023 at 06:29:54PM +0100, Srinivas Kandagatla wrote:
>
>
> On 22/08/2023 15:34, Greg KH wrote:
> > On Mon, Aug 14, 2023 at 05:52:30PM +0100, Srinivas Kandagatla wrote:
> > > Here are some nvmem patches slightly more than usual for 6.6 that includes
> > >
> > > - Support for NXP eFuse, qcom secure qfprom, QCM2290 nvmem providers
> > > - core level cleanup around error handling and layout creation.
> > > - few minor cleanups across providers drivers to use better
> > > apis and a typo fix.
> > >
> > > Can you please queue them up for 6.6.
> >
> > I did, thanks, but your email system needs to be fixed:
>
>
> Do you mean Attestation failing part or something else?
Yes:
> > Link: https://lore.kernel.org/r/20230818124338.37880-1-yuehaibing@huawei.com
> > Base: applies clean to current tree
> > git checkout -b 20230818_yuehaibing_huawei_com HEAD
> > Applying: greybus: svc: Remove unused declarations
> > Press any key to continue...
> > Grabbing thread from lore.kernel.org/all/20230814165252.93422-1-srinivas.kandagatla@linaro.org/t.mbox.gz
> > Analyzing 23 messages in the thread
> > Checking attestation on all messages, may take a moment...
> > ---
> > ✗ [PATCH 1/22] dt-bindings: nvmem: fixed-cell: add compatible for MAC cells
> > ✗ [PATCH 2/22] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource()
> > ✗ [PATCH 3/22] nvmem: brcm_nvram: Use devm_platform_get_and_ioremap_resource()
> > ✗ [PATCH 4/22] nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource()
> > ✗ [PATCH 5/22] nvmem: meson-mx-efuse: Convert to devm_platform_ioremap_resource()
> > ✗ [PATCH 6/22] nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource()
> > ✗ [PATCH 7/22] nvmem: stm32-romem: Use devm_platform_get_and_ioremap_resource()
> > ✗ [PATCH 8/22] nvmem: qfprom: do some cleanup
> > ✗ [PATCH 9/22] nvmem: uniphier: Use devm_platform_get_and_ioremap_resource()
> > ✗ [PATCH 10/22] dt-bindings: nvmem: qfprom: Add compatible for MSM8226
> > ✗ [PATCH 11/22] dt-bindings: nvmem: Add t1023-sfp efuse support
> > ✗ [PATCH 12/22] nvmem: add new NXP QorIQ eFuse driver
> > ✗ [PATCH 13/22] nvmem: Explicitly include correct DT includes
> > ✗ [PATCH 14/22] nvmem: Kconfig: Fix typo "drive" -> "driver"
> > ✗ [PATCH 15/22] dt-bindings: nvmem: Add compatible for QCM2290
> > ✗ [PATCH 16/22] dt-bindings: nvmem: sec-qfprom: Add bindings for secure qfprom
> > ✗ [PATCH 17/22] nvmem: sec-qfprom: Add Qualcomm secure QFPROM support
> > ✗ [PATCH 18/22] nvmem: u-boot-env:: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
> > ✗ [PATCH 19/22] nvmem: core: Create all cells before adding the nvmem device
> > ✗ [PATCH 20/22] nvmem: core: Return NULL when no nvmem layout is found
> > ✗ [PATCH 21/22] nvmem: core: Do not open-code existing functions
> > ✗ [PATCH 22/22] nvmem: core: Notify when a new layout is registered
> > ---
> > ✗ BADSIG: DKIM/linaro.org
Looks like someone is impersonating you, or Linaro's email server is
broken? I think other Linaro emails validate properly, so is this
something with your setup?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 00/22] nvmem: patches for v6.6
2023-08-22 17:37 ` Greg KH
@ 2023-08-23 8:54 ` Srinivas Kandagatla
2023-08-23 8:59 ` Greg KH
0 siblings, 1 reply; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-23 8:54 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
On 22/08/2023 18:37, Greg KH wrote:
> On Tue, Aug 22, 2023 at 06:29:54PM +0100, Srinivas Kandagatla wrote:
>>
>>
>> On 22/08/2023 15:34, Greg KH wrote:
>>> On Mon, Aug 14, 2023 at 05:52:30PM +0100, Srinivas Kandagatla wrote:
>>>> Here are some nvmem patches slightly more than usual for 6.6 that includes
>>>>
>>>> - Support for NXP eFuse, qcom secure qfprom, QCM2290 nvmem providers
>>>> - core level cleanup around error handling and layout creation.
>>>> - few minor cleanups across providers drivers to use better
>>>> apis and a typo fix.
>>>>
>>>> Can you please queue them up for 6.6.
>>>
>>> I did, thanks, but your email system needs to be fixed:
>>
>>
>> Do you mean Attestation failing part or something else?
>
> Yes:
>
I did not setup patatt in my workflow yet, which is why this is failing
attestation.
will do that before sending out v2.
thanks,
srini
>>> Link: https://lore.kernel.org/r/20230818124338.37880-1-yuehaibing@huawei.com
>>> Base: applies clean to current tree
>>> git checkout -b 20230818_yuehaibing_huawei_com HEAD
>>> Applying: greybus: svc: Remove unused declarations
>>> Press any key to continue...
>>> Grabbing thread from lore.kernel.org/all/20230814165252.93422-1-srinivas.kandagatla@linaro.org/t.mbox.gz
>>> Analyzing 23 messages in the thread
>>> Checking attestation on all messages, may take a moment...
>>> ---
>>> ✗ [PATCH 1/22] dt-bindings: nvmem: fixed-cell: add compatible for MAC cells
>>> ✗ [PATCH 2/22] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource()
>>> ✗ [PATCH 3/22] nvmem: brcm_nvram: Use devm_platform_get_and_ioremap_resource()
>>> ✗ [PATCH 4/22] nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource()
>>> ✗ [PATCH 5/22] nvmem: meson-mx-efuse: Convert to devm_platform_ioremap_resource()
>>> ✗ [PATCH 6/22] nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource()
>>> ✗ [PATCH 7/22] nvmem: stm32-romem: Use devm_platform_get_and_ioremap_resource()
>>> ✗ [PATCH 8/22] nvmem: qfprom: do some cleanup
>>> ✗ [PATCH 9/22] nvmem: uniphier: Use devm_platform_get_and_ioremap_resource()
>>> ✗ [PATCH 10/22] dt-bindings: nvmem: qfprom: Add compatible for MSM8226
>>> ✗ [PATCH 11/22] dt-bindings: nvmem: Add t1023-sfp efuse support
>>> ✗ [PATCH 12/22] nvmem: add new NXP QorIQ eFuse driver
>>> ✗ [PATCH 13/22] nvmem: Explicitly include correct DT includes
>>> ✗ [PATCH 14/22] nvmem: Kconfig: Fix typo "drive" -> "driver"
>>> ✗ [PATCH 15/22] dt-bindings: nvmem: Add compatible for QCM2290
>>> ✗ [PATCH 16/22] dt-bindings: nvmem: sec-qfprom: Add bindings for secure qfprom
>>> ✗ [PATCH 17/22] nvmem: sec-qfprom: Add Qualcomm secure QFPROM support
>>> ✗ [PATCH 18/22] nvmem: u-boot-env:: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
>>> ✗ [PATCH 19/22] nvmem: core: Create all cells before adding the nvmem device
>>> ✗ [PATCH 20/22] nvmem: core: Return NULL when no nvmem layout is found
>>> ✗ [PATCH 21/22] nvmem: core: Do not open-code existing functions
>>> ✗ [PATCH 22/22] nvmem: core: Notify when a new layout is registered
>>> ---
>>> ✗ BADSIG: DKIM/linaro.org
>
> Looks like someone is impersonating you, or Linaro's email server is
> broken? I think other Linaro emails validate properly, so is this
> something with your setup?
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 00/22] nvmem: patches for v6.6
2023-08-23 8:54 ` Srinivas Kandagatla
@ 2023-08-23 8:59 ` Greg KH
2023-08-23 13:26 ` Srinivas Kandagatla
0 siblings, 1 reply; 31+ messages in thread
From: Greg KH @ 2023-08-23 8:59 UTC (permalink / raw)
To: Srinivas Kandagatla; +Cc: linux-kernel
On Wed, Aug 23, 2023 at 09:54:04AM +0100, Srinivas Kandagatla wrote:
>
>
> On 22/08/2023 18:37, Greg KH wrote:
> > On Tue, Aug 22, 2023 at 06:29:54PM +0100, Srinivas Kandagatla wrote:
> > >
> > >
> > > On 22/08/2023 15:34, Greg KH wrote:
> > > > On Mon, Aug 14, 2023 at 05:52:30PM +0100, Srinivas Kandagatla wrote:
> > > > > Here are some nvmem patches slightly more than usual for 6.6 that includes
> > > > >
> > > > > - Support for NXP eFuse, qcom secure qfprom, QCM2290 nvmem providers
> > > > > - core level cleanup around error handling and layout creation.
> > > > > - few minor cleanups across providers drivers to use better
> > > > > apis and a typo fix.
> > > > >
> > > > > Can you please queue them up for 6.6.
> > > >
> > > > I did, thanks, but your email system needs to be fixed:
> > >
> > >
> > > Do you mean Attestation failing part or something else?
> >
> > Yes:
> >
> I did not setup patatt in my workflow yet, which is why this is failing
> attestation.
No, this is not for patatt (which would be good to have, I agree.) This
is due to Linaro, or you, not setting up DKIM properly.
As this works for other Linaro developers, you might want to ask them
how they resolved it.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 00/22] nvmem: patches for v6.6
2023-08-23 8:59 ` Greg KH
@ 2023-08-23 13:26 ` Srinivas Kandagatla
0 siblings, 0 replies; 31+ messages in thread
From: Srinivas Kandagatla @ 2023-08-23 13:26 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
On 23/08/2023 09:59, Greg KH wrote:
> On Wed, Aug 23, 2023 at 09:54:04AM +0100, Srinivas Kandagatla wrote:
>>
>>
>> On 22/08/2023 18:37, Greg KH wrote:
>>> On Tue, Aug 22, 2023 at 06:29:54PM +0100, Srinivas Kandagatla wrote:
>>>>
>>>>
>>>> On 22/08/2023 15:34, Greg KH wrote:
>>>>> On Mon, Aug 14, 2023 at 05:52:30PM +0100, Srinivas Kandagatla wrote:
>>>>>> Here are some nvmem patches slightly more than usual for 6.6 that includes
>>>>>>
>>>>>> - Support for NXP eFuse, qcom secure qfprom, QCM2290 nvmem providers
>>>>>> - core level cleanup around error handling and layout creation.
>>>>>> - few minor cleanups across providers drivers to use better
>>>>>> apis and a typo fix.
>>>>>>
>>>>>> Can you please queue them up for 6.6.
>>>>>
>>>>> I did, thanks, but your email system needs to be fixed:
>>>>
>>>>
>>>> Do you mean Attestation failing part or something else?
>>>
>>> Yes:
>>>
>> I did not setup patatt in my workflow yet, which is why this is failing
>> attestation.
>
> No, this is not for patatt (which would be good to have, I agree.) This
> is due to Linaro, or you, not setting up DKIM properly.
>
> As this works for other Linaro developers, you might want to ask them
> how they resolved it.
>
some interestingly results.
I tried to validate DKIM using https://dkimvalidator.com which passes
the validation.
Also checked my older patches mboxes which also passes DKIM.
Am not sure what went wrong with the previous patches.
Am hoping that the issue is fixed given that https://dkimvalidator.com
seems to indicate that DKIM is passing, I will send v2 patches.
thanks,
Srini
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2023-08-23 13:27 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14 16:52 [PATCH 00/22] nvmem: patches for v6.6 Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 01/22] dt-bindings: nvmem: fixed-cell: add compatible for MAC cells Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 02/22] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource() Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 03/22] nvmem: brcm_nvram: Use devm_platform_get_and_ioremap_resource() Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 04/22] nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource() Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 05/22] nvmem: meson-mx-efuse: " Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 06/22] nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource() Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 07/22] nvmem: stm32-romem: " Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 08/22] nvmem: qfprom: do some cleanup Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 09/22] nvmem: uniphier: Use devm_platform_get_and_ioremap_resource() Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 10/22] dt-bindings: nvmem: qfprom: Add compatible for MSM8226 Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 11/22] dt-bindings: nvmem: Add t1023-sfp efuse support Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 12/22] nvmem: add new NXP QorIQ eFuse driver Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 13/22] nvmem: Explicitly include correct DT includes Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 14/22] nvmem: Kconfig: Fix typo "drive" -> "driver" Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 15/22] dt-bindings: nvmem: Add compatible for QCM2290 Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 16/22] dt-bindings: nvmem: sec-qfprom: Add bindings for secure qfprom Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 17/22] nvmem: sec-qfprom: Add Qualcomm secure QFPROM support Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 18/22] nvmem: u-boot-env:: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 19/22] nvmem: core: Create all cells before adding the nvmem device Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 20/22] nvmem: core: Return NULL when no nvmem layout is found Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 21/22] nvmem: core: Do not open-code existing functions Srinivas Kandagatla
2023-08-14 16:52 ` [PATCH 22/22] nvmem: core: Notify when a new layout is registered Srinivas Kandagatla
2023-08-22 14:34 ` [PATCH 00/22] nvmem: patches for v6.6 Greg KH
2023-08-22 14:35 ` Greg KH
2023-08-22 14:50 ` Srinivas Kandagatla
2023-08-22 17:29 ` Srinivas Kandagatla
2023-08-22 17:37 ` Greg KH
2023-08-23 8:54 ` Srinivas Kandagatla
2023-08-23 8:59 ` Greg KH
2023-08-23 13:26 ` Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox