armv7-r: fix arm_gic_nlines redefines
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
b1ad547deb
commit
b33a925787
@ -38,37 +38,6 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_ARMV7R_HAVE_GICv2
|
#ifdef CONFIG_ARMV7R_HAVE_GICv2
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: arm_gic_nlines
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Return the number of interrupt lines supported by this GIC
|
|
||||||
* implementation (include both PPIs (32) and SPIs).
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* The number of interrupt lines.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static inline unsigned int arm_gic_nlines(void)
|
|
||||||
{
|
|
||||||
uint32_t regval;
|
|
||||||
uint32_t field;
|
|
||||||
|
|
||||||
/* Get the number of interrupt lines. */
|
|
||||||
|
|
||||||
regval = getreg32(GIC_ICDICTR);
|
|
||||||
field = (regval & GIC_ICDICTR_ITLINES_MASK) >> GIC_ICDICTR_ITLINES_SHIFT;
|
|
||||||
return (field + 1) << 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user