Lines Matching refs:info

29 flash_protect(int flag, ulong from, ulong to, flash_info_t *info)  in flash_protect()  argument
36 if (!info || info->sector_count == 0 || info->size == 0 || to < from) { in flash_protect()
40 s_end = info->sector_count - 1; /* index of last sector */ in flash_protect()
41 b_end = info->start[0] + info->size - 1; /* bank end address */ in flash_protect()
51 if (info->flash_id == FLASH_UNKNOWN || in flash_protect()
52 to < info->start[0] || from > b_end) { in flash_protect()
56 for (i=0; i<info->sector_count; ++i) { in flash_protect()
59 end = (i == s_end) ? b_end : info->start[i + 1] - 1; in flash_protect()
64 if (from <= end && to >= info->start[i]) { in flash_protect()
67 flash_real_protect(info, i, 0); in flash_protect()
69 info->protect[i] = 0; in flash_protect()
75 flash_real_protect(info, i, 1); in flash_protect()
77 info->protect[i] = 1; in flash_protect()
91 flash_info_t *info; in addr2info() local
94 for (i=0, info = &flash_info[0]; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) { in addr2info()
95 if (info->flash_id != FLASH_UNKNOWN && in addr2info()
96 addr >= info->start[0] && in addr2info()
102 addr <= info->start[0] + info->size - 1) { in addr2info()
103 return (info); in addr2info()
130 flash_info_t *info; in flash_write() local
143 for (info = info_first; info <= info_last; ++info) { in flash_write()
144 ulong b_end = info->start[0] + info->size; /* bank end addr */ in flash_write()
145 short s_end = info->sector_count - 1; in flash_write()
146 for (i=0; i<info->sector_count; ++i) { in flash_write()
147 ulong e_addr = (i == s_end) ? b_end : info->start[i + 1]; in flash_write()
149 if ((end >= info->start[i]) && (addr < e_addr) && in flash_write()
150 (info->protect[i] != 0) ) { in flash_write()
157 for (info = info_first; info <= info_last && cnt>0; ++info) { in flash_write()
160 len = info->start[0] + info->size - addr; in flash_write()
163 if ((i = write_buff(info, (uchar *)src, addr, len)) != 0) { in flash_write()