Lines Matching refs:up
47 static void bcm2835aux_rs485_start_tx(struct uart_8250_port *up) in bcm2835aux_rs485_start_tx() argument
49 if (!(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) { in bcm2835aux_rs485_start_tx()
50 struct bcm2835aux_data *data = dev_get_drvdata(up->port.dev); in bcm2835aux_rs485_start_tx()
53 serial_out(up, BCM2835_AUX_UART_CNTL, data->cntl); in bcm2835aux_rs485_start_tx()
60 if (up->port.rs485.flags & SER_RS485_RTS_ON_SEND) in bcm2835aux_rs485_start_tx()
61 serial8250_out_MCR(up, 0); in bcm2835aux_rs485_start_tx()
63 serial8250_out_MCR(up, UART_MCR_RTS); in bcm2835aux_rs485_start_tx()
66 static void bcm2835aux_rs485_stop_tx(struct uart_8250_port *up) in bcm2835aux_rs485_stop_tx() argument
68 if (up->port.rs485.flags & SER_RS485_RTS_AFTER_SEND) in bcm2835aux_rs485_stop_tx()
69 serial8250_out_MCR(up, 0); in bcm2835aux_rs485_stop_tx()
71 serial8250_out_MCR(up, UART_MCR_RTS); in bcm2835aux_rs485_stop_tx()
73 if (!(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) { in bcm2835aux_rs485_stop_tx()
74 struct bcm2835aux_data *data = dev_get_drvdata(up->port.dev); in bcm2835aux_rs485_stop_tx()
77 serial_out(up, BCM2835_AUX_UART_CNTL, data->cntl); in bcm2835aux_rs485_stop_tx()
83 struct uart_8250_port up = { }; in bcm2835aux_serial_probe() local
94 up.capabilities = UART_CAP_FIFO | UART_CAP_MINI; in bcm2835aux_serial_probe()
95 up.port.dev = &pdev->dev; in bcm2835aux_serial_probe()
96 up.port.regshift = 2; in bcm2835aux_serial_probe()
97 up.port.type = PORT_16550; in bcm2835aux_serial_probe()
98 up.port.iotype = UPIO_MEM; in bcm2835aux_serial_probe()
99 up.port.fifosize = 8; in bcm2835aux_serial_probe()
100 up.port.flags = UPF_SHARE_IRQ | UPF_FIXED_PORT | UPF_FIXED_TYPE | in bcm2835aux_serial_probe()
102 up.port.rs485_config = serial8250_em485_config; in bcm2835aux_serial_probe()
103 up.rs485_start_tx = bcm2835aux_rs485_start_tx; in bcm2835aux_serial_probe()
104 up.rs485_stop_tx = bcm2835aux_rs485_stop_tx; in bcm2835aux_serial_probe()
120 up.port.irq = ret; in bcm2835aux_serial_probe()
128 up.port.mapbase = res->start; in bcm2835aux_serial_probe()
129 up.port.mapsize = resource_size(res); in bcm2835aux_serial_probe()
134 up.port.line = ret; in bcm2835aux_serial_probe()
149 up.port.uartclk = clk_get_rate(data->clk) * 2; in bcm2835aux_serial_probe()
152 ret = serial8250_register_8250_port(&up); in bcm2835aux_serial_probe()