Lines Matching defs:map
332 * spi_nor_map_cmp_erase_type() - compare the map's erase types by size
333 * @l: member in the left half of the map's erase_type array
334 * @r: member in the right half of the map's erase_type array
337 * map's erase types, the smallest erase type size being the first member in the
351 * @map: the erase map of the SPI NOR
354 * Replicate the sort done for the map's erase types in BFPT: sort the erase
360 static u8 spi_nor_sort_erase_mask(struct spi_nor_erase_map *map, u8 erase_mask)
362 struct spi_nor_erase_type *erase_type = map->erase_type;
369 /* Replicate the sort done for the map's erase types. */
379 * @map: the erase map of the SPI NOR
381 * Function assumes that the erase types defined in the erase map are already
383 * member in the erase_type array. It replicates the sort done for the map's
385 * supported from the sorted erase types defined in the erase map.
389 static void spi_nor_regions_sort_erase_types(struct spi_nor_erase_map *map)
391 struct spi_nor_erase_region *region = map->regions;
397 sorted_erase_mask = spi_nor_sort_erase_mask(map,
440 struct spi_nor_erase_map *map = ¶ms->erase_map;
441 struct spi_nor_erase_type *erase_type = map->erase_type;
520 * Sector Erase settings. Reinitialize the uniform erase map using the
543 spi_nor_init_uniform_erase_map(map, erase_mask, params->size);
545 * Sort all the map's Erase Types in ascending order with the smallest
555 spi_nor_regions_sort_erase_types(map);
556 map->uniform_erase_type = map->uniform_region.offset &
695 * spi_nor_get_map_in_use() - get the configuration map in use
697 * @smpt: pointer to the sector map parameter table
698 * @smpt_len: sector map parameter table length
700 * Return: pointer to the map in use, ERR_PTR(-errno) otherwise.
748 * If command descriptors are provided, they always precede map
752 * Find the matching configuration map.
762 * If there are no more configuration map descriptors and no
764 * sector address map is unknown.
769 /* increment the table index to the next map */
816 * spi_nor_init_non_uniform_erase_map() - initialize the non-uniform erase map
818 * @smpt: pointer to the sector map parameter table
825 struct spi_nor_erase_map *map = &nor->params->erase_map;
826 struct spi_nor_erase_type *erase = map->erase_type;
843 map->regions = region;
865 * supported in this configuration map.
874 save_uniform_erase_type = map->uniform_erase_type;
875 map->uniform_erase_type = spi_nor_sort_erase_mask(map,
883 map->uniform_erase_type = save_uniform_erase_type;
889 * map configurations. Mask out the erase types that are not supported
890 * by the current map configuration.
902 * @smpt_header: sector map parameter table header
985 struct spi_nor_erase_map *map = ¶ms->erase_map;
986 struct spi_nor_erase_type *erase_type = map->erase_type;
1058 /* Replicate the sort done for the map's erase types in BFPT. */
1059 erase_mask = spi_nor_sort_erase_mask(map, erase_mask);