summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-17 09:39:16 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-22 07:21:20 +0100
commitb391fbc61c6f528a1b2a675f1376ff693601cdeb (patch)
treec9137a9558752a0b7f87c1870f5d5a1b3761c06c
parent2fd684e233985eac6e7a7da02026b9e95a178ffd (diff)
downloadrtems-b391fbc61c6f528a1b2a675f1376ff693601cdeb.tar.bz2
bsp/qoriq: Fix hypervisor guest interrupt init
Update #3085.
-rw-r--r--c/src/lib/libbsp/powerpc/qoriq/irq/irq.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/powerpc/qoriq/irq/irq.c b/c/src/lib/libbsp/powerpc/qoriq/irq/irq.c
index 3ead10f31a..625b9fce1b 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/irq/irq.c
@@ -126,6 +126,23 @@ void bsp_interrupt_dispatch(uintptr_t exception_number)
rtems_status_code bsp_interrupt_facility_initialize(void)
{
+ unsigned int i;
+
+ for (i = BSP_INTERRUPT_VECTOR_MIN; i <= BSP_INTERRUPT_VECTOR_MAX; ++i) {
+ uint32_t config;
+ unsigned int priority;
+ uint32_t destination;
+ unsigned int err;
+
+ err = ev_int_get_config(i, &config, &priority, &destination);
+ if (err != EV_SUCCESS)
+ continue;
+
+ priority = QORIQ_PIC_PRIORITY_DEFAULT;
+
+ ev_int_set_config(i, config, priority, destination);
+ }
+
return RTEMS_SUCCESSFUL;
}
@@ -340,7 +357,8 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
for (i = BSP_INTERRUPT_VECTOR_MIN; i <= BSP_INTERRUPT_VECTOR_MAX; ++i) {
volatile qoriq_pic_src_cfg *src_cfg = get_src_cfg(i);
- src_cfg->vpr = VPR_MSK | VPR_P | VPR_PRIORITY(1) | VPR_VECTOR(i);
+ src_cfg->vpr = VPR_MSK | VPR_P
+ | VPR_PRIORITY(QORIQ_PIC_PRIORITY_DEFAULT) | VPR_VECTOR(i);
if (!pic_is_ipi(i)) {
src_cfg->dr = 0x1;