arch/xtensa/esp32_irq: Remove the map/unmap IRQ functions they are used

only inside this file.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche
2021-08-18 10:46:11 +02:00
committed by Masayuki Ishikawa
parent 04cd520293
commit 470799b0b3
2 changed files with 2 additions and 86 deletions
+2 -52
View File
@@ -495,56 +495,6 @@ void up_irqinitialize(void)
#endif #endif
} }
/****************************************************************************
* Name: esp32_mapirq
*
* Description:
* Map the given IRQ to the CPU and allocated CPU interrupt.
*
* Input Parameters:
* irq - IRQ number (see esp32/include/irq.h)
* cpu - The CPU receiving the interrupt 0=PRO CPU 1=APP CPU
* cpuint - The allocated CPU interrupt.
*
* Returned Value:
* None
*
****************************************************************************/
void esp32_mapirq(int irq, int cpu, int cpuint)
{
DEBUGASSERT(irq >= 0 && irq < NR_IRQS);
DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32_CPUINT_MAX);
#ifdef CONFIG_SMP
DEBUGASSERT(cpu >= 0 && cpu < CONFIG_SMP_NCPUS);
#else
DEBUGASSERT(cpu == 0);
#endif
g_irqmap[irq] = IRQ_MKMAP(cpu, cpuint);
}
/****************************************************************************
* Name: esp32_unmapirq
*
* Description:
* Unmap the given IRQ.
*
* Input Parameters:
* irq - IRQ number (see esp32/include/irq.h)
*
* Returned Value:
* None
*
****************************************************************************/
void esp32_unmapirq(int irq)
{
DEBUGASSERT(irq >= 0 && irq < NR_IRQS);
g_irqmap[irq] = IRQ_UNMAPPED;
}
/**************************************************************************** /****************************************************************************
* Name: up_disable_irq * Name: up_disable_irq
* *
@@ -780,7 +730,7 @@ int esp32_setup_irq(int cpu, int periphid, int priority, int type)
DEBUGASSERT(intmap[cpuint] == CPUINT_UNASSIGNED); DEBUGASSERT(intmap[cpuint] == CPUINT_UNASSIGNED);
intmap[cpuint] = periphid + XTENSA_IRQ_FIRSTPERIPH; intmap[cpuint] = periphid + XTENSA_IRQ_FIRSTPERIPH;
esp32_mapirq(irq, cpu, cpuint); g_irqmap[irq] = IRQ_MKMAP(cpu, cpuint);
putreg32(cpuint, regaddr); putreg32(cpuint, regaddr);
@@ -834,7 +784,7 @@ void esp32_teardown_irq(int cpu, int periphid, int cpuint)
DEBUGASSERT(intmap[cpuint] != CPUINT_UNASSIGNED); DEBUGASSERT(intmap[cpuint] != CPUINT_UNASSIGNED);
intmap[cpuint] = CPUINT_UNASSIGNED; intmap[cpuint] = CPUINT_UNASSIGNED;
esp32_unmapirq(irq); g_irqmap[irq] = IRQ_UNMAPPED;
putreg32(NO_CPUINT, regaddr); putreg32(NO_CPUINT, regaddr);
-34
View File
@@ -57,40 +57,6 @@ extern "C"
* Public Functions Prototypes * Public Functions Prototypes
****************************************************************************/ ****************************************************************************/
/****************************************************************************
* Name: esp32_mapirq
*
* Description:
* Map the given IRQ to the CPU and allocated CPU interrupt.
*
* Input Parameters:
* irq - IRQ number (see esp32/include/irq.h)
* cpu - The CPU receiving the interrupt 0=PRO CPU 1=APP CPU
* cpuint - The allocated CPU interrupt.
*
* Returned Value:
* None
*
****************************************************************************/
void esp32_mapirq(int irq, int cpu, int cpuint);
/****************************************************************************
* Name: esp32_unmapirq
*
* Description:
* Unmap the given IRQ.
*
* Input Parameters:
* irq - IRQ number (see esp32/include/irq.h)
*
* Returned Value:
* None
*
****************************************************************************/
void esp32_unmapirq(int irq);
/**************************************************************************** /****************************************************************************
* Name: esp32_cpuint_initialize * Name: esp32_cpuint_initialize
* *