A10: Make sure that interrupts are disabled and cleared
This commit is contained in:
parent
89a1cff17b
commit
2dcf15944f
|
@ -98,7 +98,7 @@ extern uint32_t _vector_end; /* End+1 of vector block */
|
|||
#ifndef CONFIG_ARCH_ROMPGTABLE
|
||||
static const struct section_mapping_s section_mapping[] =
|
||||
{
|
||||
{ A1X_INTMEM_PSECTION, A1X_INTMEM_VSECTION,
|
||||
{ A1X_INTMEM_PSECTION, A1X_INTMEM_VSECTION, /* Includes vectors and page table */
|
||||
A1X_INTMEM_MMUFLAGS, A1X_INTMEM_NSECTIONS
|
||||
},
|
||||
{ A1X_PERIPH_PSECTION, A1X_PERIPH_VSECTION,
|
||||
|
|
|
@ -148,12 +148,22 @@ static void a1x_dumpintc(const char *msg, int irq)
|
|||
|
||||
void up_irqinitialize(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* The following operations need to be atomic, but since this function is
|
||||
* called early in the initialization sequence, we expect to have exclusive
|
||||
* access to the INTC.
|
||||
*/
|
||||
|
||||
/* Disable, mask, and clear all interrupts */
|
||||
|
||||
for (i = 0; i < A1X_IRQ_NINT; i += 32)
|
||||
{
|
||||
putreg32(0x00000000, A1X_INTC_EN(i)); /* 0 disables corresponding interrupt */
|
||||
putreg32(0xffffffff, A1X_INTC_MASK(i)); /* 1 masks corresponding interrupt */
|
||||
(void)getreg32(A1X_INTC_IRQ_PEND(i)); /* Reading status clears pending interrupts */
|
||||
}
|
||||
|
||||
/* Colorize the interrupt stack for debug purposes */
|
||||
|
||||
#if defined(CONFIG_DEBUG_STACK) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
|
|
Loading…
Reference in New Issue