Lines Matching refs:uport
85 static inline struct dz_port *to_dport(struct uart_port *uport) in to_dport() argument
87 return container_of(uport, struct dz_port, port); in to_dport()
123 static void dz_stop_tx(struct uart_port *uport) in dz_stop_tx() argument
125 struct dz_port *dport = to_dport(uport); in dz_stop_tx()
133 static void dz_start_tx(struct uart_port *uport) in dz_start_tx() argument
135 struct dz_port *dport = to_dport(uport); in dz_start_tx()
143 static void dz_stop_rx(struct uart_port *uport) in dz_stop_rx() argument
145 struct dz_port *dport = to_dport(uport); in dz_stop_rx()
180 struct uart_port *uport; in dz_receive_chars() local
190 uport = &dport->port; in dz_receive_chars()
195 icount = &uport->icount; in dz_receive_chars()
215 if (uart_handle_break(uport)) in dz_receive_chars()
224 status &= uport->read_status_mask; in dz_receive_chars()
234 if (uart_handle_sysrq_char(uport, ch)) in dz_receive_chars()
237 uart_insert_char(uport, status, DZ_OERR, ch, flag); in dz_receive_chars()
356 static unsigned int dz_get_mctrl(struct uart_port *uport) in dz_get_mctrl() argument
361 struct dz_port *dport = to_dport(uport); in dz_get_mctrl()
372 static void dz_set_mctrl(struct uart_port *uport, unsigned int mctrl) in dz_set_mctrl() argument
377 struct dz_port *dport = to_dport(uport); in dz_set_mctrl()
397 static int dz_startup(struct uart_port *uport) in dz_startup() argument
399 struct dz_port *dport = to_dport(uport); in dz_startup()
438 static void dz_shutdown(struct uart_port *uport) in dz_shutdown() argument
440 struct dz_port *dport = to_dport(uport); in dz_shutdown()
473 static unsigned int dz_tx_empty(struct uart_port *uport) in dz_tx_empty() argument
475 struct dz_port *dport = to_dport(uport); in dz_tx_empty()
484 static void dz_break_ctl(struct uart_port *uport, int break_state) in dz_break_ctl() argument
490 struct dz_port *dport = to_dport(uport); in dz_break_ctl()
494 spin_lock_irqsave(&uport->lock, flags); in dz_break_ctl()
501 spin_unlock_irqrestore(&uport->lock, flags); in dz_break_ctl()
560 static void dz_set_termios(struct uart_port *uport, struct ktermios *termios, in dz_set_termios() argument
563 struct dz_port *dport = to_dport(uport); in dz_set_termios()
592 baud = uart_get_baud_rate(uport, termios, old_termios, 50, 9600); in dz_set_termios()
613 uart_update_timeout(uport, termios->c_cflag, baud); in dz_set_termios()
626 uport->ignore_status_mask = 0; in dz_set_termios()
642 static void dz_pm(struct uart_port *uport, unsigned int state, in dz_pm() argument
645 struct dz_port *dport = to_dport(uport); in dz_pm()
657 static const char *dz_type(struct uart_port *uport) in dz_type() argument
662 static void dz_release_port(struct uart_port *uport) in dz_release_port() argument
664 struct dz_mux *mux = to_dport(uport)->mux; in dz_release_port()
667 iounmap(uport->membase); in dz_release_port()
668 uport->membase = NULL; in dz_release_port()
672 release_mem_region(uport->mapbase, dec_kn_slot_size); in dz_release_port()
675 static int dz_map_port(struct uart_port *uport) in dz_map_port() argument
677 if (!uport->membase) in dz_map_port()
678 uport->membase = ioremap(uport->mapbase, in dz_map_port()
680 if (!uport->membase) { in dz_map_port()
687 static int dz_request_port(struct uart_port *uport) in dz_request_port() argument
689 struct dz_mux *mux = to_dport(uport)->mux; in dz_request_port()
695 if (!request_mem_region(uport->mapbase, dec_kn_slot_size, in dz_request_port()
703 ret = dz_map_port(uport); in dz_request_port()
707 release_mem_region(uport->mapbase, dec_kn_slot_size); in dz_request_port()
713 static void dz_config_port(struct uart_port *uport, int flags) in dz_config_port() argument
715 struct dz_port *dport = to_dport(uport); in dz_config_port()
718 if (dz_request_port(uport)) in dz_config_port()
721 uport->type = PORT_DZ; in dz_config_port()
730 static int dz_verify_port(struct uart_port *uport, struct serial_struct *ser) in dz_verify_port() argument
736 if (ser->irq != uport->irq) in dz_verify_port()
777 struct uart_port *uport = &dport->port; in dz_init_ports() local
781 uport->irq = dec_interrupt[DEC_IRQ_DZ11]; in dz_init_ports()
782 uport->fifosize = 1; in dz_init_ports()
783 uport->iotype = UPIO_MEM; in dz_init_ports()
784 uport->flags = UPF_BOOT_AUTOCONF; in dz_init_ports()
785 uport->ops = &dz_ops; in dz_init_ports()
786 uport->line = line; in dz_init_ports()
787 uport->mapbase = base; in dz_init_ports()
788 uport->has_sysrq = IS_ENABLED(CONFIG_SERIAL_DZ_CONSOLE); in dz_init_ports()
807 static void dz_console_putchar(struct uart_port *uport, unsigned char ch) in dz_console_putchar() argument
809 struct dz_port *dport = to_dport(uport); in dz_console_putchar()
866 struct uart_port *uport = &dport->port; in dz_console_setup() local
873 ret = dz_map_port(uport); in dz_console_setup()
880 dz_pm(uport, 0, -1); in dz_console_setup()