From: Jang JeongHoon Date: Fri, 13 Jul 2018 01:59:58 +0000 (+0900) Subject: soc: samsung: cal-if: Introduced new access_type: PMUCAL_RAW_WAIT. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b6d09faffd5a063e7006ebd41d86a539b4fe87a7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git soc: samsung: cal-if: Introduced new access_type: PMUCAL_RAW_WAIT. Change-Id: Id95be1b44b03e59b945430de8603fff36633ea21 Signed-off-by: Jang JeongHoon --- diff --git a/drivers/soc/samsung/cal-if/pmucal_common.h b/drivers/soc/samsung/cal-if/pmucal_common.h index 88c060a61a21..13ff91b82178 100644 --- a/drivers/soc/samsung/cal-if/pmucal_common.h +++ b/drivers/soc/samsung/cal-if/pmucal_common.h @@ -22,6 +22,7 @@ enum pmucal_seq_acctype { PMUCAL_SAVE_RESTORE, PMUCAL_COND_SAVE_RESTORE, PMUCAL_WAIT, + PMUCAL_RAW_WAIT, PMUCAL_CHECK_SKIP, PMUCAL_COND_CHECK_SKIP, #ifdef CONFIG_FLEXPMU diff --git a/drivers/soc/samsung/cal-if/pmucal_rae.c b/drivers/soc/samsung/cal-if/pmucal_rae.c index 40a805740099..d21dd324afee 100644 --- a/drivers/soc/samsung/cal-if/pmucal_rae.c +++ b/drivers/soc/samsung/cal-if/pmucal_rae.c @@ -109,6 +109,14 @@ static int pmucal_rae_wait(struct pmucal_seq *seq) return 0; } +static void pmucal_rae_raw_wait(struct pmucal_seq *seq) +{ + while (1) { + if (pmucal_rae_check_value(seq)) + break; + } +} + static inline void pmucal_rae_read(struct pmucal_seq *seq) { u32 reg; @@ -250,6 +258,9 @@ int pmucal_rae_handle_seq(struct pmucal_seq *seq, unsigned int seq_size) if (ret) return ret; break; + case PMUCAL_RAW_WAIT: + pmucal_rae_raw_wait(&seq[i]); + break; #ifdef CONFIG_FLEXPMU case PMUCAL_WRITE_WAIT: pmucal_rae_write(&seq[i]);