Home
last modified time | relevance | path

Searched full:nvram (Results 1 – 25 of 558) sorted by relevance

12345678910>>...23

/kernel/linux/linux-4.19/drivers/scsi/sym53c8xx_2/
Dsym_nvram.c20 * NVRAM detection and reading.
48 * Get host setup from NVRAM.
50 void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram) in sym_nvram_setup_host() argument
54 * and miscellaneous host flags from NVRAM. in sym_nvram_setup_host()
56 switch (nvram->type) { in sym_nvram_setup_host()
58 if (!(nvram->data.Symbios.flags & SYMBIOS_PARITY_ENABLE)) in sym_nvram_setup_host()
60 np->myaddr = nvram->data.Symbios.host_id & 0x0f; in sym_nvram_setup_host()
61 if (nvram->data.Symbios.flags & SYMBIOS_VERBOSE_MSGS) in sym_nvram_setup_host()
63 if (nvram->data.Symbios.flags1 & SYMBIOS_SCAN_HI_LO) in sym_nvram_setup_host()
65 if (nvram->data.Symbios.flags2 & SYMBIOS_AVOID_BUS_RESET) in sym_nvram_setup_host()
[all …]
/kernel/linux/linux-5.10/drivers/scsi/sym53c8xx_2/
Dsym_nvram.c21 * NVRAM detection and reading.
35 * Get host setup from NVRAM.
37 void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram) in sym_nvram_setup_host() argument
41 * and miscellaneous host flags from NVRAM. in sym_nvram_setup_host()
43 switch (nvram->type) { in sym_nvram_setup_host()
45 if (!(nvram->data.Symbios.flags & SYMBIOS_PARITY_ENABLE)) in sym_nvram_setup_host()
47 np->myaddr = nvram->data.Symbios.host_id & 0x0f; in sym_nvram_setup_host()
48 if (nvram->data.Symbios.flags & SYMBIOS_VERBOSE_MSGS) in sym_nvram_setup_host()
50 if (nvram->data.Symbios.flags1 & SYMBIOS_SCAN_HI_LO) in sym_nvram_setup_host()
52 if (nvram->data.Symbios.flags2 & SYMBIOS_AVOID_BUS_RESET) in sym_nvram_setup_host()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dbcm963xx_nvram.h11 * Broadcom BCM963xx SoC board nvram data structure.
13 * The nvram structure varies in size depending on the SoC board version. Use
51 #define BCM963XX_NVRAM_NAND_PART_OFFSET(nvram, part) \ argument
52 bcm963xx_nvram_nand_part_offset(nvram, BCM963XX_NVRAM_NAND_PART_ ##part)
55 const struct bcm963xx_nvram *nvram, in bcm963xx_nvram_nand_part_offset() argument
58 return nvram->nand_part_offset[part] * SZ_1K; in bcm963xx_nvram_nand_part_offset()
61 #define BCM963XX_NVRAM_NAND_PART_SIZE(nvram, part) \ argument
62 bcm963xx_nvram_nand_part_size(nvram, BCM963XX_NVRAM_NAND_PART_ ##part)
65 const struct bcm963xx_nvram *nvram, in bcm963xx_nvram_nand_part_size() argument
68 return nvram->nand_part_size[part] * SZ_1K; in bcm963xx_nvram_nand_part_size()
[all …]
/kernel/linux/linux-4.19/include/linux/
Dbcm963xx_nvram.h11 * Broadcom BCM963xx SoC board nvram data structure.
13 * The nvram structure varies in size depending on the SoC board version. Use
51 #define BCM963XX_NVRAM_NAND_PART_OFFSET(nvram, part) \ argument
52 bcm963xx_nvram_nand_part_offset(nvram, BCM963XX_NVRAM_NAND_PART_ ##part)
55 const struct bcm963xx_nvram *nvram, in bcm963xx_nvram_nand_part_offset() argument
58 return nvram->nand_part_offset[part] * SZ_1K; in bcm963xx_nvram_nand_part_offset()
61 #define BCM963XX_NVRAM_NAND_PART_SIZE(nvram, part) \ argument
62 bcm963xx_nvram_nand_part_size(nvram, BCM963XX_NVRAM_NAND_PART_ ##part)
65 const struct bcm963xx_nvram *nvram, in bcm963xx_nvram_nand_part_size() argument
68 return nvram->nand_part_size[part] * SZ_1K; in bcm963xx_nvram_nand_part_size()
[all …]
/kernel/linux/linux-4.19/drivers/char/
Dnvram.c11 * "NVRAM" (NV stands for non-volatile).
13 * The data are supplied as a (seekable) character device, /dev/nvram. The
18 * Checksums over the NVRAM contents are managed by this driver. In case of a
20 * to a sane state either by ioctl(NVRAM_INIT) (clear whole NVRAM) or
25 * want to access the NVRAM: nvram_{read,write,check_checksum,set_checksum}.
41 #include <linux/nvram.h>
52 # error Cannot build nvram driver for this machine configuration.
137 * purpose memory in the NVRAM - that is to say, they all add the
138 * NVRAM_FIRST_BYTE offset. Pass them offsets into NVRAM as if you did not
212 * The are the file operation function for user access to /dev/nvram
[all …]
/kernel/linux/linux-5.10/drivers/rtc/
Dnvmem.c46 rtc->nvram = kzalloc(sizeof(*rtc->nvram), GFP_KERNEL); in rtc_nvram_register()
47 if (!rtc->nvram) in rtc_nvram_register()
50 rtc->nvram->attr.name = "nvram"; in rtc_nvram_register()
51 rtc->nvram->attr.mode = 0644; in rtc_nvram_register()
52 rtc->nvram->private = nvmem; in rtc_nvram_register()
54 sysfs_bin_attr_init(rtc->nvram); in rtc_nvram_register()
56 rtc->nvram->read = rtc_nvram_read; in rtc_nvram_register()
57 rtc->nvram->write = rtc_nvram_write; in rtc_nvram_register()
58 rtc->nvram->size = size; in rtc_nvram_register()
61 rtc->nvram); in rtc_nvram_register()
[all …]
/kernel/linux/linux-4.19/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
Dfirmware.c48 * @nvram: output buffer with parse result.
56 * @boardrev_found: nvram contains boardrev information.
61 u8 *nvram; member
73 * is_nvram_char() - check if char is a valid one for NVRAM entry
162 memcpy(&nvp->nvram[nvp->nvram_len], skv, cplen); in brcmf_nvram_handle_value()
164 nvp->nvram[nvp->nvram_len] = '\0'; in brcmf_nvram_handle_value()
222 nvp->nvram = kzalloc(size, GFP_KERNEL); in brcmf_init_nvram_parser()
223 if (!nvp->nvram) in brcmf_init_nvram_parser()
231 /* brcmf_fw_strip_multi_v1 :Some nvram files contain settings for multiple
233 * which data is to be returned. v1 is the version where nvram is stored
[all …]
/kernel/linux/linux-5.10/drivers/char/
Dnvram.c12 * "NVRAM" (NV stands for non-volatile).
14 * The data are supplied as a (seekable) character device, /dev/nvram. The
19 * Checksums over the NVRAM contents are managed by this driver. In case of a
21 * to a sane state either by ioctl(NVRAM_INIT) (clear whole NVRAM) or
35 #include <linux/nvram.h>
53 #include <asm/nvram.h>
71 * purpose memory in the NVRAM - that is to say, they all add the
72 * NVRAM_FIRST_BYTE offset. Pass them offsets into NVRAM as if you did not
219 * The are the file operation function for user access to /dev/nvram
288 pr_warn("nvram: Using obsolete PMAC_NVRAM_GET_OFFSET ioctl\n"); in nvram_misc_ioctl()
[all …]
/kernel/linux/linux-5.10/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
Dfirmware.c38 * @nvram: output buffer with parse result.
46 * @boardrev_found: nvram contains boardrev information.
51 u8 *nvram; member
63 * is_nvram_char() - check if char is a valid one for NVRAM entry
152 memcpy(&nvp->nvram[nvp->nvram_len], skv, cplen); in brcmf_nvram_handle_value()
154 nvp->nvram[nvp->nvram_len] = '\0'; in brcmf_nvram_handle_value()
212 nvp->nvram = kzalloc(size, GFP_KERNEL); in brcmf_init_nvram_parser()
213 if (!nvp->nvram) in brcmf_init_nvram_parser()
221 /* brcmf_fw_strip_multi_v1 :Some nvram files contain settings for multiple
223 * which data is to be returned. v1 is the version where nvram is stored
[all …]
/kernel/linux/linux-5.10/arch/m68k/atari/
Dnvram.c3 * CMOS/NV-RAM driver for Atari. Adapted from drivers/char/nvram.c.
15 #include <linux/nvram.h>
26 * purpose memory in the NVRAM - that is to say, they all add the
27 * NVRAM_FIRST_BYTE offset. Pass them offsets into NVRAM as if you did not
178 static void atari_nvram_proc_read(unsigned char *nvram, struct seq_file *seq, in atari_nvram_proc_read() argument
193 if (nvram[1] == boot_prefs[i].val) { in atari_nvram_proc_read()
198 seq_printf(seq, "0x%02x (undefined)\n", nvram[1]); in atari_nvram_proc_read()
201 (nvram[16] & 0x80) ? "on" : "off"); in atari_nvram_proc_read()
203 if (nvram[16] & 0x80) in atari_nvram_proc_read()
204 seq_printf(seq, "%d\n", nvram[16] & 7); in atari_nvram_proc_read()
[all …]
/kernel/linux/linux-4.19/drivers/rtc/
Dnvmem.c51 rtc->nvram = devm_kzalloc(rtc->dev.parent, in rtc_nvram_register()
54 if (!rtc->nvram) in rtc_nvram_register()
57 rtc->nvram->attr.name = "nvram"; in rtc_nvram_register()
58 rtc->nvram->attr.mode = 0644; in rtc_nvram_register()
59 rtc->nvram->private = rtc; in rtc_nvram_register()
61 sysfs_bin_attr_init(rtc->nvram); in rtc_nvram_register()
63 rtc->nvram->read = rtc_nvram_read; in rtc_nvram_register()
64 rtc->nvram->write = rtc_nvram_write; in rtc_nvram_register()
65 rtc->nvram->size = size; in rtc_nvram_register()
68 rtc->nvram); in rtc_nvram_register()
[all …]
/kernel/linux/linux-5.10/arch/mips/bcm63xx/
Dnvram.c24 static struct bcm963xx_nvram nvram; variable
32 /* extract nvram data */ in bcm63xx_nvram_init()
33 memcpy(&nvram, addr, BCM963XX_NVRAM_V5_SIZE); in bcm63xx_nvram_init()
36 if (bcm963xx_nvram_checksum(&nvram, &expected_crc, &crc)) in bcm63xx_nvram_init()
37 pr_warn("nvram checksum failed, contents may be invalid (expected %08x, got %08x)\n", in bcm63xx_nvram_init()
40 /* Cable modems have a different NVRAM which is embedded in the eCos in bcm63xx_nvram_init()
45 memcpy(nvram.mac_addr_base, hcs_mac_addr, ETH_ALEN); in bcm63xx_nvram_init()
46 nvram.mac_addr_count = 2; in bcm63xx_nvram_init()
52 return nvram.name; in bcm63xx_nvram_get_name()
61 if (mac_addr_used >= nvram.mac_addr_count) { in bcm63xx_nvram_get_mac_address()
[all …]
/kernel/linux/linux-4.19/arch/mips/bcm63xx/
Dnvram.c24 static struct bcm963xx_nvram nvram; variable
32 /* extract nvram data */ in bcm63xx_nvram_init()
33 memcpy(&nvram, addr, BCM963XX_NVRAM_V5_SIZE); in bcm63xx_nvram_init()
36 if (bcm963xx_nvram_checksum(&nvram, &expected_crc, &crc)) in bcm63xx_nvram_init()
37 pr_warn("nvram checksum failed, contents may be invalid (expected %08x, got %08x)\n", in bcm63xx_nvram_init()
40 /* Cable modems have a different NVRAM which is embedded in the eCos in bcm63xx_nvram_init()
45 memcpy(nvram.mac_addr_base, hcs_mac_addr, ETH_ALEN); in bcm63xx_nvram_init()
46 nvram.mac_addr_count = 2; in bcm63xx_nvram_init()
52 return nvram.name; in bcm63xx_nvram_get_name()
61 if (mac_addr_used >= nvram.mac_addr_count) { in bcm63xx_nvram_get_mac_address()
[all …]
/kernel/linux/linux-5.10/drivers/mtd/parsers/
Dbcm63xxpart.c52 struct bcm963xx_nvram *nvram) in bcm63xx_read_nvram() argument
58 /* extract nvram data */ in bcm63xx_read_nvram()
60 &retlen, (void *)nvram); in bcm63xx_read_nvram()
64 ret = bcm963xx_nvram_checksum(nvram, &expected_crc, &actual_crc); in bcm63xx_read_nvram()
66 pr_warn("nvram checksum failed, contents may be invalid (expected %08x, got %08x)\n", in bcm63xx_read_nvram()
69 if (!nvram->psi_size) in bcm63xx_read_nvram()
70 nvram->psi_size = BCM963XX_DEFAULT_PSI_SIZE; in bcm63xx_read_nvram()
81 const struct mtd_partition **pparts, struct bcm963xx_nvram *nvram) in bcm63xx_parse_cfe_nor_partitions() argument
93 nvramlen = nvram->psi_size * SZ_1K; in bcm63xx_parse_cfe_nor_partitions()
106 parts[curpart].name = "nvram"; in bcm63xx_parse_cfe_nor_partitions()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/platforms/chrp/
Dnvram.c5 * /dev/nvram driver for PPC
34 if ((rtas_call(rtas_token("nvram-fetch"), 3, 2, &done, addr, in chrp_nvram_read_val()
56 if ((rtas_call(rtas_token("nvram-store"), 3, 2, &done, addr, in chrp_nvram_write_val()
69 struct device_node *nvram; in chrp_nvram_init() local
73 nvram = of_find_node_by_type(NULL, "nvram"); in chrp_nvram_init()
74 if (nvram == NULL) in chrp_nvram_init()
77 nbytes_p = of_get_property(nvram, "#bytes", &proplen); in chrp_nvram_init()
79 of_node_put(nvram); in chrp_nvram_init()
85 printk(KERN_INFO "CHRP nvram contains %u bytes\n", nvram_size); in chrp_nvram_init()
86 of_node_put(nvram); in chrp_nvram_init()
/kernel/linux/linux-4.19/arch/powerpc/platforms/chrp/
Dnvram.c9 * /dev/nvram driver for PPC
39 if ((rtas_call(rtas_token("nvram-fetch"), 3, 2, &done, addr, in chrp_nvram_read()
61 if ((rtas_call(rtas_token("nvram-store"), 3, 2, &done, addr, in chrp_nvram_write()
69 struct device_node *nvram; in chrp_nvram_init() local
73 nvram = of_find_node_by_type(NULL, "nvram"); in chrp_nvram_init()
74 if (nvram == NULL) in chrp_nvram_init()
77 nbytes_p = of_get_property(nvram, "#bytes", &proplen); in chrp_nvram_init()
79 of_node_put(nvram); in chrp_nvram_init()
85 printk(KERN_INFO "CHRP nvram contains %u bytes\n", nvram_size); in chrp_nvram_init()
86 of_node_put(nvram); in chrp_nvram_init()
/kernel/linux/linux-4.19/arch/mips/include/asm/mach-bcm63xx/
Dbcm63xx_nvram.h8 * bcm63xx_nvram_init() - initializes nvram
9 * @nvram: address of the nvram data
11 * Initialized the local nvram copy from the target address and checks
14 void bcm63xx_nvram_init(void *nvram);
17 * bcm63xx_nvram_get_name() - returns the board name according to nvram
19 * Returns the board name field from nvram. Note that it might not be
28 * Registers and returns a mac address from the allocated macs from nvram.
/kernel/linux/linux-5.10/arch/mips/include/asm/mach-bcm63xx/
Dbcm63xx_nvram.h8 * bcm63xx_nvram_init() - initializes nvram
9 * @nvram: address of the nvram data
11 * Initialized the local nvram copy from the target address and checks
14 void bcm63xx_nvram_init(void *nvram);
17 * bcm63xx_nvram_get_name() - returns the board name according to nvram
19 * Returns the board name field from nvram. Note that it might not be
28 * Registers and returns a mac address from the allocated macs from nvram.
/kernel/linux/linux-5.10/drivers/firmware/broadcom/
Dbcm47xx_nvram.c3 * BCM947xx nvram variable access
51 /* Probe for NVRAM header */
59 pr_warn("nvram already initialized\n"); in nvram_find_and_copy()
63 /* TODO: when nvram is on nand flash check for bad blocks first. */ in nvram_find_and_copy()
75 /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */ in nvram_find_and_copy()
88 pr_err("no nvram found\n"); in nvram_find_and_copy()
95 pr_err("The nvram size according to the header seems to be bigger than the partition on flash\n"); in nvram_find_and_copy()
99 …pr_err("nvram on flash (%zu bytes) is bigger than the reserved space in memory, will just copy the… in nvram_find_and_copy()
112 * On bcm47xx we need access to the NVRAM very early, so we can't use mtd
116 * soon as we get info about flash device, before any NVRAM entry is needed.
[all …]
/kernel/linux/linux-4.19/drivers/firmware/broadcom/
Dbcm47xx_nvram.c2 * BCM947xx nvram variable access
55 /* Probe for NVRAM header */
63 pr_warn("nvram already initialized\n"); in nvram_find_and_copy()
67 /* TODO: when nvram is on nand flash check for bad blocks first. */ in nvram_find_and_copy()
79 /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */ in nvram_find_and_copy()
92 pr_err("no nvram found\n"); in nvram_find_and_copy()
99 pr_err("The nvram size according to the header seems to be bigger than the partition on flash\n"); in nvram_find_and_copy()
103 …pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the … in nvram_find_and_copy()
116 * On bcm47xx we need access to the NVRAM very early, so we can't use mtd
120 * soon as we get info about flash device, before any NVRAM entry is needed.
[all …]
/kernel/linux/linux-5.10/arch/powerpc/platforms/pseries/
Dnvram.c5 * /dev/nvram driver for PPC64
16 #include <asm/nvram.h>
130 * We need to buffer the error logs into nvram to ensure that we have
150 * Reads nvram for error log for at most 'length'
203 /* Scan nvram for partitions */ in pseries_nvram_init_log_partitions()
214 struct device_node *nvram; in pSeries_nvram_init() local
218 nvram = of_find_node_by_type(NULL, "nvram"); in pSeries_nvram_init()
219 if (nvram == NULL) in pSeries_nvram_init()
222 nbytes_p = of_get_property(nvram, "#bytes", &proplen); in pSeries_nvram_init()
224 of_node_put(nvram); in pSeries_nvram_init()
[all …]
/kernel/linux/linux-4.19/arch/powerpc/platforms/pseries/
Dnvram.c9 * /dev/nvram driver for PPC64
22 #include <asm/nvram.h>
136 * We need to buffer the error logs into nvram to ensure that we have
156 * Reads nvram for error log for at most 'length'
209 /* Scan nvram for partitions */ in pseries_nvram_init_log_partitions()
220 struct device_node *nvram; in pSeries_nvram_init() local
224 nvram = of_find_node_by_type(NULL, "nvram"); in pSeries_nvram_init()
225 if (nvram == NULL) in pSeries_nvram_init()
228 nbytes_p = of_get_property(nvram, "#bytes", &proplen); in pSeries_nvram_init()
230 of_node_put(nvram); in pSeries_nvram_init()
[all …]
/kernel/linux/linux-4.19/arch/powerpc/include/asm/
Dnvram.h2 * NVRAM definitions and access functions.
15 #include <uapi/asm/nvram.h>
74 /* Return partition offset in nvram */
81 /* Synchronize NVRAM */
84 /* Initialize NVRAM OS partition */
87 /* Initialize NVRAM oops partition */
90 /* Read a NVRAM partition */
95 /* Write to NVRAM OS partition */
101 /* Determine NVRAM size */
104 /* Normal access to NVRAM */
/kernel/linux/linux-5.10/arch/powerpc/platforms/powermac/
Dnvram.c11 #include <linux/nvram.h>
24 #include <asm/nvram.h>
41 /* On Core99, nvram is either a sharp, a micron or an AMD flash */
52 /* CHRP NVRAM header */
287 DBG("nvram: Sharp/Micron Erasing bank %d...\n", bank); in sm_erase_bank()
294 printk(KERN_ERR "nvram: Sharp/Micron flash erase timeout !\n"); in sm_erase_bank()
305 printk(KERN_ERR "nvram: Sharp/Micron flash erase failed !\n"); in sm_erase_bank()
318 DBG("nvram: Sharp/Micron Writing bank %d...\n", bank); in sm_write_bank()
327 printk(KERN_ERR "nvram: Sharp/Micron flash write timeout !\n"); in sm_write_bank()
339 printk(KERN_ERR "nvram: Sharp/Micron flash write failed !\n"); in sm_write_bank()
[all …]
/kernel/linux/linux-4.19/arch/powerpc/platforms/powermac/
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 */
56 /* CHRP NVRAM header */
286 DBG("nvram: Sharp/Micron Erasing bank %d...\n", bank); in sm_erase_bank()
293 printk(KERN_ERR "nvram: Sharp/Micron flash erase timeout !\n"); in sm_erase_bank()
304 printk(KERN_ERR "nvram: Sharp/Micron flash erase failed !\n"); in sm_erase_bank()
317 DBG("nvram: Sharp/Micron Writing bank %d...\n", bank); in sm_write_bank()
326 printk(KERN_ERR "nvram: Sharp/Micron flash write timeout !\n"); in sm_write_bank()
338 printk(KERN_ERR "nvram: Sharp/Micron flash write failed !\n"); in sm_write_bank()
[all …]

12345678910>>...23