i.MX6: Bring i.MX1 serial driver into i.MX6. Basically the same IP but does not yet compile due to some small differences, missign GPIO configuration logic, and missing clocking logic
This commit is contained in:
parent
bff9eaab1e
commit
16e93f5d41
@ -80,19 +80,19 @@
|
||||
|
||||
struct up_dev_s
|
||||
{
|
||||
uint32_t uartbase; /* Base address of UART registers */
|
||||
uint32_t baud; /* Configured baud */
|
||||
uint32_t ucr1; /* Saved UCR1 value */
|
||||
uint32_t uartbase; /* Base address of UART registers */
|
||||
uint32_t baud; /* Configured baud */
|
||||
uint32_t ucr1; /* Saved UCR1 value */
|
||||
#if defined(CONFIG_ARCH_CHIP_IMX1) || defined(CONFIG_ARCH_CHIP_IMXL)
|
||||
uint8_t rxirq; /* Rx IRQ associated with this UART */
|
||||
uint8_t txirq; /* Tx IRQ associated with this UART */
|
||||
uint8_t rxirq; /* Rx IRQ associated with this UART */
|
||||
uint8_t txirq; /* Tx IRQ associated with this UART */
|
||||
#else
|
||||
uint8_t irq; /* IRQ associated with this UART */
|
||||
uint8_t irq; /* IRQ associated with this UART */
|
||||
#endif
|
||||
uint8_t parity; /* 0=none, 1=odd, 2=even */
|
||||
uint8_t bits; /* Number of bits (7 or 8) */
|
||||
uint8_t stopbits2:1; /* 1: Configure with 2 stop bits vs 1 */
|
||||
uint8_t hwfc:1; /* 1: Hardware flow control */
|
||||
uint8_t parity; /* 0=none, 1=odd, 2=even */
|
||||
uint8_t bits; /* Number of bits (7 or 8) */
|
||||
uint8_t stopbits2:1; /* 1: Configure with 2 stop bits vs 1 */
|
||||
uint8_t hwfc:1; /* 1: Hardware flow control */
|
||||
uint8_t reserved:6;
|
||||
};
|
||||
|
||||
@ -157,8 +157,8 @@ static char g_uart2txbuffer[CONFIG_UART2_TXBUFSIZE];
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX1_UART3
|
||||
static char g_uart3rxbuffer[CONFIG_UART2_RXBUFSIZE];
|
||||
static char g_uart3txbuffer[CONFIG_UART2_TXBUFSIZE];
|
||||
static char g_uart3rxbuffer[CONFIG_UART3_RXBUFSIZE];
|
||||
static char g_uart3txbuffer[CONFIG_UART3_TXBUFSIZE];
|
||||
#endif
|
||||
|
||||
/* This describes the state of the IMX uart1 port. */
|
||||
@ -179,7 +179,7 @@ static struct up_dev_s g_uart1priv =
|
||||
.stopbits2 = CONFIG_UART1_2STOP,
|
||||
};
|
||||
|
||||
static uart_dev_t g_uart1port =
|
||||
static struct uart_dev_s g_uart1port =
|
||||
{
|
||||
.recv =
|
||||
{
|
||||
@ -214,7 +214,7 @@ static struct up_dev_s g_uart2priv =
|
||||
.stopbits2 = CONFIG_UART2_2STOP,
|
||||
};
|
||||
|
||||
static uart_dev_t g_uart2port =
|
||||
static struct uart_dev_s g_uart2port =
|
||||
{
|
||||
.recv =
|
||||
{
|
||||
@ -247,7 +247,7 @@ static struct up_dev_s g_uart3priv =
|
||||
.stopbits2 = CONFIG_UART3_2STOP,
|
||||
};
|
||||
|
||||
static uart_dev_t g_uart3port =
|
||||
static struct uart_dev_s g_uart3port =
|
||||
{
|
||||
.recv =
|
||||
{
|
||||
|
@ -132,4 +132,4 @@ CHIP_ASRCS =
|
||||
|
||||
# i.MX6-specific C source files
|
||||
|
||||
CHIP_CSRCS = imx_boot.c imx_memorymap.c imx_irq.c
|
||||
CHIP_CSRCS = imx_boot.c imx_memorymap.c imx_irq.c # imx_serial.c
|
||||
|
1305
arch/arm/src/imx6/imx_serial.c
Normal file
1305
arch/arm/src/imx6/imx_serial.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user