/* Get current temperature code from register, then calculate and calibrate it's value in degree celsius. */
static int get_cur_temp(struct tmu_info *info)
/* Get current temperature code from register, then calculate and calibrate it's value in degree celsius. */
static int get_cur_temp(struct tmu_info *info)
{
	struct exynos5_tmu_reg *reg = info->tmu_base;
	ulong start;
	int cur_temp = 0;
	if (info->tmu_state == TMU_STATUS_NORMAL) {
		start = get_timer(0);
		do {
			cur_temp = readl(&reg->current_temp) & 0xff;
		} while ((cur_temp == 0) || (get_timer(start) > 100));
	}
	if (cur_temp == 0)
		return cur_temp;
	cur_temp = cur_temp - info->te1 + info->dc_value;
	return cur_temp;
}