Skip to content

Commit e4e6448

Browse files
Vladimir Zapolskiyvireshk
authored andcommitted
cpufreq: qcom-cpufreq-hw: Clear dcvs interrupts
It's noted that dcvs interrupts are not self-clearing, thus an interrupt handler runs constantly, which leads to a severe regression in runtime. To fix the problem an explicit write to clear interrupt register is required, note that on OSM platforms the register may not be present. Fixes: 275157b ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support") Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 1aa24a8 commit e4e6448

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/cpufreq/qcom-cpufreq-hw.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#define CLK_HW_DIV 2
2525
#define LUT_TURBO_IND 1
2626

27+
#define GT_IRQ_STATUS BIT(2)
28+
2729
#define HZ_PER_KHZ 1000
2830

2931
struct qcom_cpufreq_soc_data {
@@ -32,6 +34,7 @@ struct qcom_cpufreq_soc_data {
3234
u32 reg_dcvs_ctrl;
3335
u32 reg_freq_lut;
3436
u32 reg_volt_lut;
37+
u32 reg_intr_clr;
3538
u32 reg_current_vote;
3639
u32 reg_perf_state;
3740
u8 lut_row_size;
@@ -360,6 +363,10 @@ static irqreturn_t qcom_lmh_dcvs_handle_irq(int irq, void *data)
360363
disable_irq_nosync(c_data->throttle_irq);
361364
schedule_delayed_work(&c_data->throttle_work, 0);
362365

366+
if (c_data->soc_data->reg_intr_clr)
367+
writel_relaxed(GT_IRQ_STATUS,
368+
c_data->base + c_data->soc_data->reg_intr_clr);
369+
363370
return IRQ_HANDLED;
364371
}
365372

@@ -379,6 +386,7 @@ static const struct qcom_cpufreq_soc_data epss_soc_data = {
379386
.reg_dcvs_ctrl = 0xb0,
380387
.reg_freq_lut = 0x100,
381388
.reg_volt_lut = 0x200,
389+
.reg_intr_clr = 0x308,
382390
.reg_perf_state = 0x320,
383391
.lut_row_size = 4,
384392
};

0 commit comments

Comments
 (0)