Lines Matching refs:the_port
743 static struct ioc4_port *get_ioc4_port(struct uart_port *the_port, int set) in get_ioc4_port() argument
745 struct ioc4_driver_data *idd = dev_get_drvdata(the_port->dev); in get_ioc4_port()
759 if (the_port == port->ip_all_ports in get_ioc4_port()
763 port->ip_port = the_port; in get_ioc4_port()
1556 static inline int set_mcr(struct uart_port *the_port, in set_mcr() argument
1559 struct ioc4_port *port = get_ioc4_port(the_port, 0); in set_mcr()
1625 static void transmit_chars(struct uart_port *the_port) in transmit_chars() argument
1631 struct ioc4_port *port = get_ioc4_port(the_port, 0); in transmit_chars()
1634 if (!the_port) in transmit_chars()
1639 state = the_port->state; in transmit_chars()
1642 if (uart_circ_empty(&state->xmit) || uart_tx_stopped(the_port)) { in transmit_chars()
1659 the_port->icount.tx += result; in transmit_chars()
1668 uart_write_wakeup(the_port); in transmit_chars()
1684 ioc4_change_speed(struct uart_port *the_port, in ioc4_change_speed() argument
1687 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ioc4_change_speed()
1691 struct uart_state *state = the_port->state; in ioc4_change_speed()
1729 baud = uart_get_baud_rate(the_port, new_termios, old_termios, in ioc4_change_speed()
1737 if (!the_port->fifosize) in ioc4_change_speed()
1738 the_port->fifosize = IOC4_FIFO_CHARS; in ioc4_change_speed()
1739 the_port->timeout = ((the_port->fifosize * HZ * bits) / (baud / 10)); in ioc4_change_speed()
1740 the_port->timeout += HZ / 50; /* Add .02 seconds of slop */ in ioc4_change_speed()
1742 the_port->ignore_status_mask = N_ALL_INPUT; in ioc4_change_speed()
1747 the_port->ignore_status_mask &= ~(N_PARITY_ERROR in ioc4_change_speed()
1750 the_port->ignore_status_mask &= ~N_BREAK; in ioc4_change_speed()
1752 the_port->ignore_status_mask &= ~N_OVERRUN_ERROR; in ioc4_change_speed()
1756 the_port->ignore_status_mask &= ~N_DATA_READY; in ioc4_change_speed()
1772 new_parity_enable, new_parity, the_port->ignore_status_mask)); in ioc4_change_speed()
1779 set_notification(port, the_port->ignore_status_mask, 1); in ioc4_change_speed()
1787 static inline int ic4_startup_local(struct uart_port *the_port) in ic4_startup_local() argument
1792 if (!the_port) in ic4_startup_local()
1795 port = get_ioc4_port(the_port, 0); in ic4_startup_local()
1799 state = the_port->state; in ic4_startup_local()
1804 ioc4_set_proto(port, the_port->mapbase); in ic4_startup_local()
1807 ioc4_change_speed(the_port, &state->port.tty->termios, in ic4_startup_local()
1817 static void ioc4_cb_output_lowat(struct uart_port *the_port) in ioc4_cb_output_lowat() argument
1822 if (the_port) { in ioc4_cb_output_lowat()
1823 spin_lock_irqsave(&the_port->lock, pflags); in ioc4_cb_output_lowat()
1824 transmit_chars(the_port); in ioc4_cb_output_lowat()
1825 spin_unlock_irqrestore(&the_port->lock, pflags); in ioc4_cb_output_lowat()
1841 struct uart_port *the_port; in handle_intr() local
1885 the_port = port->ip_port; in handle_intr()
1886 the_port->icount.dcd = 1; in handle_intr()
1888 (&the_port->state->port.delta_msr_wait); in handle_intr()
1906 the_port = port->ip_port; in handle_intr()
1907 the_port->icount.cts = in handle_intr()
1910 (&the_port->state->port.delta_msr_wait); in handle_intr()
2042 static void ioc4_cb_post_ncs(struct uart_port *the_port, int ncs) in ioc4_cb_post_ncs() argument
2046 icount = &the_port->icount; in ioc4_cb_post_ncs()
2066 static inline int do_read(struct uart_port *the_port, unsigned char *buf, in do_read() argument
2070 struct ioc4_port *port = get_ioc4_port(the_port, 0); in do_read()
2241 the_port->icount.dcd = 0; in do_read()
2243 (&the_port->state-> in do_read()
2257 ioc4_cb_post_ncs(the_port, NCS_OVERRUN); in do_read()
2284 ioc4_cb_post_ncs(the_port, in do_read()
2289 ioc4_cb_post_ncs(the_port, in do_read()
2295 (the_port, in do_read()
2342 static void receive_chars(struct uart_port *the_port) in receive_chars() argument
2347 struct uart_state *state = the_port->state; in receive_chars()
2354 spin_lock_irqsave(&the_port->lock, pflags); in receive_chars()
2359 icount = &the_port->icount; in receive_chars()
2360 read_count = do_read(the_port, ch, request_count); in receive_chars()
2367 spin_unlock_irqrestore(&the_port->lock, pflags); in receive_chars()
2377 static const char *ic4_type(struct uart_port *the_port) in ic4_type() argument
2379 if (the_port->mapbase == PROTO_RS232) in ic4_type()
2390 static unsigned int ic4_tx_empty(struct uart_port *the_port) in ic4_tx_empty() argument
2392 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ic4_tx_empty()
2395 if (port_is_active(port, the_port)) { in ic4_tx_empty()
2407 static void ic4_stop_tx(struct uart_port *the_port) in ic4_stop_tx() argument
2409 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ic4_stop_tx()
2411 if (port_is_active(port, the_port)) in ic4_stop_tx()
2420 static void null_void_function(struct uart_port *the_port) in null_void_function() argument
2429 static void ic4_shutdown(struct uart_port *the_port) in ic4_shutdown() argument
2435 port = get_ioc4_port(the_port, 0); in ic4_shutdown()
2439 state = the_port->state; in ic4_shutdown()
2447 spin_lock_irqsave(&the_port->lock, port_flags); in ic4_shutdown()
2450 spin_unlock_irqrestore(&the_port->lock, port_flags); in ic4_shutdown()
2459 static void ic4_set_mctrl(struct uart_port *the_port, unsigned int mctrl) in ic4_set_mctrl() argument
2464 port = get_ioc4_port(the_port, 0); in ic4_set_mctrl()
2465 if (!port_is_active(port, the_port)) in ic4_set_mctrl()
2479 set_mcr(the_port, mcr, IOC4_SHADOW_DTR); in ic4_set_mctrl()
2487 static unsigned int ic4_get_mctrl(struct uart_port *the_port) in ic4_get_mctrl() argument
2489 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ic4_get_mctrl()
2493 if (!port_is_active(port, the_port)) in ic4_get_mctrl()
2511 static void ic4_start_tx(struct uart_port *the_port) in ic4_start_tx() argument
2513 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ic4_start_tx()
2515 if (port_is_active(port, the_port)) { in ic4_start_tx()
2527 static void ic4_break_ctl(struct uart_port *the_port, int break_state) in ic4_break_ctl() argument
2536 static int ic4_startup(struct uart_port *the_port) in ic4_startup() argument
2544 if (!the_port) in ic4_startup()
2546 port = get_ioc4_port(the_port, 1); in ic4_startup()
2549 state = the_port->state; in ic4_startup()
2558 spin_lock_irqsave(&the_port->lock, port_flags); in ic4_startup()
2559 retval = ic4_startup_local(the_port); in ic4_startup()
2560 spin_unlock_irqrestore(&the_port->lock, port_flags); in ic4_startup()
2572 ic4_set_termios(struct uart_port *the_port, in ic4_set_termios() argument
2577 spin_lock_irqsave(&the_port->lock, port_flags); in ic4_set_termios()
2578 ioc4_change_speed(the_port, termios, old_termios); in ic4_set_termios()
2579 spin_unlock_irqrestore(&the_port->lock, port_flags); in ic4_set_termios()
2643 struct uart_port *the_port; in ioc4_serial_remove_one() local
2656 the_port = &control->ic_port[port_num].icp_uart_port in ioc4_serial_remove_one()
2658 if (the_port) { in ioc4_serial_remove_one()
2662 the_port); in ioc4_serial_remove_one()
2667 the_port); in ioc4_serial_remove_one()
2709 struct uart_port *the_port; in ioc4_serial_core_attach() local
2731 the_port = &control->ic_port[port_num].icp_uart_port in ioc4_serial_core_attach()
2734 port->ip_all_ports[port_type_idx] = the_port; in ioc4_serial_core_attach()
2737 __func__, (void *)the_port, in ioc4_serial_core_attach()
2742 the_port->membase = (unsigned char __iomem *)1; in ioc4_serial_core_attach()
2743 the_port->iobase = (pdev->bus->number << 16) | port_num; in ioc4_serial_core_attach()
2744 the_port->line = (Num_of_ioc4_cards << 2) | port_num; in ioc4_serial_core_attach()
2745 the_port->mapbase = port_type; in ioc4_serial_core_attach()
2746 the_port->type = PORT_16550A; in ioc4_serial_core_attach()
2747 the_port->fifosize = IOC4_FIFO_CHARS; in ioc4_serial_core_attach()
2748 the_port->ops = &ioc4_ops; in ioc4_serial_core_attach()
2749 the_port->irq = control->ic_irq; in ioc4_serial_core_attach()
2750 the_port->dev = &pdev->dev; in ioc4_serial_core_attach()
2751 spin_lock_init(&the_port->lock); in ioc4_serial_core_attach()
2752 if (uart_add_one_port(u_driver, the_port) < 0) { in ioc4_serial_core_attach()
2755 __func__, the_port->line, pdev->bus->number); in ioc4_serial_core_attach()
2759 the_port->line, the_port->irq, pdev->bus->number)); in ioc4_serial_core_attach()