|
@@ -262,3 +262,91 @@ int omap_pm_set_min_clk_rate(struct device *dev, struct clk *c, long r);
|
|
|
* Intended for use by DSPBridge. Returns an array of OPP->DSP clock
|
|
|
* frequency entries. The final item in the array should have .rate =
|
|
|
* .opp_id = 0.
|
|
|
+ */
|
|
|
+const struct omap_opp *omap_pm_dsp_get_opp_table(void);
|
|
|
+
|
|
|
+/**
|
|
|
+ * omap_pm_dsp_set_min_opp - receive desired OPP target ID from DSP Bridge
|
|
|
+ * @opp_id: target DSP OPP ID
|
|
|
+ *
|
|
|
+ * Set a minimum OPP ID for the DSP. This is intended to be called
|
|
|
+ * only from the DSP Bridge MPU-side driver. Unfortunately, the only
|
|
|
+ * information that code receives from the DSP/BIOS load estimator is the
|
|
|
+ * target OPP ID; hence, this interface. No return value.
|
|
|
+ */
|
|
|
+void omap_pm_dsp_set_min_opp(u8 opp_id);
|
|
|
+
|
|
|
+/**
|
|
|
+ * omap_pm_dsp_get_opp - report the current DSP OPP ID
|
|
|
+ *
|
|
|
+ * Report the current OPP for the DSP. Since on OMAP3, the DSP and
|
|
|
+ * MPU share a single voltage domain, the OPP ID returned back may
|
|
|
+ * represent a higher DSP speed than the OPP requested via
|
|
|
+ * omap_pm_dsp_set_min_opp().
|
|
|
+ *
|
|
|
+ * Returns the current VDD1 OPP ID, or 0 upon error.
|
|
|
+ */
|
|
|
+u8 omap_pm_dsp_get_opp(void);
|
|
|
+
|
|
|
+
|
|
|
+/*
|
|
|
+ * CPUFreq-originated constraint
|
|
|
+ *
|
|
|
+ * In the future, this should be handled by custom OPP clocktype
|
|
|
+ * functions.
|
|
|
+ */
|
|
|
+
|
|
|
+/**
|
|
|
+ * omap_pm_cpu_get_freq_table - return a cpufreq_frequency_table array ptr
|
|
|
+ *
|
|
|
+ * Provide a frequency table usable by CPUFreq for the current chip/board.
|
|
|
+ * Returns a pointer to a struct cpufreq_frequency_table array or NULL
|
|
|
+ * upon error.
|
|
|
+ */
|
|
|
+struct cpufreq_frequency_table **omap_pm_cpu_get_freq_table(void);
|
|
|
+
|
|
|
+/**
|
|
|
+ * omap_pm_cpu_set_freq - set the current minimum MPU frequency
|
|
|
+ * @f: MPU frequency in Hz
|
|
|
+ *
|
|
|
+ * Set the current minimum CPU frequency. The actual CPU frequency
|
|
|
+ * used could end up higher if the DSP requested a higher OPP.
|
|
|
+ * Intended to be called by plat-omap/cpu_omap.c:omap_target(). No
|
|
|
+ * return value.
|
|
|
+ */
|
|
|
+void omap_pm_cpu_set_freq(unsigned long f);
|
|
|
+
|
|
|
+/**
|
|
|
+ * omap_pm_cpu_get_freq - report the current CPU frequency
|
|
|
+ *
|
|
|
+ * Returns the current MPU frequency, or 0 upon error.
|
|
|
+ */
|
|
|
+unsigned long omap_pm_cpu_get_freq(void);
|
|
|
+
|
|
|
+
|
|
|
+/*
|
|
|
+ * Device context loss tracking
|
|
|
+ */
|
|
|
+
|
|
|
+/**
|
|
|
+ * omap_pm_get_dev_context_loss_count - return count of times dev has lost ctx
|
|
|
+ * @dev: struct device *
|
|
|
+ *
|
|
|
+ * This function returns the number of times that the device @dev has
|
|
|
+ * lost its internal context. This generally occurs on a powerdomain
|
|
|
+ * transition to OFF. Drivers use this as an optimization to avoid restoring
|
|
|
+ * context if the device hasn't lost it. To use, drivers should initially
|
|
|
+ * call this in their context save functions and store the result. Early in
|
|
|
+ * the driver's context restore function, the driver should call this function
|
|
|
+ * again, and compare the result to the stored counter. If they differ, the
|
|
|
+ * driver must restore device context. If the number of context losses
|
|
|
+ * exceeds the maximum positive integer, the function will wrap to 0 and
|
|
|
+ * continue counting. Returns the number of context losses for this device,
|
|
|
+ * or negative value upon error.
|
|
|
+ */
|
|
|
+int omap_pm_get_dev_context_loss_count(struct device *dev);
|
|
|
+
|
|
|
+void omap_pm_enable_off_mode(void);
|
|
|
+void omap_pm_disable_off_mode(void);
|
|
|
+
|
|
|
+#endif
|