Lines Matching defs:erase

75 	 * op code and erase sector size to be used by Sector Erase commands.
311 * spi_nor_set_erase_settings_from_bfpt() - set erase type settings from BFPT
312 * @erase: pointer to a structure that describes a SPI NOR erase type
313 * @size: the size of the sector/block erased by the erase type
314 * @opcode: the SPI command op code to erase the sector/block
315 * @i: erase type index as sorted in the Basic Flash Parameter Table
324 spi_nor_set_erase_settings_from_bfpt(struct spi_nor_erase_type *erase,
327 erase->idx = i;
328 spi_nor_set_erase_type(erase, size, opcode);
332 * spi_nor_map_cmp_erase_type() - compare the map's erase types by size
337 * map's erase types, the smallest erase type size being the first member in the
350 * spi_nor_sort_erase_mask() - sort erase mask
351 * @map: the erase map of the SPI NOR
352 * @erase_mask: the erase type mask to be sorted
354 * Replicate the sort done for the map's erase types in BFPT: sort the erase
355 * mask in ascending order with the smallest erase type size starting from
356 * BIT(0) in the sorted erase mask.
358 * Return: sorted erase mask.
369 /* Replicate the sort done for the map's erase types. */
378 * spi_nor_regions_sort_erase_types() - sort erase types in each region
379 * @map: the erase map of the SPI NOR
381 * Function assumes that the erase types defined in the erase map are already
382 * sorted in ascending order, with the smallest erase type size being the first
384 * erase types. Each region's erase bitmask will indicate which erase types are
385 * supported from the sorted erase types defined in the erase map.
386 * Sort the all region's erase type at init in order to speed up the process of
387 * finding the best erase command at runtime.
399 /* Overwrite erase mask. */
517 * Sector Erase settings. Reinitialize the uniform erase map using the
543 * erase size being the first member in the erase_type array.
548 * Sort the erase types in the uniform region in order to update the
550 * selecting the uniform erase.
805 * @region: pointer to a structure that describes a SPI NOR erase region
806 * @erase: pointer to a structure that describes a SPI NOR erase type
807 * @erase_type: erase type bitmask
811 const struct spi_nor_erase_type *erase,
817 if (!(erase[i].size && erase_type & BIT(erase[i].idx)))
819 if (region->size & erase[i].size_mask) {
827 * spi_nor_init_non_uniform_erase_map() - initialize the non-uniform erase map
837 struct spi_nor_erase_type *erase = map->erase_type;
868 spi_nor_region_check_overlay(&region[i], erase, erase_type);
871 * Save the erase types that are supported in all regions and
872 * can erase the entire flash memory.
877 * regions_erase_type mask will indicate all the erase types
900 * BFPT advertises all the erase types supported by all the possible
901 * map configurations. Mask out the erase types that are not supported
905 if (!(regions_erase_type & BIT(erase[i].idx)))
906 spi_nor_mask_erase_type(&erase[i]);
1066 const struct sfdp_4bait *erase = &erases[i];
1068 if (dwords[SFDP_DWORD(1)] & erase->supported_bit)
1072 /* Replicate the sort done for the map's erase types in BFPT. */
1076 * We need at least one 4-byte op code per read, program and erase
1077 * operation; the .read(), .write() and .erase() hooks share the
1128 * this latest function implements a legacy quirk for the erase size of