#include "../../../drivers/clk/rockchip/clk-pd.h"
#include "cpu_axi.h"
-#ifdef CONFIG_CPU_FREQ
-extern int rockchip_cpufreq_reboot_limit_freq(void);
-#else
-static inline int rockchip_cpufreq_reboot_limit_freq(void) { return 0; }
-#endif
-
static DECLARE_COMPLETION(ddrfreq_completion);
static DEFINE_MUTEX(ddrfreq_mutex);
CLK_NOTIFIER(pd_vop1, LCDC1)
#endif
-static int ddrfreq_reboot_notifier_event(struct notifier_block *this, unsigned long event, void *ptr)
-{
- rockchip_set_system_status(SYS_STATUS_REBOOT);
- rockchip_cpufreq_reboot_limit_freq();
-
- return NOTIFY_OK;
-}
-
-static struct notifier_block ddrfreq_reboot_notifier = {
- .notifier_call = ddrfreq_reboot_notifier_event,
-};
-
static int ddr_freq_suspend_notifier_call(struct notifier_block *self,
unsigned long action, void *data)
{
rockchip_register_system_status_notifier(&ddrfreq_system_status_notifier);
fb_register_client(&ddr_freq_suspend_notifier);
- register_reboot_notifier(&ddrfreq_reboot_notifier);
pr_info("verion 1.2 20140526\n");
pr_info("normal %luMHz video_1080p %luMHz video_4k %luMHz dualview %luMHz idle %luMHz suspend %luMHz reboot %luMHz\n",
#include <asm/unistd.h>
#include <asm/uaccess.h>
#include <asm/system_misc.h>
+#include <linux/rockchip/common.h>
+#include <dt-bindings/clock/rk_system_status.h>
#include "../../../drivers/clk/rockchip/clk-pd.h"
extern void dvfs_disable_temp_limit(void);
static struct notifier_block cpufreq_pm_notifier = {
.notifier_call = cpufreq_pm_notifier_event,
};
-#if 0
-static int cpufreq_reboot_notifier_event(struct notifier_block *this, unsigned long event, void *ptr)
-{
- struct cpufreq_policy *policy = cpufreq_cpu_get(0);
- if (policy) {
- is_booting = false;
- policy->cur++;
- cpufreq_driver_target(policy, suspend_freq, DISABLE_FURTHER_CPUFREQ | CPUFREQ_RELATION_H);
- cpufreq_cpu_put(policy);
- }
-
- return NOTIFY_OK;
-}
-#endif
int rockchip_cpufreq_reboot_limit_freq(void)
{
struct regulator *regulator;
return 0;
}
-#if 0
+
+static int cpufreq_reboot_notifier_event(struct notifier_block *this,
+ unsigned long event, void *ptr)
+{
+ rockchip_set_system_status(SYS_STATUS_REBOOT);
+ rockchip_cpufreq_reboot_limit_freq();
+
+ return NOTIFY_OK;
+}
+
static struct notifier_block cpufreq_reboot_notifier = {
.notifier_call = cpufreq_reboot_notifier_event,
};
-#endif
+
static int clk_pd_vio_notifier_call(struct notifier_block *nb, unsigned long event, void *ptr)
{
switch (event) {
.notifier_call = clk_pd_vio_notifier_call,
};
-
static struct cpufreq_driver cpufreq_driver = {
.flags = CPUFREQ_CONST_LOOPS,
.verify = cpufreq_verify,
clk_enable_dvfs(aclk_vio1_dvfs_node);
}
}
+ register_reboot_notifier(&cpufreq_reboot_notifier);
register_pm_notifier(&cpufreq_pm_notifier);
return cpufreq_register_driver(&cpufreq_driver);
}