diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-03-12 18:10:09 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2021-03-12 18:22:18 +0100 |
commit | baf04eed028a838518c65be48cbaabe0892343aa (patch) | |
tree | 95f71247ec861c985ed6a96513b7ef4e9eb3ec3b /target/linux/bcm53xx/patches-5.4/800-0002-nvmem-brcm_nvram-provide-NVMEM-content-to-the-NVRAM-.patch | |
parent | 1c48eee5b2bcfaf9815cc9a6f6664392d17164cb (diff) | |
download | upstream-baf04eed028a838518c65be48cbaabe0892343aa.tar.gz upstream-baf04eed028a838518c65be48cbaabe0892343aa.tar.bz2 upstream-baf04eed028a838518c65be48cbaabe0892343aa.zip |
bcm53xx: initialize NVRAM from NVMEM driver
NVRAM access may be needed early in boot process. Reading it using mtd
happens quite late in the init process. Add NVRAM initialization to the
NVMEM driver which comes up early and depends on IO mapping only.
This is required by Linksys devices which use NVRAM content for proper
partitioning (detecting current firmware partition).
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/bcm53xx/patches-5.4/800-0002-nvmem-brcm_nvram-provide-NVMEM-content-to-the-NVRAM-.patch')
-rw-r--r-- | target/linux/bcm53xx/patches-5.4/800-0002-nvmem-brcm_nvram-provide-NVMEM-content-to-the-NVRAM-.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/patches-5.4/800-0002-nvmem-brcm_nvram-provide-NVMEM-content-to-the-NVRAM-.patch b/target/linux/bcm53xx/patches-5.4/800-0002-nvmem-brcm_nvram-provide-NVMEM-content-to-the-NVRAM-.patch new file mode 100644 index 0000000000..cf5952ad5f --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/800-0002-nvmem-brcm_nvram-provide-NVMEM-content-to-the-NVRAM-.patch @@ -0,0 +1,31 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> +Date: Thu, 11 Mar 2021 08:26:14 +0100 +Subject: [PATCH] nvmem: brcm_nvram: provide NVMEM content to the NVRAM driver +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Rafał Miłecki <rafal@milecki.pl> +--- + drivers/nvmem/brcm_nvram.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/nvmem/brcm_nvram.c ++++ b/drivers/nvmem/brcm_nvram.c +@@ -3,6 +3,7 @@ + * Copyright (C) 2021 Rafał Miłecki <rafal@milecki.pl> + */ + ++#include <linux/bcm47xx_nvram.h> + #include <linux/io.h> + #include <linux/mod_devicetable.h> + #include <linux/module.h> +@@ -46,6 +47,8 @@ static int brcm_nvram_probe(struct platf + if (IS_ERR(priv->base)) + return PTR_ERR(priv->base); + ++ bcm47xx_nvram_init_from_iomem(priv->base, resource_size(res)); ++ + config.dev = dev; + config.priv = priv; + config.size = resource_size(res); |