Lines Matching refs:up
52 static void bcm2835aux_rs485_start_tx(struct uart_8250_port *up) in bcm2835aux_rs485_start_tx() argument
54 if (!(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) { in bcm2835aux_rs485_start_tx()
55 struct bcm2835aux_data *data = dev_get_drvdata(up->port.dev); in bcm2835aux_rs485_start_tx()
58 serial_out(up, BCM2835_AUX_UART_CNTL, data->cntl); in bcm2835aux_rs485_start_tx()
65 if (up->port.rs485.flags & SER_RS485_RTS_ON_SEND) in bcm2835aux_rs485_start_tx()
66 serial8250_out_MCR(up, 0); in bcm2835aux_rs485_start_tx()
68 serial8250_out_MCR(up, UART_MCR_RTS); in bcm2835aux_rs485_start_tx()
71 static void bcm2835aux_rs485_stop_tx(struct uart_8250_port *up) in bcm2835aux_rs485_stop_tx() argument
73 if (up->port.rs485.flags & SER_RS485_RTS_AFTER_SEND) in bcm2835aux_rs485_stop_tx()
74 serial8250_out_MCR(up, 0); in bcm2835aux_rs485_stop_tx()
76 serial8250_out_MCR(up, UART_MCR_RTS); in bcm2835aux_rs485_stop_tx()
78 if (!(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) { in bcm2835aux_rs485_stop_tx()
79 struct bcm2835aux_data *data = dev_get_drvdata(up->port.dev); in bcm2835aux_rs485_stop_tx()
82 serial_out(up, BCM2835_AUX_UART_CNTL, data->cntl); in bcm2835aux_rs485_stop_tx()
89 struct uart_8250_port up = { }; in bcm2835aux_serial_probe() local
102 up.capabilities = UART_CAP_FIFO | UART_CAP_MINI; in bcm2835aux_serial_probe()
103 up.port.dev = &pdev->dev; in bcm2835aux_serial_probe()
104 up.port.regshift = 2; in bcm2835aux_serial_probe()
105 up.port.type = PORT_16550; in bcm2835aux_serial_probe()
106 up.port.iotype = UPIO_MEM; in bcm2835aux_serial_probe()
107 up.port.fifosize = 8; in bcm2835aux_serial_probe()
108 up.port.flags = UPF_SHARE_IRQ | UPF_FIXED_PORT | UPF_FIXED_TYPE | in bcm2835aux_serial_probe()
110 up.port.rs485_config = serial8250_em485_config; in bcm2835aux_serial_probe()
111 up.port.rs485_supported = serial8250_em485_supported; in bcm2835aux_serial_probe()
112 up.rs485_start_tx = bcm2835aux_rs485_start_tx; in bcm2835aux_serial_probe()
113 up.rs485_stop_tx = bcm2835aux_rs485_stop_tx; in bcm2835aux_serial_probe()
127 up.port.irq = ret; in bcm2835aux_serial_probe()
151 up.port.mapbase = res->start + offset; in bcm2835aux_serial_probe()
152 up.port.mapsize = resource_size(res) - offset; in bcm2835aux_serial_probe()
157 up.port.line = ret; in bcm2835aux_serial_probe()
181 up.port.uartclk = uartclk * 2; in bcm2835aux_serial_probe()
184 ret = serial8250_register_8250_port(&up); in bcm2835aux_serial_probe()