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()
357 static unsigned int dz_get_mctrl(struct uart_port *uport) in dz_get_mctrl() argument
362 struct dz_port *dport = to_dport(uport); in dz_get_mctrl()
373 static void dz_set_mctrl(struct uart_port *uport, unsigned int mctrl) in dz_set_mctrl() argument
378 struct dz_port *dport = to_dport(uport); in dz_set_mctrl()
398 static int dz_startup(struct uart_port *uport) in dz_startup() argument
400 struct dz_port *dport = to_dport(uport); in dz_startup()
439 static void dz_shutdown(struct uart_port *uport) in dz_shutdown() argument
441 struct dz_port *dport = to_dport(uport); in dz_shutdown()
474 static unsigned int dz_tx_empty(struct uart_port *uport) in dz_tx_empty() argument
476 struct dz_port *dport = to_dport(uport); in dz_tx_empty()
485 static void dz_break_ctl(struct uart_port *uport, int break_state) in dz_break_ctl() argument
491 struct dz_port *dport = to_dport(uport); in dz_break_ctl()
495 spin_lock_irqsave(&uport->lock, flags); in dz_break_ctl()
502 spin_unlock_irqrestore(&uport->lock, flags); in dz_break_ctl()
561 static void dz_set_termios(struct uart_port *uport, struct ktermios *termios, in dz_set_termios() argument
564 struct dz_port *dport = to_dport(uport); in dz_set_termios()
593 baud = uart_get_baud_rate(uport, termios, old_termios, 50, 9600); in dz_set_termios()
614 uart_update_timeout(uport, termios->c_cflag, baud); in dz_set_termios()
627 uport->ignore_status_mask = 0; in dz_set_termios()
643 static void dz_pm(struct uart_port *uport, unsigned int state, in dz_pm() argument
646 struct dz_port *dport = to_dport(uport); in dz_pm()
658 static const char *dz_type(struct uart_port *uport) in dz_type() argument
663 static void dz_release_port(struct uart_port *uport) in dz_release_port() argument
665 struct dz_mux *mux = to_dport(uport)->mux; in dz_release_port()
668 iounmap(uport->membase); in dz_release_port()
669 uport->membase = NULL; in dz_release_port()
673 release_mem_region(uport->mapbase, dec_kn_slot_size); in dz_release_port()
676 static int dz_map_port(struct uart_port *uport) in dz_map_port() argument
678 if (!uport->membase) in dz_map_port()
679 uport->membase = ioremap(uport->mapbase, in dz_map_port()
681 if (!uport->membase) { in dz_map_port()
688 static int dz_request_port(struct uart_port *uport) in dz_request_port() argument
690 struct dz_mux *mux = to_dport(uport)->mux; in dz_request_port()
696 if (!request_mem_region(uport->mapbase, dec_kn_slot_size, in dz_request_port()
704 ret = dz_map_port(uport); in dz_request_port()
708 release_mem_region(uport->mapbase, dec_kn_slot_size); in dz_request_port()
714 static void dz_config_port(struct uart_port *uport, int flags) in dz_config_port() argument
716 struct dz_port *dport = to_dport(uport); in dz_config_port()
719 if (dz_request_port(uport)) in dz_config_port()
722 uport->type = PORT_DZ; in dz_config_port()
731 static int dz_verify_port(struct uart_port *uport, struct serial_struct *ser) in dz_verify_port() argument
737 if (ser->irq != uport->irq) in dz_verify_port()
778 struct uart_port *uport = &dport->port; in dz_init_ports() local
782 uport->irq = dec_interrupt[DEC_IRQ_DZ11]; in dz_init_ports()
783 uport->fifosize = 1; in dz_init_ports()
784 uport->iotype = UPIO_MEM; in dz_init_ports()
785 uport->flags = UPF_BOOT_AUTOCONF; in dz_init_ports()
786 uport->ops = &dz_ops; in dz_init_ports()
787 uport->line = line; in dz_init_ports()
788 uport->mapbase = base; in dz_init_ports()
789 uport->has_sysrq = IS_ENABLED(CONFIG_SERIAL_DZ_CONSOLE); in dz_init_ports()
808 static void dz_console_putchar(struct uart_port *uport, unsigned char ch) in dz_console_putchar() argument
810 struct dz_port *dport = to_dport(uport); in dz_console_putchar()
867 struct uart_port *uport = &dport->port; in dz_console_setup() local
874 ret = dz_map_port(uport); in dz_console_setup()
881 dz_pm(uport, 0, -1); in dz_console_setup()