Lines Matching refs:image
520 } *image; in npe_load_firmware() local
539 image = (struct dl_image*)fw_entry->data; in npe_load_firmware()
543 image->magic, image->id, image->size, image->size * 4); in npe_load_firmware()
546 if (image->magic == swab32(FW_MAGIC)) { /* swapped file */ in npe_load_firmware()
547 image->id = swab32(image->id); in npe_load_firmware()
548 image->size = swab32(image->size); in npe_load_firmware()
549 } else if (image->magic != FW_MAGIC) { in npe_load_firmware()
551 image->magic); in npe_load_firmware()
554 if ((image->size * 4 + sizeof(struct dl_image)) != fw_entry->size) { in npe_load_firmware()
559 if (((image->id >> 24) & 0xF /* NPE ID */) != npe->id) { in npe_load_firmware()
563 if (image->magic == swab32(FW_MAGIC)) in npe_load_firmware()
564 for (i = 0; i < image->size; i++) in npe_load_firmware()
565 image->data[i] = swab32(image->data[i]); in npe_load_firmware()
567 if (cpu_is_ixp42x() && ((image->id >> 28) & 0xF /* device ID */)) { in npe_load_firmware()
585 "revision 0x%X:%X\n", (image->id >> 16) & 0xFF, in npe_load_firmware()
586 (image->id >> 8) & 0xFF, image->id & 0xFF); in npe_load_firmware()
599 for (blocks = 0; blocks * sizeof(struct dl_block) / 4 < image->size; in npe_load_firmware()
601 if (image->blocks[blocks].type == FW_BLOCK_TYPE_EOF) in npe_load_firmware()
603 if (blocks * sizeof(struct dl_block) / 4 >= image->size) { in npe_load_firmware()
614 for (i = 0, blk = image->blocks; i < blocks; i++, blk++) { in npe_load_firmware()
615 if (blk->offset > image->size - sizeof(struct dl_codeblock) / 4 in npe_load_firmware()
622 cb = (struct dl_codeblock*)&image->data[blk->offset]; in npe_load_firmware()
636 if (blk->offset + sizeof(*cb) / 4 + cb->size > image->size) { in npe_load_firmware()