* [PATCH] nvmem: u-boot-env: find Device Tree nodes for NVMEM cells
@ 2022-09-15 20:06 ` Rafał Miłecki
0 siblings, 0 replies; 4+ messages in thread
From: Rafał Miłecki @ 2022-09-15 20:06 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: Tom Rini, Michael Walle, linux-arm-kernel, u-boot, linux-kernel,
Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
DT binding allows specifying NVMEM cells as NVMEM device (provider)
subnodes. Looks for such subnodes when building NVMEM cells.
This allows NVMEM consumers to use U-Boot environment variables.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
drivers/nvmem/u-boot-env.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvmem/u-boot-env.c b/drivers/nvmem/u-boot-env.c
index 9b9abfb8f187..d17a164ae705 100644
--- a/drivers/nvmem/u-boot-env.c
+++ b/drivers/nvmem/u-boot-env.c
@@ -92,6 +92,7 @@ static int u_boot_env_add_cells(struct u_boot_env *priv, uint8_t *buf,
return -ENOMEM;
priv->cells[idx].offset = data_offset + value - data;
priv->cells[idx].bytes = strlen(value);
+ priv->cells[idx].np = of_get_child_by_name(dev->of_node, priv->cells[idx].name);
}
if (WARN_ON(idx != priv->ncells))
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] nvmem: u-boot-env: find Device Tree nodes for NVMEM cells
@ 2022-09-15 20:06 ` Rafał Miłecki
0 siblings, 0 replies; 4+ messages in thread
From: Rafał Miłecki @ 2022-09-15 20:06 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: Tom Rini, Michael Walle, linux-arm-kernel, u-boot, linux-kernel,
Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
DT binding allows specifying NVMEM cells as NVMEM device (provider)
subnodes. Looks for such subnodes when building NVMEM cells.
This allows NVMEM consumers to use U-Boot environment variables.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
drivers/nvmem/u-boot-env.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvmem/u-boot-env.c b/drivers/nvmem/u-boot-env.c
index 9b9abfb8f187..d17a164ae705 100644
--- a/drivers/nvmem/u-boot-env.c
+++ b/drivers/nvmem/u-boot-env.c
@@ -92,6 +92,7 @@ static int u_boot_env_add_cells(struct u_boot_env *priv, uint8_t *buf,
return -ENOMEM;
priv->cells[idx].offset = data_offset + value - data;
priv->cells[idx].bytes = strlen(value);
+ priv->cells[idx].np = of_get_child_by_name(dev->of_node, priv->cells[idx].name);
}
if (WARN_ON(idx != priv->ncells))
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmem: u-boot-env: find Device Tree nodes for NVMEM cells
2022-09-15 20:06 ` Rafał Miłecki
@ 2022-09-16 9:57 ` Srinivas Kandagatla
-1 siblings, 0 replies; 4+ messages in thread
From: Srinivas Kandagatla @ 2022-09-16 9:57 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Tom Rini, Michael Walle, linux-arm-kernel, u-boot, linux-kernel,
Rafał Miłecki
On 15/09/2022 21:06, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> DT binding allows specifying NVMEM cells as NVMEM device (provider)
> subnodes. Looks for such subnodes when building NVMEM cells.
>
> This allows NVMEM consumers to use U-Boot environment variables.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Applied thanks,
--srini
> ---
> drivers/nvmem/u-boot-env.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvmem/u-boot-env.c b/drivers/nvmem/u-boot-env.c
> index 9b9abfb8f187..d17a164ae705 100644
> --- a/drivers/nvmem/u-boot-env.c
> +++ b/drivers/nvmem/u-boot-env.c
> @@ -92,6 +92,7 @@ static int u_boot_env_add_cells(struct u_boot_env *priv, uint8_t *buf,
> return -ENOMEM;
> priv->cells[idx].offset = data_offset + value - data;
> priv->cells[idx].bytes = strlen(value);
> + priv->cells[idx].np = of_get_child_by_name(dev->of_node, priv->cells[idx].name);
> }
>
> if (WARN_ON(idx != priv->ncells))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmem: u-boot-env: find Device Tree nodes for NVMEM cells
@ 2022-09-16 9:57 ` Srinivas Kandagatla
0 siblings, 0 replies; 4+ messages in thread
From: Srinivas Kandagatla @ 2022-09-16 9:57 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Tom Rini, Michael Walle, linux-arm-kernel, u-boot, linux-kernel,
Rafał Miłecki
On 15/09/2022 21:06, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> DT binding allows specifying NVMEM cells as NVMEM device (provider)
> subnodes. Looks for such subnodes when building NVMEM cells.
>
> This allows NVMEM consumers to use U-Boot environment variables.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Applied thanks,
--srini
> ---
> drivers/nvmem/u-boot-env.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvmem/u-boot-env.c b/drivers/nvmem/u-boot-env.c
> index 9b9abfb8f187..d17a164ae705 100644
> --- a/drivers/nvmem/u-boot-env.c
> +++ b/drivers/nvmem/u-boot-env.c
> @@ -92,6 +92,7 @@ static int u_boot_env_add_cells(struct u_boot_env *priv, uint8_t *buf,
> return -ENOMEM;
> priv->cells[idx].offset = data_offset + value - data;
> priv->cells[idx].bytes = strlen(value);
> + priv->cells[idx].np = of_get_child_by_name(dev->of_node, priv->cells[idx].name);
> }
>
> if (WARN_ON(idx != priv->ncells))
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-16 9:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-15 20:06 [PATCH] nvmem: u-boot-env: find Device Tree nodes for NVMEM cells Rafał Miłecki
2022-09-15 20:06 ` Rafał Miłecki
2022-09-16 9:57 ` Srinivas Kandagatla
2022-09-16 9:57 ` Srinivas Kandagatla
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.