Lines Matching refs:rom_desc
647 …IGetDescriptorAddress (struct edgeport_serial *serial, int desc_type, struct ti_i2c_desc *rom_desc) in TIGetDescriptorAddress() argument
658 (__u8 *)rom_desc ); in TIGetDescriptorAddress()
662 if (rom_desc->Type == desc_type) in TIGetDescriptorAddress()
665 start_address = start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size; in TIGetDescriptorAddress()
667 } while ((start_address < TI_MAX_I2C_SIZE) && rom_desc->Type); in TIGetDescriptorAddress()
673 static int ValidChecksum(struct ti_i2c_desc *rom_desc, __u8 *buffer) in ValidChecksum() argument
678 for (i=0; i < rom_desc->Size; i++) { in ValidChecksum()
681 if (cs != rom_desc->CheckSum) { in ValidChecksum()
682 dbg ("%s - Mismatch %x - %x", __FUNCTION__, rom_desc->CheckSum, cs); in ValidChecksum()
692 struct ti_i2c_desc *rom_desc; in TiValidateI2cImage() local
696 rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); in TiValidateI2cImage()
697 if (!rom_desc) { in TiValidateI2cImage()
704 kfree (rom_desc); in TiValidateI2cImage()
724 (__u8 *)rom_desc); in TiValidateI2cImage()
728 if ((start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size) > TI_MAX_I2C_SIZE) { in TiValidateI2cImage()
734 dbg ("%s Type = 0x%x", __FUNCTION__, rom_desc->Type); in TiValidateI2cImage()
737 if ((rom_desc->Type & 0x0f) != I2C_DESC_TYPE_FIRMWARE_BASIC) { in TiValidateI2cImage()
741 rom_desc->Size, in TiValidateI2cImage()
746 status = ValidChecksum(rom_desc, buffer); in TiValidateI2cImage()
750 start_address = start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size; in TiValidateI2cImage()
752 } while ((rom_desc->Type != I2C_DESC_TYPE_ION) && (start_address < TI_MAX_I2C_SIZE)); in TiValidateI2cImage()
754 if ((rom_desc->Type != I2C_DESC_TYPE_ION) || (start_address > TI_MAX_I2C_SIZE)) in TiValidateI2cImage()
759 kfree (rom_desc); in TiValidateI2cImage()
767 struct ti_i2c_desc *rom_desc; in TIReadManufDescriptor() local
770 rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); in TIReadManufDescriptor()
771 if (!rom_desc) { in TIReadManufDescriptor()
775 start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc); in TIReadManufDescriptor()
786 rom_desc->Size, in TIReadManufDescriptor()
791 status = ValidChecksum(rom_desc, buffer); in TIReadManufDescriptor()
802 kfree (rom_desc); in TIReadManufDescriptor()
1010 struct ti_i2c_desc *rom_desc; in TIDownloadFirmware() local
1043 rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); in TIDownloadFirmware()
1044 if (!rom_desc) { in TIDownloadFirmware()
1051 …if ((start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_FIRMWARE_BASIC, rom_desc)) != 0… in TIDownloadFirmware()
1060 kfree (rom_desc); in TIDownloadFirmware()
1073 kfree (rom_desc); in TIDownloadFirmware()
1116 kfree (rom_desc); in TIDownloadFirmware()
1130 kfree (rom_desc); in TIDownloadFirmware()
1138 kfree (rom_desc); in TIDownloadFirmware()
1157 kfree (rom_desc); in TIDownloadFirmware()
1164 …else if ((start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_FIRMWARE_BLANK, rom_desc))… in TIDownloadFirmware()
1172 kfree (rom_desc); in TIDownloadFirmware()
1181 kfree (rom_desc); in TIDownloadFirmware()
1198 kfree (rom_desc); in TIDownloadFirmware()
1211 kfree (rom_desc); in TIDownloadFirmware()
1227 kfree (rom_desc); in TIDownloadFirmware()
1235 kfree (rom_desc); in TIDownloadFirmware()
1256 kfree (rom_desc); in TIDownloadFirmware()
1263 kfree (rom_desc); in TIDownloadFirmware()