aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/cpm_uart
diff options
context:
space:
mode:
authorBecky Bruce <becky.bruce@freescale.com>2008-09-12 11:42:56 -0400
committerKumar Gala <galak@kernel.crashing.org>2008-09-19 14:34:04 -0400
commit8b05cefca73bfbd98c89f16327f5d7da52ab7c3c (patch)
tree41790cff3fbd5baf6395c7e7d55eab46a2c92560 /drivers/serial/cpm_uart
parentb38fd42ff46a4a31dced8533e8a6e549693500b6 (diff)
cpm_uart: Pass actual dev ptr to dma_* in ucc and cpm_uart serial
We're currently passing NULL, and really shouldn't be. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Acked-By: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers/serial/cpm_uart')
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c3
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm1.c6
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm2.c6
3 files changed, 9 insertions, 6 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 25efca5a7a1f..a6c4d744495e 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -1333,6 +1333,9 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev,
1333 if (ret) 1333 if (ret)
1334 return ret; 1334 return ret;
1335 1335
1336 /* initialize the device pointer for the port */
1337 pinfo->port.dev = &ofdev->dev;
1338
1336 return uart_add_one_port(&cpm_reg, &pinfo->port); 1339 return uart_add_one_port(&cpm_reg, &pinfo->port);
1337} 1340}
1338 1341
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
index 0f0aff06c596..1b94c56ec239 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
@@ -100,7 +100,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
100 mem_addr = (u8 *) cpm_dpram_addr(cpm_dpalloc(memsz, 8)); 100 mem_addr = (u8 *) cpm_dpram_addr(cpm_dpalloc(memsz, 8));
101 dma_addr = (u32)cpm_dpram_phys(mem_addr); 101 dma_addr = (u32)cpm_dpram_phys(mem_addr);
102 } else 102 } else
103 mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr, 103 mem_addr = dma_alloc_coherent(pinfo->port.dev, memsz, &dma_addr,
104 GFP_KERNEL); 104 GFP_KERNEL);
105 105
106 if (mem_addr == NULL) { 106 if (mem_addr == NULL) {
@@ -127,8 +127,8 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
127 127
128void cpm_uart_freebuf(struct uart_cpm_port *pinfo) 128void cpm_uart_freebuf(struct uart_cpm_port *pinfo)
129{ 129{
130 dma_free_coherent(NULL, L1_CACHE_ALIGN(pinfo->rx_nrfifos * 130 dma_free_coherent(pinfo->port.dev, L1_CACHE_ALIGN(pinfo->rx_nrfifos *
131 pinfo->rx_fifosize) + 131 pinfo->rx_fifosize) +
132 L1_CACHE_ALIGN(pinfo->tx_nrfifos * 132 L1_CACHE_ALIGN(pinfo->tx_nrfifos *
133 pinfo->tx_fifosize), pinfo->mem_addr, 133 pinfo->tx_fifosize), pinfo->mem_addr,
134 pinfo->dma_addr); 134 pinfo->dma_addr);
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
index b8db4d3eed36..141c0a3333ad 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
@@ -136,7 +136,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
136 dma_addr = virt_to_bus(mem_addr); 136 dma_addr = virt_to_bus(mem_addr);
137 } 137 }
138 else 138 else
139 mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr, 139 mem_addr = dma_alloc_coherent(pinfo->port.dev, memsz, &dma_addr,
140 GFP_KERNEL); 140 GFP_KERNEL);
141 141
142 if (mem_addr == NULL) { 142 if (mem_addr == NULL) {
@@ -163,8 +163,8 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
163 163
164void cpm_uart_freebuf(struct uart_cpm_port *pinfo) 164void cpm_uart_freebuf(struct uart_cpm_port *pinfo)
165{ 165{
166 dma_free_coherent(NULL, L1_CACHE_ALIGN(pinfo->rx_nrfifos * 166 dma_free_coherent(pinfo->port.dev, L1_CACHE_ALIGN(pinfo->rx_nrfifos *
167 pinfo->rx_fifosize) + 167 pinfo->rx_fifosize) +
168 L1_CACHE_ALIGN(pinfo->tx_nrfifos * 168 L1_CACHE_ALIGN(pinfo->tx_nrfifos *
169 pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, 169 pinfo->tx_fifosize), (void __force *)pinfo->mem_addr,
170 pinfo->dma_addr); 170 pinfo->dma_addr);