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()
1555 static inline int set_mcr(struct uart_port *the_port, in set_mcr() argument
1558 struct ioc4_port *port = get_ioc4_port(the_port, 0); in set_mcr()
1624 static void transmit_chars(struct uart_port *the_port) in transmit_chars() argument
1630 struct ioc4_port *port = get_ioc4_port(the_port, 0); in transmit_chars()
1633 if (!the_port) in transmit_chars()
1638 state = the_port->state; in transmit_chars()
1641 if (uart_circ_empty(&state->xmit) || uart_tx_stopped(the_port)) { in transmit_chars()
1658 the_port->icount.tx += result; in transmit_chars()
1667 uart_write_wakeup(the_port); in transmit_chars()
1683 ioc4_change_speed(struct uart_port *the_port, in ioc4_change_speed() argument
1686 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ioc4_change_speed()
1690 struct uart_state *state = the_port->state; in ioc4_change_speed()
1728 baud = uart_get_baud_rate(the_port, new_termios, old_termios, in ioc4_change_speed()
1736 if (!the_port->fifosize) in ioc4_change_speed()
1737 the_port->fifosize = IOC4_FIFO_CHARS; in ioc4_change_speed()
1738 the_port->timeout = ((the_port->fifosize * HZ * bits) / (baud / 10)); in ioc4_change_speed()
1739 the_port->timeout += HZ / 50; /* Add .02 seconds of slop */ in ioc4_change_speed()
1741 the_port->ignore_status_mask = N_ALL_INPUT; in ioc4_change_speed()
1746 the_port->ignore_status_mask &= ~(N_PARITY_ERROR in ioc4_change_speed()
1749 the_port->ignore_status_mask &= ~N_BREAK; in ioc4_change_speed()
1751 the_port->ignore_status_mask &= ~N_OVERRUN_ERROR; in ioc4_change_speed()
1755 the_port->ignore_status_mask &= ~N_DATA_READY; in ioc4_change_speed()
1771 new_parity_enable, new_parity, the_port->ignore_status_mask)); in ioc4_change_speed()
1778 set_notification(port, the_port->ignore_status_mask, 1); in ioc4_change_speed()
1786 static inline int ic4_startup_local(struct uart_port *the_port) in ic4_startup_local() argument
1791 if (!the_port) in ic4_startup_local()
1794 port = get_ioc4_port(the_port, 0); in ic4_startup_local()
1798 state = the_port->state; in ic4_startup_local()
1803 ioc4_set_proto(port, the_port->mapbase); in ic4_startup_local()
1806 ioc4_change_speed(the_port, &state->port.tty->termios, in ic4_startup_local()
1816 static void ioc4_cb_output_lowat(struct uart_port *the_port) in ioc4_cb_output_lowat() argument
1821 if (the_port) { in ioc4_cb_output_lowat()
1822 spin_lock_irqsave(&the_port->lock, pflags); in ioc4_cb_output_lowat()
1823 transmit_chars(the_port); in ioc4_cb_output_lowat()
1824 spin_unlock_irqrestore(&the_port->lock, pflags); in ioc4_cb_output_lowat()
1840 struct uart_port *the_port; in handle_intr() local
1884 the_port = port->ip_port; in handle_intr()
1885 the_port->icount.dcd = 1; in handle_intr()
1887 (&the_port->state->port.delta_msr_wait); in handle_intr()
1905 the_port = port->ip_port; in handle_intr()
1906 the_port->icount.cts = in handle_intr()
1909 (&the_port->state->port.delta_msr_wait); in handle_intr()
2041 static void ioc4_cb_post_ncs(struct uart_port *the_port, int ncs) in ioc4_cb_post_ncs() argument
2045 icount = &the_port->icount; in ioc4_cb_post_ncs()
2065 static inline int do_read(struct uart_port *the_port, unsigned char *buf, in do_read() argument
2069 struct ioc4_port *port = get_ioc4_port(the_port, 0); in do_read()
2240 the_port->icount.dcd = 0; in do_read()
2242 (&the_port->state-> in do_read()
2256 ioc4_cb_post_ncs(the_port, NCS_OVERRUN); in do_read()
2283 ioc4_cb_post_ncs(the_port, in do_read()
2288 ioc4_cb_post_ncs(the_port, in do_read()
2294 (the_port, in do_read()
2341 static void receive_chars(struct uart_port *the_port) in receive_chars() argument
2346 struct uart_state *state = the_port->state; in receive_chars()
2353 spin_lock_irqsave(&the_port->lock, pflags); in receive_chars()
2358 icount = &the_port->icount; in receive_chars()
2359 read_count = do_read(the_port, ch, request_count); in receive_chars()
2366 spin_unlock_irqrestore(&the_port->lock, pflags); in receive_chars()
2376 static const char *ic4_type(struct uart_port *the_port) in ic4_type() argument
2378 if (the_port->mapbase == PROTO_RS232) in ic4_type()
2389 static unsigned int ic4_tx_empty(struct uart_port *the_port) in ic4_tx_empty() argument
2391 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ic4_tx_empty()
2394 if (port_is_active(port, the_port)) { in ic4_tx_empty()
2406 static void ic4_stop_tx(struct uart_port *the_port) in ic4_stop_tx() argument
2408 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ic4_stop_tx()
2410 if (port_is_active(port, the_port)) in ic4_stop_tx()
2419 static void null_void_function(struct uart_port *the_port) in null_void_function() argument
2428 static void ic4_shutdown(struct uart_port *the_port) in ic4_shutdown() argument
2434 port = get_ioc4_port(the_port, 0); in ic4_shutdown()
2438 state = the_port->state; in ic4_shutdown()
2446 spin_lock_irqsave(&the_port->lock, port_flags); in ic4_shutdown()
2449 spin_unlock_irqrestore(&the_port->lock, port_flags); in ic4_shutdown()
2458 static void ic4_set_mctrl(struct uart_port *the_port, unsigned int mctrl) in ic4_set_mctrl() argument
2463 port = get_ioc4_port(the_port, 0); in ic4_set_mctrl()
2464 if (!port_is_active(port, the_port)) in ic4_set_mctrl()
2478 set_mcr(the_port, mcr, IOC4_SHADOW_DTR); in ic4_set_mctrl()
2486 static unsigned int ic4_get_mctrl(struct uart_port *the_port) in ic4_get_mctrl() argument
2488 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ic4_get_mctrl()
2492 if (!port_is_active(port, the_port)) in ic4_get_mctrl()
2510 static void ic4_start_tx(struct uart_port *the_port) in ic4_start_tx() argument
2512 struct ioc4_port *port = get_ioc4_port(the_port, 0); in ic4_start_tx()
2514 if (port_is_active(port, the_port)) { in ic4_start_tx()
2526 static void ic4_break_ctl(struct uart_port *the_port, int break_state) in ic4_break_ctl() argument
2535 static int ic4_startup(struct uart_port *the_port) in ic4_startup() argument
2543 if (!the_port) in ic4_startup()
2545 port = get_ioc4_port(the_port, 1); in ic4_startup()
2548 state = the_port->state; in ic4_startup()
2557 spin_lock_irqsave(&the_port->lock, port_flags); in ic4_startup()
2558 retval = ic4_startup_local(the_port); in ic4_startup()
2559 spin_unlock_irqrestore(&the_port->lock, port_flags); in ic4_startup()
2571 ic4_set_termios(struct uart_port *the_port, in ic4_set_termios() argument
2576 spin_lock_irqsave(&the_port->lock, port_flags); in ic4_set_termios()
2577 ioc4_change_speed(the_port, termios, old_termios); in ic4_set_termios()
2578 spin_unlock_irqrestore(&the_port->lock, port_flags); in ic4_set_termios()
2642 struct uart_port *the_port; in ioc4_serial_remove_one() local
2655 the_port = &control->ic_port[port_num].icp_uart_port in ioc4_serial_remove_one()
2657 if (the_port) { in ioc4_serial_remove_one()
2661 the_port); in ioc4_serial_remove_one()
2666 the_port); in ioc4_serial_remove_one()
2708 struct uart_port *the_port; in ioc4_serial_core_attach() local
2730 the_port = &control->ic_port[port_num].icp_uart_port in ioc4_serial_core_attach()
2733 port->ip_all_ports[port_type_idx] = the_port; in ioc4_serial_core_attach()
2736 __func__, (void *)the_port, in ioc4_serial_core_attach()
2741 the_port->membase = (unsigned char __iomem *)1; in ioc4_serial_core_attach()
2742 the_port->iobase = (pdev->bus->number << 16) | port_num; in ioc4_serial_core_attach()
2743 the_port->line = (Num_of_ioc4_cards << 2) | port_num; in ioc4_serial_core_attach()
2744 the_port->mapbase = port_type; in ioc4_serial_core_attach()
2745 the_port->type = PORT_16550A; in ioc4_serial_core_attach()
2746 the_port->fifosize = IOC4_FIFO_CHARS; in ioc4_serial_core_attach()
2747 the_port->ops = &ioc4_ops; in ioc4_serial_core_attach()
2748 the_port->irq = control->ic_irq; in ioc4_serial_core_attach()
2749 the_port->dev = &pdev->dev; in ioc4_serial_core_attach()
2750 spin_lock_init(&the_port->lock); in ioc4_serial_core_attach()
2751 if (uart_add_one_port(u_driver, the_port) < 0) { in ioc4_serial_core_attach()
2754 __func__, the_port->line, pdev->bus->number); in ioc4_serial_core_attach()
2758 the_port->line, the_port->irq, pdev->bus->number)); in ioc4_serial_core_attach()