Lines Matching refs:info

94 	flash_info_t *info;  in flash_sect_roundb()  local
102 info = &flash_info[bank]; in flash_sect_roundb()
103 for (i = 0; i < info->sector_count && !found; ++i) { in flash_sect_roundb()
105 if (i == info->sector_count - 1) { in flash_sect_roundb()
106 sector_end_addr = info->start[0] + in flash_sect_roundb()
107 info->size - 1; in flash_sect_roundb()
109 sector_end_addr = info->start[i+1] - 1; in flash_sect_roundb()
113 *addr >= info->start[i]) { in flash_sect_roundb()
193 flash_info_t *info; in flash_fill_sect_ranges() local
204 for (bank=0,info = &flash_info[0]; in flash_fill_sect_ranges()
206 ++bank, ++info) { in flash_fill_sect_ranges()
211 if (info->flash_id == FLASH_UNKNOWN) { in flash_fill_sect_ranges()
215 b_end = info->start[0] + info->size - 1; /* bank end addr */ in flash_fill_sect_ranges()
216 s_end = info->sector_count - 1; /* last sector */ in flash_fill_sect_ranges()
219 for (sect=0; sect < info->sector_count; ++sect) { in flash_fill_sect_ranges()
222 end = (sect == s_end) ? b_end : info->start[sect + 1] - 1; in flash_fill_sect_ranges()
226 if (addr_last < info->start[sect]) in flash_fill_sect_ranges()
229 if (addr_first == info->start[sect]) { in flash_fill_sect_ranges()
254 addr_first = (sect == s_end) ? b_end + 1: info->start[sect + 1]; in flash_fill_sect_ranges()
256 } else if (addr_first >= info->start[0] && addr_first < b_end) { in flash_fill_sect_ranges()
303 flash_info_t *info = NULL; in do_flerase() local
319 info = &flash_info[bank-1]; in do_flerase()
320 rcode = flash_erase (info, 0, info->sector_count-1); in do_flerase()
325 if ((n = abbrev_spec(argv[1], &info, &sect_first, &sect_last)) != 0) { in do_flerase()
331 sect_first, sect_last, (info-flash_info)+1); in do_flerase()
332 rcode = flash_erase(info, sect_first, sect_last); in do_flerase()
343 info = &flash_info[bank]; in do_flerase()
344 addr_first = part->offset + info->start[0]; in do_flerase()
373 info = &flash_info[bank-1]; in do_flerase()
374 rcode = flash_erase (info, 0, info->sector_count-1); in do_flerase()
396 flash_info_t *info; in flash_sect_erase() local
407 for (bank=0,info = &flash_info[0]; in flash_sect_erase()
409 ++bank, ++info) { in flash_sect_erase()
414 info->start[s_first[bank]], in flash_sect_erase()
415 (s_last[bank] == info->sector_count) ? in flash_sect_erase()
416 info->start[0] + info->size - 1: in flash_sect_erase()
417 info->start[s_last[bank]+1] - 1, in flash_sect_erase()
419 rcode = flash_erase (info, s_first[bank], s_last[bank]); in flash_sect_erase()
437 flash_info_t *info = NULL; in do_protect() local
466 info = &flash_info[bank-1]; in do_protect()
467 if (info->flash_id == FLASH_UNKNOWN) { in do_protect()
473 for (i=0; i<info->sector_count; ++i) { in do_protect()
475 if (flash_real_protect(info, i, p)) in do_protect()
479 info->protect[i] = p; in do_protect()
489 if ((n = abbrev_spec(argv[2], &info, &sect_first, &sect_last)) != 0) { in do_protect()
496 (info-flash_info)+1); in do_protect()
499 if (flash_real_protect(info, i, p)) in do_protect()
503 info->protect[i] = p; in do_protect()
521 info = &flash_info[bank]; in do_protect()
522 addr_first = part->offset + info->start[0]; in do_protect()
553 info = &flash_info[bank-1]; in do_protect()
555 if (info->flash_id == FLASH_UNKNOWN) { in do_protect()
559 for (i=0; i<info->sector_count; ++i) { in do_protect()
561 if (flash_real_protect(info, i, p)) in do_protect()
565 info->protect[i] = p; in do_protect()
592 flash_info_t *info; in flash_sect_protect() local
604 for (bank=0,info = &flash_info[0]; bank < CONFIG_SYS_MAX_FLASH_BANKS; ++bank, ++info) { in flash_sect_protect()
605 if (info->flash_id == FLASH_UNKNOWN) { in flash_sect_protect()
616 if (flash_real_protect(info, i, p)) in flash_sect_protect()
620 info->protect[i] = p; in flash_sect_protect()