arch/arm/src/imxrt: Fix some errors in the LPUART register defintion files. Correct naming of a function: up_earlyserialinit() should be imxrt_earlyserialinit(). Remove prototypes for non-existent serial initialization functions.

This commit is contained in:
Gregory Nutt
2019-08-13 14:59:59 -06:00
parent ce90390146
commit cd49e6fbd7
4 changed files with 9 additions and 33 deletions
+4 -1
View File
@@ -340,7 +340,9 @@
# define LPUART_MODIR_TXCTSSRC_CTSB (0 << 5) /* Bit nn: CTS input is CTS_B pin */ # define LPUART_MODIR_TXCTSSRC_CTSB (0 << 5) /* Bit nn: CTS input is CTS_B pin */
# define LPUART_MODIR_TXCTSSRC_RXMAT (1 << 5) /* Bit nn: Transmit CTS Source */ # define LPUART_MODIR_TXCTSSRC_RXMAT (1 << 5) /* Bit nn: Transmit CTS Source */
/* Bits 6-7: Reserved */ /* Bits 6-7: Reserved */
#define LPUART_MODIR_RTSWATER (8) /* Bits 8-9: Receive RTS Configuration */ #define LPUART_MODIR_RTSWATER_SHIFT (8) /* Bits 8-9: Receive RTS Configuration */
#define LPUART_MODIR_RTSWATER_MASK (3 << LPUART_MODIR_RTSWATER_SHIFT)
# define LPUART_MODIR_RTSWATER(n) ((uint32_t)(n) << LPUART_MODIR_RTSWATER_SHIFT)
/* Bits 10-15: Reserved */ /* Bits 10-15: Reserved */
#define LPUART_MODIR_TNP_SHIFT (16) /* Bits 16-17: Transmitter narrow pulse */ #define LPUART_MODIR_TNP_SHIFT (16) /* Bits 16-17: Transmitter narrow pulse */
#define LPUART_MODIR_TNP_MASK (3 << LPUART_MODIR_TNP_SHIFT) #define LPUART_MODIR_TNP_MASK (3 << LPUART_MODIR_TNP_SHIFT)
@@ -360,6 +362,7 @@
# define LPUART_FIFO_RXFIFOSIZE_64 (5 << LPUART_FIFO_RXFIFOSIZE_SHIFT) /* 64 datawords */ # define LPUART_FIFO_RXFIFOSIZE_64 (5 << LPUART_FIFO_RXFIFOSIZE_SHIFT) /* 64 datawords */
# define LPUART_FIFO_RXFIFOSIZE_128 (6 << LPUART_FIFO_RXFIFOSIZE_SHIFT) /* 128 datawords */ # define LPUART_FIFO_RXFIFOSIZE_128 (6 << LPUART_FIFO_RXFIFOSIZE_SHIFT) /* 128 datawords */
# define LPUART_FIFO_RXFIFOSIZE_256 (7 << LPUART_FIFO_RXFIFOSIZE_SHIFT) /* 256 datawords */ # define LPUART_FIFO_RXFIFOSIZE_256 (7 << LPUART_FIFO_RXFIFOSIZE_SHIFT) /* 256 datawords */
#define LPUART_FIFO_RXFE (1 << 3) /* Bit 3: Receive FIFO Enable */
#define LPUART_FIFO_TXFIFOSIZE_SHIFT (4) /* Bits 4-6: Transmit FIFO. Buffer Depth */ #define LPUART_FIFO_TXFIFOSIZE_SHIFT (4) /* Bits 4-6: Transmit FIFO. Buffer Depth */
#define LPUART_FIFO_TXFIFOSIZE_MASK (7 << LPUART_FIFO_TXFIFOSIZE_SHIFT) #define LPUART_FIFO_TXFIFOSIZE_MASK (7 << LPUART_FIFO_TXFIFOSIZE_SHIFT)
# define LPUART_FIFO_TXFIFOSIZE_1 (0 << LPUART_FIFO_TXFIFOSIZE_SHIFT) /* 1 datawords */ # define LPUART_FIFO_TXFIFOSIZE_1 (0 << LPUART_FIFO_TXFIFOSIZE_SHIFT) /* 1 datawords */
+1 -1
View File
@@ -1643,7 +1643,7 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain,
* *
****************************************************************************/ ****************************************************************************/
void up_earlyserialinit(void) void imxrt_earlyserialinit(void)
{ {
/* NOTE: This function assumes that low level hardware configuration /* NOTE: This function assumes that low level hardware configuration
* -- including all clocking and pin configuration -- was performed by the * -- including all clocking and pin configuration -- was performed by the
+3 -30
View File
@@ -33,8 +33,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_ARM_SRC_IMXRT_IMX_SERIAL_H #ifndef __ARCH_ARM_SRC_IMXRT_IMXRT_SERIAL_H
#define __ARCH_ARM_SRC_IMXRT_IMX_SERIAL_H #define __ARCH_ARM_SRC_IMXRT_IMXRT_SERIAL_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@@ -90,37 +90,10 @@ extern "C"
void imxrt_earlyserialinit(void); void imxrt_earlyserialinit(void);
#endif #endif
/****************************************************************************
* Name: uart_earlyserialinit
*
* Description:
* Performs the low level UART initialization early in debug so that the
* serial console will be available during bootup. This must be called
* before up_serialinit.
*
****************************************************************************/
#if defined(USE_EARLYSERIALINIT) && defined(IMXRT_HAVE_LPUART)
void uart_earlyserialinit(void);
#endif
/****************************************************************************
* Name: uart_serialinit
*
* Description:
* Register the UART serial console and serial ports. This assumes that
* uart_earlyserialinit was called previously.
*
****************************************************************************/
#ifdef IMXRT_HAVE_LPUART
void uart_serialinit(void);
#endif
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __ARCH_ARM_SRC_IMXRT_IMX_SERIAL_H */ #endif /* __ARCH_ARM_SRC_IMXRT_IMXRT_SERIAL_H */
+1 -1
View File
@@ -381,7 +381,7 @@ void __start(void)
/* Perform early serial initialization */ /* Perform early serial initialization */
#ifdef USE_EARLYSERIALINIT #ifdef USE_EARLYSERIALINIT
up_earlyserialinit(); imxrt_earlyserialinit();
#endif #endif
/* Then start NuttX */ /* Then start NuttX */