Lines Matching refs:port
197 struct uart_port *port; member
220 struct uart_port *port = (struct uart_port *)dev_id; in cdns_uart_handle_rx() local
221 struct cdns_uart *cdns_uart = port->private_data; in cdns_uart_handle_rx()
231 while ((readl(port->membase + CDNS_UART_SR) & in cdns_uart_handle_rx()
234 rxbs_status = readl(port->membase + CDNS_UART_RXBS); in cdns_uart_handle_rx()
235 data = readl(port->membase + CDNS_UART_FIFO); in cdns_uart_handle_rx()
236 port->icount.rx++; in cdns_uart_handle_rx()
245 port->read_status_mask |= CDNS_UART_IXR_BRK; in cdns_uart_handle_rx()
251 port->icount.brk++; in cdns_uart_handle_rx()
253 if (uart_handle_break(port)) in cdns_uart_handle_rx()
257 isrstatus &= port->read_status_mask; in cdns_uart_handle_rx()
258 isrstatus &= ~port->ignore_status_mask; in cdns_uart_handle_rx()
259 status_mask = port->read_status_mask; in cdns_uart_handle_rx()
260 status_mask &= ~port->ignore_status_mask; in cdns_uart_handle_rx()
263 (port->read_status_mask & CDNS_UART_IXR_BRK)) { in cdns_uart_handle_rx()
264 port->read_status_mask &= ~CDNS_UART_IXR_BRK; in cdns_uart_handle_rx()
265 port->icount.brk++; in cdns_uart_handle_rx()
266 if (uart_handle_break(port)) in cdns_uart_handle_rx()
270 if (uart_handle_sysrq_char(port, data)) in cdns_uart_handle_rx()
276 port->icount.parity++; in cdns_uart_handle_rx()
281 port->icount.frame++; in cdns_uart_handle_rx()
286 port->icount.parity++; in cdns_uart_handle_rx()
291 port->icount.frame++; in cdns_uart_handle_rx()
296 port->icount.overrun++; in cdns_uart_handle_rx()
297 tty_insert_flip_char(&port->state->port, 0, in cdns_uart_handle_rx()
300 tty_insert_flip_char(&port->state->port, data, status); in cdns_uart_handle_rx()
303 spin_unlock(&port->lock); in cdns_uart_handle_rx()
304 tty_flip_buffer_push(&port->state->port); in cdns_uart_handle_rx()
305 spin_lock(&port->lock); in cdns_uart_handle_rx()
315 struct uart_port *port = (struct uart_port *)dev_id; in cdns_uart_handle_tx() local
318 if (uart_circ_empty(&port->state->xmit)) { in cdns_uart_handle_tx()
319 writel(CDNS_UART_IXR_TXEMPTY, port->membase + CDNS_UART_IDR); in cdns_uart_handle_tx()
321 numbytes = port->fifosize; in cdns_uart_handle_tx()
322 while (numbytes && !uart_circ_empty(&port->state->xmit) && in cdns_uart_handle_tx()
323 !(readl(port->membase + CDNS_UART_SR) & in cdns_uart_handle_tx()
331 port->state->xmit.buf[port->state->xmit.tail], in cdns_uart_handle_tx()
332 port->membase + CDNS_UART_FIFO); in cdns_uart_handle_tx()
334 port->icount.tx++; in cdns_uart_handle_tx()
340 port->state->xmit.tail = in cdns_uart_handle_tx()
341 (port->state->xmit.tail + 1) & in cdns_uart_handle_tx()
348 &port->state->xmit) < WAKEUP_CHARS) in cdns_uart_handle_tx()
349 uart_write_wakeup(port); in cdns_uart_handle_tx()
362 struct uart_port *port = (struct uart_port *)dev_id; in cdns_uart_isr() local
365 spin_lock(&port->lock); in cdns_uart_isr()
370 isrstatus = readl(port->membase + CDNS_UART_ISR); in cdns_uart_isr()
371 writel(isrstatus, port->membase + CDNS_UART_ISR); in cdns_uart_isr()
378 isrstatus &= port->read_status_mask; in cdns_uart_isr()
379 isrstatus &= ~port->ignore_status_mask; in cdns_uart_isr()
385 !(readl(port->membase + CDNS_UART_CR) & CDNS_UART_CR_RX_DIS)) in cdns_uart_isr()
388 spin_unlock(&port->lock); in cdns_uart_isr()
461 static unsigned int cdns_uart_set_baud_rate(struct uart_port *port, in cdns_uart_set_baud_rate() argument
468 struct cdns_uart *cdns_uart = port->private_data; in cdns_uart_set_baud_rate()
470 calc_baud = cdns_uart_calc_baud_divs(port->uartclk, baud, &bdiv, &cd, in cdns_uart_set_baud_rate()
474 mreg = readl(port->membase + CDNS_UART_MR); in cdns_uart_set_baud_rate()
479 writel(mreg, port->membase + CDNS_UART_MR); in cdns_uart_set_baud_rate()
480 writel(cd, port->membase + CDNS_UART_BAUDGEN); in cdns_uart_set_baud_rate()
481 writel(bdiv, port->membase + CDNS_UART_BAUDDIV); in cdns_uart_set_baud_rate()
499 struct uart_port *port; in cdns_uart_clk_notifier_cb() local
505 port = cdns_uart->port; in cdns_uart_clk_notifier_cb()
506 if (port->suspended) in cdns_uart_clk_notifier_cb()
521 dev_warn(port->dev, "clock rate change rejected\n"); in cdns_uart_clk_notifier_cb()
525 spin_lock_irqsave(&cdns_uart->port->lock, flags); in cdns_uart_clk_notifier_cb()
528 ctrl_reg = readl(port->membase + CDNS_UART_CR); in cdns_uart_clk_notifier_cb()
530 writel(ctrl_reg, port->membase + CDNS_UART_CR); in cdns_uart_clk_notifier_cb()
532 spin_unlock_irqrestore(&cdns_uart->port->lock, flags); in cdns_uart_clk_notifier_cb()
542 spin_lock_irqsave(&cdns_uart->port->lock, flags); in cdns_uart_clk_notifier_cb()
545 port->uartclk = ndata->new_rate; in cdns_uart_clk_notifier_cb()
547 cdns_uart->baud = cdns_uart_set_baud_rate(cdns_uart->port, in cdns_uart_clk_notifier_cb()
552 spin_lock_irqsave(&cdns_uart->port->lock, flags); in cdns_uart_clk_notifier_cb()
555 ctrl_reg = readl(port->membase + CDNS_UART_CR); in cdns_uart_clk_notifier_cb()
557 writel(ctrl_reg, port->membase + CDNS_UART_CR); in cdns_uart_clk_notifier_cb()
559 while (readl(port->membase + CDNS_UART_CR) & in cdns_uart_clk_notifier_cb()
568 writel(rx_timeout, port->membase + CDNS_UART_RXTOUT); in cdns_uart_clk_notifier_cb()
569 ctrl_reg = readl(port->membase + CDNS_UART_CR); in cdns_uart_clk_notifier_cb()
572 writel(ctrl_reg, port->membase + CDNS_UART_CR); in cdns_uart_clk_notifier_cb()
574 spin_unlock_irqrestore(&cdns_uart->port->lock, flags); in cdns_uart_clk_notifier_cb()
587 static void cdns_uart_start_tx(struct uart_port *port) in cdns_uart_start_tx() argument
591 if (uart_tx_stopped(port)) in cdns_uart_start_tx()
598 status = readl(port->membase + CDNS_UART_CR); in cdns_uart_start_tx()
601 writel(status, port->membase + CDNS_UART_CR); in cdns_uart_start_tx()
603 if (uart_circ_empty(&port->state->xmit)) in cdns_uart_start_tx()
606 writel(CDNS_UART_IXR_TXEMPTY, port->membase + CDNS_UART_ISR); in cdns_uart_start_tx()
608 cdns_uart_handle_tx(port); in cdns_uart_start_tx()
611 writel(CDNS_UART_IXR_TXEMPTY, port->membase + CDNS_UART_IER); in cdns_uart_start_tx()
618 static void cdns_uart_stop_tx(struct uart_port *port) in cdns_uart_stop_tx() argument
622 regval = readl(port->membase + CDNS_UART_CR); in cdns_uart_stop_tx()
625 writel(regval, port->membase + CDNS_UART_CR); in cdns_uart_stop_tx()
632 static void cdns_uart_stop_rx(struct uart_port *port) in cdns_uart_stop_rx() argument
637 writel(CDNS_UART_RX_IRQS, port->membase + CDNS_UART_IDR); in cdns_uart_stop_rx()
640 regval = readl(port->membase + CDNS_UART_CR); in cdns_uart_stop_rx()
642 writel(regval, port->membase + CDNS_UART_CR); in cdns_uart_stop_rx()
651 static unsigned int cdns_uart_tx_empty(struct uart_port *port) in cdns_uart_tx_empty() argument
655 status = readl(port->membase + CDNS_UART_SR) & in cdns_uart_tx_empty()
666 static void cdns_uart_break_ctl(struct uart_port *port, int ctl) in cdns_uart_break_ctl() argument
671 spin_lock_irqsave(&port->lock, flags); in cdns_uart_break_ctl()
673 status = readl(port->membase + CDNS_UART_CR); in cdns_uart_break_ctl()
677 port->membase + CDNS_UART_CR); in cdns_uart_break_ctl()
681 port->membase + CDNS_UART_CR); in cdns_uart_break_ctl()
683 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_break_ctl()
693 static void cdns_uart_set_termios(struct uart_port *port, in cdns_uart_set_termios() argument
701 spin_lock_irqsave(&port->lock, flags); in cdns_uart_set_termios()
704 ctrl_reg = readl(port->membase + CDNS_UART_CR); in cdns_uart_set_termios()
706 writel(ctrl_reg, port->membase + CDNS_UART_CR); in cdns_uart_set_termios()
713 minbaud = port->uartclk / in cdns_uart_set_termios()
715 maxbaud = port->uartclk / (CDNS_UART_BDIV_MIN + 1); in cdns_uart_set_termios()
716 baud = uart_get_baud_rate(port, termios, old, minbaud, maxbaud); in cdns_uart_set_termios()
717 baud = cdns_uart_set_baud_rate(port, baud); in cdns_uart_set_termios()
722 uart_update_timeout(port, termios->c_cflag, baud); in cdns_uart_set_termios()
725 ctrl_reg = readl(port->membase + CDNS_UART_CR); in cdns_uart_set_termios()
727 writel(ctrl_reg, port->membase + CDNS_UART_CR); in cdns_uart_set_termios()
729 while (readl(port->membase + CDNS_UART_CR) & in cdns_uart_set_termios()
737 ctrl_reg = readl(port->membase + CDNS_UART_CR); in cdns_uart_set_termios()
740 writel(ctrl_reg, port->membase + CDNS_UART_CR); in cdns_uart_set_termios()
742 writel(rx_timeout, port->membase + CDNS_UART_RXTOUT); in cdns_uart_set_termios()
744 port->read_status_mask = CDNS_UART_IXR_TXEMPTY | CDNS_UART_IXR_RXTRIG | in cdns_uart_set_termios()
746 port->ignore_status_mask = 0; in cdns_uart_set_termios()
749 port->read_status_mask |= CDNS_UART_IXR_PARITY | in cdns_uart_set_termios()
753 port->ignore_status_mask |= CDNS_UART_IXR_PARITY | in cdns_uart_set_termios()
758 port->ignore_status_mask |= CDNS_UART_IXR_RXTRIG | in cdns_uart_set_termios()
762 mode_reg = readl(port->membase + CDNS_UART_MR); in cdns_uart_set_termios()
803 writel(cval, port->membase + CDNS_UART_MR); in cdns_uart_set_termios()
805 cval = readl(port->membase + CDNS_UART_MODEMCR); in cdns_uart_set_termios()
810 writel(cval, port->membase + CDNS_UART_MODEMCR); in cdns_uart_set_termios()
812 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_set_termios()
821 static int cdns_uart_startup(struct uart_port *port) in cdns_uart_startup() argument
823 struct cdns_uart *cdns_uart = port->private_data; in cdns_uart_startup()
831 spin_lock_irqsave(&port->lock, flags); in cdns_uart_startup()
835 port->membase + CDNS_UART_CR); in cdns_uart_startup()
841 port->membase + CDNS_UART_CR); in cdns_uart_startup()
843 while (readl(port->membase + CDNS_UART_CR) & in cdns_uart_startup()
851 status = readl(port->membase + CDNS_UART_CR); in cdns_uart_startup()
854 writel(status, port->membase + CDNS_UART_CR); in cdns_uart_startup()
861 port->membase + CDNS_UART_MR); in cdns_uart_startup()
867 writel(rx_trigger_level, port->membase + CDNS_UART_RXWM); in cdns_uart_startup()
873 writel(rx_timeout, port->membase + CDNS_UART_RXTOUT); in cdns_uart_startup()
876 writel(readl(port->membase + CDNS_UART_ISR), in cdns_uart_startup()
877 port->membase + CDNS_UART_ISR); in cdns_uart_startup()
879 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_startup()
881 ret = request_irq(port->irq, cdns_uart_isr, 0, CDNS_UART_NAME, port); in cdns_uart_startup()
883 dev_err(port->dev, "request_irq '%d' failed with %d\n", in cdns_uart_startup()
884 port->irq, ret); in cdns_uart_startup()
891 port->membase + CDNS_UART_IER); in cdns_uart_startup()
893 writel(CDNS_UART_RX_IRQS, port->membase + CDNS_UART_IER); in cdns_uart_startup()
902 static void cdns_uart_shutdown(struct uart_port *port) in cdns_uart_shutdown() argument
907 spin_lock_irqsave(&port->lock, flags); in cdns_uart_shutdown()
910 status = readl(port->membase + CDNS_UART_IMR); in cdns_uart_shutdown()
911 writel(status, port->membase + CDNS_UART_IDR); in cdns_uart_shutdown()
912 writel(0xffffffff, port->membase + CDNS_UART_ISR); in cdns_uart_shutdown()
916 port->membase + CDNS_UART_CR); in cdns_uart_shutdown()
918 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_shutdown()
920 free_irq(port->irq, port); in cdns_uart_shutdown()
929 static const char *cdns_uart_type(struct uart_port *port) in cdns_uart_type() argument
931 return port->type == PORT_XUARTPS ? CDNS_UART_NAME : NULL; in cdns_uart_type()
941 static int cdns_uart_verify_port(struct uart_port *port, in cdns_uart_verify_port() argument
946 if (port->irq != ser->irq) in cdns_uart_verify_port()
950 if (port->iobase != ser->port) in cdns_uart_verify_port()
965 static int cdns_uart_request_port(struct uart_port *port) in cdns_uart_request_port() argument
967 if (!request_mem_region(port->mapbase, CDNS_UART_REGISTER_SPACE, in cdns_uart_request_port()
972 port->membase = ioremap(port->mapbase, CDNS_UART_REGISTER_SPACE); in cdns_uart_request_port()
973 if (!port->membase) { in cdns_uart_request_port()
974 dev_err(port->dev, "Unable to map registers\n"); in cdns_uart_request_port()
975 release_mem_region(port->mapbase, CDNS_UART_REGISTER_SPACE); in cdns_uart_request_port()
988 static void cdns_uart_release_port(struct uart_port *port) in cdns_uart_release_port() argument
990 release_mem_region(port->mapbase, CDNS_UART_REGISTER_SPACE); in cdns_uart_release_port()
991 iounmap(port->membase); in cdns_uart_release_port()
992 port->membase = NULL; in cdns_uart_release_port()
1000 static void cdns_uart_config_port(struct uart_port *port, int flags) in cdns_uart_config_port() argument
1002 if (flags & UART_CONFIG_TYPE && cdns_uart_request_port(port) == 0) in cdns_uart_config_port()
1003 port->type = PORT_XUARTPS; in cdns_uart_config_port()
1012 static unsigned int cdns_uart_get_mctrl(struct uart_port *port) in cdns_uart_get_mctrl() argument
1016 struct cdns_uart *cdns_uart_data = port->private_data; in cdns_uart_get_mctrl()
1021 val = readl(port->membase + CDNS_UART_MODEMSR); in cdns_uart_get_mctrl()
1034 static void cdns_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in cdns_uart_set_mctrl() argument
1038 struct cdns_uart *cdns_uart_data = port->private_data; in cdns_uart_set_mctrl()
1043 val = readl(port->membase + CDNS_UART_MODEMCR); in cdns_uart_set_mctrl()
1044 mode_reg = readl(port->membase + CDNS_UART_MR); in cdns_uart_set_mctrl()
1058 writel(val, port->membase + CDNS_UART_MODEMCR); in cdns_uart_set_mctrl()
1059 writel(mode_reg, port->membase + CDNS_UART_MR); in cdns_uart_set_mctrl()
1063 static int cdns_uart_poll_get_char(struct uart_port *port) in cdns_uart_poll_get_char() argument
1068 spin_lock_irqsave(&port->lock, flags); in cdns_uart_poll_get_char()
1071 if (readl(port->membase + CDNS_UART_SR) & CDNS_UART_SR_RXEMPTY) in cdns_uart_poll_get_char()
1074 c = (unsigned char) readl(port->membase + CDNS_UART_FIFO); in cdns_uart_poll_get_char()
1076 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_poll_get_char()
1081 static void cdns_uart_poll_put_char(struct uart_port *port, unsigned char c) in cdns_uart_poll_put_char() argument
1085 spin_lock_irqsave(&port->lock, flags); in cdns_uart_poll_put_char()
1088 while (!(readl(port->membase + CDNS_UART_SR) & CDNS_UART_SR_TXEMPTY)) in cdns_uart_poll_put_char()
1092 writel(c, port->membase + CDNS_UART_FIFO); in cdns_uart_poll_put_char()
1095 while (!(readl(port->membase + CDNS_UART_SR) & CDNS_UART_SR_TXEMPTY)) in cdns_uart_poll_put_char()
1098 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_poll_put_char()
1102 static void cdns_uart_pm(struct uart_port *port, unsigned int state, in cdns_uart_pm() argument
1107 pm_runtime_mark_last_busy(port->dev); in cdns_uart_pm()
1108 pm_runtime_put_autosuspend(port->dev); in cdns_uart_pm()
1111 pm_runtime_get_sync(port->dev); in cdns_uart_pm()
1147 static void cdns_uart_console_putchar(struct uart_port *port, int ch) in cdns_uart_console_putchar() argument
1149 while (readl(port->membase + CDNS_UART_SR) & CDNS_UART_SR_TXFULL) in cdns_uart_console_putchar()
1151 writel(ch, port->membase + CDNS_UART_FIFO); in cdns_uart_console_putchar()
1159 uart_console_write(&dev->port, s, n, cdns_uart_console_putchar); in cdns_early_write()
1165 struct uart_port *port = &device->port; in cdns_early_console_setup() local
1167 if (!port->membase) in cdns_early_console_setup()
1172 port->membase + CDNS_UART_CR); in cdns_early_console_setup()
1177 if (port->uartclk && device->baud) { in cdns_early_console_setup()
1182 cdns_uart_calc_baud_divs(port->uartclk, device->baud, in cdns_early_console_setup()
1188 writel(mr, port->membase + CDNS_UART_MR); in cdns_early_console_setup()
1189 writel(cd, port->membase + CDNS_UART_BAUDGEN); in cdns_early_console_setup()
1190 writel(bdiv, port->membase + CDNS_UART_BAUDDIV); in cdns_early_console_setup()
1215 struct uart_port *port = console_port; in cdns_uart_console_write() local
1220 if (port->sysrq) in cdns_uart_console_write()
1223 locked = spin_trylock_irqsave(&port->lock, flags); in cdns_uart_console_write()
1225 spin_lock_irqsave(&port->lock, flags); in cdns_uart_console_write()
1228 imr = readl(port->membase + CDNS_UART_IMR); in cdns_uart_console_write()
1229 writel(imr, port->membase + CDNS_UART_IDR); in cdns_uart_console_write()
1235 ctrl = readl(port->membase + CDNS_UART_CR); in cdns_uart_console_write()
1238 writel(ctrl, port->membase + CDNS_UART_CR); in cdns_uart_console_write()
1240 uart_console_write(port, s, count, cdns_uart_console_putchar); in cdns_uart_console_write()
1241 while (cdns_uart_tx_empty(port) != TIOCSER_TEMT) in cdns_uart_console_write()
1245 writel(imr, port->membase + CDNS_UART_IER); in cdns_uart_console_write()
1248 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_console_write()
1260 struct uart_port *port = console_port; in cdns_uart_console_setup() local
1268 if (!port->membase) { in cdns_uart_console_setup()
1281 cdns_uart_tx_empty(port) != TIOCSER_TEMT) in cdns_uart_console_setup()
1284 return uart_set_options(port, co, baud, parity, bits, flow); in cdns_uart_console_setup()
1307 struct uart_port *port = dev_get_drvdata(device); in cdns_uart_suspend() local
1308 struct cdns_uart *cdns_uart = port->private_data; in cdns_uart_suspend()
1313 if (console_suspend_enabled && uart_console(port) && may_wake) { in cdns_uart_suspend()
1316 spin_lock_irqsave(&port->lock, flags); in cdns_uart_suspend()
1318 while (!(readl(port->membase + CDNS_UART_SR) & in cdns_uart_suspend()
1320 readl(port->membase + CDNS_UART_FIFO); in cdns_uart_suspend()
1322 writel(1, port->membase + CDNS_UART_RXWM); in cdns_uart_suspend()
1324 writel(CDNS_UART_IXR_TOUT, port->membase + CDNS_UART_IDR); in cdns_uart_suspend()
1325 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_suspend()
1332 return uart_suspend_port(cdns_uart->cdns_uart_driver, port); in cdns_uart_suspend()
1343 struct uart_port *port = dev_get_drvdata(device); in cdns_uart_resume() local
1344 struct cdns_uart *cdns_uart = port->private_data; in cdns_uart_resume()
1351 if (console_suspend_enabled && uart_console(port) && !may_wake) { in cdns_uart_resume()
1355 spin_lock_irqsave(&port->lock, flags); in cdns_uart_resume()
1358 ctrl_reg = readl(port->membase + CDNS_UART_CR); in cdns_uart_resume()
1360 writel(ctrl_reg, port->membase + CDNS_UART_CR); in cdns_uart_resume()
1361 while (readl(port->membase + CDNS_UART_CR) & in cdns_uart_resume()
1366 writel(rx_timeout, port->membase + CDNS_UART_RXTOUT); in cdns_uart_resume()
1368 ctrl_reg = readl(port->membase + CDNS_UART_CR); in cdns_uart_resume()
1371 writel(ctrl_reg, port->membase + CDNS_UART_CR); in cdns_uart_resume()
1375 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_resume()
1377 spin_lock_irqsave(&port->lock, flags); in cdns_uart_resume()
1379 writel(rx_trigger_level, port->membase + CDNS_UART_RXWM); in cdns_uart_resume()
1381 writel(CDNS_UART_IXR_TOUT, port->membase + CDNS_UART_IER); in cdns_uart_resume()
1382 spin_unlock_irqrestore(&port->lock, flags); in cdns_uart_resume()
1385 return uart_resume_port(cdns_uart->cdns_uart_driver, port); in cdns_uart_resume()
1390 struct uart_port *port = dev_get_drvdata(dev); in cdns_runtime_suspend() local
1391 struct cdns_uart *cdns_uart = port->private_data; in cdns_runtime_suspend()
1400 struct uart_port *port = dev_get_drvdata(dev); in cdns_runtime_resume() local
1401 struct cdns_uart *cdns_uart = port->private_data; in cdns_runtime_resume()
1439 struct uart_port *port; in cdns_uart_probe() local
1448 port = devm_kzalloc(&pdev->dev, sizeof(*port), GFP_KERNEL); in cdns_uart_probe()
1449 if (!port) in cdns_uart_probe()
1551 spin_lock_init(&port->lock); in cdns_uart_probe()
1552 port->type = PORT_UNKNOWN; in cdns_uart_probe()
1553 port->iotype = UPIO_MEM32; in cdns_uart_probe()
1554 port->flags = UPF_BOOT_AUTOCONF; in cdns_uart_probe()
1555 port->ops = &cdns_uart_ops; in cdns_uart_probe()
1556 port->fifosize = CDNS_UART_FIFO_SIZE; in cdns_uart_probe()
1557 port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_XILINX_PS_UART_CONSOLE); in cdns_uart_probe()
1558 port->line = id; in cdns_uart_probe()
1565 port->mapbase = res->start; in cdns_uart_probe()
1566 port->irq = irq; in cdns_uart_probe()
1567 port->dev = &pdev->dev; in cdns_uart_probe()
1568 port->uartclk = clk_get_rate(cdns_uart_data->uartclk); in cdns_uart_probe()
1569 port->private_data = cdns_uart_data; in cdns_uart_probe()
1570 cdns_uart_data->port = port; in cdns_uart_probe()
1571 platform_set_drvdata(pdev, port); in cdns_uart_probe()
1577 device_init_wakeup(port->dev, true); in cdns_uart_probe()
1588 console_port = port; in cdns_uart_probe()
1592 rc = uart_add_one_port(&cdns_uart_uart_driver, port); in cdns_uart_probe()
1601 if (console_port == port && in cdns_uart_probe()
1641 struct uart_port *port = platform_get_drvdata(pdev); in cdns_uart_remove() local
1642 struct cdns_uart *cdns_uart_data = port->private_data; in cdns_uart_remove()
1650 rc = uart_remove_one_port(cdns_uart_data->cdns_uart_driver, port); in cdns_uart_remove()
1651 port->mapbase = 0; in cdns_uart_remove()
1660 if (console_port == port) in cdns_uart_remove()