Lines Matching refs:sf

19 	*size = dfu->data.sf.size;  in dfu_get_medium_size_sf()
27 return spi_flash_read(dfu->data.sf.dev, dfu->data.sf.start + offset, in dfu_read_medium_sf()
33 return (lldiv((start + offset), dfu->data.sf.dev->sector_size)) * in find_sector()
34 dfu->data.sf.dev->sector_size; in find_sector()
42 ret = spi_flash_erase(dfu->data.sf.dev, in dfu_write_medium_sf()
43 find_sector(dfu, dfu->data.sf.start, offset), in dfu_write_medium_sf()
44 dfu->data.sf.dev->sector_size); in dfu_write_medium_sf()
48 ret = spi_flash_write(dfu->data.sf.dev, dfu->data.sf.start + offset, in dfu_write_medium_sf()
60 if (!CONFIG_IS_ENABLED(DFU_SF_PART) || !dfu->data.sf.ubi) in dfu_flush_medium_sf()
64 off = find_sector(dfu, dfu->data.sf.start, dfu->offset); in dfu_flush_medium_sf()
66 if (off != dfu->data.sf.start + dfu->offset) in dfu_flush_medium_sf()
67 off += dfu->data.sf.dev->sector_size; in dfu_flush_medium_sf()
68 length = dfu->data.sf.start + dfu->data.sf.size - off; in dfu_flush_medium_sf()
70 return spi_flash_erase(dfu->data.sf.dev, off, length); in dfu_flush_medium_sf()
82 if (CONFIG_IS_ENABLED(DFU_SF_PART) && dfu->data.sf.ubi) in dfu_polltimeout_sf()
90 spi_flash_free(dfu->data.sf.dev); in dfu_free_entity_sf()
147 dfu->data.sf.dev = parse_dev(devstr_bkup); in dfu_fill_entity_sf()
149 if (!dfu->data.sf.dev) in dfu_fill_entity_sf()
153 dfu->max_buf_size = dfu->data.sf.dev->sector_size; in dfu_fill_entity_sf()
158 dfu->data.sf.start = simple_strtoul(s, &s, 16); in dfu_fill_entity_sf()
160 dfu->data.sf.size = simple_strtoul(s, &s, 16); in dfu_fill_entity_sf()
185 dfu->data.sf.start = pi->offset; in dfu_fill_entity_sf()
186 dfu->data.sf.size = pi->size; in dfu_fill_entity_sf()
188 dfu->data.sf.ubi = 1; in dfu_fill_entity_sf()
191 spi_flash_free(dfu->data.sf.dev); in dfu_fill_entity_sf()