summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2011-12-05 13:54:37 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 21:09:01 +0800
commit9af3583febf0fe551742fed4c8846cbc915779ae (patch)
treed0abd9a2d707183f27863efcf65e5cf86ce1c9c8 /drivers/tty
parent3db897feff91bd9a4c506c176bcf3c746efb0bb8 (diff)
ENGR00169388-3 IMX/UART : fix the compiling error
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/imx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index e484c82b6de9..d589ee0c6044 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -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");