Lines Matching defs:uport

85 static inline struct dz_port *to_dport(struct uart_port *uport)
87 return container_of(uport, struct dz_port, port);
123 static void dz_stop_tx(struct uart_port *uport)
125 struct dz_port *dport = to_dport(uport);
133 static void dz_start_tx(struct uart_port *uport)
135 struct dz_port *dport = to_dport(uport);
143 static void dz_stop_rx(struct uart_port *uport)
145 struct dz_port *dport = to_dport(uport);
180 struct uart_port *uport;
190 uport = &dport->port;
195 icount = &uport->icount;
215 if (uart_handle_break(uport))
224 status &= uport->read_status_mask;
234 if (uart_handle_sysrq_char(uport, ch))
237 uart_insert_char(uport, status, DZ_OERR, ch, flag);
357 static unsigned int dz_get_mctrl(struct uart_port *uport)
362 struct dz_port *dport = to_dport(uport);
373 static void dz_set_mctrl(struct uart_port *uport, unsigned int mctrl)
378 struct dz_port *dport = to_dport(uport);
398 static int dz_startup(struct uart_port *uport)
400 struct dz_port *dport = to_dport(uport);
439 static void dz_shutdown(struct uart_port *uport)
441 struct dz_port *dport = to_dport(uport);
474 static unsigned int dz_tx_empty(struct uart_port *uport)
476 struct dz_port *dport = to_dport(uport);
485 static void dz_break_ctl(struct uart_port *uport, int break_state)
491 struct dz_port *dport = to_dport(uport);
495 spin_lock_irqsave(&uport->lock, flags);
502 spin_unlock_irqrestore(&uport->lock, flags);
561 static void dz_set_termios(struct uart_port *uport, struct ktermios *termios,
564 struct dz_port *dport = to_dport(uport);
593 baud = uart_get_baud_rate(uport, termios, old_termios, 50, 9600);
596 baud = uart_get_baud_rate(uport, old_termios, NULL, 50, 9600);
611 uart_update_timeout(uport, termios->c_cflag, baud);
624 uport->ignore_status_mask = 0;
640 static void dz_pm(struct uart_port *uport, unsigned int state,
643 struct dz_port *dport = to_dport(uport);
655 static const char *dz_type(struct uart_port *uport)
660 static void dz_release_port(struct uart_port *uport)
662 struct dz_mux *mux = to_dport(uport)->mux;
665 iounmap(uport->membase);
666 uport->membase = NULL;
670 release_mem_region(uport->mapbase, dec_kn_slot_size);
673 static int dz_map_port(struct uart_port *uport)
675 if (!uport->membase)
676 uport->membase = ioremap(uport->mapbase,
678 if (!uport->membase) {
685 static int dz_request_port(struct uart_port *uport)
687 struct dz_mux *mux = to_dport(uport)->mux;
693 if (!request_mem_region(uport->mapbase, dec_kn_slot_size,
701 ret = dz_map_port(uport);
705 release_mem_region(uport->mapbase, dec_kn_slot_size);
711 static void dz_config_port(struct uart_port *uport, int flags)
713 struct dz_port *dport = to_dport(uport);
716 if (dz_request_port(uport))
719 uport->type = PORT_DZ;
728 static int dz_verify_port(struct uart_port *uport, struct serial_struct *ser)
734 if (ser->irq != uport->irq)
775 struct uart_port *uport = &dport->port;
779 uport->irq = dec_interrupt[DEC_IRQ_DZ11];
780 uport->fifosize = 1;
781 uport->iotype = UPIO_MEM;
782 uport->flags = UPF_BOOT_AUTOCONF;
783 uport->ops = &dz_ops;
784 uport->line = line;
785 uport->mapbase = base;
786 uport->has_sysrq = IS_ENABLED(CONFIG_SERIAL_DZ_CONSOLE);
805 static void dz_console_putchar(struct uart_port *uport, int ch)
807 struct dz_port *dport = to_dport(uport);
864 struct uart_port *uport = &dport->port;
871 ret = dz_map_port(uport);
878 dz_pm(uport, 0, -1);