Loading drivers/clk/msm/clock-cpu-8939.c +42 −0 Original line number Diff line number Diff line Loading @@ -700,6 +700,45 @@ static struct notifier_block clock_8939_pm_notifier_single_cluster = { .notifier_call = clock_8939_pm_event_single_cluster, }; /** * clock_panic_callback() - panic notification callback function. * This function is invoked when a kernel panic occurs. * @nfb: Notifier block pointer * @event: Value passed unmodified to notifier function * @data: Pointer passed unmodified to notifier function * * Return: NOTIFY_OK */ static int clock_panic_callback(struct notifier_block *nfb, unsigned long event, void *data) { bool single_cluster = 0; unsigned long rate; struct device_node *ofnode = of_find_compatible_node(NULL, NULL, "qcom,cpu-clock-8939"); if (!ofnode) ofnode = of_find_compatible_node(NULL, NULL, "qcom,cpu-clock-8917"); if (ofnode) single_cluster = of_property_read_bool(ofnode, "qcom,num-cluster"); rate = (a53_bc_clk.c.count) ? a53_bc_clk.c.rate : 0; pr_err("%s frequency: %10lu Hz\n", a53_bc_clk.c.dbg_name, rate); if (!single_cluster) { rate = (a53_lc_clk.c.count) ? a53_lc_clk.c.rate : 0; pr_err("%s frequency: %10lu Hz\n", a53_lc_clk.c.dbg_name, rate); } return NOTIFY_OK; } static struct notifier_block clock_panic_notifier = { .notifier_call = clock_panic_callback, .priority = 1, }; static int clock_a53_probe(struct platform_device *pdev) { int speed_bin, version, rc, cpu, mux_id, rate; Loading Loading @@ -798,6 +837,9 @@ static int clock_a53_probe(struct platform_device *pdev) populate_opp_table(pdev, single_cluster); atomic_notifier_chain_register(&panic_notifier_list, &clock_panic_notifier); return 0; } Loading drivers/clk/msm/clock-cpu-8953.c +31 −0 Original line number Diff line number Diff line Loading @@ -753,6 +753,34 @@ static int cpu_parse_devicetree(struct platform_device *pdev) return 0; } /** * clock_panic_callback() - panic notification callback function. * This function is invoked when a kernel panic occurs. * @nfb: Notifier block pointer * @event: Value passed unmodified to notifier function * @data: Pointer passed unmodified to notifier function * * Return: NOTIFY_OK */ static int clock_panic_callback(struct notifier_block *nfb, unsigned long event, void *data) { unsigned long rate; rate = (a53_perf_clk.c.count) ? a53_perf_clk.c.rate : 0; pr_err("%s frequency: %10lu Hz\n", a53_perf_clk.c.dbg_name, rate); rate = (a53_pwr_clk.c.count) ? a53_pwr_clk.c.rate : 0; pr_err("%s frequency: %10lu Hz\n", a53_pwr_clk.c.dbg_name, rate); return NOTIFY_OK; } static struct notifier_block clock_panic_notifier = { .notifier_call = clock_panic_callback, .priority = 1, }; static int clock_cpu_probe(struct platform_device *pdev) { int speed_bin, version, rc, cpu, mux_id; Loading Loading @@ -875,6 +903,9 @@ static int clock_cpu_probe(struct platform_device *pdev) a53_perf_clk.hw_low_power_ctrl = true; } atomic_notifier_chain_register(&panic_notifier_list, &clock_panic_notifier); return 0; } Loading Loading
drivers/clk/msm/clock-cpu-8939.c +42 −0 Original line number Diff line number Diff line Loading @@ -700,6 +700,45 @@ static struct notifier_block clock_8939_pm_notifier_single_cluster = { .notifier_call = clock_8939_pm_event_single_cluster, }; /** * clock_panic_callback() - panic notification callback function. * This function is invoked when a kernel panic occurs. * @nfb: Notifier block pointer * @event: Value passed unmodified to notifier function * @data: Pointer passed unmodified to notifier function * * Return: NOTIFY_OK */ static int clock_panic_callback(struct notifier_block *nfb, unsigned long event, void *data) { bool single_cluster = 0; unsigned long rate; struct device_node *ofnode = of_find_compatible_node(NULL, NULL, "qcom,cpu-clock-8939"); if (!ofnode) ofnode = of_find_compatible_node(NULL, NULL, "qcom,cpu-clock-8917"); if (ofnode) single_cluster = of_property_read_bool(ofnode, "qcom,num-cluster"); rate = (a53_bc_clk.c.count) ? a53_bc_clk.c.rate : 0; pr_err("%s frequency: %10lu Hz\n", a53_bc_clk.c.dbg_name, rate); if (!single_cluster) { rate = (a53_lc_clk.c.count) ? a53_lc_clk.c.rate : 0; pr_err("%s frequency: %10lu Hz\n", a53_lc_clk.c.dbg_name, rate); } return NOTIFY_OK; } static struct notifier_block clock_panic_notifier = { .notifier_call = clock_panic_callback, .priority = 1, }; static int clock_a53_probe(struct platform_device *pdev) { int speed_bin, version, rc, cpu, mux_id, rate; Loading Loading @@ -798,6 +837,9 @@ static int clock_a53_probe(struct platform_device *pdev) populate_opp_table(pdev, single_cluster); atomic_notifier_chain_register(&panic_notifier_list, &clock_panic_notifier); return 0; } Loading
drivers/clk/msm/clock-cpu-8953.c +31 −0 Original line number Diff line number Diff line Loading @@ -753,6 +753,34 @@ static int cpu_parse_devicetree(struct platform_device *pdev) return 0; } /** * clock_panic_callback() - panic notification callback function. * This function is invoked when a kernel panic occurs. * @nfb: Notifier block pointer * @event: Value passed unmodified to notifier function * @data: Pointer passed unmodified to notifier function * * Return: NOTIFY_OK */ static int clock_panic_callback(struct notifier_block *nfb, unsigned long event, void *data) { unsigned long rate; rate = (a53_perf_clk.c.count) ? a53_perf_clk.c.rate : 0; pr_err("%s frequency: %10lu Hz\n", a53_perf_clk.c.dbg_name, rate); rate = (a53_pwr_clk.c.count) ? a53_pwr_clk.c.rate : 0; pr_err("%s frequency: %10lu Hz\n", a53_pwr_clk.c.dbg_name, rate); return NOTIFY_OK; } static struct notifier_block clock_panic_notifier = { .notifier_call = clock_panic_callback, .priority = 1, }; static int clock_cpu_probe(struct platform_device *pdev) { int speed_bin, version, rc, cpu, mux_id; Loading Loading @@ -875,6 +903,9 @@ static int clock_cpu_probe(struct platform_device *pdev) a53_perf_clk.hw_low_power_ctrl = true; } atomic_notifier_chain_register(&panic_notifier_list, &clock_panic_notifier); return 0; } Loading