Lines Matching full:context
45 int init_flash_dev(struct mbox_context* context) in init_flash_dev() argument
68 if (ioctl(fd, MEMGETINFO, &context->mtd_info) == -1) in init_flash_dev()
75 if (context->flash_size == 0) in init_flash_dev()
79 context->flash_size = context->mtd_info.size; in init_flash_dev()
83 context->mtd_info.erasesize = 4096; in init_flash_dev()
84 context->erase_size_shift = log_2(context->mtd_info.erasesize); in init_flash_dev()
85 context->flash_bmap = NULL; in init_flash_dev()
86 context->fds[MTD_FD].fd = -1; in init_flash_dev()
92 void free_flash_dev(struct mbox_context* context) in free_flash_dev() argument
97 int set_flash_bytemap(struct mbox_context* context, uint32_t offset, in set_flash_bytemap() argument
104 int erase_flash(struct mbox_context* context, uint32_t offset, uint32_t count) in erase_flash() argument
112 * @context: The mbox context pointer
120 int64_t copy_flash(struct mbox_context* context, uint32_t offset, void* mem, in copy_flash() argument
126 if (!(context && context->vpnor && context->vpnor->table)) in copy_flash()
128 MSG_ERR("Trying to copy data with uninitialised context!\n"); in copy_flash()
132 table = context->vpnor->table; in copy_flash()
152 vpnor::Request req(context, offset); in copy_flash()
181 * @context: The mbox context pointer
189 int write_flash(struct mbox_context* context, uint32_t offset, void* buf, in write_flash() argument
193 if (!(context && context->vpnor && context->vpnor->table)) in write_flash()
195 MSG_ERR("Trying to write data with uninitialised context!\n"); in write_flash()
199 vpnor::partition::Table* table = context->vpnor->table; in write_flash()
214 vpnor::Request req(context, offset); in write_flash()