summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/power-imx233.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/power-imx233.h')
-rw-r--r--firmware/target/arm/imx233/power-imx233.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/power-imx233.h b/firmware/target/arm/imx233/power-imx233.h
index 59ffcd37a2..9888bebe1f 100644
--- a/firmware/target/arm/imx233/power-imx233.h
+++ b/firmware/target/arm/imx233/power-imx233.h
@@ -119,6 +119,15 @@ static inline void imx233_power_set_dcdc_freq(bool pll, unsigned freq)
}
#endif
+static inline unsigned imx233_power_read_pswitch(void)
+{
+#if IMX233_SUBTARGET >= 3700
+ return BF_RD(POWER_STS, PSWITCH);
+#else
+ return BF_RD(DIGCTL_STATUS, PSWITCH);
+#endif
+}
+
#if IMX233_SUBTARGET < 3700
/* return -1 on error */
int imx233_power_sense_die_temperature(int *min, int *max);