forked from Imagelibrary/rtems
bsp/leon3: Add LEON3_IRQAMP_EXTENDED_INTERRUPT
This commit is contained in:
@@ -103,7 +103,11 @@ extern struct ambapp_dev *LEON3_IrqCtrl_Adev;
|
||||
*
|
||||
* This object should be read-only after initialization.
|
||||
*/
|
||||
#if defined(LEON3_IRQAMP_EXTENDED_INTERRUPT)
|
||||
#define LEON3_IrqCtrl_EIrq LEON3_IRQAMP_EXTENDED_INTERRUPT
|
||||
#else
|
||||
extern uint32_t LEON3_IrqCtrl_EIrq;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Initializes the interrupt controller for the boot processor.
|
||||
|
||||
@@ -35,8 +35,10 @@
|
||||
#include <bsp/irq-generic.h>
|
||||
#include <bsp/irqimpl.h>
|
||||
|
||||
#if !defined(LEON3_IRQAMP_EXTENDED_INTERRUPT)
|
||||
/* GRLIB extended IRQ controller IRQ number */
|
||||
uint32_t LEON3_IrqCtrl_EIrq;
|
||||
#endif
|
||||
|
||||
rtems_interrupt_lock LEON3_IrqCtrl_Lock =
|
||||
RTEMS_INTERRUPT_LOCK_INITIALIZER("LEON3 IrqCtrl");
|
||||
@@ -47,7 +49,9 @@ void leon3_ext_irq_init(irqamp *regs)
|
||||
grlib_store_32(®s->pimask[LEON3_Cpu_Index], 0);
|
||||
grlib_store_32(®s->piforce[LEON3_Cpu_Index], 0);
|
||||
grlib_store_32(®s->iclear, 0xffffffff);
|
||||
#if !defined(LEON3_IRQAMP_EXTENDED_INTERRUPT)
|
||||
LEON3_IrqCtrl_EIrq = IRQAMP_MPSTAT_EIRQ_GET(grlib_load_32(®s->mpstat));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
|
||||
@@ -56,11 +60,15 @@ bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(LEON3_IRQAMP_EXTENDED_INTERRUPT)
|
||||
return vector <= BSP_INTERRUPT_VECTOR_MAX_EXT;
|
||||
#else
|
||||
if (LEON3_IrqCtrl_EIrq > 0) {
|
||||
return vector <= BSP_INTERRUPT_VECTOR_MAX_EXT;
|
||||
}
|
||||
|
||||
return vector <= BSP_INTERRUPT_VECTOR_MAX_STD;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(RTEMS_SMP)
|
||||
|
||||
@@ -42,6 +42,8 @@ links:
|
||||
uid: optgptimerbase
|
||||
- role: build-dependency
|
||||
uid: optirqampbase
|
||||
- role: build-dependency
|
||||
uid: optirqampextirq
|
||||
- role: build-dependency
|
||||
uid: optirqampts
|
||||
- role: build-dependency
|
||||
|
||||
19
spec/build/bsps/sparc/leon3/optirqampextirq.yml
Normal file
19
spec/build/bsps/sparc/leon3/optirqampextirq.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
copyrights:
|
||||
- Copyright (C) 2021 embedded brains GmbH & Co. KG
|
||||
actions:
|
||||
- get-integer: null
|
||||
- format-and-define: null
|
||||
build-type: option
|
||||
default:
|
||||
- enabled-by: sparc/gr712rc
|
||||
value: 12
|
||||
- enabled-by: sparc/gr740
|
||||
value: 10
|
||||
enabled-by: true
|
||||
format: '{}'
|
||||
links: []
|
||||
name: LEON3_IRQAMP_EXTENDED_INTERRUPT
|
||||
description: |
|
||||
This option specifies the interrupt line of the IRQ(A)MP extended interrupt.
|
||||
type: build
|
||||
Reference in New Issue
Block a user