Home
last modified time | relevance | path

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

12345678910>>...25

/kernel/linux/linux-6.6/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/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-6.6/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-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-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-6.6/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/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()
214 nvp->nvram = kzalloc(size, GFP_KERNEL); in brcmf_init_nvram_parser()
215 if (!nvp->nvram) in brcmf_init_nvram_parser()
223 /* brcmf_fw_strip_multi_v1 :Some nvram files contain settings for multiple
225 * which data is to be returned. v1 is the version where nvram is stored
[all …]
/kernel/linux/linux-6.6/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-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-6.6/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
Dfirmware.c40 * @nvram: output buffer with parse result.
48 * @boardrev_found: nvram contains boardrev information.
54 u8 *nvram; member
67 * is_nvram_char() - check if char is a valid one for NVRAM entry
160 memcpy(&nvp->nvram[nvp->nvram_len], skv, cplen); in brcmf_nvram_handle_value()
162 nvp->nvram[nvp->nvram_len] = '\0'; in brcmf_nvram_handle_value()
223 nvp->nvram = kzalloc(size, GFP_KERNEL); in brcmf_init_nvram_parser()
224 if (!nvp->nvram) in brcmf_init_nvram_parser()
232 /* brcmf_fw_strip_multi_v1 :Some nvram files contain settings for multiple
234 * which data is to be returned. v1 is the version where nvram is stored
[all …]
/kernel/linux/linux-6.6/drivers/firmware/broadcom/
Dbcm47xx_nvram.c3 * 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()
[all …]
/kernel/linux/linux-6.6/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/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-6.6/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-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-6.6/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-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-6.6/Documentation/devicetree/bindings/nvmem/
Dbrcm,nvram.yaml4 $id: http://devicetree.org/schemas/nvmem/brcm,nvram.yaml#
7 title: Broadcom's NVRAM
10 Broadcom's NVRAM is a structure containing device specific environment
14 NVRAM can be accessed on Broadcom BCM47xx MIPS and Northstar ARM Cortex-A9
17 NVRAM variables can be defined as NVMEM device subnodes.
27 const: brcm,nvram
67 nvram@1eff0000 {
68 compatible = "brcm,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-6.6/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-6.6/arch/powerpc/platforms/chrp/
Dnvram.c5 * /dev/nvram driver for PPC
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()

12345678910>>...25