From 7b2e34a7e49569b9759d1e1274b58533552cbc7a Mon Sep 17 00:00:00 2001 From: Finley Xiao Date: Tue, 26 Nov 2019 15:26:02 +0800 Subject: [PATCH] soc: rockchip: system_monitor: Add default reboot frequency for cpu There is an reboot frequency event if don't add property 'rockchip,reboot-freq' in cpu opp table node. Change-Id: I79a56d62c70d99f60840cd3304622799aaa66476 Signed-off-by: Finley Xiao --- drivers/soc/rockchip/rockchip_system_monitor.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/soc/rockchip/rockchip_system_monitor.c b/drivers/soc/rockchip/rockchip_system_monitor.c index 9d8ccec6afb4..45d35e386e64 100644 --- a/drivers/soc/rockchip/rockchip_system_monitor.c +++ b/drivers/soc/rockchip/rockchip_system_monitor.c @@ -592,6 +592,12 @@ static int monitor_device_parse_status_config(struct device_node *np, &info->video_4k_freq); ret &= of_property_read_u32(np, "rockchip,reboot-freq", &info->reboot_freq); + if (info->devp->type == MONITOR_TPYE_CPU) { + if (!info->reboot_freq) { + info->reboot_freq = CPU_REBOOT_FREQ; + ret = 0; + } + } return ret; } @@ -1227,8 +1233,6 @@ static void rockchip_system_status_cpu_limit_freq(struct monitor_dev_info *info, int cpu; if (status & SYS_STATUS_REBOOT) { - if (!info->reboot_freq) - info->reboot_freq = CPU_REBOOT_FREQ; info->status_min_limit = info->reboot_freq; info->status_max_limit = info->reboot_freq; info->is_status_freq_fixed = true;