Lines Matching refs:uport

88 static inline struct dz_port *to_dport(struct uart_port *uport)
90 return container_of(uport, struct dz_port, port);
126 static void dz_stop_tx(struct uart_port *uport)
128 struct dz_port *dport = to_dport(uport);
136 static void dz_start_tx(struct uart_port *uport)
138 struct dz_port *dport = to_dport(uport);
146 static void dz_stop_rx(struct uart_port *uport)
148 struct dz_port *dport = to_dport(uport);
183 struct uart_port *uport;
193 uport = &dport->port;
198 icount = &uport->icount;
218 if (uart_handle_break(uport))
227 status &= uport->read_status_mask;
237 if (uart_handle_sysrq_char(uport, ch))
240 uart_insert_char(uport, status, DZ_OERR, ch, flag);
360 static unsigned int dz_get_mctrl(struct uart_port *uport)
365 struct dz_port *dport = to_dport(uport);
376 static void dz_set_mctrl(struct uart_port *uport, unsigned int mctrl)
381 struct dz_port *dport = to_dport(uport);
401 static int dz_startup(struct uart_port *uport)
403 struct dz_port *dport = to_dport(uport);
442 static void dz_shutdown(struct uart_port *uport)
444 struct dz_port *dport = to_dport(uport);
477 static unsigned int dz_tx_empty(struct uart_port *uport)
479 struct dz_port *dport = to_dport(uport);
488 static void dz_break_ctl(struct uart_port *uport, int break_state)
494 struct dz_port *dport = to_dport(uport);
498 spin_lock_irqsave(&uport->lock, flags);
505 spin_unlock_irqrestore(&uport->lock, flags);
564 static void dz_set_termios(struct uart_port *uport, struct ktermios *termios,
567 struct dz_port *dport = to_dport(uport);
596 baud = uart_get_baud_rate(uport, termios, old_termios, 50, 9600);
599 baud = uart_get_baud_rate(uport, old_termios, NULL, 50, 9600);
614 uart_update_timeout(uport, termios->c_cflag, baud);
627 uport->ignore_status_mask = 0;
643 static void dz_pm(struct uart_port *uport, unsigned int state,
646 struct dz_port *dport = to_dport(uport);
658 static const char *dz_type(struct uart_port *uport)
663 static void dz_release_port(struct uart_port *uport)
665 struct dz_mux *mux = to_dport(uport)->mux;
668 iounmap(uport->membase);
669 uport->membase = NULL;
673 release_mem_region(uport->mapbase, dec_kn_slot_size);
676 static int dz_map_port(struct uart_port *uport)
678 if (!uport->membase)
679 uport->membase = ioremap_nocache(uport->mapbase,
681 if (!uport->membase) {
688 static int dz_request_port(struct uart_port *uport)
690 struct dz_mux *mux = to_dport(uport)->mux;
696 if (!request_mem_region(uport->mapbase, dec_kn_slot_size,
704 ret = dz_map_port(uport);
708 release_mem_region(uport->mapbase, dec_kn_slot_size);
714 static void dz_config_port(struct uart_port *uport, int flags)
716 struct dz_port *dport = to_dport(uport);
719 if (dz_request_port(uport))
722 uport->type = PORT_DZ;
731 static int dz_verify_port(struct uart_port *uport, struct serial_struct *ser)
737 if (ser->irq != uport->irq)
778 struct uart_port *uport = &dport->port;
782 uport->irq = dec_interrupt[DEC_IRQ_DZ11];
783 uport->fifosize = 1;
784 uport->iotype = UPIO_MEM;
785 uport->flags = UPF_BOOT_AUTOCONF;
786 uport->ops = &dz_ops;
787 uport->line = line;
788 uport->mapbase = base;
807 static void dz_console_putchar(struct uart_port *uport, int ch)
809 struct dz_port *dport = to_dport(uport);
866 struct uart_port *uport = &dport->port;
873 ret = dz_map_port(uport);
880 dz_pm(uport, 0, -1);