]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00169388-3 IMX/UART : fix the compiling error
authorHuang Shijie <b32955@freescale.com>
Mon, 5 Dec 2011 05:54:37 +0000 (13:54 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:10:12 +0000 (14:10 +0200)
use the platformdata to fix the compiling error.

We save the DMA RX/TX request numbers in the platformdata.

Signed-off-by: Huang Shijie <b32955@freescale.com>
drivers/tty/serial/imx.c

index e484c82b6de99bea2fd6eb49284a8516327d81af..d589ee0c60441119268ac1e23d4fc6a8d6bc1d6e 100644 (file)
@@ -824,6 +824,7 @@ static void imx_uart_dma_exit(struct imx_port *sport)
 /* see the "i.MX61 SDMA Scripts User Manual.doc" for the parameters */
 static int imx_uart_dma_init(struct imx_port *sport)
 {
+       struct imxuart_platform_data *pdata = sport->port.dev->platform_data;
        struct dma_slave_config slave_config;
        dma_cap_mask_t mask;
        int ret;
@@ -833,7 +834,7 @@ static int imx_uart_dma_init(struct imx_port *sport)
        dma_cap_set(DMA_SLAVE, mask);
 
        sport->dma_data.priority = DMA_PRIO_HIGH;
-       sport->dma_data.dma_request = MX6Q_DMA_REQ_UART2_RX;
+       sport->dma_data.dma_request = pdata->dma_req_rx;
        sport->dma_data.peripheral_type = IMX_DMATYPE_UART;
 
        sport->dma_chan_rx = dma_request_channel(mask, imx_uart_filter, sport);
@@ -862,7 +863,7 @@ static int imx_uart_dma_init(struct imx_port *sport)
        sport->rx_bytes = 0;
 
        /* prepare for TX : */
-       sport->dma_data.dma_request = MX6Q_DMA_REQ_UART2_TX;
+       sport->dma_data.dma_request = pdata->dma_req_tx;
        sport->dma_chan_tx = dma_request_channel(mask, imx_uart_filter, sport);
        if (!sport->dma_chan_tx) {
                pr_err("cannot get the TX DMA channel!\n");