Lines Matching refs:sector
32 int fcb_flash_read(const struct fcb *fcbp, const struct flash_sector *sector, off_t off, in fcb_flash_read() argument
37 if (off + len > sector->fs_size) { in fcb_flash_read()
45 rc = flash_area_read(fcbp->fap, sector->fs_off + off, dst, len); in fcb_flash_read()
54 int fcb_flash_write(const struct fcb *fcbp, const struct flash_sector *sector, off_t off, in fcb_flash_write() argument
59 if (off + len > sector->fs_size) { in fcb_flash_write()
67 rc = flash_area_write(fcbp->fap, sector->fs_off + off, src, len); in fcb_flash_write()
76 int fcb_erase_sector(const struct fcb *fcbp, const struct flash_sector *sector) in fcb_erase_sector() argument
84 rc = flash_area_flatten(fcbp->fap, sector->fs_off, sector->fs_size); in fcb_erase_sector()
94 struct flash_sector *sector; in fcb_init() local
122 sector = &fcbp->f_sectors[i]; in fcb_init()
123 rc = fcb_sector_hdr_read(fcbp, sector, &fda); in fcb_init()
132 oldest_sector = newest_sector = sector; in fcb_init()
137 newest_sector = sector; in fcb_init()
140 oldest_sector = sector; in fcb_init()
255 int fcb_sector_hdr_init(struct fcb *fcbp, struct flash_sector *sector, uint16_t id) in fcb_sector_hdr_init() argument
265 rc = fcb_flash_write(fcbp, sector, 0, &fda, sizeof(fda)); in fcb_sector_hdr_init()
278 int fcb_sector_hdr_read(struct fcb *fcbp, struct flash_sector *sector, struct fcb_disk_area *fdap) in fcb_sector_hdr_read() argument
286 rc = fcb_flash_read(fcbp, sector, 0, fdap, sizeof(*fdap)); in fcb_sector_hdr_read()