else
info("DUAL CRC16: 0x%x, cal_buffer CRC: 0x%x\n", crc16, crc_value);
+ crc_value = ((eeprom->data[EEPROM_DUAL_VER_CRC_SEC] << 8) | (eeprom->data[EEPROM_DUAL_VER_CRC_FST]));
+
+ crc16 = fimc_is_sensor_eeprom_check_crc(&eeprom->data[EEPROM_DUAL_VER_CRC_CHK_START], EEPROM_DUAL_VER_CRC_CHK_SIZE);
+ if (crc_value != crc16)
+ err("Error to DUAL VER CRC16: 0x%x, cal_buffer CRC: 0x%x", crc16, crc_value);
+ else
+ info("DUAL VER CRC16: 0x%x, cal_buffer CRC: 0x%x\n", crc16, crc_value);
+
return ret;
}
#define EEPROM_DUAL_CRC_FST 0x2100
#define EEPROM_DUAL_CRC_SEC 0x2101
#define EEPROM_DUAL_CRC_CHK_START 0x2104
-#define EEPROM_DUAL_CRC_CHK_SIZE 0x800
-#define EEPROM_DUAL_CAL_SIZE 0x804
+#define EEPROM_DUAL_CRC_CHK_SIZE 0x804
+#define EEPROM_DUAL_VER_CRC_FST 0x2102
+#define EEPROM_DUAL_VER_CRC_SEC 0x2103
+#define EEPROM_DUAL_VER_CRC_CHK_START 0x2908
+#define EEPROM_DUAL_VER_CRC_CHK_SIZE 0x4
+#define EEPROM_DUAL_CAL_SIZE SZ_2K
/* SFR Cal */
#define EEPROM_SFR_CRC_FST 0x3000