arch: misoc: nxstyle fixes

Nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea
2021-03-30 11:35:11 +02:00
committed by Xiang Xiao
parent 6035e838da
commit 22eebf3edf
17 changed files with 49 additions and 45 deletions
-2
View File
@@ -43,8 +43,6 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
+7 -6
View File
@@ -57,11 +57,12 @@
#define SYS_syscall 0x00 #define SYS_syscall 0x00
/* Configuration ********************************************************************/ /* Configuration ************************************************************/
/* SYS call 1 and 2 are defined for internal use by the LM32 port (see /* 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 * arch/miscoc/include/lm32/syscall.h). In addition, SYS call 3 is the
* a SYS call in kernel mode. The first four syscall values must, therefore, be * return from a SYS call in kernel mode. The first four syscall values
* reserved (0 is not used). * must, therefore, be reserved (0 is not used).
*/ */
#ifdef CONFIG_BUILD_KERNEL #ifdef CONFIG_BUILD_KERNEL
@@ -72,11 +73,11 @@
# endif # endif
#endif #endif
/* sys_call macros ******************************************************************/ /* sys_call macros **********************************************************/
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* Context switching system calls ***************************************************/ /* Context switching system calls *******************************************/
/* SYS call 0: (not used) */ /* SYS call 0: (not used) */
+3 -1
View File
@@ -55,7 +55,9 @@
/* Configuration ************************************************************/ /* 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_NINTERRUPTS 32
#define MINERVA_IRQ_SWINT 32 #define MINERVA_IRQ_SWINT 32
+1 -1
View File
@@ -58,7 +58,7 @@
#define putreg32(v,a) (*(volatile uint32_t *)(a) = (v)) #define putreg32(v,a) (*(volatile uint32_t *)(a) = (v))
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions Prototypes
****************************************************************************/ ****************************************************************************/
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
+14 -12
View File
@@ -118,8 +118,8 @@
/* Common initialization logic will not not know that the all of the UARTs /* 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 * have been disabled. So, as a result, we may still have to provide
* stub implementations of misoc_earlyserialinit(), misoc_serial_initialize(), and * stub implementations of misoc_earlyserialinit(),
* misoc_putc(). * misoc_serial_initialize(), and misoc_putc().
*/ */
#ifdef HAVE_UART_DEVICE #ifdef HAVE_UART_DEVICE
@@ -228,7 +228,7 @@ static uart_dev_t g_uart1port =
{ {
.size = CONFIG_UART1_TXBUFSIZE, .size = CONFIG_UART1_TXBUFSIZE,
.buffer = g_uart1txbuffer, .buffer = g_uart1txbuffer,
}, },
.ops = &g_uart_ops, .ops = &g_uart_ops,
.priv = &g_uart1priv, .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) static void misoc_disableuartint(struct uart_dev_s *dev, uint8_t *im)
{ {
if (im) if (im)
{ {
*im = uart_ev_enable_read(); *im = uart_ev_enable_read();
} }
misoc_restoreuartint(dev, 0); misoc_restoreuartint(dev, 0);
} }
@@ -297,14 +297,15 @@ static void misoc_shutdown(struct uart_dev_s *dev)
* Name: misoc_attach * Name: misoc_attach
* *
* Description: * Description:
* Configure the UART to operation in interrupt driven mode. This method is * Configure the UART to operation in interrupt driven mode. This method
* called when the serial port is opened. Normally, this is just after the * 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 * the setup() method is called, however, the serial console may operate in
* a non-interrupt driven mode during the boot phase. * a non-interrupt driven mode during the boot phase.
* *
* RX and TX interrupts are not enabled by the attach method (unless the * RX and TX interrupts are not enabled by the attach method (unless the
* hardware supports multiple levels of interrupt enabling). The RX and TX * 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: * Description:
* Detach UART interrupts. This method is called when the serial port is * Detach UART interrupts. This method is called when the serial port is
* closed normally just before the shutdown method is called. The exception * closed normally just before the shutdown method is called.
* is the serial console which is never shutdown. * 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; struct uart_dev_s *dev = (struct uart_dev_s *)&CONSOLE_DEV;
uint8_t imr; uint8_t imr;
misoc_disableuartint(dev, &imr); misoc_disableuartint(dev, &imr);
/* Check for LF */ /* Check for LF */
@@ -659,6 +660,7 @@ void misoc_serial_initialize(void)
#endif #endif
/* Register all UARTs */ /* Register all UARTs */
uart_register("/dev/ttyS0", &TTYS0_DEV); uart_register("/dev/ttyS0", &TTYS0_DEV);
#endif #endif
} }
+1 -1
View File
@@ -122,7 +122,7 @@ void up_timer_initialize(void)
timer0_ev_pending_write(timer0_ev_pending_read()); timer0_ev_pending_write(timer0_ev_pending_read());
/* Disable timer*/ /* Disable timer */
timer0_en_write(0); timer0_en_write(0);
+1 -3
View File
@@ -37,7 +37,7 @@
#define __ARCH_MISOC_SRC_LM32_CHIP_H #define __ARCH_MISOC_SRC_LM32_CHIP_H
/**************************************************************************** /****************************************************************************
* Inline Functions * Included Files
****************************************************************************/ ****************************************************************************/
#include "lm32.h" #include "lm32.h"
@@ -65,7 +65,6 @@ static inline void irq_setie(unsigned int ie)
static inline unsigned int irq_getmask(void) static inline unsigned int irq_getmask(void)
{ {
unsigned int mask; unsigned int mask;
__asm__ __volatile__("rcsr %0, IM" : "=r" (mask)); __asm__ __volatile__("rcsr %0, IM" : "=r" (mask));
return mask; return mask;
@@ -78,7 +77,6 @@ static inline void irq_setmask(unsigned int mask)
static inline unsigned int irq_pending(void) static inline unsigned int irq_pending(void)
{ {
unsigned int pending; unsigned int pending;
__asm__ __volatile__("rcsr %0, IP" : "=r" (pending)); __asm__ __volatile__("rcsr %0, IP" : "=r" (pending));
return pending; return pending;
+2 -2
View File
@@ -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); void lm32_board_initialize(void);
+2 -1
View File
@@ -53,6 +53,7 @@
/************************************************************************************ /************************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
************************************************************************************/ ************************************************************************************/
/* UARTs ****************************************************************************/ /* UARTs ****************************************************************************/
/* Are any UARTs enabled? */ /* Are any UARTs enabled? */
@@ -91,7 +92,7 @@
************************************************************************************/ ************************************************************************************/
/************************************************************************************ /************************************************************************************
* Public Functions * Public Functions Prototypes
************************************************************************************/ ************************************************************************************/
#endif /* __ARCH_MISOC_SRC_LM32_LM32_CONFIG_H */ #endif /* __ARCH_MISOC_SRC_LM32_LM32_CONFIG_H */
+7 -6
View File
@@ -1,4 +1,4 @@
/******************************************************************************** /****************************************************************************
* arch/misoc/src/lm32/lm32_decodeirq.c * arch/misoc/src/lm32/lm32_decodeirq.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,11 +16,11 @@
* License for the specific language governing permissions and limitations * License for the specific language governing permissions and limitations
* under the License. * under the License.
* *
********************************************************************************/ ****************************************************************************/
/******************************************************************************** /****************************************************************************
* Included Files * Included Files
********************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -32,9 +32,9 @@
#include "chip.h" #include "chip.h"
#include "lm32.h" #include "lm32.h"
/******************************************************************************** /****************************************************************************
* Public Functions * Public Functions
********************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Name: lm32_decodeirq * Name: lm32_decodeirq
@@ -68,6 +68,7 @@ uint32_t *lm32_decodeirq(uint32_t intstat, uint32_t *regs)
if ((intstat & bit) != 0) if ((intstat & bit) != 0)
{ {
/* Yes.. Dispatch the interrupt */ /* Yes.. Dispatch the interrupt */
/* REVIST: Do I need to acknowledge the interrupt first? */ /* REVIST: Do I need to acknowledge the interrupt first? */
irqinfo("irq=%d\n", irq); irqinfo("irq=%d\n", irq);
+2 -2
View File
@@ -71,8 +71,8 @@ uint32_t *lm32_doirq(int irq, uint32_t *regs)
DEBUGASSERT(g_current_regs == NULL); DEBUGASSERT(g_current_regs == NULL);
g_current_regs = regs; g_current_regs = regs;
/* Disable further occurrences of this interrupt (until the interrupt sources /* Disable further occurrences of this interrupt (until the interrupt
* have been clear by the driver). * sources have been clear by the driver).
*/ */
up_disable_irq(irq); up_disable_irq(irq);
+1 -1
View File
@@ -60,7 +60,7 @@
#include "lm32.h" #include "lm32.h"
/**************************************************************************** /****************************************************************************
* Public Functionis * Public Functions
****************************************************************************/ ****************************************************************************/
void up_initialize(void) void up_initialize(void)
+1 -1
View File
@@ -37,7 +37,7 @@
#define __ARCH_MISOC_SRC_MINERVA_CHIP_H #define __ARCH_MISOC_SRC_MINERVA_CHIP_H
/**************************************************************************** /****************************************************************************
* Inline Functions * Included Files
****************************************************************************/ ****************************************************************************/
#include "minerva.h" #include "minerva.h"
+2 -2
View File
@@ -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); void minerva_board_initialize(void);
+2 -1
View File
@@ -40,7 +40,8 @@
* Name: minerva_decodeirq * Name: minerva_decodeirq
* *
* Description: * 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 * At this point, the interrupt has been taken and the registers have
* been saved on the stack. This function simply needs to determine the * 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 * the irq number of the interrupt and then to call minerva_doirq to
+2 -2
View File
@@ -110,8 +110,8 @@ uint32_t *minerva_doirq(int irq, uint32_t * regs)
/* If a context switch occurred while processing the interrupt then /* If a context switch occurred while processing the interrupt then
* g_current_regs may have change value. If we return any value different * 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 * from the input regs, then the lower level will know that a context
* occurred during interrupt processing. * switch occurred during interrupt processing.
*/ */
regs = (uint32_t *) g_current_regs; regs = (uint32_t *) g_current_regs;
+1 -1
View File
@@ -60,7 +60,7 @@
#include "minerva.h" #include "minerva.h"
/**************************************************************************** /****************************************************************************
* Public Functionis * Public Functions
****************************************************************************/ ****************************************************************************/
void up_initialize(void) void up_initialize(void)