Lines Matching defs:uport

99 #define to_zport(uport) container_of(uport, struct zs_port, port)
304 static unsigned int zs_tx_empty(struct uart_port *uport)
306 struct zs_port *zport = to_zport(uport);
372 static unsigned int zs_get_mctrl(struct uart_port *uport)
374 struct zs_port *zport = to_zport(uport);
385 static void zs_set_mctrl(struct uart_port *uport, unsigned int mctrl)
387 struct zs_port *zport = to_zport(uport);
425 static void zs_stop_tx(struct uart_port *uport)
427 struct zs_port *zport = to_zport(uport);
437 static void zs_start_tx(struct uart_port *uport)
439 struct zs_port *zport = to_zport(uport);
451 static void zs_stop_rx(struct uart_port *uport)
453 struct zs_port *zport = to_zport(uport);
485 static void zs_enable_ms(struct uart_port *uport)
487 struct zs_port *zport = to_zport(uport);
515 static void zs_break_ctl(struct uart_port *uport, int break_state)
517 struct zs_port *zport = to_zport(uport);
539 struct uart_port *uport = &zport->port;
560 icount = &uport->icount;
589 status &= uport->read_status_mask;
598 if (uart_handle_sysrq_char(uport, ch))
601 uart_insert_char(uport, status, Rx_OVR, ch, flag);
604 tty_flip_buffer_push(&uport->state->port);
648 struct uart_port *uport = &zport->port;
662 if (uart_handle_break(uport))
676 uart_handle_cts_change(uport,
679 uart_handle_dcd_change(uport,
682 uport->icount.dsr++;
684 uport->icount.rng++;
687 wake_up_interruptible(&uport->state->port.delta_msr_wait);
752 static int zs_startup(struct uart_port *uport)
754 struct zs_port *zport = to_zport(uport);
805 static void zs_shutdown(struct uart_port *uport)
807 struct zs_port *zport = to_zport(uport);
848 static void zs_set_termios(struct uart_port *uport, struct ktermios *termios,
851 struct zs_port *zport = to_zport(uport);
911 baud = uart_get_baud_rate(uport, termios, old_termios, 0,
912 uport->uartclk / zport->clk_mode / 4);
914 brg = ZS_BPS_TO_BRG(baud, uport->uartclk / zport->clk_mode);
918 uart_update_timeout(uport, termios->c_cflag, baud);
920 uport->read_status_mask = Rx_OVR;
922 uport->read_status_mask |= FRM_ERR | PAR_ERR;
924 uport->read_status_mask |= Rx_BRK;
926 uport->ignore_status_mask = 0;
928 uport->ignore_status_mask |= FRM_ERR | PAR_ERR;
930 uport->ignore_status_mask |= Rx_BRK;
932 uport->ignore_status_mask |= Rx_OVR;
963 static void zs_pm(struct uart_port *uport, unsigned int state,
966 struct zs_port *zport = to_zport(uport);
976 static const char *zs_type(struct uart_port *uport)
981 static void zs_release_port(struct uart_port *uport)
983 iounmap(uport->membase);
984 uport->membase = NULL;
985 release_mem_region(uport->mapbase, ZS_CHAN_IO_SIZE);
988 static int zs_map_port(struct uart_port *uport)
990 if (!uport->membase)
991 uport->membase = ioremap(uport->mapbase,
993 if (!uport->membase) {
1000 static int zs_request_port(struct uart_port *uport)
1004 if (!request_mem_region(uport->mapbase, ZS_CHAN_IO_SIZE, "scc")) {
1008 ret = zs_map_port(uport);
1010 release_mem_region(uport->mapbase, ZS_CHAN_IO_SIZE);
1016 static void zs_config_port(struct uart_port *uport, int flags)
1018 struct zs_port *zport = to_zport(uport);
1021 if (zs_request_port(uport))
1024 uport->type = PORT_ZS;
1030 static int zs_verify_port(struct uart_port *uport, struct serial_struct *ser)
1032 struct zs_port *zport = to_zport(uport);
1037 if (ser->irq != uport->irq)
1039 if (ser->baud_base != uport->uartclk / zport->clk_mode / 4)
1100 struct uart_port *uport = &zport->port;
1105 uport->has_sysrq = IS_ENABLED(CONFIG_SERIAL_ZS_CONSOLE);
1106 uport->irq = zs_parms.irq[chip];
1107 uport->uartclk = ZS_CLOCK;
1108 uport->fifosize = 1;
1109 uport->iotype = UPIO_MEM;
1110 uport->flags = UPF_BOOT_AUTOCONF;
1111 uport->ops = &zs_ops;
1112 uport->line = chip * ZS_NUM_CHAN + side;
1113 uport->mapbase = dec_kn_slot_base +
1127 static void zs_console_putchar(struct uart_port *uport, unsigned char ch)
1129 struct zs_port *zport = to_zport(uport);
1200 struct uart_port *uport = &zport->port;
1207 ret = zs_map_port(uport);
1212 zs_pm(uport, 0, -1);
1216 return uart_set_options(uport, co, baud, parity, bits, flow);
1281 struct uart_port *uport = &zport->port;
1284 uart_add_one_port(&zs_reg, uport);
1297 struct uart_port *uport = &zport->port;
1300 uart_remove_one_port(&zs_reg, uport);