Lines Matching refs:pos
7 int ota_patch_read(unsigned long src, unsigned char *buffer, unsigned long pos, unsigned long size) in ota_patch_read() argument
9 unsigned long base = pos; in ota_patch_read()
15 ret = flash_read_data(src + pos, buffer+pos-base, read_size); in ota_patch_read()
19 pos += read_size; in ota_patch_read()
22 return pos - base; in ota_patch_read()
25 int ota_patch_write(unsigned long dst, unsigned char *buffer, unsigned long pos, unsigned long size) in ota_patch_write() argument
27 unsigned long base = pos; in ota_patch_write()
33 ret = flash_erase(dst + pos, write_size); in ota_patch_write()
37 ret = flash_write_data(dst + pos, buffer+pos-base, write_size); in ota_patch_write()
41 pos += write_size; in ota_patch_write()
44 return pos - base; in ota_patch_write()
49 unsigned long pos = 0; in ota_patch_new_data() local
60 ret = flash_erase(diff_data + pos, bsize); in ota_patch_new_data()
64 ret = flash_write_data(diff_data + pos, buf + pos, bsize); in ota_patch_new_data()
68 pos += bsize; in ota_patch_new_data()
75 unsigned long pos = 0; in ota_load_new_data() local
89 ret = flash_read_data(diff_data + pos, tmp, bsize); in ota_load_new_data()
93 ret = flash_erase(diff_app + dst + pos, bsize); in ota_load_new_data()
97 ret = flash_write_data(diff_app + dst + pos, tmp, bsize); in ota_load_new_data()
101 pos += bsize; in ota_load_new_data()