mirror of
https://github.com/sjlongland/adv950.git
synced 2025-09-13 10:43:14 +10:00
adv950_base: Call serial_core
functions.
This commit is contained in:
parent
fb809f752c
commit
d230e784fe
@ -1603,7 +1603,7 @@ static void transmit_chars(struct uart_adv950_port *up)
|
||||
}
|
||||
|
||||
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
|
||||
adv950_uart_write_wakeup(&up->port);
|
||||
uart_write_wakeup(&up->port);
|
||||
|
||||
DEBUG_INTR("THRE...");
|
||||
|
||||
@ -2904,7 +2904,7 @@ static void __init adv950_register_ports(struct uart_driver *drv)
|
||||
up->mcr_mask = ~ALPHA_KLUDGE_MCR;
|
||||
up->mcr_force = ALPHA_KLUDGE_MCR;
|
||||
|
||||
adv950_uart_add_one_port(drv, &up->port);
|
||||
uart_add_one_port(drv, &up->port);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2972,7 +2972,7 @@ int __init early_serial_setup(struct uart_port *port)
|
||||
*/
|
||||
void adv950_suspend_port(int line)
|
||||
{
|
||||
adv950_uart_suspend_port(&adv950_reg, &adv950_ports[line].port);
|
||||
uart_suspend_port(&adv950_reg, &adv950_ports[line].port);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2994,7 +2994,7 @@ void adv950_resume_port(int line)
|
||||
serial_outp(up, UART_LCR, 0);
|
||||
up->port.uartclk = 921600*16;
|
||||
}
|
||||
adv950_uart_resume_port(&adv950_reg, &up->port);
|
||||
uart_resume_port(&adv950_reg, &up->port);
|
||||
}
|
||||
|
||||
|
||||
@ -3020,7 +3020,7 @@ static struct uart_adv950_port *adv950_find_match_or_unused(struct uart_port *po
|
||||
* First, find a port entry which matches.
|
||||
*/
|
||||
for (i = 0; i < nr_uarts; i++)
|
||||
if (adv950_uart_match_port(&adv950_ports[i].port, port))
|
||||
if (uart_match_port(&adv950_ports[i].port, port))
|
||||
return &adv950_ports[i];
|
||||
|
||||
/*
|
||||
@ -3059,8 +3059,6 @@ static struct uart_adv950_port *adv950_find_match_or_unused(struct uart_port *po
|
||||
*
|
||||
* On success the port is ready to use and the line number is returned.
|
||||
*/
|
||||
extern void adv950_uart_configure_port(struct uart_driver *drv, struct uart_state *state,
|
||||
struct uart_port *port);
|
||||
int adv950_uart_register_port(struct uart_port *port)
|
||||
{
|
||||
struct uart_adv950_port *uart;
|
||||
@ -3073,7 +3071,6 @@ int adv950_uart_register_port(struct uart_port *port)
|
||||
|
||||
uart = adv950_find_match_or_unused(port);
|
||||
if (uart) {
|
||||
|
||||
uart->port.iobase = port->iobase;
|
||||
uart->port.membase = port->membase;
|
||||
uart->port.irq = port->irq;
|
||||
@ -3105,7 +3102,7 @@ int adv950_uart_register_port(struct uart_port *port)
|
||||
uart->port.set_termios = port->set_termios;
|
||||
if (port->pm)
|
||||
uart->port.pm = port->pm;
|
||||
adv950_uart_configure_port(&adv950_reg, uart->port.state, &uart->port);
|
||||
uart_add_one_port(&adv950_reg, &uart->port);
|
||||
//if (ret == 0)
|
||||
ret = uart->port.line;
|
||||
}
|
||||
@ -3127,13 +3124,13 @@ void adv950_uart_unregister_port(int line)
|
||||
struct uart_adv950_port *uart = &adv950_ports[line];
|
||||
|
||||
mutex_lock(&serial_mutex);
|
||||
adv950_uart_remove_one_port(&adv950_reg, &uart->port);
|
||||
uart_remove_one_port(&adv950_reg, &uart->port);
|
||||
if (adv950_isa_devs) {
|
||||
uart->port.flags &= ~UPF_BOOT_AUTOCONF;
|
||||
uart->port.type = PORT_UNKNOWN;
|
||||
uart->port.dev = &adv950_isa_devs->dev;
|
||||
uart->capabilities = uart_config[uart->port.type].flags;
|
||||
adv950_uart_add_one_port(&adv950_reg, &uart->port);
|
||||
uart_add_one_port(&adv950_reg, &uart->port);
|
||||
} else {
|
||||
uart->port.dev = NULL;
|
||||
}
|
||||
@ -3174,7 +3171,7 @@ void __exit adv950_uart_exit(void)
|
||||
{
|
||||
state = ((struct uart_driver*)(&adv950_reg))->state + ((struct uart_port *)(&adv950_ports[i].port))->line;
|
||||
if (state->uart_port != NULL)
|
||||
adv950_uart_remove_one_port(&adv950_reg, &adv950_ports[i].port);
|
||||
uart_remove_one_port(&adv950_reg, &adv950_ports[i].port);
|
||||
}
|
||||
|
||||
uart_unregister_driver(&adv950_reg);
|
||||
|
Loading…
Reference in New Issue
Block a user