Lines Matching refs:image_data
120 static struct image_data_t image_data; variable
205 if (image_data.status != IMAGE_READY || in validate_store()
206 image_data.size < VALIDATE_BUF_SIZE) { in validate_store()
213 memcpy(args_buf->buf, image_data.data, VALIDATE_BUF_SIZE); in validate_store()
292 list = opal_vmalloc_to_sg_list(image_data.data, image_data.size); in opal_flash_update()
330 pr_alert("FLASH: Image is %u bytes\n", image_data.size); in opal_flash_term_callback()
379 if (image_data.status == IMAGE_READY) in update_store()
401 addr = image_data.data; in free_image_buf()
402 size = PAGE_ALIGN(image_data.size); in free_image_buf()
408 vfree(image_data.data); in free_image_buf()
409 image_data.data = NULL; in free_image_buf()
410 image_data.status = IMAGE_INVALID; in free_image_buf()
427 image_data.size = be32_to_cpu(image_header.size); in alloc_image_buf()
428 pr_debug("FLASH: Candidate image size = %u\n", image_data.size); in alloc_image_buf()
430 if (image_data.size > MAX_IMAGE_SIZE) { in alloc_image_buf()
434 if (image_data.size < VALIDATE_BUF_SIZE) { in alloc_image_buf()
439 image_data.data = vzalloc(PAGE_ALIGN(image_data.size)); in alloc_image_buf()
440 if (!image_data.data) { in alloc_image_buf()
446 addr = image_data.data; in alloc_image_buf()
447 size = PAGE_ALIGN(image_data.size); in alloc_image_buf()
454 image_data.status = IMAGE_LOADING; in alloc_image_buf()
475 if (image_data.data) in image_data_write()
488 if (image_data.status != IMAGE_LOADING) { in image_data_write()
493 if ((pos + count) > image_data.size) { in image_data_write()
498 memcpy(image_data.data + pos, (void *)buffer, count); in image_data_write()
502 if ((pos + count) == image_data.size) { in image_data_write()
504 image_data.status = IMAGE_READY; in image_data_write()
583 image_data.status = IMAGE_INVALID; in opal_flash_update_init()