git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
drivers
/
serial
/
cpm_uart
/
cpm_uart_cpm1.c
diff --git
a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
index
7c940b5
..
a9ab047
100644
(file)
--- a/
drivers/serial/cpm_uart/cpm_uart_cpm1.c
+++ b/
drivers/serial/cpm_uart/cpm_uart_cpm1.c
@@
-130,20
+130,20
@@
int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
{
int dpmemsz, memsz;
u8 *dp_mem;
{
int dpmemsz, memsz;
u8 *dp_mem;
- uint dp_
addr
;
+ uint dp_
offset
;
u8 *mem_addr;
u8 *mem_addr;
- dma_addr_t dma_addr;
+ dma_addr_t dma_addr
= 0
;
pr_debug("CPM uart[%d]:allocbuf\n", pinfo->port.line);
dpmemsz = sizeof(cbd_t) * (pinfo->rx_nrfifos + pinfo->tx_nrfifos);
pr_debug("CPM uart[%d]:allocbuf\n", pinfo->port.line);
dpmemsz = sizeof(cbd_t) * (pinfo->rx_nrfifos + pinfo->tx_nrfifos);
- dp_
mem = m8xx_cpm_dpalloc(dpmemsz
);
- if (
dp_mem == NULL
) {
+ dp_
offset = cpm_dpalloc(dpmemsz, 8
);
+ if (
IS_DPERR(dp_offset)
) {
printk(KERN_ERR
"cpm_uart_cpm1.c: could not allocate buffer descriptors\n");
return -ENOMEM;
}
printk(KERN_ERR
"cpm_uart_cpm1.c: could not allocate buffer descriptors\n");
return -ENOMEM;
}
- dp_
addr = m8xx_cpm_dpram_offset(dp_mem
);
+ dp_
mem = cpm_dpram_addr(dp_offset
);
memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) +
L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) +
L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
@@
-155,13
+155,13
@@
int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
GFP_KERNEL);
if (mem_addr == NULL) {
GFP_KERNEL);
if (mem_addr == NULL) {
-
m8xx_cpm_dpfree(dp_mem
);
+
cpm_dpfree(dp_offset
);
printk(KERN_ERR
"cpm_uart_cpm1.c: could not allocate coherent memory\n");
return -ENOMEM;
}
printk(KERN_ERR
"cpm_uart_cpm1.c: could not allocate coherent memory\n");
return -ENOMEM;
}
- pinfo->dp_addr = dp_
addr
;
+ pinfo->dp_addr = dp_
offset
;
pinfo->mem_addr = mem_addr;
pinfo->dma_addr = dma_addr;
pinfo->mem_addr = mem_addr;
pinfo->dma_addr = dma_addr;
@@
-183,7
+183,7
@@
void cpm_uart_freebuf(struct uart_cpm_port *pinfo)
pinfo->tx_fifosize), pinfo->mem_addr,
pinfo->dma_addr);
pinfo->tx_fifosize), pinfo->mem_addr,
pinfo->dma_addr);
-
m8xx_cpm_dpfree(m8xx_cpm_dpram_addr(pinfo->dp_addr)
);
+
cpm_dpfree(pinfo->dp_addr
);
}
/* Setup any dynamic params in the uart desc */
}
/* Setup any dynamic params in the uart desc */