Lines Matching defs:smpt
654 * @smpt: pointer to the sector map parameter table
659 static const u32 *spi_nor_get_map_in_use(struct spi_nor *nor, const u32 *smpt,
682 if (smpt[i] & SMPT_DESC_TYPE_MAP)
685 read_data_mask = SMPT_CMD_READ_DATA(smpt[i]);
686 nor->addr_width = spi_nor_smpt_addr_width(nor, smpt[i]);
687 nor->read_dummy = spi_nor_smpt_read_dummy(nor, smpt[i]);
688 nor->read_opcode = SMPT_CMD_OPCODE(smpt[i]);
689 addr = smpt[i + 1];
707 * over smpt array all over again.
713 if (SMPT_MAP_ID(smpt[i]) == map_id) {
714 ret = smpt + i;
723 if (smpt[i] & SMPT_DESC_END)
727 i += SMPT_MAP_REGION_COUNT(smpt[i]) + 1;
777 * @smpt: pointer to the sector map parameter table
784 const u32 *smpt)
795 region_count = SMPT_MAP_REGION_COUNT(*smpt);
812 region[i].size = SMPT_MAP_REGION_SIZE(smpt[j]);
813 erase_type = SMPT_MAP_REGION_ERASE_TYPE(smpt[j]);
878 u32 *smpt;
884 len = smpt_header->length * sizeof(*smpt);
885 smpt = kmalloc(len, GFP_KERNEL);
886 if (!smpt)
890 ret = spi_nor_read_sfdp(nor, addr, len, smpt);
895 le32_to_cpu_array(smpt, smpt_header->length);
897 sector_map = spi_nor_get_map_in_use(nor, smpt, smpt_header->length);
910 kfree(smpt);