diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2019-03-13 19:00:35 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-03-14 18:13:35 +0300 |
commit | ebe351e550cee8e2ffcc1883119e2f6e1e96dd82 (patch) | |
tree | 3061ac18e10e065e03f462b4130736fa30f3db2e /platform | |
parent | ab91c143a34357892a1ced36e3902a92b5aa8ca6 (diff) | |
download | opensbi-ebe351e550cee8e2ffcc1883119e2f6e1e96dd82.tar.xz |
platform: plic: Fix plic_set_priority()
At present plic_set_priority() ignores the 'source' and the priority
register to be programmed is constant. Fix it.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'platform')
-rw-r--r-- | platform/common/irqchip/plic.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/common/irqchip/plic.c b/platform/common/irqchip/plic.c index 3a0c93f..7509f05 100644 --- a/platform/common/irqchip/plic.c +++ b/platform/common/irqchip/plic.c @@ -27,7 +27,10 @@ static volatile void *plic_base; static void plic_set_priority(u32 source, u32 val) { - writel(val, plic_base); + volatile void *plic_priority = plic_base + + PLIC_PRIORITY_BASE + + 4 * source; + writel(val, plic_priority); } static void plic_set_thresh(u32 cntxid, u32 val) |