Lines Matching full:nvram

3  * BCM947xx nvram variable access
38 * bcm47xx_nvram_is_valid - check for a valid NVRAM at specified memory
40 static bool bcm47xx_nvram_is_valid(void __iomem *nvram) in bcm47xx_nvram_is_valid() argument
42 return ((struct nvram_header *)nvram)->magic == NVRAM_MAGIC; in bcm47xx_nvram_is_valid()
46 * bcm47xx_nvram_copy - copy NVRAM to internal buffer
55 pr_err("The nvram size according to the header seems to be bigger than the partition on flash\n"); in bcm47xx_nvram_copy()
59 …pr_err("nvram on flash (%zu bytes) is bigger than the reserved space in memory, will just copy the… in bcm47xx_nvram_copy()
70 * bcm47xx_nvram_find_and_copy - find NVRAM on flash mapping & copy it
79 pr_warn("nvram already initialized\n"); in bcm47xx_nvram_find_and_copy()
83 /* TODO: when nvram is on nand flash check for bad blocks first. */ in bcm47xx_nvram_find_and_copy()
85 /* Try every possible flash size and check for NVRAM at its end */ in bcm47xx_nvram_find_and_copy()
94 /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */ in bcm47xx_nvram_find_and_copy()
104 pr_err("no nvram found\n"); in bcm47xx_nvram_find_and_copy()
116 pr_warn("nvram already initialized\n"); in bcm47xx_nvram_init_from_iomem()
121 pr_err("No valid NVRAM found\n"); in bcm47xx_nvram_init_from_iomem()
132 * On bcm47xx we need access to the NVRAM very early, so we can't use mtd
136 * soon as we get info about flash device, before any NVRAM entry is needed.
162 mtd = get_mtd_device_nm("nvram"); in nvram_init()
171 …pr_err("nvram on flash (%zu bytes) is bigger than the reserved space in memory, will just copy the… in nvram_init()
240 char *nvram; in bcm47xx_nvram_get_contents() local
249 nvram = vmalloc(*nvram_size); in bcm47xx_nvram_get_contents()
250 if (!nvram) in bcm47xx_nvram_get_contents()
252 memcpy(nvram, &nvram_buf[sizeof(struct nvram_header)], *nvram_size); in bcm47xx_nvram_get_contents()
254 return nvram; in bcm47xx_nvram_get_contents()