/openbmc/linux/drivers/thunderbolt/ |
H A D | nvm.c | 3 * NVM helpers 19 /* Intel specific NVM offsets */ 25 /* ASMedia specific NVM offsets */ 32 * struct tb_nvm_vendor_ops - Vendor specific NVM operations 33 * @read_version: Reads out NVM version from the flash 34 * @validate: Validates the NVM image before update (optional) 38 int (*read_version)(struct tb_nvm *nvm); 39 int (*validate)(struct tb_nvm *nvm); 40 int (*write_headers)(struct tb_nvm *nvm); 46 * @vops: Vendor specific NVM operations [all …]
|
H A D | retimer.c | 20 * tb_retimer_nvm_read() - Read contents of retimer NVM 22 * @address: NVM address (in bytes) to start reading 23 * @buf: Data read from NVM is stored here 26 * Reads retimer NVM and copies the contents to @buf. Returns %0 if the 37 struct tb_nvm *nvm = priv; in nvm_read() local 38 struct tb_retimer *rt = tb_to_retimer(nvm->dev); in nvm_read() 60 struct tb_nvm *nvm = priv; in nvm_write() local 61 struct tb_retimer *rt = tb_to_retimer(nvm->dev); in nvm_write() 67 ret = tb_nvm_write_buf(nvm, offset, val, bytes); in nvm_write() 75 struct tb_nvm *nvm; in tb_retimer_nvm_add() local [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/igb/ |
H A D | e1000_nvm.c | 22 udelay(hw->nvm.delay_usec); in igb_raise_eec_clk() 37 udelay(hw->nvm.delay_usec); in igb_lower_eec_clk() 52 struct e1000_nvm_info *nvm = &hw->nvm; in igb_shift_out_eec_bits() local 57 if (nvm->type == e1000_nvm_eeprom_spi) in igb_shift_out_eec_bits() 69 udelay(nvm->delay_usec); in igb_shift_out_eec_bits() 179 hw_dbg("Could not acquire NVM grant\n"); in igb_acquire_nvm() 194 struct e1000_nvm_info *nvm = &hw->nvm; in igb_standby_nvm() local 197 if (nvm->type == e1000_nvm_eeprom_spi) { in igb_standby_nvm() 202 udelay(nvm->delay_usec); in igb_standby_nvm() 206 udelay(nvm->delay_usec); in igb_standby_nvm() [all …]
|
H A D | e1000_i210.c | 20 * Acquire the HW semaphore to access the PHY or NVM 25 s32 timeout = hw->nvm.word_size + 1; in igb_get_hw_semaphore_i210() 76 hw_dbg("Driver can't access the NVM\n"); in igb_get_hw_semaphore_i210() 114 * Acquire the SW/FW semaphore to access the PHY or NVM. The mask 160 * Release the SW/FW semaphore used to access the PHY or NVM. The mask 200 if (!(hw->nvm.ops.acquire(hw))) { in igb_read_nvm_srrd_i210() 203 hw->nvm.ops.release(hw); in igb_read_nvm_srrd_i210() 230 struct e1000_nvm_info *nvm = &hw->nvm; in igb_write_nvm_srwr() local 238 if ((offset >= nvm->word_size) || (words > (nvm->word_size - offset)) || in igb_write_nvm_srwr() 240 hw_dbg("nvm parameter(s) out of bounds\n"); in igb_write_nvm_srwr() [all …]
|
H A D | e1000_82575.c | 323 * igb_init_nvm_params_82575 - Init NVM func ptrs. 328 struct e1000_nvm_info *nvm = &hw->nvm; in igb_init_nvm_params_82575() local 345 nvm->word_size = BIT(size); in igb_init_nvm_params_82575() 346 nvm->opcode_bits = 8; in igb_init_nvm_params_82575() 347 nvm->delay_usec = 1; in igb_init_nvm_params_82575() 349 switch (nvm->override) { in igb_init_nvm_params_82575() 351 nvm->page_size = 32; in igb_init_nvm_params_82575() 352 nvm->address_bits = 16; in igb_init_nvm_params_82575() 355 nvm->page_size = 8; in igb_init_nvm_params_82575() 356 nvm->address_bits = 8; in igb_init_nvm_params_82575() [all …]
|
H A D | e1000_defines.h | 510 /* Number of milliseconds for NVM auto read done after MAC reset. */ 703 /* NVM Control */ 704 #define E1000_EECD_SK 0x00000001 /* NVM Clock */ 705 #define E1000_EECD_CS 0x00000002 /* NVM Chip Select */ 706 #define E1000_EECD_DI 0x00000004 /* NVM Data In */ 707 #define E1000_EECD_DO 0x00000008 /* NVM Data Out */ 708 #define E1000_EECD_REQ 0x00000040 /* NVM Access Request */ 709 #define E1000_EECD_GNT 0x00000080 /* NVM Access Grant */ 710 #define E1000_EECD_PRES 0x00000100 /* NVM Present */ 711 /* NVM Addressing bits based on type 0=small, 1=large */ [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/e1000e/ |
H A D | nvm.c | 18 udelay(hw->nvm.delay_usec); in e1000_raise_eec_clk() 33 udelay(hw->nvm.delay_usec); in e1000_lower_eec_clk() 48 struct e1000_nvm_info *nvm = &hw->nvm; in e1000_shift_out_eec_bits() local 53 if (nvm->type == e1000_nvm_eeprom_spi) in e1000_shift_out_eec_bits() 65 udelay(nvm->delay_usec); in e1000_shift_out_eec_bits() 169 e_dbg("Could not acquire NVM grant\n"); in e1000e_acquire_nvm() 184 struct e1000_nvm_info *nvm = &hw->nvm; in e1000_standby_nvm() local 187 if (nvm->type == e1000_nvm_eeprom_spi) { in e1000_standby_nvm() 192 udelay(nvm->delay_usec); in e1000_standby_nvm() 196 udelay(nvm->delay_usec); in e1000_standby_nvm() [all …]
|
H A D | defines.h | 221 #define E1000_STATUS_LAN_INIT_DONE 0x00000200 /* Lan Init Completion by NVM */ 515 /* Number of milliseconds for NVM auto read done after MAC reset. */ 578 /* NVM Control */ 579 #define E1000_EECD_SK 0x00000001 /* NVM Clock */ 580 #define E1000_EECD_CS 0x00000002 /* NVM Chip Select */ 581 #define E1000_EECD_DI 0x00000004 /* NVM Data In */ 582 #define E1000_EECD_DO 0x00000008 /* NVM Data Out */ 583 #define E1000_EECD_REQ 0x00000040 /* NVM Access Request */ 584 #define E1000_EECD_GNT 0x00000080 /* NVM Access Grant */ 585 #define E1000_EECD_PRES 0x00000100 /* NVM Present */ [all …]
|
H A D | ich8lan.c | 611 * e1000_init_nvm_params_ich8lan - Initialize NVM function pointers 614 * Initialize family-specific NVM parameters and function 619 struct e1000_nvm_info *nvm = &hw->nvm; in e1000_init_nvm_params_ich8lan() local 625 nvm->type = e1000_nvm_flash_sw; in e1000_init_nvm_params_ich8lan() 628 /* in SPT, gfpreg doesn't exist. NVM size is taken from the in e1000_init_nvm_params_ich8lan() 634 nvm->flash_base_addr = 0; in e1000_init_nvm_params_ich8lan() 637 nvm->flash_bank_size = nvm_size / 2; in e1000_init_nvm_params_ich8lan() 639 nvm->flash_bank_size /= sizeof(u16); in e1000_init_nvm_params_ich8lan() 659 nvm->flash_base_addr = sector_base_addr in e1000_init_nvm_params_ich8lan() 662 /* find total size of the NVM, then cut in half since the total in e1000_init_nvm_params_ich8lan() [all …]
|
H A D | 82571.c | 117 * e1000_init_nvm_params_82571 - Init NVM func ptrs. 122 struct e1000_nvm_info *nvm = &hw->nvm; in e1000_init_nvm_params_82571() local 126 nvm->opcode_bits = 8; in e1000_init_nvm_params_82571() 127 nvm->delay_usec = 1; in e1000_init_nvm_params_82571() 128 switch (nvm->override) { in e1000_init_nvm_params_82571() 130 nvm->page_size = 32; in e1000_init_nvm_params_82571() 131 nvm->address_bits = 16; in e1000_init_nvm_params_82571() 134 nvm->page_size = 8; in e1000_init_nvm_params_82571() 135 nvm->address_bits = 8; in e1000_init_nvm_params_82571() 138 nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8; in e1000_init_nvm_params_82571() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/igc/ |
H A D | igc_i225.c | 39 * Acquire the HW semaphore to access the PHY or NVM 43 s32 timeout = hw->nvm.word_size + 1; in igc_get_hw_semaphore_i225() 95 hw_dbg("Driver can't access the NVM\n"); in igc_get_hw_semaphore_i225() 107 * Acquire the SW/FW semaphore to access the PHY or NVM. The mask 153 * Release the SW/FW semaphore used to access the PHY or NVM. The mask 201 status = hw->nvm.ops.acquire(hw); in igc_read_nvm_srrd_i225() 206 hw->nvm.ops.release(hw); in igc_read_nvm_srrd_i225() 229 struct igc_nvm_info *nvm = &hw->nvm; in igc_write_nvm_srwr() local 237 if (offset >= nvm->word_size || (words > (nvm->word_size - offset)) || in igc_write_nvm_srwr() 239 hw_dbg("nvm parameter(s) out of bounds\n"); in igc_write_nvm_srwr() [all …]
|
H A D | igc_nvm.c | 66 hw_dbg("Could not acquire NVM grant\n"); in igc_acquire_nvm() 99 struct igc_nvm_info *nvm = &hw->nvm; in igc_read_nvm_eerd() local 106 if (offset >= nvm->word_size || (words > (nvm->word_size - offset)) || in igc_read_nvm_eerd() 108 hw_dbg("nvm parameter(s) out of bounds\n"); in igc_read_nvm_eerd() 168 ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data); in igc_validate_nvm_checksum() 170 hw_dbg("NVM Read Error\n"); in igc_validate_nvm_checksum() 177 hw_dbg("NVM Checksum Invalid\n"); in igc_validate_nvm_checksum() 201 ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data); in igc_update_nvm_checksum() 203 hw_dbg("NVM Read Error while updating checksum.\n"); in igc_update_nvm_checksum() 209 ret_val = hw->nvm.ops.write(hw, NVM_CHECKSUM_REG, 1, &checksum); in igc_update_nvm_checksum() [all …]
|
H A D | igc_base.c | 62 * igc_init_nvm_params_base - Init NVM func ptrs. 67 struct igc_nvm_info *nvm = &hw->nvm; in igc_init_nvm_params_base() local 85 nvm->type = igc_nvm_eeprom_spi; in igc_init_nvm_params_base() 86 nvm->word_size = BIT(size); in igc_init_nvm_params_base() 87 nvm->opcode_bits = 8; in igc_init_nvm_params_base() 88 nvm->delay_usec = 1; in igc_init_nvm_params_base() 90 nvm->page_size = eecd & IGC_EECD_ADDR_BITS ? 32 : 8; in igc_init_nvm_params_base() 91 nvm->address_bits = eecd & IGC_EECD_ADDR_BITS ? in igc_init_nvm_params_base() 94 if (nvm->word_size == BIT(15)) in igc_init_nvm_params_base() 95 nvm->page_size = 128; in igc_init_nvm_params_base() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/i40e/ |
H A D | i40e_nvm.c | 10 * i40e_init_nvm - Initialize NVM function pointers 13 * Setup the function pointers and the NVM info structure. Should be called 14 * once per NVM initialization, e.g. inside the i40e_init_shared_code(). 15 * Please notice that the NVM term is used here (& in all methods covered 21 struct i40e_nvm_info *nvm = &hw->nvm; in i40e_init_nvm() local 26 /* The SR size is stored regardless of the nvm programming mode in i40e_init_nvm() 33 nvm->sr_size = BIT(sr_size) * I40E_SR_WORDS_IN_1KB; in i40e_init_nvm() 35 /* Check if we are in the normal or blank NVM programming mode */ in i40e_init_nvm() 38 /* Max NVM timeout */ in i40e_init_nvm() 39 nvm->timeout = I40E_MAX_NVM_TIMEOUT; in i40e_init_nvm() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_nvm.c | 11 * @module_typeid: module pointer location in words from the NVM beginning 19 * Read the NVM using the admin queue commands (0x0701) 29 cmd = &desc.params.nvm; in ice_aq_read_nvm() 51 * ice_read_flat_nvm - Read portion of NVM by flat offset 53 * @offset: offset from beginning of NVM 56 * @read_shadow_ram: if true, read from shadow RAM instead of NVM 58 * Reads a portion of the NVM, as a flat memory space. This function correctly 78 ice_debug(hw, ICE_DBG_NVM, "NVM error: requested offset is beyond Shadow RAM limit\n"); in ice_read_flat_nvm() 114 * @module_typeid: module pointer location in words from the NVM beginning 122 * Update the NVM using the admin queue commands (0x0703) [all …]
|
H A D | ice_fw_update.c | 17 /* Track which NVM banks to activate at the end of the update */ 43 * NVM resource has been acquired. 201 * This function sends AdminQ commands related to the NVM, and assumes that 202 * the NVM resource has been acquired. 265 * ice_write_one_nvm_block - Write an NVM block and await completion response 278 * Note this function assumes the caller has acquired the NVM resource. 332 completion_module = le16_to_cpu(desc->params.nvm.module_typeid); in ice_write_one_nvm_block() 335 completion_offset = le16_to_cpu(desc->params.nvm.offset_low); in ice_write_one_nvm_block() 336 completion_offset |= desc->params.nvm.offset_high << 16; in ice_write_one_nvm_block() 360 /* For the last command to write the NVM bank, newer versions of in ice_write_one_nvm_block() [all …]
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/mvm/ |
H A D | nvm.c | 14 #include "iwl-nvm-parse.h" 18 /* Default NVM size to read */ 24 /* load nvm chunk response */ 31 * prepare the NVM host command w/ the pointers to the nvm buffer 60 /* Extract & check NVM write response */ in iwl_nvm_write_chunk() 64 "NVM access write command failed for section %u (status = 0x%x)\n", in iwl_nvm_write_chunk() 100 /* Extract NVM response */ in iwl_nvm_read_chunk() 118 "NVM access command failed on offset 0x%x since that section size is multiple 2K\n", in iwl_nvm_read_chunk() 123 "NVM access command failed with status %d (device: %s)\n", in iwl_nvm_read_chunk() 131 IWL_ERR(mvm, "NVM ACCESS response with invalid offset %d\n", in iwl_nvm_read_chunk() [all …]
|
/openbmc/qemu/docs/system/devices/ |
H A D | nvme.rst | 10 * `Adding NVMe Devices`_, `additional namespaces`_ and `NVM subsystems`_. 21 The QEMU emulated NVMe controller implements version 1.4 of the NVM Express 34 -drive file=nvm.img,if=none,id=nvm 35 -device nvme,serial=deadbeef,drive=nvm 66 -drive file=nvm-1.img,if=none,id=nvm-1 67 -device nvme-ns,drive=nvm-1 68 -drive file=nvm-2.img,if=none,id=nvm-2 69 -device nvme-ns,drive=nvm-2 102 NVM Subsystems 106 linked to an NVM Subsystem device (``nvme-subsys``). [all …]
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/ |
H A D | iwl-nvm-parse.h | 25 * iwl_parse_nvm_data - parse NVM data and return values 27 * This function parses all NVM values we need and then 56 * struct iwl_nvm_section - describes an NVM section in memory. 58 * This struct holds an NVM section read from the NIC using NVM_ACCESS_CMD, 59 * and saved for later use by the driver. Not all NVM sections are saved 68 * iwl_read_external_nvm - Reads external NVM from a file into nvm_sections 77 * iwl_get_nvm - retrieve NVM data from firmware 80 * NVM data, and returns it to caller.
|
H A D | iwl-nvm-parse.c | 16 #include "iwl-nvm-parse.h" 21 #include "fw/api/nvm-reg.h" 27 /* NVM offsets (in words) definitions */ 29 /* NVM HW-Section offset (in words) definitions */ 33 /* NVM SW-Section offset (in words) definitions */ 41 /* NVM calibration section offset (in words) definitions */ 45 /* NVM REGULATORY -Section offset (in words) definitions */ 50 /* NVM HW-Section offset (in words) definitions */ 53 /* NVM SW-Section offset (in words) definitions */ 57 /* NVM PHY_SKU-Section offset (in words) definitions */ [all …]
|
/openbmc/linux/drivers/nvme/host/ |
H A D | Kconfig | 7 tristate "NVM Express block device" 11 The NVM Express driver is for solid state drives directly 48 tristate "NVM Express over Fabrics RDMA host driver" 63 tristate "NVM Express over Fabrics FC host driver" 79 tristate "NVM Express over Fabrics TCP host driver" 96 bool "NVM Express over Fabrics In-Band Authentication" 111 tristate "Apple ANS2 NVM Express host driver"
|
/openbmc/linux/Documentation/admin-guide/ |
H A D | thunderbolt.rst | 146 the key is stored on the device NVM. 161 ``authorized`` file to get the new key stored on the device NVM. 199 Upgrading NVM on Thunderbolt device, host or retimer 216 Host NVM upgrade on Apple Macs is not supported. 218 Once the NVM image has been downloaded, you need to plug in a 220 matter which device is connected (unless you are upgrading NVM on a 227 After that we can write the firmware to the non-active parts of the NVM 229 Canyon) Thunderbolt controller NVM is upgraded:: 233 Once the operation completes we can trigger NVM authentication and 243 We can verify that the new NVM firmware is active by running the following [all …]
|
/openbmc/linux/drivers/media/i2c/ |
H A D | ov2740.c | 345 /* NVM data inforamtion */ 346 struct nvm_data *nvm; member 651 static int ov2740_load_otp_data(struct nvm_data *nvm) in ov2740_load_otp_data() argument 653 struct device *dev = regmap_get_device(nvm->regmap); in ov2740_load_otp_data() 659 if (nvm->nvm_buffer) in ov2740_load_otp_data() 662 nvm->nvm_buffer = kzalloc(CUSTOMER_USE_OTP_SIZE, GFP_KERNEL); in ov2740_load_otp_data() 663 if (!nvm->nvm_buffer) in ov2740_load_otp_data() 707 ret = regmap_bulk_read(nvm->regmap, OV2740_REG_OTP_CUSTOMER, in ov2740_load_otp_data() 708 nvm->nvm_buffer, CUSTOMER_USE_OTP_SIZE); in ov2740_load_otp_data() 735 kfree(nvm->nvm_buffer); in ov2740_load_otp_data() [all …]
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/fw/api/ |
H A D | nvm-reg.h | 11 * enum iwl_regulatory_and_nvm_subcmd_ids - regulatory/NVM commands 53 * enum iwl_nvm_access_op - NVM access opcode 54 * @IWL_NVM_READ: read NVM 55 * @IWL_NVM_WRITE: write NVM 97 * struct iwl_nvm_access_cmd - Request the device to send an NVM section 131 * struct iwl_nvm_get_info - request to get NVM data 146 * struct iwl_nvm_get_info_general - general NVM data 148 * @nvm_version: nvm version 231 * struct iwl_nvm_get_info_rsp_v3 - response to get NVM data 232 * @general: general NVM data [all …]
|
/openbmc/qemu/hw/arm/ |
H A D | nrf51_soc.c | 122 if (!object_property_set_uint(OBJECT(&s->nvm), "flash-size", in nrf51_soc_realize() 127 if (!sysbus_realize(SYS_BUS_DEVICE(&s->nvm), errp)) { in nrf51_soc_realize() 131 mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->nvm), 0); in nrf51_soc_realize() 133 mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->nvm), 1); in nrf51_soc_realize() 135 mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->nvm), 2); in nrf51_soc_realize() 137 mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->nvm), 3); in nrf51_soc_realize() 198 object_initialize_child(obj, "nvm", &s->nvm, TYPE_NRF51_NVM); in nrf51_soc_init()
|