Lines Matching refs:s_last
191 int *s_first, int *s_last, in flash_fill_sect_ranges() argument
202 s_last [bank] = -1; /* last sector to erase */ in flash_fill_sect_ranges()
234 s_last[bank] = sect; in flash_fill_sect_ranges()
238 if (s_last[bank] < 0) { in flash_fill_sect_ranges()
240 s_last[bank] = s_end; in flash_fill_sect_ranges()
248 if (s_last[bank] < s_first[bank]) { in flash_fill_sect_ranges()
254 sect = s_last[bank]; in flash_fill_sect_ranges()
256 (*s_count) += s_last[bank] - s_first[bank] + 1; in flash_fill_sect_ranges()
261 } else if (s_last[bank] >= 0) { in flash_fill_sect_ranges()
401 int s_first[CONFIG_SYS_MAX_FLASH_BANKS], s_last[CONFIG_SYS_MAX_FLASH_BANKS]; in flash_sect_erase() local
407 s_first, s_last, &planned ); in flash_sect_erase()
414 erased += s_last[bank] - s_first[bank] + 1; in flash_sect_erase()
417 (s_last[bank] == info->sector_count) ? in flash_sect_erase()
419 info->start[s_last[bank] + 1] - 1, in flash_sect_erase()
422 s_last[bank]); in flash_sect_erase()
599 int s_first[CONFIG_SYS_MAX_FLASH_BANKS], s_last[CONFIG_SYS_MAX_FLASH_BANKS]; in flash_sect_protect() local
604 rcode = flash_fill_sect_ranges( addr_first, addr_last, s_first, s_last, &planned ); in flash_sect_protect()
614 if (s_first[bank]>=0 && s_first[bank]<=s_last[bank]) { in flash_sect_protect()
617 s_last[bank], bank + 1); in flash_sect_protect()
618 protected += s_last[bank] - s_first[bank] + 1; in flash_sect_protect()
619 for (i=s_first[bank]; i<=s_last[bank]; ++i) { in flash_sect_protect()