[PATCH] ppc32 CPM_UART: various fixes for pq2 uart users
This fixes various odd things that missed update together with cpm_uart platform_device move. Unified resources names, restructurisation, etc. Also, addressed issue with recent phys/virt translation rework. Being cache-coherent, CPM2's do alloc_bootmem() for the console stuff, and it was used to treat console buffer descriptor mapping 1:1 (as in CPM1 case), which is definitely wrong. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
committed by
Paul Mackerras
parent
6d923f98fe
commit
8e30a9a299
@@ -1164,14 +1164,16 @@ static int __init cpm_uart_console_setup(struct console *co, char *options)
|
||||
struct fs_uart_platform_info *pdata;
|
||||
struct platform_device* pdev = early_uart_get_pdev(co->index);
|
||||
|
||||
port =
|
||||
(struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]];
|
||||
pinfo = (struct uart_cpm_port *)port;
|
||||
if (!pdev) {
|
||||
pr_info("cpm_uart: console: compat mode\n");
|
||||
/* compatibility - will be cleaned up */
|
||||
cpm_uart_init_portdesc();
|
||||
}
|
||||
|
||||
port =
|
||||
(struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]];
|
||||
pinfo = (struct uart_cpm_port *)port;
|
||||
if (!pdev) {
|
||||
if (pinfo->set_lineif)
|
||||
pinfo->set_lineif(pinfo);
|
||||
} else {
|
||||
|
@@ -213,7 +213,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
|
||||
L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
|
||||
if (is_con) {
|
||||
mem_addr = alloc_bootmem(memsz);
|
||||
dma_addr = mem_addr;
|
||||
dma_addr = virt_to_bus(mem_addr);
|
||||
}
|
||||
else
|
||||
mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr,
|
||||
|
Reference in New Issue
Block a user