.. | .. |
---|
10 | 10 | |
---|
11 | 11 | #include "irq-gic-common.h" |
---|
12 | 12 | |
---|
| 13 | +#ifdef CONFIG_ROCKCHIP_AMP |
---|
| 14 | +#include <soc/rockchip/rockchip_amp.h> |
---|
| 15 | +#endif |
---|
| 16 | + |
---|
13 | 17 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); |
---|
14 | 18 | |
---|
15 | 19 | static const struct gic_kvm_info *gic_kvm_info; |
---|
.. | .. |
---|
112 | 116 | /* |
---|
113 | 117 | * Set priority on all global interrupts. |
---|
114 | 118 | */ |
---|
| 119 | +#ifdef CONFIG_ROCKCHIP_AMP |
---|
| 120 | + for (i = 32; i < gic_irqs; i += 4) { |
---|
| 121 | + u32 amp_pri, j; |
---|
| 122 | + |
---|
| 123 | + amp_pri = 0; |
---|
| 124 | + for (j = 0; j < 4; j++) { |
---|
| 125 | + if (rockchip_amp_check_amp_irq(i + j)) { |
---|
| 126 | + amp_pri |= rockchip_amp_get_irq_prio(i + j) << |
---|
| 127 | + (j * 8); |
---|
| 128 | + } else { |
---|
| 129 | + amp_pri |= GICD_INT_DEF_PRI << (j * 8); |
---|
| 130 | + } |
---|
| 131 | + } |
---|
| 132 | + writel_relaxed(amp_pri, base + GIC_DIST_PRI + i); |
---|
| 133 | + } |
---|
| 134 | +#else |
---|
115 | 135 | for (i = 32; i < gic_irqs; i += 4) |
---|
116 | 136 | writel_relaxed(GICD_INT_DEF_PRI_X4, base + GIC_DIST_PRI + i); |
---|
| 137 | +#endif |
---|
117 | 138 | |
---|
118 | 139 | /* |
---|
119 | 140 | * Deactivate and disable all SPIs. Leave the PPI and SGIs |
---|