Searched refs:nvram (Results 1 - 131 of 131) sorted by relevance

/linux-4.1.27/arch/mips/include/asm/mach-bcm63xx/
H A Dbcm63xx_nvram.h7 * bcm63xx_nvram_init() - initializes nvram
8 * @nvram: address of the nvram data
10 * Initialized the local nvram copy from the target address and checks
13 void bcm63xx_nvram_init(void *nvram);
16 * bcm63xx_nvram_get_name() - returns the board name according to nvram
18 * Returns the board name field from nvram. Note that it might not be
27 * Registers and returns a mac address from the allocated macs from nvram.
/linux-4.1.27/arch/mips/bcm63xx/
H A Dnvram.c22 * nvram structure
40 static struct bcm963xx_nvram nvram; variable in typeref:struct:bcm963xx_nvram
49 /* extract nvram data */ bcm63xx_nvram_init()
50 memcpy(&nvram, addr, sizeof(nvram)); bcm63xx_nvram_init()
53 if (nvram.version <= 4) { bcm63xx_nvram_init()
55 expected_crc = nvram.checksum_old; bcm63xx_nvram_init()
56 nvram.checksum_old = 0; bcm63xx_nvram_init()
58 check_len = sizeof(nvram); bcm63xx_nvram_init()
59 expected_crc = nvram.checksum_high; bcm63xx_nvram_init()
60 nvram.checksum_high = 0; bcm63xx_nvram_init()
63 crc = crc32_le(~0, (u8 *)&nvram, check_len); bcm63xx_nvram_init()
66 pr_warn("nvram checksum failed, contents may be invalid (expected %08x, got %08x)\n", bcm63xx_nvram_init()
74 memcpy(nvram.mac_addr_base, hcs_mac_addr, ETH_ALEN); bcm63xx_nvram_init()
75 nvram.mac_addr_count = 2; bcm63xx_nvram_init()
81 return nvram.name; bcm63xx_nvram_get_name()
90 if (mac_addr_used >= nvram.mac_addr_count) { bcm63xx_nvram_get_mac_address()
95 memcpy(mac, nvram.mac_addr_base, ETH_ALEN); bcm63xx_nvram_get_mac_address()
122 if (nvram.psi_size > 0) bcm63xx_nvram_get_psi_size()
123 return nvram.psi_size; bcm63xx_nvram_get_psi_size()
/linux-4.1.27/arch/powerpc/platforms/chrp/
H A Dnvram.c9 * /dev/nvram driver for PPC
38 if ((rtas_call(rtas_token("nvram-fetch"), 3, 2, &done, addr, chrp_nvram_read()
60 if ((rtas_call(rtas_token("nvram-store"), 3, 2, &done, addr, chrp_nvram_write()
68 struct device_node *nvram; chrp_nvram_init() local
72 nvram = of_find_node_by_type(NULL, "nvram"); chrp_nvram_init()
73 if (nvram == NULL) chrp_nvram_init()
76 nbytes_p = of_get_property(nvram, "#bytes", &proplen); chrp_nvram_init()
78 of_node_put(nvram); chrp_nvram_init()
84 printk(KERN_INFO "CHRP nvram contains %u bytes\n", nvram_size); chrp_nvram_init()
85 of_node_put(nvram); chrp_nvram_init()
H A Dtime.c25 #include <asm/nvram.h>
/linux-4.1.27/drivers/char/
H A Dnvram.c13 * The data are supplied as a (seekable) character device, /dev/nvram. The
41 #include <linux/nvram.h>
52 # error Cannot build nvram driver for this machine configuration.
211 * The are the file operation function for user access to /dev/nvram
419 if (!proc_create("driver/nvram", 0, NULL, &nvram_proc_fops)) nvram_add_proc_fs()
438 "nvram",
452 printk(KERN_ERR "nvram: can't misc_register on minor=%d\n", nvram_init()
458 printk(KERN_ERR "nvram: can't create /proc/driver/nvram\n"); nvram_init()
472 remove_proc_entry("driver/nvram", NULL); nvram_cleanup_module()
523 static void pc_proc_infos(unsigned char *nvram, struct seq_file *seq, pc_proc_infos() argument
536 (nvram[6] & 1) ? (nvram[6] >> 6) + 1 : 0); pc_proc_infos()
538 type = nvram[2] >> 4; pc_proc_infos()
544 type = nvram[2] & 0x0f; pc_proc_infos()
551 type = nvram[4] >> 4; pc_proc_infos()
553 seq_printf(seq, "%02x\n", type == 0x0f ? nvram[11] : type); pc_proc_infos()
558 type = nvram[4] & 0x0f; pc_proc_infos()
560 seq_printf(seq, "%02x\n", type == 0x0f ? nvram[12] : type); pc_proc_infos()
565 nvram[18] | (nvram[19] << 8), pc_proc_infos()
566 nvram[20], nvram[25], pc_proc_infos()
567 nvram[21] | (nvram[22] << 8), nvram[23] | (nvram[24] << 8)); pc_proc_infos()
569 nvram[39] | (nvram[40] << 8), pc_proc_infos()
570 nvram[41], nvram[46], pc_proc_infos()
571 nvram[42] | (nvram[43] << 8), nvram[44] | (nvram[45] << 8)); pc_proc_infos()
573 seq_printf(seq, "DOS base memory: %d kB\n", nvram[7] | (nvram[8] << 8)); pc_proc_infos()
575 nvram[9] | (nvram[10] << 8), nvram[34] | (nvram[35] << 8)); pc_proc_infos()
578 gfx_types[(nvram[6] >> 4) & 3]); pc_proc_infos()
581 (nvram[6] & 2) ? "" : "not "); pc_proc_infos()
653 static void atari_proc_infos(unsigned char *nvram, struct seq_file *seq, atari_proc_infos() argument
664 if (nvram[1] == boot_prefs[i].val) { atari_proc_infos()
670 seq_printf(seq, "0x%02x (undefined)\n", nvram[1]); atari_proc_infos()
673 (nvram[16] & 0x80) ? "on" : "off"); atari_proc_infos()
675 if (nvram[16] & 0x80) atari_proc_infos()
676 seq_printf(seq, "%d\n", nvram[16] & 7); atari_proc_infos()
685 if (nvram[6] < ARRAY_SIZE(languages)) atari_proc_infos()
686 seq_printf(seq, "%s\n", languages[nvram[6]]); atari_proc_infos()
688 seq_printf(seq, "%u (undefined)\n", nvram[6]); atari_proc_infos()
690 if (nvram[7] < ARRAY_SIZE(languages)) atari_proc_infos()
691 seq_printf(seq, "%s\n", languages[nvram[7]]); atari_proc_infos()
693 seq_printf(seq, "%u (undefined)\n", nvram[7]); atari_proc_infos()
695 seq_printf(seq, dateformat[nvram[8] & 7], atari_proc_infos()
696 nvram[9] ? nvram[9] : '/', nvram[9] ? nvram[9] : '/'); atari_proc_infos()
697 seq_printf(seq, ", %dh clock\n", nvram[8] & 16 ? 24 : 12); atari_proc_infos()
699 if (nvram[10] == 0) atari_proc_infos()
702 seq_printf(seq, "%ds%s\n", nvram[10], atari_proc_infos()
703 nvram[10] < 8 ? ", no memory test" : ""); atari_proc_infos()
705 vmode = (nvram[14] << 8) || nvram[15]; atari_proc_infos()
H A Dgeneric_nvram.c2 * Generic /dev/nvram driver for architectures providing some
8 * for getting the nvram "partition" informations
24 #include <asm/nvram.h>
98 printk(KERN_WARNING "nvram: Using obsolete PMAC_NVRAM_GET_OFFSET ioctl\n"); nvram_ioctl()
145 "nvram",
H A DMakefile36 obj-$(CONFIG_NVRAM) += nvram.o
/linux-4.1.27/arch/powerpc/platforms/powermac/
H A DMakefile15 obj-$(CONFIG_NVRAM:m=y) += nvram.o
16 # ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff
17 obj-$(CONFIG_PPC64) += nvram.o
H A Dnvram.c15 #include <linux/nvram.h>
28 #include <asm/nvram.h>
45 /* On Core99, nvram is either a sharp, a micron or an AMD flash */
286 DBG("nvram: Sharp/Micron Erasing bank %d...\n", bank); sm_erase_bank()
293 printk(KERN_ERR "nvram: Sharp/Micron flash erase timeout !\n"); sm_erase_bank()
304 printk(KERN_ERR "nvram: Sharp/Micron flash erase failed !\n"); sm_erase_bank()
317 DBG("nvram: Sharp/Micron Writing bank %d...\n", bank); sm_write_bank()
326 printk(KERN_ERR "nvram: Sharp/Micron flash write timeout !\n"); sm_write_bank()
338 printk(KERN_ERR "nvram: Sharp/Micron flash write failed !\n"); sm_write_bank()
351 DBG("nvram: AMD Erasing bank %d...\n", bank); amd_erase_bank()
373 printk(KERN_ERR "nvram: AMD flash erase timeout !\n"); amd_erase_bank()
384 printk(KERN_ERR "nvram: AMD flash erase failed !\n"); amd_erase_bank()
397 DBG("nvram: AMD Writing bank %d...\n", bank); amd_write_bank()
415 printk(KERN_ERR "nvram: AMD flash write timeout !\n"); amd_write_bank()
429 printk(KERN_ERR "nvram: AMD flash write failed !\n"); amd_write_bank()
465 DBG("nvram: OF partition at 0x%x\n", nvram_partitions[pmac_nvram_OF]); lookup_partitions()
466 DBG("nvram: XP partition at 0x%x\n", nvram_partitions[pmac_nvram_XPRAM]); lookup_partitions()
467 DBG("nvram: NR partition at 0x%x\n", nvram_partitions[pmac_nvram_NR]); lookup_partitions()
483 DBG("Updating nvram...\n"); core99_nvram_sync()
493 printk("nvram: Error erasing bank %d\n", core99_bank); core99_nvram_sync()
498 printk("nvram: Error writing bank %d\n", core99_bank); core99_nvram_sync()
513 printk(KERN_ERR "nvram: no address\n"); core99_nvram_setup()
520 DBG("nvram: Checking bank 0...\n"); core99_nvram_setup()
526 DBG("nvram: gen0=%d, gen1=%d\n", gen_bank0, gen_bank1); core99_nvram_setup()
527 DBG("nvram: Active bank is: %d\n", core99_bank); core99_nvram_setup()
565 dp = of_find_node_by_name(NULL, "nvram"); pmac_nvram_init()
581 is_core_99 = of_device_is_compatible(dp, "nvram,flash"); pmac_nvram_init()
H A Dtime.c33 #include <asm/nvram.h>
/linux-4.1.27/drivers/scsi/sym53c8xx_2/
H A Dsym_nvram.c50 void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram) sym_nvram_setup_host() argument
56 switch (nvram->type) { sym_nvram_setup_host()
58 if (!(nvram->data.Symbios.flags & SYMBIOS_PARITY_ENABLE)) sym_nvram_setup_host()
60 np->myaddr = nvram->data.Symbios.host_id & 0x0f; sym_nvram_setup_host()
61 if (nvram->data.Symbios.flags & SYMBIOS_VERBOSE_MSGS) sym_nvram_setup_host()
63 if (nvram->data.Symbios.flags1 & SYMBIOS_SCAN_HI_LO) sym_nvram_setup_host()
65 if (nvram->data.Symbios.flags2 & SYMBIOS_AVOID_BUS_RESET) sym_nvram_setup_host()
69 np->myaddr = nvram->data.Tekram.host_id & 0x0f; sym_nvram_setup_host()
73 if (nvram->data.parisc.host_id != -1) sym_nvram_setup_host()
74 np->myaddr = nvram->data.parisc.host_id; sym_nvram_setup_host()
75 if (nvram->data.parisc.factor != -1) sym_nvram_setup_host()
76 np->minsync = nvram->data.parisc.factor; sym_nvram_setup_host()
77 if (nvram->data.parisc.width != -1) sym_nvram_setup_host()
78 np->maxwide = nvram->data.parisc.width; sym_nvram_setup_host()
79 switch (nvram->data.parisc.mode) { sym_nvram_setup_host()
95 sym_Symbios_setup_target(struct sym_tcb *tp, int target, Symbios_nvram *nvram) sym_Symbios_setup_target() argument
97 Symbios_target *tn = &nvram->target[target]; sym_Symbios_setup_target()
119 sym_Tekram_setup_target(struct sym_tcb *tp, int target, Tekram_nvram *nvram) sym_Tekram_setup_target() argument
121 struct Tekram_target *tn = &nvram->target[target]; sym_Tekram_setup_target()
124 tp->usrtags = 2 << nvram->max_tags_index; sym_Tekram_setup_target()
156 static void sym_display_Symbios_nvram(struct sym_device *np, Symbios_nvram *nvram) sym_display_Symbios_nvram() argument
160 /* display Symbios nvram host data */ sym_display_Symbios_nvram()
162 sym_name(np), nvram->host_id & 0x0f, sym_display_Symbios_nvram()
163 (nvram->flags & SYMBIOS_SCAM_ENABLE) ? " SCAM" :"", sym_display_Symbios_nvram()
164 (nvram->flags & SYMBIOS_PARITY_ENABLE) ? " PARITY" :"", sym_display_Symbios_nvram()
165 (nvram->flags & SYMBIOS_VERBOSE_MSGS) ? " VERBOSE" :"", sym_display_Symbios_nvram()
166 (nvram->flags & SYMBIOS_CHS_MAPPING) ? " CHS_ALT" :"", sym_display_Symbios_nvram()
167 (nvram->flags2 & SYMBIOS_AVOID_BUS_RESET)?" NO_RESET" :"", sym_display_Symbios_nvram()
168 (nvram->flags1 & SYMBIOS_SCAN_HI_LO) ? " HI_LO" :""); sym_display_Symbios_nvram()
170 /* display Symbios nvram drive data */ sym_display_Symbios_nvram()
172 struct Symbios_target *tn = &nvram->target[i]; sym_display_Symbios_nvram()
188 static void sym_display_Tekram_nvram(struct sym_device *np, Tekram_nvram *nvram) sym_display_Tekram_nvram() argument
193 /* display Tekram nvram host data */ sym_display_Tekram_nvram()
194 tags = 2 << nvram->max_tags_index; sym_display_Tekram_nvram()
196 if (nvram->boot_delay_index < 6) sym_display_Tekram_nvram()
197 boot_delay = Tekram_boot_delay[nvram->boot_delay_index]; sym_display_Tekram_nvram()
198 switch ((nvram->flags & TEKRAM_REMOVABLE_FLAGS) >> 6) { sym_display_Tekram_nvram()
206 sym_name(np), nvram->host_id & 0x0f, sym_display_Tekram_nvram()
207 (nvram->flags1 & SYMBIOS_SCAM_ENABLE) ? " SCAM" :"", sym_display_Tekram_nvram()
208 (nvram->flags & TEKRAM_MORE_THAN_2_DRIVES) ? " >2DRIVES":"", sym_display_Tekram_nvram()
209 (nvram->flags & TEKRAM_DRIVES_SUP_1GB) ? " >1GB" :"", sym_display_Tekram_nvram()
210 (nvram->flags & TEKRAM_RESET_ON_POWER_ON) ? " RESET" :"", sym_display_Tekram_nvram()
211 (nvram->flags & TEKRAM_ACTIVE_NEGATION) ? " ACT_NEG" :"", sym_display_Tekram_nvram()
212 (nvram->flags & TEKRAM_IMMEDIATE_SEEK) ? " IMM_SEEK" :"", sym_display_Tekram_nvram()
213 (nvram->flags & TEKRAM_SCAN_LUNS) ? " SCAN_LUNS" :"", sym_display_Tekram_nvram()
214 (nvram->flags1 & TEKRAM_F2_F6_ENABLED) ? " F2_F6" :"", sym_display_Tekram_nvram()
217 /* display Tekram nvram drive data */ sym_display_Tekram_nvram()
220 struct Tekram_target *tn = &nvram->target[i]; sym_display_Tekram_nvram()
235 static void sym_display_Symbios_nvram(struct sym_device *np, Symbios_nvram *nvram) { (void)np; (void)nvram; } sym_display_Tekram_nvram() argument
236 static void sym_display_Tekram_nvram(struct sym_device *np, Tekram_nvram *nvram) { (void)np; (void)nvram; } sym_display_Tekram_nvram() argument
510 static int sym_read_Symbios_nvram(struct sym_device *np, Symbios_nvram *nvram) sym_read_Symbios_nvram() argument
513 u_char *data = (u_char *) nvram; sym_read_Symbios_nvram()
514 int len = sizeof(*nvram); sym_read_Symbios_nvram()
523 if (nvram->type != 0 || sym_read_Symbios_nvram()
524 memcmp(nvram->trailer, Symbios_trailer, 6) || sym_read_Symbios_nvram()
525 nvram->byte_count != len - 12) sym_read_Symbios_nvram()
531 if (csum != nvram->checksum) sym_read_Symbios_nvram()
660 static int sym_read_T93C46_nvram(struct sym_device *np, Tekram_nvram *nvram) sym_read_T93C46_nvram() argument
678 retv = T93C46_Read_Data(np, (u_short *) nvram, sym_read_T93C46_nvram()
679 sizeof(*nvram) / sizeof(short), &gpreg); sym_read_T93C46_nvram()
692 static int sym_read_Tekram_nvram (struct sym_device *np, Tekram_nvram *nvram) sym_read_Tekram_nvram() argument
694 u_char *data = (u_char *) nvram; sym_read_Tekram_nvram()
695 int len = sizeof(*nvram); sym_read_Tekram_nvram()
712 x = sym_read_T93C46_nvram(np, nvram); sym_read_Tekram_nvram()
H A Dsym_nvram.h196 void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram);
201 static inline void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram) { } sym_nvram_setup_target() argument
202 static inline void sym_nvram_setup_target(struct sym_tcb *tp, struct sym_nvram *nvram) { } sym_read_nvram() argument
H A Dsym_glue.c71 module_param_named(nvram, sym_driver_setup.use_nvram, byte, 0);
85 MODULE_PARM_DESC(nvram, "Option currently not used");
1322 if (sym_hcb_attach(shost, fw, dev->nvram)) sym_attach()
1407 devp->nvram = nvp; sym_get_nvram()
1681 struct sym_nvram nvram; sym2_probe() local
1687 memset(&nvram, 0, sizeof(nvram)); sym2_probe()
1716 sym_get_nvram(&sym_dev, &nvram); sym2_probe()
H A Dsym_glue.h213 struct sym_nvram *nvram; member in struct:sym_device
H A Dsym_hipd.c654 static void sym_set_bus_mode(struct sym_hcb *np, struct sym_nvram *nvram) sym_set_bus_mode() argument
667 } else if (nvram->type == SYM_SYMBIOS_NVRAM) { sym_set_bus_mode()
682 static int sym_prepare_setting(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram) sym_prepare_setting() argument
772 np->maxoffs_dt = nvram->type ? 62 : 31; sym_prepare_setting()
865 sym_nvram_setup_host(shost, np, nvram); sym_prepare_setting()
881 sym_set_bus_mode(np, nvram); sym_prepare_setting()
890 (nvram->type == SYM_SYMBIOS_NVRAM || sym_prepare_setting()
891 (nvram->type == SYM_TEKRAM_NVRAM && sym_prepare_setting()
922 sym_nvram_setup_target(tp, i, nvram); sym_prepare_setting()
932 sym_nvram_type(nvram), np->myaddr, sym_prepare_setting()
5580 int sym_hcb_attach(struct Scsi_Host *shost, struct sym_fw *fw, struct sym_nvram *nvram) sym_hcb_attach() argument
5612 sym_prepare_setting(shost, np, nvram); sym_hcb_attach()
H A Dsym_hipd.h1074 int sym_hcb_attach(struct Scsi_Host *shost, struct sym_fw *fw, struct sym_nvram *nvram);
/linux-4.1.27/arch/powerpc/platforms/pseries/
H A Dnvram.c9 * /dev/nvram driver for PPC64
24 #include <asm/nvram.h>
138 * We need to buffer the error logs into nvram to ensure that we have
158 * Reads nvram for error log for at most 'length'
211 /* Scan nvram for partitions */ pseries_nvram_init_log_partitions()
222 struct device_node *nvram; pSeries_nvram_init() local
226 nvram = of_find_node_by_type(NULL, "nvram"); pSeries_nvram_init()
227 if (nvram == NULL) pSeries_nvram_init()
230 nbytes_p = of_get_property(nvram, "#bytes", &proplen); pSeries_nvram_init()
232 of_node_put(nvram); pSeries_nvram_init()
238 nvram_fetch = rtas_token("nvram-fetch"); pSeries_nvram_init()
239 nvram_store = rtas_token("nvram-store"); pSeries_nvram_init()
240 printk(KERN_INFO "PPC64 nvram contains %d bytes\n", nvram_size); pSeries_nvram_init()
241 of_node_put(nvram); pSeries_nvram_init()
H A DMakefile4 obj-y := lpar.o hvCall.o nvram.o reconfig.o \
H A Dsetup.c57 #include <asm/nvram.h>
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/
H A Dfirmware.c43 * @nvram: output buffer with parse result.
53 u8 *nvram; member in struct:nvram_parser
137 memcpy(&nvp->nvram[nvp->nvram_len], skv, cplen); brcmf_nvram_handle_value()
139 nvp->nvram[nvp->nvram_len] = '\0'; brcmf_nvram_handle_value()
186 nvp->nvram = kzalloc(nv->size + 1 + 3 + sizeof(u32), GFP_KERNEL); brcmf_init_nvram_parser()
187 if (!nvp->nvram) brcmf_init_nvram_parser()
218 nvp.nvram[pad] = 0; brcmf_fw_nvram_strip()
226 memcpy(&nvp.nvram[*new_length], &token_le, sizeof(token_le)); brcmf_fw_nvram_strip()
229 return nvp.nvram; brcmf_fw_nvram_strip()
232 void brcmf_fw_nvram_free(void *nvram) brcmf_fw_nvram_free() argument
234 kfree(nvram); brcmf_fw_nvram_free()
250 void *nvram = NULL; brcmf_fw_request_nvram_done() local
257 nvram = brcmf_fw_nvram_strip(fw, &nvram_length); brcmf_fw_request_nvram_done()
259 if (!nvram && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL)) brcmf_fw_request_nvram_done()
263 fwctx->done(fwctx->dev, fwctx->code, nvram, nvram_length); brcmf_fw_request_nvram_done()
297 /* when nvram is optional call .done() callback here */ brcmf_fw_request_code_done()
304 /* failed nvram request */ brcmf_fw_request_code_done()
313 const char *code, const char *nvram, brcmf_fw_get_firmwares()
324 if ((flags & BRCMF_FW_REQUEST_NVRAM) && !nvram) brcmf_fw_get_firmwares()
335 fwctx->nvram_name = nvram; brcmf_fw_get_firmwares()
312 brcmf_fw_get_firmwares(struct device *dev, u16 flags, const char *code, const char *nvram, void (*fw_cb)(struct device *dev, const struct firmware *fw, void *nvram_image, u32 nvram_len)) brcmf_fw_get_firmwares() argument
H A Dfirmware.h29 void brcmf_fw_nvram_free(void *nvram);
36 const char *code, const char *nvram,
H A Dpcie.c1366 const struct firmware *fw, void *nvram, brcmf_pcie_download_fw_nvram()
1396 if (nvram) { brcmf_pcie_download_fw_nvram()
1400 brcmf_pcie_copy_mem_todev(devinfo, address, nvram, nvram_len); brcmf_pcie_download_fw_nvram()
1401 brcmf_fw_nvram_free(nvram); brcmf_pcie_download_fw_nvram()
1577 void *nvram, u32 nvram_len) brcmf_pcie_setup()
1588 ret = brcmf_pcie_download_fw_nvram(devinfo, fw, nvram, nvram_len); brcmf_pcie_setup()
1365 brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, const struct firmware *fw, void *nvram, u32 nvram_len) brcmf_pcie_download_fw_nvram() argument
1576 brcmf_pcie_setup(struct device *dev, const struct firmware *fw, void *nvram, u32 nvram_len) brcmf_pcie_setup() argument
H A Dusb.c86 #define DL_NVRAM_TOOBIG 6 /* host specified nvram data exceeds DL_NVRAM
142 const u8 *image; /* buffer for combine fw and nvram */
1200 void *nvram, u32 nvlen) brcmf_usb_probe_phase2()
1198 brcmf_usb_probe_phase2(struct device *dev, const struct firmware *fw, void *nvram, u32 nvlen) brcmf_usb_probe_phase2() argument
H A Dsdio.c3356 brcmf_err("error %d on writing %d nvram bytes at 0x%08x\n", brcmf_sdio_download_nvram()
3366 void *nvram, u32 nvlen) brcmf_sdio_download_firmware()
3381 brcmf_fw_nvram_free(nvram); brcmf_sdio_download_firmware()
3385 bcmerror = brcmf_sdio_download_nvram(bus, nvram, nvlen); brcmf_sdio_download_firmware()
3386 brcmf_fw_nvram_free(nvram); brcmf_sdio_download_firmware()
3388 brcmf_err("dongle nvram file download failed\n"); brcmf_sdio_download_firmware()
3993 void *nvram, u32 nvram_len) brcmf_sdio_firmware_callback()
4006 /* try to download image and nvram to the dongle */ brcmf_sdio_firmware_callback()
4008 err = brcmf_sdio_download_firmware(bus, code, nvram, nvram_len); brcmf_sdio_firmware_callback()
3364 brcmf_sdio_download_firmware(struct brcmf_sdio *bus, const struct firmware *fw, void *nvram, u32 nvlen) brcmf_sdio_download_firmware() argument
3991 brcmf_sdio_firmware_callback(struct device *dev, const struct firmware *code, void *nvram, u32 nvram_len) brcmf_sdio_firmware_callback() argument
H A Dfwil_types.h561 * @nvramrev: nvram revision number.
/linux-4.1.27/arch/powerpc/platforms/powernv/
H A Dopal-nvram.c2 * PowerNV nvram code.
19 #include <asm/nvram.h>
68 /* Scan nvram for partitions */ opal_nvram_init_log_partitions()
80 np = of_find_compatible_node(NULL, NULL, "ibm,opal-nvram"); opal_nvram_init()
91 pr_info("OPAL nvram setup, %u bytes\n", nvram_size); opal_nvram_init()
/linux-4.1.27/include/linux/
H A Dnvram.h4 #include <uapi/linux/nvram.h>
/linux-4.1.27/include/uapi/linux/
H A Dnvram.h6 /* /dev/nvram ioctls */
H A Dcapability.h251 /* Allow access to the nvram device */
/linux-4.1.27/arch/powerpc/sysdev/
H A Dmmio_nvram.c30 #include <asm/nvram.h>
117 nvram_node = of_find_node_by_type(NULL, "nvram"); mmio_nvram_init()
119 nvram_node = of_find_compatible_node(NULL, NULL, "nvram"); mmio_nvram_init()
121 printk(KERN_WARNING "nvram: no node found in device-tree\n"); mmio_nvram_init()
127 printk(KERN_WARNING "nvram: failed to get address (err %d)\n", mmio_nvram_init()
134 printk(KERN_WARNING "nvram: address or length is 0\n"); mmio_nvram_init()
141 printk(KERN_WARNING "nvram: failed to ioremap\n"); mmio_nvram_init()
H A Dof_rtc.c22 { "ds1743-nvram", "rtc-ds1742" },
/linux-4.1.27/arch/mips/bcm47xx/
H A Dnvram.c2 * BCM947xx nvram variable access
64 pr_warn("nvram already initialized\n"); nvram_find_and_copy()
68 /* TODO: when nvram is on nand flash check for bad blocks first. */ nvram_find_and_copy()
93 pr_err("no nvram found\n"); nvram_find_and_copy()
98 pr_err("The nvram size accoridng to the header seems to be bigger than the partition on flash\n"); nvram_find_and_copy()
100 pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", nvram_find_and_copy()
144 mtd = get_mtd_device_nm("nvram"); nvram_init()
154 pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", nvram_init()
H A Dboard.c325 /* check if the nvram is available */ bcm47xx_board_detect()
328 /* init of nvram failed, probably too early now */ bcm47xx_board_detect()
H A Dsprom.c77 pr_warn("can not parse nvram name %s%s%s with value %s got %i\n", \
105 pr_warn("can not parse nvram name %s%s with value %s got %i\n", nvram_read_u32_2()
126 pr_warn("can not parse nvram name %s%s with value %s got %i\n", nvram_read_leddc()
/linux-4.1.27/drivers/macintosh/
H A Dnvram.c2 * /dev/nvram driver for Power Macintosh.
14 #include <linux/nvram.h>
17 #include <asm/nvram.h>
112 "nvram",
H A Dvia-pmu68k.c759 printk(KERN_DEBUG "pmu: nvram returned bright: %d\n", (int)req.reply[1]); pmu_enable_backlight()
/linux-4.1.27/arch/powerpc/include/uapi/asm/
H A Dnvram.h13 /* Signatures for nvram partitions */
29 /* PowerMac specific nvram stuffs */
50 * /dev/nvram ioctls
/linux-4.1.27/arch/arm/mach-clps711x/
H A Dboard-autcpu12.c217 void __iomem *nvram; autcpu12_nvram_init() local
229 nvram = ioremap(autcpu12_nvram_resource[0].start, SZ_128K); autcpu12_nvram_init()
230 if (nvram) { autcpu12_nvram_init()
231 save[0] = readl(nvram + 0); autcpu12_nvram_init()
232 save[1] = readl(nvram + SZ_64K); autcpu12_nvram_init()
233 writel(~save[0], nvram + SZ_64K); autcpu12_nvram_init()
234 if (readl(nvram + 0) != save[0]) { autcpu12_nvram_init()
235 writel(save[0], nvram + 0); autcpu12_nvram_init()
238 writel(save[1], nvram + SZ_64K); autcpu12_nvram_init()
239 iounmap(nvram); autcpu12_nvram_init()
/linux-4.1.27/drivers/scsi/qla4xxx/
H A Dql4_dbg.c61 printk(KERN_INFO "0x%02X nvram = 0x%08X\n", qla4xxx_dump_registers()
62 (uint8_t) offsetof(struct isp_reg, u1.isp4010.nvram), qla4xxx_dump_registers()
63 readw(&ha->reg->u1.isp4010.nvram)); qla4xxx_dump_registers()
68 printk(KERN_INFO "0x%02X nvram = 0x%08X\n", qla4xxx_dump_registers()
69 (uint8_t) offsetof(struct isp_reg, u1.isp4022.nvram), qla4xxx_dump_registers()
70 readw(&ha->reg->u1.isp4022.nvram)); qla4xxx_dump_registers()
H A Dql4_bsg.c210 uint8_t *nvram = NULL; qla4xxx_read_nvram() local
237 " nvram size, offset=%d len=%d\n", qla4xxx_read_nvram()
242 nvram = dma_alloc_coherent(&ha->pdev->dev, len, &nvram_dma, qla4xxx_read_nvram()
244 if (!nvram) { qla4xxx_read_nvram()
245 ql4_printk(KERN_ERR, ha, "%s: dma alloc failed for nvram " qla4xxx_read_nvram()
253 ql4_printk(KERN_ERR, ha, "%s: get nvram failed\n", __func__); qla4xxx_read_nvram()
260 nvram, len); qla4xxx_read_nvram()
266 dma_free_coherent(&ha->pdev->dev, len, nvram, nvram_dma); qla4xxx_read_nvram()
282 uint8_t *nvram = NULL; qla4xxx_update_nvram() local
308 " nvram size, offset=%d len=%d\n", qla4xxx_update_nvram()
313 nvram = dma_alloc_coherent(&ha->pdev->dev, len, &nvram_dma, qla4xxx_update_nvram()
315 if (!nvram) { qla4xxx_update_nvram()
323 bsg_job->request_payload.sg_cnt, nvram, len); qla4xxx_update_nvram()
327 ql4_printk(KERN_ERR, ha, "%s: set nvram failed\n", __func__); qla4xxx_update_nvram()
335 dma_free_coherent(&ha->pdev->dev, len, nvram, nvram_dma); qla4xxx_update_nvram()
372 ql4_printk(KERN_ERR, ha, "%s: set nvram failed\n", __func__); qla4xxx_restore_defaults()
H A Dql4_def.h379 /* Offsets for flash/nvram access (set to ~0 if not used). */
629 struct eeprom_data *nvram; member in struct:scsi_qla_host
935 &ha->reg->u1.isp4010.nvram : isp_semaphore()
942 &ha->reg->u1.isp4010.nvram : isp_nvram()
943 &ha->reg->u1.isp4022.nvram); isp_nvram()
H A Dql4_fw.h113 __le32 nvram; member in struct:isp_reg::__anon9593::__anon9594
118 __le32 nvram; /* 0x30 */ member in struct:isp_reg::__anon9593::__anon9595
184 /* nvram address for 4032 */
236 /* ISP 4022 nvram definitions */
H A Dql4_init.c64 * by nvram config routine.
587 int size = sizeof(ha->nvram->isp4022.boardIdStr); qla4xxx_set_model_info()
707 &ha->reg->u1.isp4022.nvram); qla4xxx_start_firmware_from_flash()
/linux-4.1.27/arch/powerpc/kernel/
H A Dnvram_64.c9 * /dev/nvram driver for PPC64
13 * TODO: Split the /dev/nvram part (that one can use
25 #include <linux/nvram.h>
33 #include <asm/nvram.h>
164 * We need to buffer the error logs into nvram to ensure that we have
229 * Reads nvram partition for at most 'length'
298 pr_info("nvram: Found too small %s partition," nvram_init_os_partition()
309 pr_info("nvram: No room to create %s partition, " nvram_init_os_partition()
320 pr_err("nvram: Failed to find or create %s" nvram_init_os_partition()
373 pr_err("nvram: compression failed; returned %d\n", zipped_len); zip_oops()
374 pr_err("nvram: logging uncompressed oops/panic report\n"); zip_oops()
392 * nvram_pstore_write - pstore write callback for nvram
505 pr_err("nvram: Failed to find partition %s, " nvram_pstore_read()
563 .name = "nvram",
586 pr_err("nvram: pstore_register() failed, defaults to " nvram_pstore_init()
606 pr_err("nvram: Failed to initialize oops partition!"); nvram_init_oops_partition()
609 pr_notice("nvram: Using %s partition to log both" nvram_init_oops_partition()
615 pr_err("nvram: Failed to initialize oops partition!"); nvram_init_oops_partition()
621 pr_err("nvram: No memory for %s partition\n", nvram_init_oops_partition()
644 pr_err("nvram: No memory for compression workspace; " nvram_init_oops_partition()
658 pr_err("nvram: kmsg_dump_register() failed; returned %d\n", rc); nvram_init_oops_partition()
844 printk(KERN_WARNING "nvram: Using obsolete PMAC_NVRAM_GET_OFFSET ioctl\n"); dev_nvram_ioctl()
877 "nvram",
952 * nvram_remove_partition - Remove one or more partitions in nvram
1006 * nvram_create_partition - Create a partition in nvram
1012 * Returns a negative error code or a positive nvram index
1117 * nvram_get_partition_size - Get the data size of an nvram partition
1135 * nvram_find_partition - Find an nvram partition by signature and name
1181 "nvram partitions\n"); nvram_scan_partitions()
1194 printk(KERN_WARNING "WARNING: nvram partition checksum" nvram_scan_partitions()
1197 printk(KERN_WARNING "Terminating nvram partition scan\n"); nvram_scan_partitions()
1201 printk(KERN_WARNING "WARNING: nvram corruption " nvram_scan_partitions()
H A Drtasd.c29 #include <asm/nvram.h>
54 /* Stop logging to nvram after first fatal error */
184 * First write to nvram, if fatal error, that is the only
189 * there might be a need to store data in nvram before a
192 * XXX We write to nvram periodically, to indicate error has
231 * those somewhere, even if nvram isn't ready (why not?), and even pSeries_log_error()
515 /* Retrieve errors from nvram if any */ start_event_scan()
H A Dsetup_32.c34 #include <asm/nvram.h>
172 /* Generic nvram hooks used by drivers/char/gen_nvram.c */ nvram_read_byte()
H A Dmce.c209 * TODO: log this error event to FSP or nvram. machine_check_process_queued_event()
H A Dtau_6xx.c25 #include <asm/nvram.h>
H A Dsetup-common.c52 #include <asm/nvram.h>
H A Dsetup_64.c55 #include <asm/nvram.h>
H A Dtime.c62 #include <asm/nvram.h>
/linux-4.1.27/drivers/net/ethernet/sfc/
H A Dselftest.h36 int nvram; member in struct:efx_self_tests
H A Dethtool.c312 efx_fill_test(n++, strings, data, &tests->nvram, efx_ethtool_fill_self_tests()
313 "core", 0, "nvram", NULL); efx_ethtool_fill_self_tests()
H A Dselftest.c117 tests->nvram = rc ? -1 : 1; efx_test_nvram()
/linux-4.1.27/drivers/rtc/
H A Drtc-ds1307.c7 * Copyright (C) 2012 Bertrand Achard (nvram access fixes)
110 struct bin_attribute *nvram; member in struct:ds1307
801 if (unlikely(off >= ds1307->nvram->size)) ds1307_nvram_read()
803 if ((off + count) > ds1307->nvram->size) ds1307_nvram_read()
804 count = ds1307->nvram->size - off; ds1307_nvram_read()
811 dev_err(&client->dev, "%s error %d\n", "nvram read", result); ds1307_nvram_read()
827 if (unlikely(off >= ds1307->nvram->size)) ds1307_nvram_write()
829 if ((off + count) > ds1307->nvram->size) ds1307_nvram_write()
830 count = ds1307->nvram->size - off; ds1307_nvram_write()
837 dev_err(&client->dev, "%s error %d\n", "nvram write", result); ds1307_nvram_write()
1193 ds1307->nvram = devm_kzalloc(&client->dev, ds1307_probe()
1196 if (!ds1307->nvram) { ds1307_probe()
1197 dev_err(&client->dev, "cannot allocate memory for nvram sysfs\n"); ds1307_probe()
1200 ds1307->nvram->attr.name = "nvram"; ds1307_probe()
1201 ds1307->nvram->attr.mode = S_IRUGO | S_IWUSR; ds1307_probe()
1203 sysfs_bin_attr_init(ds1307->nvram); ds1307_probe()
1205 ds1307->nvram->read = ds1307_nvram_read; ds1307_probe()
1206 ds1307->nvram->write = ds1307_nvram_write; ds1307_probe()
1207 ds1307->nvram->size = chip->nvram_size; ds1307_probe()
1211 ds1307->nvram); ds1307_probe()
1215 ds1307->nvram->attr.name); ds1307_probe()
1218 dev_info(&client->dev, "%zu bytes nvram\n", ds1307_probe()
1219 ds1307->nvram->size); ds1307_probe()
1240 sysfs_remove_bin_file(&client->dev.kobj, ds1307->nvram); ds1307_remove()
H A Drtc-ds1305.c555 dev_err(&spi->dev, "nvram %s error %d\n", "read", status); ds1305_nvram_read()
586 dev_err(&spi->dev, "nvram %s error %d\n", "write", status); ds1305_nvram_write()
590 static struct bin_attribute nvram = { variable in typeref:struct:bin_attribute
591 .attr.name = "nvram",
767 status = sysfs_create_bin_file(&spi->dev.kobj, &nvram); ds1305_probe()
769 dev_err(&spi->dev, "register nvram --> %d\n", status); ds1305_probe()
779 sysfs_remove_bin_file(&spi->dev.kobj, &nvram); ds1305_remove()
H A Drtc-cmos.c578 static struct bin_attribute nvram = { variable in typeref:struct:bin_attribute
580 .name = "nvram",
796 nvram.size = address_space - NVRAM_OFFSET; cmos_do_probe()
797 retval = sysfs_create_bin_file(&dev->kobj, &nvram); cmos_do_probe()
799 dev_dbg(dev, "can't create nvram file? %d\n", retval); cmos_do_probe()
803 dev_info(dev, "%s%s, %zd bytes nvram%s\n", cmos_do_probe()
809 nvram.size, cmos_do_probe()
843 sysfs_remove_bin_file(&dev->kobj, &nvram); cmos_do_remove()
H A Drtc-ds1742.c11 * - nvram size determined from resource
180 pdata->nvram_attr.attr.name = "nvram"; ds1742_rtc_probe()
H A Drtc-ds1343.c175 dev_err(&priv->spi->dev, "Error in nvram write %d", ret); ds1343_nvram_write()
200 dev_err(&priv->spi->dev, "Error in nvram read %d\n", ret); ds1343_nvram_read()
207 .attr.name = "nvram",
H A Drtc-ds1685.c140 * data for normal rtc operation, as bank 0 contains only the nvram.
929 * ds1685_rtc_sysfs_nvram_read - reads rtc nvram via sysfs.
1009 * ds1685_rtc_sysfs_nvram_write - writes rtc nvram via sysfs.
1084 * struct ds1685_rtc_sysfs_nvram_attr - sysfs attributes for rtc nvram.
1085 * @attr: nvram attributes.
1086 * @read: nvram read function.
1087 * @write: nvram write function.
1088 * @size: nvram total size (bank0 + extended).
1093 .name = "nvram",
H A Drtc-rp5c01.c242 priv->nvram_attr.attr.name = "nvram"; rp5c01_rtc_probe()
H A Drtc-tx4939.c232 .name = "nvram",
H A Drtc-ds1553.c270 .name = "nvram",
H A Drtc-stk17ta8.c279 .name = "nvram",
H A Drtc-ds1511.c465 .name = "nvram",
H A Drtc-m48t59.c379 .name = "nvram",
/linux-4.1.27/arch/mips/include/asm/mach-ath25/
H A Dath25_platform.h29 #define BD_CPUFREQ 0x00000080 /* cpu freq is valid in nvram */
30 #define BD_SYSFREQ 0x00000100 /* sys freq is set in nvram */
/linux-4.1.27/arch/mips/sgi-ip22/
H A Dip22-nvram.c2 * ip22-nvram.c: NVRAM and serial EEPROM handling.
51 * clock in the nvram command and the register number. For the
/linux-4.1.27/arch/powerpc/include/asm/
H A Dnvram.h15 #include <uapi/asm/nvram.h>
74 /* Return partition offset in nvram */
/linux-4.1.27/drivers/scsi/qla2xxx/
H A Dqla_sup.c29 data = RD_REG_WORD(&reg->nvram); qla2x00_lock_nvram_access()
32 data = RD_REG_WORD(&reg->nvram); qla2x00_lock_nvram_access()
76 WRT_REG_WORD(&reg->nvram, data | NVR_SELECT | NVR_WRT_ENABLE); qla2x00_nv_write()
77 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_nv_write()
79 WRT_REG_WORD(&reg->nvram, data | NVR_SELECT | NVR_CLOCK | qla2x00_nv_write()
81 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_nv_write()
83 WRT_REG_WORD(&reg->nvram, data | NVR_SELECT | NVR_WRT_ENABLE); qla2x00_nv_write()
84 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_nv_write()
101 * Returns the word read from nvram @addr.
123 WRT_REG_WORD(&reg->nvram, NVR_SELECT | NVR_CLOCK); qla2x00_nvram_request()
124 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_nvram_request()
127 reg_data = RD_REG_WORD(&reg->nvram); qla2x00_nvram_request()
130 WRT_REG_WORD(&reg->nvram, NVR_SELECT); qla2x00_nvram_request()
131 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_nvram_request()
136 WRT_REG_WORD(&reg->nvram, NVR_DESELECT); qla2x00_nvram_request()
137 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_nvram_request()
150 * Returns the word read from nvram @addr.
174 WRT_REG_WORD(&reg->nvram, NVR_DESELECT); qla2x00_nv_deselect()
175 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_nv_deselect()
219 WRT_REG_WORD(&reg->nvram, NVR_SELECT); qla2x00_write_nvram_word()
220 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_write_nvram_word()
229 word = RD_REG_WORD(&reg->nvram); qla2x00_write_nvram_word()
278 WRT_REG_WORD(&reg->nvram, NVR_SELECT); qla2x00_write_nvram_word_tmo()
279 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_write_nvram_word_tmo()
282 word = RD_REG_WORD(&reg->nvram); qla2x00_write_nvram_word_tmo()
350 WRT_REG_WORD(&reg->nvram, NVR_SELECT); qla2x00_clear_nvram_protection()
351 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_clear_nvram_protection()
360 word = RD_REG_WORD(&reg->nvram); qla2x00_clear_nvram_protection()
410 WRT_REG_WORD(&reg->nvram, NVR_SELECT); qla2x00_set_nvram_protection()
411 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_set_nvram_protection()
420 word = RD_REG_WORD(&reg->nvram); qla2x00_set_nvram_protection()
868 "FLT[%s]: boot=0x%x fw=0x%x vpd_nvram=0x%x vpd=0x%x nvram=0x%x " qla2xxx_get_flt_info()
1424 "Unable to program nvram address=%x data=%x.\n", qla24xx_write_nvram_data()
2225 WRT_REG_WORD(&reg->nvram, 0); qla2x00_read_flash_data()
2226 RD_REG_WORD(&reg->nvram); qla2x00_read_flash_data()
2229 WRT_REG_WORD(&reg->nvram, NVR_SELECT); qla2x00_read_flash_data()
2230 RD_REG_WORD(&reg->nvram); qla2x00_read_flash_data()
2298 WRT_REG_WORD(&reg->nvram, 0); qla2x00_read_optrom_data()
2299 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_read_optrom_data()
2302 WRT_REG_WORD(&reg->nvram, NVR_SELECT); qla2x00_read_optrom_data()
2303 RD_REG_WORD(&reg->nvram); /* PCI Posting. */ qla2x00_read_optrom_data()
2483 WRT_REG_WORD(&reg->nvram, NVR_SELECT); qla2x00_write_optrom_data()
2484 RD_REG_WORD(&reg->nvram); qla2x00_write_optrom_data()
H A Dqla_attr.c248 ha->isp_ops->read_optrom(vha, ha->nvram, ha->flt_region_nvram << 2, qla2x00_sysfs_read_nvram()
250 return memory_read_from_buffer(buf, count, &off, ha->nvram, qla2x00_sysfs_read_nvram()
299 ha->isp_ops->read_nvram(vha, (uint8_t *)ha->nvram, ha->nvram_base, qla2x00_sysfs_write_nvram()
314 .name = "nvram",
936 { "nvram", &sysfs_nvram_attr, },
H A Dqla_init.c1939 * by nvram config routine.
2176 * by nvram config routine.
2620 nvram_t *nv = ha->nvram; qla2x00_nvram_config()
2621 uint8_t *ptr = ha->nvram; qla2x00_nvram_config()
5078 nv = ha->nvram; qla24xx_nvram_config()
5093 ha->vpd = ha->nvram + VPD_OFFSET; qla24xx_nvram_config()
6030 nv = ha->nvram; qla81xx_nvram_config()
6039 ha->vpd = ha->nvram + VPD_OFFSET; qla81xx_nvram_config()
6044 ha->isp_ops->read_optrom(vha, ha->nvram, ha->flt_region_nvram << 2, qla81xx_nvram_config()
H A Dqla_os.c3380 ha->nvram = kzalloc(MAX_NVRAM_SIZE, GFP_KERNEL); qla2x00_mem_alloc()
3381 if (!ha->nvram) qla2x00_mem_alloc()
3571 kfree(ha->nvram); qla2x00_mem_alloc()
3572 ha->nvram = NULL; qla2x00_mem_alloc()
3719 kfree(ha->nvram); qla2x00_mem_free()
H A Dqla_def.h451 uint16_t nvram; /* NVRAM register. */ member in struct:device_reg_2xxx
3180 void *nvram; member in struct:qla_hw_data
3360 /* Offsets for flash/nvram access (set to ~0 if not used). */
H A Dqla_mr.c1412 * by nvram config routine.
H A Dqla_mbx.c487 struct nvram_81xx *nv = ha->nvram; qla2x00_execute_fw()
H A Dqla_target.c6120 * by nvram config routine.
/linux-4.1.27/drivers/scsi/
H A Dips.c2043 if ((le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) && ips_host_info()
2044 (le16_to_cpu(ha->nvram->adapter_type) != 0)) ips_host_info()
2069 if (le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) { ips_host_info()
2070 if (ha->nvram->bios_low[3] == 0) { ips_host_info()
2073 ha->nvram->bios_high[0], ha->nvram->bios_high[1], ips_host_info()
2074 ha->nvram->bios_high[2], ha->nvram->bios_high[3], ips_host_info()
2075 ha->nvram->bios_low[0], ha->nvram->bios_low[1], ips_host_info()
2076 ha->nvram->bios_low[2]); ips_host_info()
2081 ha->nvram->bios_high[0], ha->nvram->bios_high[1], ips_host_info()
2082 ha->nvram->bios_high[2], ha->nvram->bios_high[3], ips_host_info()
2083 ha->nvram->bios_low[0], ha->nvram->bios_low[1], ips_host_info()
2084 ha->nvram->bios_low[2], ha->nvram->bios_low[3]); ips_host_info()
2449 /* write nvram user page 5 */ ips_hainit()
4258 kfree(ha->nvram); ips_free()
4259 ha->nvram = NULL; ips_free()
5606 /* Write OS/Driver version to Page 5 of the nvram on the controller */
5623 if (le32_to_cpu(ha->nvram->signature) != IPS_NVRAM_P5_SIG) { ips_write_driver_status()
5626 ips_name, ha->host_num, ha->nvram->signature); ips_write_driver_status()
5627 ha->nvram->signature = IPS_NVRAM_P5_SIG; ips_write_driver_status()
5632 ips_name, ha->host_num, le16_to_cpu(ha->nvram->adapter_type), ips_write_driver_status()
5633 ha->nvram->adapter_slot, ha->nvram->bios_high[0], ips_write_driver_status()
5634 ha->nvram->bios_high[1], ha->nvram->bios_high[2], ips_write_driver_status()
5635 ha->nvram->bios_high[3], ha->nvram->bios_low[0], ips_write_driver_status()
5636 ha->nvram->bios_low[1], ha->nvram->bios_low[2], ips_write_driver_status()
5637 ha->nvram->bios_low[3]); ips_write_driver_status()
5642 ha->nvram->operating_system = IPS_OS_LINUX; ips_write_driver_status()
5643 ha->nvram->adapter_type = ha->ad_type; ips_write_driver_status()
5644 strncpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4); ips_write_driver_status()
5645 strncpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4); ips_write_driver_status()
5646 strncpy((char *) ha->nvram->bios_high, ha->bios_version, 4); ips_write_driver_status()
5647 strncpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4); ips_write_driver_status()
5649 ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */ ips_write_driver_status()
5660 ha->slot_num = ha->nvram->adapter_slot; ips_write_driver_status()
5816 /* Read nvram page 5 from the adapter */
5834 scb->cmd.nvram.op_code = IPS_CMD_RW_NVRAM_PAGE; ips_readwrite_page5()
5835 scb->cmd.nvram.command_id = IPS_COMMAND_ID(ha, scb); ips_readwrite_page5()
5836 scb->cmd.nvram.page = 5; ips_readwrite_page5()
5837 scb->cmd.nvram.write = write; ips_readwrite_page5()
5838 scb->cmd.nvram.reserved = 0; ips_readwrite_page5()
5839 scb->cmd.nvram.reserved2 = 0; ips_readwrite_page5()
5840 scb->data_len = sizeof (*ha->nvram); ips_readwrite_page5()
5841 scb->cmd.nvram.buffer_addr = ha->ioctl_busaddr; ips_readwrite_page5()
5843 memcpy(ha->ioctl_data, ha->nvram, sizeof(*ha->nvram)); ips_readwrite_page5()
5851 memset(ha->nvram, 0, sizeof (IPS_NVRAM_P5)); ips_readwrite_page5()
5856 memcpy(ha->nvram, ha->ioctl_data, sizeof(*ha->nvram)); ips_readwrite_page5()
6618 IPS_NVRAM_P5 *nvram; ips_order_controllers() local
6621 nvram = ips_ha[0]->nvram; ips_order_controllers()
6623 if (nvram->adapter_order[0]) { ips_order_controllers()
6624 for (i = 1; i <= nvram->adapter_order[0]; i++) { ips_order_controllers()
6629 if (nvram->adapter_order[i] == 'M') { ips_order_controllers()
6639 if (nvram->adapter_order[i] == 'N') { ips_order_controllers()
6649 if (nvram->adapter_order[i] == 'S') { ips_order_controllers()
6662 if (nvram->adapter_order[i] == 'A') { ips_order_controllers()
7031 ha->nvram = kmalloc(sizeof (IPS_NVRAM_P5), GFP_KERNEL); ips_init_phase1()
7033 if (!ha->nvram) { ips_init_phase1()
H A Da100u2w.h340 /* Bios Configuration for nvram->BIOSConfig1 */
345 /* Bios Configuration for nvram->BIOSConfig2 */
349 /* Bit definition for nvram->SCSIConfig */
357 /* Bit definition for nvram->TargetxConfig */
H A Dqla1280.c100 - Add a number of missing default nvram parameters
611 struct nvram *nv; qla1280_read_nvram()
620 wptr = (uint16_t *)&ha->nvram; qla1280_read_nvram()
621 nv = &ha->nvram; qla1280_read_nvram()
632 dprintk(2, "Invalid nvram ID or version!\n"); qla1280_read_nvram()
635 for (; cnt < sizeof(struct nvram); cnt++) { qla1280_read_nvram()
1147 struct nvram *nv; qla1280_set_target_parameters()
1150 nv = &ha->nvram; qla1280_set_target_parameters()
1216 struct nvram *nv; qla1280_slave_configure()
1220 nv = &ha->nvram; qla1280_slave_configure()
1458 /* TODO: implement support for the 1040 nvram format */ qla1280_initialize_adapter()
1965 qla1280_print_settings(struct nvram *nv) qla1280_print_settings()
2017 struct nvram *nv = &ha->nvram; qla1280_set_target_defaults()
2048 struct nvram *nv = &ha->nvram; qla1280_set_defaults()
2052 memset(nv, 0, sizeof(struct nvram)); qla1280_set_defaults()
2102 struct nvram *nv = &ha->nvram; qla1280_config_target()
2160 struct nvram *nv = &ha->nvram; qla1280_config_bus()
2193 struct nvram *nv = &ha->nvram; qla1280_nvram_config()
2406 WRT_REG_WORD(&reg->nvram, (NV_SELECT | NV_CLOCK)); qla1280_nvram_request()
2410 reg_data = RD_REG_WORD(&reg->nvram); qla1280_nvram_request()
2413 WRT_REG_WORD(&reg->nvram, NV_SELECT); qla1280_nvram_request()
2420 WRT_REG_WORD(&reg->nvram, NV_DESELECT); qla1280_nvram_request()
2432 WRT_REG_WORD(&reg->nvram, data | NV_SELECT); qla1280_nv_write()
2435 WRT_REG_WORD(&reg->nvram, data | NV_SELECT | NV_CLOCK); qla1280_nv_write()
2438 WRT_REG_WORD(&reg->nvram, data | NV_SELECT); qla1280_nv_write()
4106 { "nvram", TOKEN_NVRAM },
H A Dqla1280.h153 uint16_t nvram; /* NVRAM register. */ member in struct:device_reg
342 struct nvram { struct
1071 struct nvram nvram; member in struct:scsi_qla_host
H A Dinitio.h605 /* Bios Configuration for nvram->BIOSConfig1 */
618 /* Bit definition for nvram->SCSIconfig1 */
H A Dips.h610 IPS_NVRAM_CMD nvram; member in union:__anon9010
1047 IPS_NVRAM_P5 *nvram; /* NVRAM page 5 data */ member in struct:ips_ha
H A Da100u2w.c88 static struct orc_nvram nvram, *nvramp = &nvram; variable in typeref:struct:orc_nvram
H A Datari_scsi.c73 #include <linux/nvram.h>
H A Dinitio.c288 (address and cmd sent to nvram)
293 (data sent from nvram)
H A Dncr53c8xx.c641 "safe:" "nvram:"
/linux-4.1.27/drivers/scsi/esas2r/
H A Desas2r_flash.c1197 if (!esas2r_read_flash_block(a, a->nvram, FLS_OFFSET_NVR, esas2r_nvram_read_direct()
1254 * Write the contents of nvram to the adapter's physical NVRAM.
1258 struct esas2r_sas_nvram *nvram) esas2r_nvram_write()
1260 struct esas2r_sas_nvram *n = nvram; esas2r_nvram_write()
1272 n = a->nvram; esas2r_nvram_write()
1296 memcpy(a->nvram, n, sizeof(struct esas2r_sas_nvram)); esas2r_nvram_write()
1299 n = a->nvram; esas2r_nvram_write()
1331 struct esas2r_sas_nvram *n = a->nvram; esas2r_nvram_validate()
1363 struct esas2r_sas_nvram *n = a->nvram; esas2r_nvram_set_defaults()
1376 struct esas2r_sas_nvram *nvram) esas2r_nvram_get_defaults()
1384 memcpy(&sas_addr[0], a->nvram->sas_addr, 8); esas2r_nvram_get_defaults()
1385 *nvram = default_sas_nvram; esas2r_nvram_get_defaults()
1386 memcpy(&nvram->sas_addr[0], &sas_addr[0], 8); esas2r_nvram_get_defaults()
1257 esas2r_nvram_write(struct esas2r_adapter *a, struct esas2r_request *rq, struct esas2r_sas_nvram *nvram) esas2r_nvram_write() argument
1375 esas2r_nvram_get_defaults(struct esas2r_adapter *a, struct esas2r_sas_nvram *nvram) esas2r_nvram_get_defaults() argument
H A Desas2r_main.c136 memcpy(buf, a->nvram, length); read_live_nvram()
727 a->nvram->sas_addr[0], esas2r_show_info()
728 a->nvram->sas_addr[1], esas2r_show_info()
729 a->nvram->sas_addr[2], esas2r_show_info()
730 a->nvram->sas_addr[3], esas2r_show_info()
731 a->nvram->sas_addr[4], esas2r_show_info()
732 a->nvram->sas_addr[5], esas2r_show_info()
733 a->nvram->sas_addr[6], esas2r_show_info()
734 a->nvram->sas_addr[7]); esas2r_show_info()
H A Desas2r.h868 struct esas2r_sas_nvram *nvram; member in struct:esas2r_adapter
1006 struct esas2r_sas_nvram *nvram);
1008 struct esas2r_sas_nvram *nvram);
1341 (a->nvram->options2 & SASNVR2_HEARTBEAT)) esas2r_enable_heartbeat()
H A Desas2r_ioctl.c892 &a->nvram->sas_addr[0], sizeof(u64)); hba_ioctl_callback()
1414 memcpy(ioctl->data.prw.data_buffer, a->nvram, esas2r_ioctl_handler()
H A Desas2r_disc.c85 struct esas2r_sas_nvram *nvr = a->nvram; esas2r_disc_initialize()
H A Desas2r_init.c946 a->nvram = (struct esas2r_sas_nvram *)high; esas2r_init_adapter_struct()
/linux-4.1.27/arch/sparc/kernel/
H A Didprom.c85 prom_printf("IDPROM: Warning, checksum failure (nvram=%x, calc=%x)!\n", idprom_init()
/linux-4.1.27/arch/arm/mach-orion5x/
H A Drd88f6183ap-ge-setup.c58 .name = "nvram",
H A Dwrt350n-v2-setup.c147 .name = "nvram",
/linux-4.1.27/arch/arm/mach-sa1100/include/mach/
H A Dh3xxx.h67 #define H3XXX_EGPIO_OPT_NVRAM_ON (H3XXX_EGPIO_BASE + 4) /* apply power to optionpack nvram, active high. */
/linux-4.1.27/drivers/net/ethernet/broadcom/bnx2x/
H A Dbnx2x_link.h294 * 2'b00: Timer will be configured by nvram, output will be the value
295 * from nvram.
296 * 2'b01: Timer will be configured by nvram, output will be in
298 * 2'b10: bits 1:0 contain an nvram value which will be used instead
299 * of the one located in the nvram. Output will be that value.
H A Dbnx2x_ethtool.c1167 * attempt to access nvram at the same time, we could run into a scenario such
1192 /* request access to nvram interface */ bnx2x_acquire_nvram_lock()
1206 "cannot get access to nvram interface\n"); bnx2x_acquire_nvram_lock()
1224 /* relinquish nvram interface */ bnx2x_release_nvram_lock()
1238 "cannot free access to nvram interface\n"); bnx2x_release_nvram_lock()
1304 /* we read nvram data in cpu order bnx2x_nvram_read_dword()
1315 "nvram read timeout expired\n"); bnx2x_nvram_read_dword()
1340 /* request access to nvram interface */ bnx2x_nvram_read()
1345 /* enable access to nvram interface */ bnx2x_nvram_read()
1367 /* disable access to nvram interface */ bnx2x_nvram_read()
1583 "nvram write timeout expired\n"); bnx2x_nvram_write_dword()
1603 /* request access to nvram interface */ bnx2x_nvram_write1()
1608 /* enable access to nvram interface */ bnx2x_nvram_write1()
1616 /* nvram data is returned as an array of bytes bnx2x_nvram_write1()
1630 /* disable access to nvram interface */ bnx2x_nvram_write1()
1662 /* request access to nvram interface */ bnx2x_nvram_write()
1667 /* enable access to nvram interface */ bnx2x_nvram_write()
1697 /* disable access to nvram interface */ bnx2x_nvram_write()
H A Dbnx2x_hsi.h698 /* When enabled, all second phy nvram parameters will be swapped
945 in a separate nvram image */
2158 /* bitmap notifying which VIF profiles stored in nvram are enabled by
H A Dbnx2x_dcb.c1920 /* Fail to set state to "enabled" if dcbx is disabled in nvram */ bnx2x_dcbnl_set_state()
H A Dbnx2x_link.c2556 * by nvram configuration. This parameter, whether this is the
2557 * default phy configuration, or the nvram overrun
2892 /* hsi values in nvram --> time*/ bnx2x_eee_calc_timer()
3998 /* TAP values are controlled by nvram, if value there isn't 0 */ bnx2x_warpcore_set_10G_XFI()
H A Dbnx2x_main.c10632 BNX2X_DEV_INFO("No need to release hw/nvram locks\n"); bnx2x_prev_unload()
11301 /* Configure link feature according to nvram value */ bnx2x_get_port_hwinfo()
/linux-4.1.27/drivers/message/fusion/
H A Dmptspi.c114 int nvram; mptspi_setTargetNegoParms() local
175 if (pspi_data->nvram && (pspi_data->nvram[id] != MPT_HOST_NVRAM_INVALID)) { mptspi_setTargetNegoParms()
176 nvram = pspi_data->nvram[id]; mptspi_setTargetNegoParms()
177 nfactor = (nvram & MPT_NVRAM_SYNC_MASK) >> 8; mptspi_setTargetNegoParms()
180 width = nvram & MPT_NVRAM_WIDE_DISABLE ? 0 : 1; mptspi_setTargetNegoParms()
184 * maximum of: adapter, nvram, inquiry mptspi_setTargetNegoParms()
443 if (ioc->spi_data.nvram && mptspi_target_alloc()
444 ioc->spi_data.nvram[starget->id] != MPT_HOST_NVRAM_INVALID) { mptspi_target_alloc()
445 u32 nvram = ioc->spi_data.nvram[starget->id]; mptspi_target_alloc() local
446 spi_min_period(starget) = (nvram & MPT_NVRAM_SYNC_MASK) >> MPT_NVRAM_SYNC_SHIFT; mptspi_target_alloc()
447 spi_max_width(starget) = nvram & MPT_NVRAM_WIDE_DISABLE ? 0 : 1; mptspi_target_alloc()
H A Dmptbase.c2743 kfree(ioc->spi_data.nvram); mpt_adapter_disable()
2747 ioc->spi_data.nvram = NULL; mpt_adapter_disable()
5341 * or if no nvram
5367 if (!ioc->spi_data.nvram) { mpt_GetScsiPortSettings()
5375 ioc->spi_data.nvram = (int *) mem; mpt_GetScsiPortSettings()
5378 ioc->name, ioc->spi_data.nvram, sz)); mpt_GetScsiPortSettings()
5384 ioc->spi_data.nvram[ii] = MPT_HOST_NVRAM_INVALID; mpt_GetScsiPortSettings()
5519 ioc->spi_data.nvram[ii] = data; mpt_GetScsiPortSettings()
5542 ioc->spi_data.nvram[ii] = data; mpt_GetScsiPortSettings()
H A Dmptbase.h484 int *nvram; /* table of device NVRAM values */ member in struct:_SpiCfgData
/linux-4.1.27/arch/m68k/sun3/
H A Didprom.c121 prom_printf("IDPROM: Checksum failure (nvram=%x, calc=%x)!\n", idprom_init()
/linux-4.1.27/drivers/mtd/
H A Dbcm47xxpart.c251 bcm47xxpart_add_part(&parts[curr_part++], "nvram", bcm47xxpart_parse()
289 bcm47xxpart_add_part(&parts[curr_part++], "nvram", bcm47xxpart_parse()
H A Dbcm63xxpart.c193 parts[curpart].name = "nvram"; bcm63xx_parse_cfe_partitions()
/linux-4.1.27/arch/powerpc/platforms/85xx/
H A Dge_imp3a.c34 #include <asm/nvram.h>
/linux-4.1.27/arch/powerpc/platforms/86xx/
H A Dgef_ppc9a.c35 #include <asm/nvram.h>
H A Dgef_sbc310.c35 #include <asm/nvram.h>
H A Dgef_sbc610.c35 #include <asm/nvram.h>
/linux-4.1.27/sound/ppc/
H A Dpmac.h36 #include <linux/nvram.h>
H A Dawacs.c24 #include <asm/nvram.h>
901 /* get default volume from nvram */ snd_pmac_awacs_init()
/linux-4.1.27/arch/powerpc/platforms/maple/
H A Dsetup.c61 #include <asm/nvram.h>
77 rtcs = of_find_compatible_node(NULL, "nvram", "AMD8111"); maple_find_nvram_base()
/linux-4.1.27/arch/powerpc/platforms/cell/
H A Dsetup.c46 #include <asm/nvram.h>
/linux-4.1.27/arch/mips/pci/
H A Dpci-bcm63xx.c22 * Allow PCI to be disabled at runtime depending on board nvram
/linux-4.1.27/arch/mips/bcm63xx/boards/
H A Dboard_bcm963xx.c758 * early init callback, read nvram data from flash and checksum it
/linux-4.1.27/fs/pstore/
H A Dplatform.c213 /* buffer range for nvram, erst */ allocate_buf_for_compression()
/linux-4.1.27/drivers/video/fbdev/
H A Digafb.c43 #include <linux/nvram.h>
H A Dvalkyriefb.c54 #include <linux/nvram.h>
H A Dplatinumfb.c32 #include <linux/nvram.h>
H A Dcontrolfb.c48 #include <linux/nvram.h>
H A Dimsttfb.c34 #include <linux/nvram.h>
/linux-4.1.27/drivers/scsi/megaraid/
H A Dmegaraid_sas.h659 u32 nvram:1; member in struct:megasas_ctrl_info::__anon9290
/linux-4.1.27/arch/mips/include/asm/sn/
H A Dklconfig.h688 unsigned char ioc3_nvram ; /* Info about nvram */
/linux-4.1.27/drivers/net/ethernet/broadcom/
H A Dtg3.c458 [TG3_NVRAM_TEST] = { "nvram test (online) " },
3665 /* Clear firmware's nvram arbitration. */ tg3_halt_cpu()
3721 * Get the nvram lock first before halting the cpu. tg3_load_firmware_cpu()
9053 * chip reset below will undo the nvram lock.
14951 "Cannot get nvram lock, %s failed\n", tg3_nvram_init()
H A Dbnx2.c4113 /* Relinquish nvram interface. */ bnx2_release_nvram_lock()
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmsmac/
H A Dmain.c4398 * run backplane attach, init nvram
4512 /* check device id(srom, nvram etc.) to set bands */ brcms_b_attach()
/linux-4.1.27/drivers/platform/x86/
H A Dthinkpad_acpi.c64 #include <linux/nvram.h>

Completed in 3459 milliseconds