mfd : Check if the other db8500 core is in WFI
[deliverable/linux.git] / drivers / mfd / db8500-prcmu.c
index 4e27db841fabfa69a6e097622289a0941d21ee7b..a1b3464cdba3d872b6ff72a23099c3e6c4844c9f 100644 (file)
@@ -903,6 +903,18 @@ bool db8500_prcmu_pending_irq(void)
        return false;
 }
 
+/*
+ * This function checks if the specified cpu is in in WFI. It's usage
+ * makes sense only if the gic is decoupled with the db8500_prcmu_gic_decouple
+ * function. Of course passing smp_processor_id() to this function will
+ * always return false...
+ */
+bool db8500_prcmu_is_cpu_in_wfi(int cpu)
+{
+       return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 :
+                    PRCM_ARM_WFI_STANDBY_WFI0;
+}
+
 /*
  * This function copies the gic SPI settings to the prcmu in order to
  * monitor them and abort/finish the retention/off sequence or state.
This page took 0.027486 seconds and 5 git commands to generate.