diff --git a/arch/misoc/include/irq.h b/arch/misoc/include/irq.h index 0d492ff7ce9..2ae10c7af5c 100644 --- a/arch/misoc/include/irq.h +++ b/arch/misoc/include/irq.h @@ -43,8 +43,6 @@ * Pre-processor Definitions ****************************************************************************/ - - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ diff --git a/arch/misoc/include/lm32/syscall.h b/arch/misoc/include/lm32/syscall.h index d3dab9546e4..17591efe5d8 100644 --- a/arch/misoc/include/lm32/syscall.h +++ b/arch/misoc/include/lm32/syscall.h @@ -57,11 +57,12 @@ #define SYS_syscall 0x00 -/* Configuration ********************************************************************/ +/* Configuration ************************************************************/ + /* SYS call 1 and 2 are defined for internal use by the LM32 port (see - * arch/miscoc/include/lm32/syscall.h). In addition, SYS call 3 is the return from - * a SYS call in kernel mode. The first four syscall values must, therefore, be - * reserved (0 is not used). + * arch/miscoc/include/lm32/syscall.h). In addition, SYS call 3 is the + * return from a SYS call in kernel mode. The first four syscall values + * must, therefore, be reserved (0 is not used). */ #ifdef CONFIG_BUILD_KERNEL @@ -72,11 +73,11 @@ # endif #endif -/* sys_call macros ******************************************************************/ +/* sys_call macros **********************************************************/ #ifndef __ASSEMBLY__ -/* Context switching system calls ***************************************************/ +/* Context switching system calls *******************************************/ /* SYS call 0: (not used) */ diff --git a/arch/misoc/include/minerva/irq.h b/arch/misoc/include/minerva/irq.h index 7afb355522d..4f8a128bb22 100644 --- a/arch/misoc/include/minerva/irq.h +++ b/arch/misoc/include/minerva/irq.h @@ -55,7 +55,9 @@ /* Configuration ************************************************************/ -/* If this is a kernel build, how many nested system calls should we support? */ +/* If this is a kernel build, how many nested system calls should we + * support? + */ #define MINERVA_NINTERRUPTS 32 #define MINERVA_IRQ_SWINT 32 diff --git a/arch/misoc/src/common/misoc.h b/arch/misoc/src/common/misoc.h index 3005a288da1..128a6e8b3b6 100644 --- a/arch/misoc/src/common/misoc.h +++ b/arch/misoc/src/common/misoc.h @@ -58,7 +58,7 @@ #define putreg32(v,a) (*(volatile uint32_t *)(a) = (v)) /**************************************************************************** - * Public Functions + * Public Functions Prototypes ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/arch/misoc/src/common/misoc_serial.c b/arch/misoc/src/common/misoc_serial.c index ae3efd49584..045dbe1d912 100644 --- a/arch/misoc/src/common/misoc_serial.c +++ b/arch/misoc/src/common/misoc_serial.c @@ -118,8 +118,8 @@ /* Common initialization logic will not not know that the all of the UARTs * have been disabled. So, as a result, we may still have to provide - * stub implementations of misoc_earlyserialinit(), misoc_serial_initialize(), and - * misoc_putc(). + * stub implementations of misoc_earlyserialinit(), + * misoc_serial_initialize(), and misoc_putc(). */ #ifdef HAVE_UART_DEVICE @@ -228,7 +228,7 @@ static uart_dev_t g_uart1port = { .size = CONFIG_UART1_TXBUFSIZE, .buffer = g_uart1txbuffer, - }, + }, .ops = &g_uart_ops, .priv = &g_uart1priv, }; @@ -258,9 +258,9 @@ static void misoc_restoreuartint(struct uart_dev_s *dev, uint8_t im) static void misoc_disableuartint(struct uart_dev_s *dev, uint8_t *im) { if (im) - { - *im = uart_ev_enable_read(); - } + { + *im = uart_ev_enable_read(); + } misoc_restoreuartint(dev, 0); } @@ -297,14 +297,15 @@ static void misoc_shutdown(struct uart_dev_s *dev) * Name: misoc_attach * * Description: - * Configure the UART to operation in interrupt driven mode. This method is - * called when the serial port is opened. Normally, this is just after the + * Configure the UART to operation in interrupt driven mode. This method + * is called when the serial port is opened. Normally, this is just after * the setup() method is called, however, the serial console may operate in * a non-interrupt driven mode during the boot phase. * * RX and TX interrupts are not enabled by the attach method (unless the * hardware supports multiple levels of interrupt enabling). The RX and TX - * interrupts are not enabled until the txint() and rxint() methods are called. + * interrupts are not enabled until the txint() and rxint() methods are + * called. * ****************************************************************************/ @@ -323,8 +324,8 @@ static int misoc_attach(struct uart_dev_s *dev) * * Description: * Detach UART interrupts. This method is called when the serial port is - * closed normally just before the shutdown method is called. The exception - * is the serial console which is never shutdown. + * closed normally just before the shutdown method is called. + * The exception is the serial console which is never shutdown. * ****************************************************************************/ @@ -560,7 +561,7 @@ int up_putc(int ch) struct uart_dev_s *dev = (struct uart_dev_s *)&CONSOLE_DEV; uint8_t imr; - misoc_disableuartint(dev, &imr); + misoc_disableuartint(dev, &imr); /* Check for LF */ @@ -659,6 +660,7 @@ void misoc_serial_initialize(void) #endif /* Register all UARTs */ + uart_register("/dev/ttyS0", &TTYS0_DEV); #endif } diff --git a/arch/misoc/src/common/misoc_timerisr.c b/arch/misoc/src/common/misoc_timerisr.c index 024e4d649cc..98f35c7c6c2 100644 --- a/arch/misoc/src/common/misoc_timerisr.c +++ b/arch/misoc/src/common/misoc_timerisr.c @@ -122,7 +122,7 @@ void up_timer_initialize(void) timer0_ev_pending_write(timer0_ev_pending_read()); - /* Disable timer*/ + /* Disable timer */ timer0_en_write(0); diff --git a/arch/misoc/src/lm32/chip.h b/arch/misoc/src/lm32/chip.h index f49eb756c59..4a400aaad98 100644 --- a/arch/misoc/src/lm32/chip.h +++ b/arch/misoc/src/lm32/chip.h @@ -37,7 +37,7 @@ #define __ARCH_MISOC_SRC_LM32_CHIP_H /**************************************************************************** - * Inline Functions + * Included Files ****************************************************************************/ #include "lm32.h" @@ -65,7 +65,6 @@ static inline void irq_setie(unsigned int ie) static inline unsigned int irq_getmask(void) { - unsigned int mask; __asm__ __volatile__("rcsr %0, IM" : "=r" (mask)); return mask; @@ -78,7 +77,6 @@ static inline void irq_setmask(unsigned int mask) static inline unsigned int irq_pending(void) { - unsigned int pending; __asm__ __volatile__("rcsr %0, IP" : "=r" (pending)); return pending; diff --git a/arch/misoc/src/lm32/lm32.h b/arch/misoc/src/lm32/lm32.h index 64c07227f03..74642daadf3 100644 --- a/arch/misoc/src/lm32/lm32.h +++ b/arch/misoc/src/lm32/lm32.h @@ -105,10 +105,10 @@ extern uint32_t g_idle_topstack; ****************************************************************************/ /**************************************************************************** - * Public Functions + * Public Functions Prototypes ****************************************************************************/ -/* Low level initialization provided by board-level logic ******************/ +/* Low level initialization provided by board-level logic *******************/ void lm32_board_initialize(void); diff --git a/arch/misoc/src/lm32/lm32_config.h b/arch/misoc/src/lm32/lm32_config.h index 5b0d5d9b03f..c78b4d3402d 100644 --- a/arch/misoc/src/lm32/lm32_config.h +++ b/arch/misoc/src/lm32/lm32_config.h @@ -53,6 +53,7 @@ /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ + /* UARTs ****************************************************************************/ /* Are any UARTs enabled? */ @@ -91,7 +92,7 @@ ************************************************************************************/ /************************************************************************************ - * Public Functions + * Public Functions Prototypes ************************************************************************************/ #endif /* __ARCH_MISOC_SRC_LM32_LM32_CONFIG_H */ diff --git a/arch/misoc/src/lm32/lm32_decodeirq.c b/arch/misoc/src/lm32/lm32_decodeirq.c index 62b77d89e30..6f5a1c229b6 100644 --- a/arch/misoc/src/lm32/lm32_decodeirq.c +++ b/arch/misoc/src/lm32/lm32_decodeirq.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * arch/misoc/src/lm32/lm32_decodeirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -32,9 +32,9 @@ #include "chip.h" #include "lm32.h" -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: lm32_decodeirq @@ -68,6 +68,7 @@ uint32_t *lm32_decodeirq(uint32_t intstat, uint32_t *regs) if ((intstat & bit) != 0) { /* Yes.. Dispatch the interrupt */ + /* REVIST: Do I need to acknowledge the interrupt first? */ irqinfo("irq=%d\n", irq); diff --git a/arch/misoc/src/lm32/lm32_doirq.c b/arch/misoc/src/lm32/lm32_doirq.c index 5c39aa95d57..c5d6bb6527e 100644 --- a/arch/misoc/src/lm32/lm32_doirq.c +++ b/arch/misoc/src/lm32/lm32_doirq.c @@ -71,8 +71,8 @@ uint32_t *lm32_doirq(int irq, uint32_t *regs) DEBUGASSERT(g_current_regs == NULL); g_current_regs = regs; - /* Disable further occurrences of this interrupt (until the interrupt sources - * have been clear by the driver). + /* Disable further occurrences of this interrupt (until the interrupt + * sources have been clear by the driver). */ up_disable_irq(irq); diff --git a/arch/misoc/src/lm32/lm32_initialize.c b/arch/misoc/src/lm32/lm32_initialize.c index f218dbdb7b0..cfcb7c45121 100644 --- a/arch/misoc/src/lm32/lm32_initialize.c +++ b/arch/misoc/src/lm32/lm32_initialize.c @@ -60,7 +60,7 @@ #include "lm32.h" /**************************************************************************** - * Public Functionis + * Public Functions ****************************************************************************/ void up_initialize(void) diff --git a/arch/misoc/src/minerva/chip.h b/arch/misoc/src/minerva/chip.h index f6cdb8efbab..16d61278e6d 100644 --- a/arch/misoc/src/minerva/chip.h +++ b/arch/misoc/src/minerva/chip.h @@ -37,7 +37,7 @@ #define __ARCH_MISOC_SRC_MINERVA_CHIP_H /**************************************************************************** - * Inline Functions + * Included Files ****************************************************************************/ #include "minerva.h" diff --git a/arch/misoc/src/minerva/minerva.h b/arch/misoc/src/minerva/minerva.h index ff9bdb06a22..8d9a43fb642 100644 --- a/arch/misoc/src/minerva/minerva.h +++ b/arch/misoc/src/minerva/minerva.h @@ -105,10 +105,10 @@ extern uint32_t g_idle_topstack; ****************************************************************************/ /**************************************************************************** - * Public Functions + * Public Functions Prototypes ****************************************************************************/ -/* Low level initialization provided by board-level logic ******************/ +/* Low level initialization provided by board-level logic *******************/ void minerva_board_initialize(void); diff --git a/arch/misoc/src/minerva/minerva_decodeirq.c b/arch/misoc/src/minerva/minerva_decodeirq.c index a88b0926808..fca3d112f13 100644 --- a/arch/misoc/src/minerva/minerva_decodeirq.c +++ b/arch/misoc/src/minerva/minerva_decodeirq.c @@ -40,7 +40,8 @@ * Name: minerva_decodeirq * * Description: - * This function is called from the IRQ vector handler in minerva_vectors.S. + * This function is called from the IRQ vector handler in + * minerva_vectors.S. * At this point, the interrupt has been taken and the registers have * been saved on the stack. This function simply needs to determine the * the irq number of the interrupt and then to call minerva_doirq to diff --git a/arch/misoc/src/minerva/minerva_doirq.c b/arch/misoc/src/minerva/minerva_doirq.c index 70ac6b67bdc..f64a210d5f8 100644 --- a/arch/misoc/src/minerva/minerva_doirq.c +++ b/arch/misoc/src/minerva/minerva_doirq.c @@ -110,8 +110,8 @@ uint32_t *minerva_doirq(int irq, uint32_t * regs) /* If a context switch occurred while processing the interrupt then * g_current_regs may have change value. If we return any value different - * from the input regs, then the lower level will know that a context switch - * occurred during interrupt processing. + * from the input regs, then the lower level will know that a context + * switch occurred during interrupt processing. */ regs = (uint32_t *) g_current_regs; diff --git a/arch/misoc/src/minerva/minerva_initialize.c b/arch/misoc/src/minerva/minerva_initialize.c index 2c6714c5b17..d6c753c4fb9 100644 --- a/arch/misoc/src/minerva/minerva_initialize.c +++ b/arch/misoc/src/minerva/minerva_initialize.c @@ -60,7 +60,7 @@ #include "minerva.h" /**************************************************************************** - * Public Functionis + * Public Functions ****************************************************************************/ void up_initialize(void)