LM32: Fix various compilation errors that I introduced.
This commit is contained in:
parent
5a9d3b20fa
commit
911e5abb2c
3
arch/misoc/include/.gitignore
vendored
Normal file
3
arch/misoc/include/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/board
|
||||
/chip
|
||||
|
5
arch/misoc/src/.gitignore
vendored
Normal file
5
arch/misoc/src/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/.depend
|
||||
/Make.dep
|
||||
/locked.r
|
||||
/board
|
||||
/chip
|
@ -42,6 +42,20 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Low-level register access */
|
||||
|
||||
#define getreg8(a) (*(volatile uint8_t *)(a))
|
||||
#define putreg8(v,a) (*(volatile uint8_t *)(a) = (v))
|
||||
#define getreg16(a) (*(volatile uint16_t *)(a))
|
||||
#define putreg16(v,a) (*(volatile uint16_t *)(a) = (v))
|
||||
#define getreg32(a) (*(volatile uint32_t *)(a))
|
||||
#define putreg32(v,a) (*(volatile uint32_t *)(a) = (v))
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
@ -57,6 +57,6 @@ void misoc_lowputs(const char *str)
|
||||
{
|
||||
while (*str)
|
||||
{
|
||||
up_lowputc(*str++);
|
||||
misoc_lowputc(*str++);
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "misoc_arch.h"
|
||||
#include "misoc.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
@ -58,6 +58,6 @@ void misoc_puts(const char *str)
|
||||
{
|
||||
while (*str)
|
||||
{
|
||||
misoc_putc(*str++);
|
||||
up_putc(*str++);
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
||||
#include <arch/board/generated/csr.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "hw/flags.h
|
||||
#include "hw/flags.h"
|
||||
#include "misoc.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -38,15 +38,14 @@ HEAD_ASRC = lm32_vectors.S
|
||||
|
||||
CMN_ASRCS =
|
||||
CMN_CSRCS = misoc_lowputs.c misoc_serial.c misoc_mdelay.c
|
||||
CMN_CSRCS += misoc_modifyreg8.cmisoc_modifyreg16.c misoc_modifyreg32.c
|
||||
CMN_CSRCS += misoc_modifyreg8.c misoc_modifyreg16.c misoc_modifyreg32.c
|
||||
CMN_CSRCS += misoc_puts.c misoc_udelay.c
|
||||
|
||||
CHIP_ASRCS = lm32_syscall.S
|
||||
|
||||
CHIP_CSRCS = lm32_allocateheap.c lm32_assert.c lm32_blocktask.c
|
||||
CHIP_CSRCS += lm32_copystate.c lm32_createstack.c lm32_decodeirq.c
|
||||
CHIP_CSRCS += lm32_doirq.c lm32_dumpstate.c lm32_dumpstate.c lm32_exit.c
|
||||
CHIP_CSRCS += lm32_idle.c lm32_initialize.c lm32_initialstate.c
|
||||
CHIP_CSRCS += lm32_interruptcontext.c lm32_irq.c lm32_releasepending.c
|
||||
CHIP_CSRCS += lm32_releasestack.c lm32_stackframe.c lm32_swint.c
|
||||
CHIP_CSRCS += lm32_unblocktask.c
|
||||
CHIP_CSRCS += lm32_doirq.c lm32_dumpstate.c lm32_exit.c lm32_idle.c
|
||||
CHIP_CSRCS += lm32_initialize.c lm32_initialstate.c lm32_interruptcontext.c
|
||||
CHIP_CSRCS += lm32_irq.c lm32_releasepending.c lm32_releasestack.c
|
||||
CHIP_CSRCS += lm32_stackframe.c lm32_swint.c lm32_unblocktask.c
|
||||
|
@ -92,15 +92,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Low-level register access */
|
||||
|
||||
#define getreg8(a) (*(volatile uint8_t *)(a))
|
||||
#define putreg8(v,a) (*(volatile uint8_t *)(a) = (v))
|
||||
#define getreg16(a) (*(volatile uint16_t *)(a))
|
||||
#define putreg16(v,a) (*(volatile uint16_t *)(a) = (v))
|
||||
#define getreg32(a) (*(volatile uint32_t *)(a))
|
||||
#define putreg32(v,a) (*(volatile uint32_t *)(a) = (v))
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
@ -143,6 +134,7 @@ void lm32_irq_initialize(void);
|
||||
/* Interrupt decode *********************************************************/
|
||||
|
||||
uint32_t *lm32_decodeirq(uint32_t intstat, uint32_t *regs);
|
||||
uint32_t *lm32_doirq(int irq, uint32_t *regs);
|
||||
|
||||
/* Software interrupts ******************************************************/
|
||||
|
||||
|
@ -39,6 +39,11 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "lm32.h"
|
||||
|
||||
@ -69,13 +74,13 @@ uint32_t *lm32_decodeirq(uint32_t intstat, uint32_t *regs)
|
||||
|
||||
/* Decode and dispatch interrupts */
|
||||
|
||||
for (irq = 0; irq < MISOC_NINTERRUPTS & instat != 0; i++)
|
||||
for (irq = 0; irq < MISOC_NINTERRUPTS && intstat != 0; irq++)
|
||||
{
|
||||
uint32_t bit = (1 << irq);
|
||||
|
||||
/* Is this interrupt pending? */
|
||||
|
||||
if ((instat & bit) != 0)
|
||||
if ((intstat & bit) != 0)
|
||||
{
|
||||
/* Yes.. Dispatch the interrupt */
|
||||
/* REVIST: Do I need to acknowledge the interrupt first? */
|
||||
@ -87,7 +92,7 @@ uint32_t *lm32_decodeirq(uint32_t intstat, uint32_t *regs)
|
||||
* break out of the loop early.
|
||||
*/
|
||||
|
||||
instat &= ~bit;
|
||||
intstat &= ~bit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,6 @@ uint32_t *lm32_doirq(int irq, uint32_t *regs)
|
||||
/* Unmask the last interrupt (global interrupts are still disabled) */
|
||||
|
||||
up_enable_irq(irq);
|
||||
#endif
|
||||
board_autoled_off(LED_INIRQ);
|
||||
return regs;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user