/linux-6.12.1/drivers/scsi/sym53c8xx_2/ |
D | sym_nvram.c | 21 * 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 …]
|
D | sym_nvram.h | 21 * NVRAM detection and reading. 33 * Symbios NVRAM data format 124 * Tekram NvRAM data format. 166 * Union of supported NVRAM formats. 183 void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram); 188 …void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram) { } in sym_nvram_setup_host() argument 189 static inline void sym_nvram_setup_target(struct sym_tcb *tp, struct sym_nvram *nvram) { } in sym_nvram_setup_target() argument 197 return "No NVRAM"; in sym_nvram_type()
|
/linux-6.12.1/include/linux/ |
D | bcm963xx_nvram.h | 11 * 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 …]
|
D | nvram.h | 6 #include <uapi/linux/nvram.h> 13 * struct nvram_ops - NVRAM functionality made available to drivers 14 * @read: validate checksum (if any) then load a range of bytes from NVRAM 15 * @write: store a range of bytes to NVRAM then update checksum (if any) 16 * @read_byte: load a single byte from NVRAM 17 * @write_byte: store a single byte to NVRAM 18 * @get_size: return the fixed number of bytes in the NVRAM 20 * Architectures which provide an nvram ops struct need not implement all 21 * of these methods. If the NVRAM hardware can be accessed only one byte 23 * If the NVRAM has a checksum (and it is to be checked) the .read and
|
/linux-6.12.1/drivers/char/ |
D | nvram.c | 12 * "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 …]
|
/linux-6.12.1/arch/m68k/atari/ |
D | nvram.c | 3 * 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 …]
|
/linux-6.12.1/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
D | firmware.c | 40 * @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 …]
|
/linux-6.12.1/drivers/firmware/broadcom/ |
D | bcm47xx_nvram.c | 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() [all …]
|
D | Kconfig | 3 bool "Broadcom NVRAM driver" 6 Broadcom home routers contain flash partition called "nvram" with all 8 NVRAM partition contains a text-like data representing name=value 11 It simply reads content of NVRAM and parses it. It doesn't control any
|
/linux-6.12.1/arch/mips/bcm63xx/ |
D | nvram.c | 24 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 …]
|
/linux-6.12.1/drivers/mtd/parsers/ |
D | bcm63xxpart.c | 52 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 …]
|
/linux-6.12.1/arch/mips/include/asm/mach-bcm63xx/ |
D | bcm63xx_nvram.h | 8 * 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.
|
/linux-6.12.1/arch/powerpc/platforms/chrp/ |
D | nvram.c | 5 * /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() 95 MODULE_DESCRIPTION("PPC NVRAM device driver");
|
/linux-6.12.1/arch/powerpc/platforms/powermac/ |
D | nvram.c | 11 #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 …]
|
/linux-6.12.1/Documentation/devicetree/bindings/nvmem/ |
D | brcm,nvram.yaml | 4 $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";
|
/linux-6.12.1/arch/powerpc/platforms/pseries/ |
D | nvram.c | 5 * /dev/nvram driver for PPC64 17 #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 …]
|
/linux-6.12.1/arch/powerpc/sysdev/ |
D | mmio_nvram.c | 3 * memory mapped NVRAM 18 #include <asm/nvram.h> 104 nvram_node = of_find_node_by_type(NULL, "nvram"); in mmio_nvram_init() 106 nvram_node = of_find_compatible_node(NULL, NULL, "nvram"); in mmio_nvram_init() 108 printk(KERN_WARNING "nvram: no node found in device-tree\n"); in mmio_nvram_init() 114 printk(KERN_WARNING "nvram: failed to get address (err %d)\n", in mmio_nvram_init() 121 printk(KERN_WARNING "nvram: address or length is 0\n"); in mmio_nvram_init() 128 printk(KERN_WARNING "nvram: failed to ioremap\n"); in mmio_nvram_init() 133 printk(KERN_INFO "mmio NVRAM, %luk at 0x%lx mapped to %p\n", in mmio_nvram_init()
|
/linux-6.12.1/arch/powerpc/include/asm/ |
D | nvram.h | 3 * NVRAM definitions and access functions. 11 #include <uapi/asm/nvram.h> 70 /* Return partition offset in nvram */ 77 /* Initialize NVRAM OS partition */ 80 /* Initialize NVRAM oops partition */ 83 /* Read a NVRAM partition */ 88 /* Write to NVRAM OS partition */
|
/linux-6.12.1/arch/powerpc/kernel/ |
D | nvram_64.c | 5 * /dev/nvram driver for PPC64 13 #include <linux/nvram.h> 23 #include <asm/nvram.h> 91 * holding the timestamp. oops_buf[] gets written to NVRAM. 153 * We need to buffer the error logs into nvram to ensure that we have 160 * captured to disk, thus we buffer it in NVRAM for analysis on the 163 * In NVRAM the partition containing the error log buffer will looks like: 217 * Reads nvram partition for at most 'length' 284 pr_info("nvram: Found too small %s partition," in nvram_init_os_partition() 295 pr_info("nvram: No room to create %s partition, " in nvram_init_os_partition() [all …]
|
/linux-6.12.1/arch/powerpc/include/uapi/asm/ |
D | nvram.h | 3 * NVRAM definitions and access functions. 14 /* Signatures for nvram partitions */ 30 /* PowerMac specific nvram stuffs */ 51 * /dev/nvram ioctls 60 #define IOC_NVRAM_GET_OFFSET _IOWR('p', 0x42, int) /* Get NVRAM partition offset */ 61 #define IOC_NVRAM_SYNC _IO('p', 0x43) /* Sync NVRAM image */
|
/linux-6.12.1/include/uapi/linux/ |
D | nvram.h | 7 /* /dev/nvram ioctls */ 8 #define NVRAM_INIT _IO('p', 0x40) /* initialize NVRAM and set checksum */ 11 /* for all current systems, this is where NVRAM starts */ 13 /* all these functions expect an NVRAM offset, not an absolute */
|
/linux-6.12.1/drivers/nvmem/ |
D | brcm_nvram.c | 24 * @nvmem_size: Size of the whole space available for NVRAM 25 * @data: NVRAM data copy stored to avoid poking underlaying flash controller 26 * @data_len: NVRAM data size 85 WARN(priv->data_len > SZ_128K, "Unexpected (big) NVRAM size: %zu B\n", priv->data_len); in brcm_nvram_copy_data() 185 dev_err(dev, "Invalid NVRAM magic\n"); in brcm_nvram_parse() 191 dev_err(dev, "NVRAM length (%zd) exceeds mapped size (%zd)\n", len, in brcm_nvram_parse() 206 .name = "brcm-nvram", in brcm_nvram_probe() 236 { .compatible = "brcm,nvram", }, 256 MODULE_DESCRIPTION("Broadcom I/O-mapped NVRAM support driver");
|
/linux-6.12.1/arch/powerpc/platforms/powernv/ |
D | opal-nvram.c | 3 * PowerNV nvram code. 16 #include <asm/nvram.h> 83 /* Scan nvram for partitions */ in opal_nvram_init_log_partitions() 95 np = of_find_compatible_node(NULL, NULL, "ibm,opal-nvram"); in opal_nvram_init() 106 pr_info("OPAL nvram setup, %u bytes\n", nvram_size); in opal_nvram_init()
|
/linux-6.12.1/Documentation/scsi/ |
D | sym53c8xx_2.rst | 51 10.2.11 Serial NVRAM 58 12. Serial NVRAM support (by Richard Waltham) 60 17.2 Symbios NVRAM layout 61 17.3 Tekram NVRAM layout 194 :Serial NVRAM: Symbios and Tekram formats 270 If your controller has NVRAM, you can configure this feature per target 286 If your controller does not have NVRAM or if it is managed by the SDMS 586 If a host SCSI id is available from the NVRAM, the driver will ignore 642 10.2.11 Serial NVRAM 648 nvram=n do not look for serial NVRAM [all …]
|
/linux-6.12.1/drivers/scsi/esas2r/ |
D | esas2r_flash.c | 1186 * Read and validate current NVRAM parameters by accessing 1187 * physical NVRAM directly. if currently stored parameters are 1197 if (!esas2r_read_flash_block(a, a->nvram, FLS_OFFSET_NVR, in esas2r_nvram_read_direct() 1199 esas2r_hdebug("NVRAM read failed, using defaults"); in esas2r_nvram_read_direct() 1211 /* Interrupt callback to process NVRAM completions. */ 1242 /* update the NVRAM state */ in esas2r_nvram_callback() 1255 * Write the contents of nvram to the adapter's physical NVRAM. 1256 * The cached copy of the NVRAM is also updated. 1259 struct esas2r_sas_nvram *nvram) in esas2r_nvram_write() argument 1261 struct esas2r_sas_nvram *n = nvram; in esas2r_nvram_write() [all …]
|