.. | .. |
---|
271 | 271 | u32 reg; |
---|
272 | 272 | |
---|
273 | 273 | #ifdef CONFIG_ROCKCHIP_AMP |
---|
274 | | - if (rockchip_amp_check_amp_irq(gic_irq(d))) |
---|
| 274 | + if (which != IRQCHIP_STATE_PENDING && |
---|
| 275 | + rockchip_amp_check_amp_irq(gic_irq(d))) |
---|
275 | 276 | return -EINVAL; |
---|
276 | 277 | #endif |
---|
277 | 278 | switch (which) { |
---|
.. | .. |
---|
533 | 534 | |
---|
534 | 535 | maskval = 0; |
---|
535 | 536 | for (j = 0; j < 4; j++) { |
---|
536 | | - if (rockchip_amp_check_amp_irq(i + j)) { |
---|
| 537 | + if (rockchip_amp_need_init_amp_irq(i + j)) { |
---|
537 | 538 | maskval |= rockchip_amp_get_irq_cpumask(i + j) << |
---|
538 | 539 | (j * 8); |
---|
539 | 540 | } else { |
---|
.. | .. |
---|
1348 | 1349 | goto error; |
---|
1349 | 1350 | } |
---|
1350 | 1351 | |
---|
| 1352 | +#ifdef CONFIG_ROCKCHIP_AMP |
---|
| 1353 | + rockchip_amp_get_gic_info(gic->gic_irqs, GIC_V2); |
---|
| 1354 | +#endif |
---|
1351 | 1355 | gic_dist_init(gic); |
---|
1352 | 1356 | ret = gic_cpu_init(gic); |
---|
1353 | 1357 | if (ret) |
---|
.. | .. |
---|
1565 | 1569 | gic->percpu_offset = 0; |
---|
1566 | 1570 | |
---|
1567 | 1571 | gic_enable_of_quirks(node, gic_quirks, gic); |
---|
1568 | | - |
---|
1569 | | -#ifdef CONFIG_ROCKCHIP_AMP |
---|
1570 | | - rockchip_amp_get_gic_info(); |
---|
1571 | | -#endif |
---|
1572 | 1572 | |
---|
1573 | 1573 | return 0; |
---|
1574 | 1574 | |
---|