|
沙发
楼主 |
发表于 2020-2-19 13:53:34
|
只看该作者
static const struct imxuart_platform_data uart0_data __initconst = {
.flags = IMXUART_HAVE_RTSCTS | IMXUART_USE_DCEDTE | IMXUART_SDMA,
.dma_req_rx = MX6Q_DMA_REQ_UART1_RX,
.dma_req_tx = MX6Q_DMA_REQ_UART1_TX,
.dir_set=mxc_rs485_dir_set,
};
static const struct imxuart_platform_data uart1_data __initconst = {
.flags = IMXUART_HAVE_RTSCTS | IMXUART_USE_DCEDTE | IMXUART_SDMA,
.dma_req_rx = MX6Q_DMA_REQ_UART2_RX,
.dma_req_tx = MX6Q_DMA_REQ_UART2_TX,
.dir_set=mxc_rs485_dir_set,
};
static const struct imxuart_platform_data uart2_data __initconst = {
.flags = IMXUART_HAVE_RTSCTS | IMXUART_USE_DCEDTE | IMXUART_SDMA,
.dma_req_rx = MX6Q_DMA_REQ_UART3_RX,
.dma_req_tx = MX6Q_DMA_REQ_UART3_TX,
.dir_set=mxc_rs485_dir_set,
};
static const struct imxuart_platform_data uart3_data __initconst = {
.flags = IMXUART_HAVE_RTSCTS | IMXUART_USE_DCEDTE | IMXUART_SDMA,
.dma_req_rx = MX6Q_DMA_REQ_UART4_RX,
.dma_req_tx = MX6Q_DMA_REQ_UART4_TX,
.dir_set=mxc_rs485_dir_set,
};
static const struct imxuart_platform_data uart4_data __initconst = {
.flags = IMXUART_HAVE_RTSCTS | IMXUART_USE_DCEDTE | IMXUART_SDMA,
.dma_req_rx = MX6Q_DMA_REQ_UART5_RX,
.dma_req_tx = MX6Q_DMA_REQ_UART5_TX,
.dir_set=mxc_rs485_dir_set,
};
static inline void mx6q_sabresd_init_uart(void)
{
imx6q_add_imx_uart(0, &uart0_data);
imx6q_add_imx_uart(1, &uart1_data);
imx6q_add_imx_uart(2, &uart2_data);
imx6q_add_imx_uart(3, &uart3_data);
imx6q_add_imx_uart(4, &uart4_data);
}
我是这么加的,但是内核在初始化串口的时候卡住了 |
|