mpm: 8625: Add support for bypass irq list
Populate the bypassed irq list to ignore some of the interrupts which are don't care while system decide to IdlePC. Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org> (cherry picked from commit 613904cef759a9d5ea550610f5bc039fdfc5e719) Change-Id: Ie6aa79d19e1c4d7c371b5ea17d291faf39811bde Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
eda46c2a8d
commit
d2809a438f
@@ -98,6 +98,22 @@ static uint8_t msm_gic_irq_to_smsm[NR_IRQS] = {
|
||||
[MSM8625_INT_ADSP_A11] = SMSM_FAKE_IRQ,
|
||||
};
|
||||
|
||||
static uint16_t msm_bypassed_apps_irqs[] = {
|
||||
MSM8625_INT_CPR_IRQ0,
|
||||
};
|
||||
|
||||
/* Check IRQ falls into bypassed list are not */
|
||||
static bool msm_mpm_bypass_apps_irq(unsigned int irq)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(msm_bypassed_apps_irqs); i++)
|
||||
if (irq == msm_bypassed_apps_irqs[i])
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void msm_gic_mask_irq(struct irq_data *d)
|
||||
{
|
||||
unsigned int index = GIC_IRQ_INDEX(d->irq);
|
||||
@@ -106,6 +122,10 @@ static void msm_gic_mask_irq(struct irq_data *d)
|
||||
|
||||
mask = GIC_IRQ_MASK(d->irq);
|
||||
|
||||
/* check whether irq to be bypassed are not */
|
||||
if (msm_mpm_bypass_apps_irq(d->irq))
|
||||
return;
|
||||
|
||||
if (smsm_irq == 0) {
|
||||
msm_gic_irq_idle_disable[index] &= ~mask;
|
||||
} else {
|
||||
@@ -122,6 +142,10 @@ static void msm_gic_unmask_irq(struct irq_data *d)
|
||||
|
||||
mask = GIC_IRQ_MASK(d->irq);
|
||||
|
||||
/* check whether irq to be bypassed are not */
|
||||
if (msm_mpm_bypass_apps_irq(d->irq))
|
||||
return;
|
||||
|
||||
if (smsm_irq == 0) {
|
||||
msm_gic_irq_idle_disable[index] |= mask;
|
||||
} else {
|
||||
@@ -140,6 +164,10 @@ static int msm_gic_set_irq_wake(struct irq_data *d, unsigned int on)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* check whether irq to be bypassed are not */
|
||||
if (msm_mpm_bypass_apps_irq(d->irq))
|
||||
return 0;
|
||||
|
||||
if (smsm_irq == SMSM_FAKE_IRQ)
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user