Lines Matching refs:erase

63 	 * op code and erase sector size to be used by Sector Erase commands.
300 * spi_nor_set_erase_settings_from_bfpt() - set erase type settings from BFPT
301 * @erase: pointer to a structure that describes a SPI NOR erase type
302 * @size: the size of the sector/block erased by the erase type
303 * @opcode: the SPI command op code to erase the sector/block
304 * @i: erase type index as sorted in the Basic Flash Parameter Table
313 spi_nor_set_erase_settings_from_bfpt(struct spi_nor_erase_type *erase,
316 erase->idx = i;
317 spi_nor_set_erase_type(erase, size, opcode);
321 * spi_nor_map_cmp_erase_type() - compare the map's erase types by size
326 * map's erase types, the smallest erase type size being the first member in the
339 * spi_nor_sort_erase_mask() - sort erase mask
340 * @map: the erase map of the SPI NOR
341 * @erase_mask: the erase type mask to be sorted
343 * Replicate the sort done for the map's erase types in BFPT: sort the erase
344 * mask in ascending order with the smallest erase type size starting from
345 * BIT(0) in the sorted erase mask.
347 * Return: sorted erase mask.
358 /* Replicate the sort done for the map's erase types. */
367 * spi_nor_regions_sort_erase_types() - sort erase types in each region
368 * @map: the erase map of the SPI NOR
370 * Function assumes that the erase types defined in the erase map are already
371 * sorted in ascending order, with the smallest erase type size being the first
373 * erase types. Each region's erase bitmask will indicate which erase types are
374 * supported from the sorted erase types defined in the erase map.
375 * Sort the all region's erase type at init in order to speed up the process of
376 * finding the best erase command at runtime.
389 /* Overwrite erase mask. */
508 * Sector Erase settings. Reinitialize the uniform erase map using the
534 * erase size being the first member in the erase_type array.
539 * Sort the erase types in the uniform region in order to update the
541 * selecting the uniform erase.
751 * @region: pointer to a structure that describes a SPI NOR erase region
752 * @erase: pointer to a structure that describes a SPI NOR erase type
753 * @erase_type: erase type bitmask
757 const struct spi_nor_erase_type *erase,
763 if (!(erase[i].size && erase_type & BIT(erase[i].idx)))
765 if (region->size & erase[i].size_mask) {
773 * spi_nor_init_non_uniform_erase_map() - initialize the non-uniform erase map
787 struct spi_nor_erase_type *erase = map->erase_type;
816 spi_nor_region_check_overlay(&region[i], erase, erase_type);
819 * Save the erase types that are supported in all regions and
820 * can erase the entire flash memory.
825 * regions_erase_type mask will indicate all the erase types
849 * BFPT advertises all the erase types supported by all the possible
850 * map configurations. Mask out the erase types that are not supported
854 if (!(regions_erase_type & BIT(erase[i].idx)))
855 spi_nor_mask_erase_type(&erase[i]);
1017 const struct sfdp_4bait *erase = &erases[i];
1019 if (dwords[0] & erase->supported_bit)
1023 /* Replicate the sort done for the map's erase types in BFPT. */
1027 * We need at least one 4-byte op code per read, program and erase
1028 * operation; the .read(), .write() and .erase() hooks share the
1072 * this latest function implements a legacy quirk for the erase size of