aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-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
-rw-r--r--drivers/serial/ucc_uart.c4
4 files changed, 11 insertions, 8 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);
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c
index 5c5d18dcb6ac..539c933b335f 100644
--- a/drivers/serial/ucc_uart.c
+++ b/drivers/serial/ucc_uart.c
@@ -1009,7 +1009,7 @@ static int qe_uart_request_port(struct uart_port *port)
1009 rx_size = L1_CACHE_ALIGN(qe_port->rx_nrfifos * qe_port->rx_fifosize); 1009 rx_size = L1_CACHE_ALIGN(qe_port->rx_nrfifos * qe_port->rx_fifosize);
1010 tx_size = L1_CACHE_ALIGN(qe_port->tx_nrfifos * qe_port->tx_fifosize); 1010 tx_size = L1_CACHE_ALIGN(qe_port->tx_nrfifos * qe_port->tx_fifosize);
1011 1011
1012 bd_virt = dma_alloc_coherent(NULL, rx_size + tx_size, &bd_dma_addr, 1012 bd_virt = dma_alloc_coherent(port->dev, rx_size + tx_size, &bd_dma_addr,
1013 GFP_KERNEL); 1013 GFP_KERNEL);
1014 if (!bd_virt) { 1014 if (!bd_virt) {
1015 dev_err(port->dev, "could not allocate buffer descriptors\n"); 1015 dev_err(port->dev, "could not allocate buffer descriptors\n");
@@ -1051,7 +1051,7 @@ static void qe_uart_release_port(struct uart_port *port)
1051 container_of(port, struct uart_qe_port, port); 1051 container_of(port, struct uart_qe_port, port);
1052 struct ucc_slow_private *uccs = qe_port->us_private; 1052 struct ucc_slow_private *uccs = qe_port->us_private;
1053 1053
1054 dma_free_coherent(NULL, qe_port->bd_size, qe_port->bd_virt, 1054 dma_free_coherent(port->dev, qe_port->bd_size, qe_port->bd_virt,
1055 qe_port->bd_dma_addr); 1055 qe_port->bd_dma_addr);
1056 1056
1057 ucc_slow_free(uccs); 1057 ucc_slow_free(uccs);