瀏覽代碼

efHotAgingTrendMining environmentalHumidityAnalysis.c 朱俊杰 commit at 2021-03-12

朱俊杰 4 年之前
父節點
當前提交
18950bf33b
共有 1 個文件被更改,包括 25 次插入0 次删除
  1. 25 0
      efHotAgingTrendMining/analysisOfEnvironmentalFactors/environmentalHumidityAnalysis.c

+ 25 - 0
efHotAgingTrendMining/analysisOfEnvironmentalFactors/environmentalHumidityAnalysis.c

@@ -870,3 +870,28 @@ void clkdm_deny_idle(struct clockdomain *clkdm)
 
 	spin_lock_irqsave(&clkdm->lock, flags);
 	clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
+	arch_clkdm->clkdm_deny_idle(clkdm);
+	pwrdm_state_switch(clkdm->pwrdm.ptr);
+	spin_unlock_irqrestore(&clkdm->lock, flags);
+}
+
+/**
+ * clkdm_in_hwsup - is clockdomain @clkdm have hardware-supervised idle enabled?
+ * @clkdm: struct clockdomain *
+ *
+ * Returns true if clockdomain @clkdm currently has
+ * hardware-supervised idle enabled, or false if it does not or if
+ * @clkdm is NULL.  It is only valid to call this function after
+ * clkdm_init() has been called.  This function does not actually read
+ * bits from the hardware; it instead tests an in-memory flag that is
+ * changed whenever the clockdomain code changes the auto-idle mode.
+ */
+bool clkdm_in_hwsup(struct clockdomain *clkdm)
+{
+	bool ret;
+	unsigned long flags;
+
+	if (!clkdm)
+		return false;
+
+	spin_lock_irqsave(&clkdm->lock, flags);