Lines Matching refs: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;
395 for (i = 0; i < map->n_regions; i++) {
397 spi_nor_sort_erase_mask(map, region[i].erase_mask);
436 struct spi_nor_erase_map *map = &params->erase_map;
437 struct spi_nor_erase_type *erase_type = map->erase_type;
517 * Sector Erase settings. Reinitialize the uniform erase map using the
540 spi_nor_init_uniform_erase_map(map, erase_mask, params->size);
542 * Sort all the map's Erase Types in ascending order with the smallest
552 spi_nor_regions_sort_erase_types(map);
716 * spi_nor_get_map_in_use() - get the configuration map in use
718 * @smpt: pointer to the sector map parameter table
719 * @smpt_len: sector map parameter table length
721 * Return: pointer to the map in use, ERR_PTR(-errno) otherwise.
769 * If command descriptors are provided, they always precede map
773 * Find the matching configuration map.
783 * If there are no more configuration map descriptors and no
785 * sector address map is unknown.
790 /* increment the table index to the next map */
827 * spi_nor_init_non_uniform_erase_map() - initialize the non-uniform erase map
829 * @smpt: pointer to the sector map parameter table
836 struct spi_nor_erase_map *map = &nor->params->erase_map;
837 struct spi_nor_erase_type *erase = map->erase_type;
854 map->regions = region;
855 map->n_regions = region_count;
878 * supported in this configuration map.
885 save_uniform_erase_type = map->uniform_region.erase_mask;
886 map->uniform_region.erase_mask =
887 spi_nor_sort_erase_mask(map,
895 map->uniform_region.erase_mask = save_uniform_erase_type;
901 * map configurations. Mask out the erase types that are not supported
902 * by the current map configuration.
914 * @smpt_header: sector map parameter table header
999 struct spi_nor_erase_map *map = &params->erase_map;
1000 struct spi_nor_erase_type *erase_type = map->erase_type;
1072 /* Replicate the sort done for the map's erase types in BFPT. */
1073 erase_mask = spi_nor_sort_erase_mask(map, erase_mask);