Lines Matching refs:rom_desc
631 int desc_type, struct ti_i2c_desc *rom_desc) in get_descriptor_addr() argument
642 (u8 *)rom_desc); in get_descriptor_addr()
646 if (rom_desc->Type == desc_type) in get_descriptor_addr()
650 le16_to_cpu(rom_desc->Size); in get_descriptor_addr()
652 } while ((start_address < TI_MAX_I2C_SIZE) && rom_desc->Type); in get_descriptor_addr()
658 static int valid_csum(struct ti_i2c_desc *rom_desc, u8 *buffer) in valid_csum() argument
663 for (i = 0; i < le16_to_cpu(rom_desc->Size); i++) in valid_csum()
666 if (cs != rom_desc->CheckSum) { in valid_csum()
667 pr_debug("%s - Mismatch %x - %x", __func__, rom_desc->CheckSum, cs); in valid_csum()
678 struct ti_i2c_desc *rom_desc; in check_i2c_image() local
683 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL); in check_i2c_image()
684 if (!rom_desc) in check_i2c_image()
689 kfree(rom_desc); in check_i2c_image()
709 (u8 *)rom_desc); in check_i2c_image()
714 le16_to_cpu(rom_desc->Size)) > TI_MAX_I2C_SIZE) { in check_i2c_image()
720 dev_dbg(dev, "%s Type = 0x%x\n", __func__, rom_desc->Type); in check_i2c_image()
723 ttype = rom_desc->Type & 0x0f; in check_i2c_image()
729 le16_to_cpu(rom_desc->Size), in check_i2c_image()
734 status = valid_csum(rom_desc, buffer); in check_i2c_image()
739 le16_to_cpu(rom_desc->Size); in check_i2c_image()
741 } while ((rom_desc->Type != I2C_DESC_TYPE_ION) && in check_i2c_image()
744 if ((rom_desc->Type != I2C_DESC_TYPE_ION) || in check_i2c_image()
750 kfree(rom_desc); in check_i2c_image()
758 struct ti_i2c_desc *rom_desc; in get_manuf_info() local
762 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL); in get_manuf_info()
763 if (!rom_desc) in get_manuf_info()
767 rom_desc); in get_manuf_info()
777 le16_to_cpu(rom_desc->Size), buffer); in get_manuf_info()
781 status = valid_csum(rom_desc, buffer); in get_manuf_info()
792 kfree(rom_desc); in get_manuf_info()
1078 struct ti_i2c_desc *rom_desc; in do_download_mode() local
1110 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL); in do_download_mode()
1111 if (!rom_desc) { in do_download_mode()
1118 I2C_DESC_TYPE_FIRMWARE_BASIC, rom_desc); in do_download_mode()
1129 kfree(rom_desc); in do_download_mode()
1144 kfree(rom_desc); in do_download_mode()
1178 kfree(rom_desc); in do_download_mode()
1206 kfree(rom_desc); in do_download_mode()
1223 kfree(rom_desc); in do_download_mode()
1233 kfree(rom_desc); in do_download_mode()
1252 kfree(rom_desc); in do_download_mode()
1263 I2C_DESC_TYPE_FIRMWARE_BLANK, rom_desc); in do_download_mode()
1272 kfree(rom_desc); in do_download_mode()
1280 kfree(rom_desc); in do_download_mode()
1303 kfree(rom_desc); in do_download_mode()
1319 kfree(rom_desc); in do_download_mode()
1336 kfree(rom_desc); in do_download_mode()
1345 kfree(rom_desc); in do_download_mode()
1367 kfree(rom_desc); in do_download_mode()
1375 kfree(rom_desc); in do_download_mode()
2456 struct ti_i2c_desc *rom_desc; in edge_heartbeat_work() local
2461 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL); in edge_heartbeat_work()
2464 if (!rom_desc || !get_descriptor_addr(serial, I2C_DESC_TYPE_ION, in edge_heartbeat_work()
2465 rom_desc)) { in edge_heartbeat_work()
2469 kfree(rom_desc); in edge_heartbeat_work()