Lines Matching full:up
49 static void bcm2835aux_rs485_start_tx(struct uart_8250_port *up) in bcm2835aux_rs485_start_tx() argument
51 if (!(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) { in bcm2835aux_rs485_start_tx()
52 struct bcm2835aux_data *data = dev_get_drvdata(up->port.dev); in bcm2835aux_rs485_start_tx()
55 serial_out(up, BCM2835_AUX_UART_CNTL, data->cntl); in bcm2835aux_rs485_start_tx()
62 if (up->port.rs485.flags & SER_RS485_RTS_ON_SEND) in bcm2835aux_rs485_start_tx()
63 serial8250_out_MCR(up, 0); in bcm2835aux_rs485_start_tx()
65 serial8250_out_MCR(up, UART_MCR_RTS); in bcm2835aux_rs485_start_tx()
68 static void bcm2835aux_rs485_stop_tx(struct uart_8250_port *up) in bcm2835aux_rs485_stop_tx() argument
70 if (up->port.rs485.flags & SER_RS485_RTS_AFTER_SEND) in bcm2835aux_rs485_stop_tx()
71 serial8250_out_MCR(up, 0); in bcm2835aux_rs485_stop_tx()
73 serial8250_out_MCR(up, UART_MCR_RTS); in bcm2835aux_rs485_stop_tx()
75 if (!(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) { in bcm2835aux_rs485_stop_tx()
76 struct bcm2835aux_data *data = dev_get_drvdata(up->port.dev); in bcm2835aux_rs485_stop_tx()
79 serial_out(up, BCM2835_AUX_UART_CNTL, data->cntl); in bcm2835aux_rs485_stop_tx()
86 struct uart_8250_port up = { }; in bcm2835aux_serial_probe() local
98 up.capabilities = UART_CAP_FIFO | UART_CAP_MINI; in bcm2835aux_serial_probe()
99 up.port.dev = &pdev->dev; in bcm2835aux_serial_probe()
100 up.port.type = PORT_16550; in bcm2835aux_serial_probe()
101 up.port.flags = UPF_FIXED_PORT | UPF_FIXED_TYPE | UPF_SKIP_TEST | UPF_IOREMAP; in bcm2835aux_serial_probe()
102 up.port.rs485_config = serial8250_em485_config; in bcm2835aux_serial_probe()
103 up.port.rs485_supported = serial8250_em485_supported; in bcm2835aux_serial_probe()
104 up.rs485_start_tx = bcm2835aux_rs485_start_tx; in bcm2835aux_serial_probe()
105 up.rs485_stop_tx = bcm2835aux_rs485_stop_tx; in bcm2835aux_serial_probe()
124 up.port.mapbase = res->start; in bcm2835aux_serial_probe()
125 up.port.mapsize = resource_size(res); in bcm2835aux_serial_probe()
134 ret = uart_read_port_properties(&up.port); in bcm2835aux_serial_probe()
138 up.port.regshift = 2; in bcm2835aux_serial_probe()
139 up.port.fifosize = 8; in bcm2835aux_serial_probe()
150 up.port.uartclk = uartclk; in bcm2835aux_serial_probe()
157 up.port.uartclk *= 2; in bcm2835aux_serial_probe()
160 ret = serial8250_register_8250_port(&up); in bcm2835aux_serial_probe()
220 struct uart_8250_port *up = serial8250_get_port(data->line); in bcm2835aux_can_disable_clock() local
225 if (uart_console(&up->port) && !console_suspend_enabled) in bcm2835aux_can_disable_clock()