Lines Matching +full:auto +full:- +full:baud

1 // SPDX-License-Identifier: GPL-2.0+
9 * Copyright 2014 Oleksij Rempel <linux@rempel-privat.de>
11 * Copyright 2008-2010 Freescale Semiconductor, Inc.
34 #include <linux/dma-mapping.h>
90 #define AUART_LINECTRL_WLEN(v) ((((v) - 5) & 0x3) << 5)
138 * RW. Receive Timeout Counter Value: number of 8-bit-time to wait before
140 * input is idle, then the watchdog counter will decrement each bit-time. Note
141 * 7-bit-time is added to the programmed value, so a value of zero will set
142 * the counter to 7-bit-time, a value of 0x1 gives 15-bit-time and so on. Also
146 * value is 0x3 (31 bit-time).
149 /* TIMEOUT = (100*7+1)*(1/BAUD) */
218 /* Auto-Boud Timeout */
273 /* RW. Enable Auto Direction Control. */
280 /* RW. Enable Auto Address Detect (AAD). */
284 /* RW. Enable RS-485/EIA-485 Normal Multidrop Mode (NMM) */
294 * is in periods of the baud clock.
299 /* WO. Auto-baud time-out interrupt clear bit. */
301 /* WO. End of auto-baud interrupt clear bit. */
305 /* Auto-baud mode select bit. 0 - Mode 0, 1 - Mode 1. */
308 * Auto-baud start (auto-baud is running). Auto-baud run bit. This bit is
309 * automatically cleared after auto-baud completion.
320 /* RW. Baud Rate Mode: 1 - Enable sync mode. 0 - async mode. */
322 /* RW. 1 - MSB bit send frist; 0 - LSB bit frist. */
324 /* RW. 1 - sample rate = 8 x Baudrate; 0 - sample rate = 16 x Baudrate. */
326 /* RW. 1 - Set word length to 9bit. 0 - use ASM9260_BM_LCTRL_WLEN */
338 /* RW. 1 - ISO7816 mode; 0 - USART mode */
376 /* The size of the array - must be last */
446 .compatible = "fsl,imx28-auart",
449 .compatible = "fsl,imx23-auart",
452 .compatible = "alphascale,asm9260-auart",
460 return s->devtype == IMX28_AUART; in is_imx28_auart()
465 return s->devtype == ASM9260_AUART; in is_asm9260_auart()
470 return s->flags & MXS_AUART_DMA_ENABLED; in auart_dma_enabled()
476 return uap->vendor->reg_offset[reg]; in mxs_reg_to_offset()
482 void __iomem *addr = uap->port.membase + mxs_reg_to_offset(uap, reg); in mxs_read()
490 void __iomem *addr = uap->port.membase + mxs_reg_to_offset(uap, reg); in mxs_write()
498 void __iomem *addr = uap->port.membase + mxs_reg_to_offset(uap, reg); in mxs_set()
506 void __iomem *addr = uap->port.membase + mxs_reg_to_offset(uap, reg); in mxs_clr()
520 struct tty_port *tport = &s->port.state->port; in dma_tx_callback()
522 dma_unmap_sg(s->dev, &s->tx_sgl, 1, DMA_TO_DEVICE); in dma_tx_callback()
525 clear_bit(MXS_AUART_DMA_TX_SYNC, &s->flags); in dma_tx_callback()
529 if (kfifo_len(&tport->xmit_fifo) < WAKEUP_CHARS) in dma_tx_callback()
530 uart_write_wakeup(&s->port); in dma_tx_callback()
538 struct scatterlist *sgl = &s->tx_sgl; in mxs_auart_dma_tx()
539 struct dma_chan *channel = s->tx_dma_chan; in mxs_auart_dma_tx()
547 dev_err(s->dev, "step 1 error\n"); in mxs_auart_dma_tx()
548 return -EINVAL; in mxs_auart_dma_tx()
552 sg_init_one(sgl, s->tx_dma_buf, size); in mxs_auart_dma_tx()
553 dma_map_sg(s->dev, sgl, 1, DMA_TO_DEVICE); in mxs_auart_dma_tx()
557 dev_err(s->dev, "step 2 error\n"); in mxs_auart_dma_tx()
558 return -EINVAL; in mxs_auart_dma_tx()
562 desc->callback = dma_tx_callback; in mxs_auart_dma_tx()
563 desc->callback_param = s; in mxs_auart_dma_tx()
571 struct tty_port *tport = &s->port.state->port; in mxs_auart_tx_chars()
577 void *buffer = s->tx_dma_buf; in mxs_auart_tx_chars()
579 if (test_and_set_bit(MXS_AUART_DMA_TX_SYNC, &s->flags)) in mxs_auart_tx_chars()
582 if (uart_tx_stopped(&s->port)) in mxs_auart_tx_chars()
583 mxs_auart_stop_tx(&s->port); in mxs_auart_tx_chars()
585 i = kfifo_out(&tport->xmit_fifo, buffer, in mxs_auart_tx_chars()
591 clear_bit(MXS_AUART_DMA_TX_SYNC, &s->flags); in mxs_auart_tx_chars()
597 pending = uart_port_tx_flags(&s->port, ch, UART_TX_NOSTOP, in mxs_auart_tx_chars()
605 if (uart_tx_stopped(&s->port)) in mxs_auart_tx_chars()
606 mxs_auart_stop_tx(&s->port); in mxs_auart_tx_chars()
618 s->port.icount.rx++; in mxs_auart_rx_char()
621 s->port.icount.brk++; in mxs_auart_rx_char()
622 if (uart_handle_break(&s->port)) in mxs_auart_rx_char()
625 s->port.icount.parity++; in mxs_auart_rx_char()
627 s->port.icount.frame++; in mxs_auart_rx_char()
633 stat &= s->port.read_status_mask; in mxs_auart_rx_char()
643 s->port.icount.overrun++; in mxs_auart_rx_char()
645 if (uart_handle_sysrq_char(&s->port, c)) in mxs_auart_rx_char()
648 uart_insert_char(&s->port, stat, AUART_STAT_OERR, c, flag); in mxs_auart_rx_char()
665 tty_flip_buffer_push(&s->port.state->port); in mxs_auart_rx_chars()
676 if (u->type != PORT_UNKNOWN && u->type != PORT_IMX) in mxs_auart_verify_port()
677 return -EINVAL; in mxs_auart_verify_port()
689 return dev_name(s->dev); in mxs_auart_type()
712 mctrl_gpio_set(s->gpios, mctrl); in mxs_auart_set_mctrl()
720 mctrl_diff = mctrl ^ s->mctrl_prev; in mxs_auart_modem_status()
721 s->mctrl_prev = mctrl; in mxs_auart_modem_status()
722 if (mctrl_diff & MCTRL_ANY_DELTA && s->ms_irq_enabled && in mxs_auart_modem_status()
723 s->port.state != NULL) { in mxs_auart_modem_status()
725 s->port.icount.rng++; in mxs_auart_modem_status()
727 s->port.icount.dsr++; in mxs_auart_modem_status()
729 uart_handle_dcd_change(&s->port, mctrl & TIOCM_CD); in mxs_auart_modem_status()
731 uart_handle_cts_change(&s->port, mctrl & TIOCM_CTS); in mxs_auart_modem_status()
733 wake_up_interruptible(&s->port.state->port.delta_msr_wait); in mxs_auart_modem_status()
747 return mctrl_gpio_get(s->gpios, &mctrl); in mxs_auart_get_mctrl()
760 if (s->ms_irq_enabled) in mxs_auart_enable_ms()
763 s->ms_irq_enabled = true; in mxs_auart_enable_ms()
765 if (s->gpio_irq[UART_GPIO_CTS] >= 0) in mxs_auart_enable_ms()
766 enable_irq(s->gpio_irq[UART_GPIO_CTS]); in mxs_auart_enable_ms()
769 if (s->gpio_irq[UART_GPIO_DSR] >= 0) in mxs_auart_enable_ms()
770 enable_irq(s->gpio_irq[UART_GPIO_DSR]); in mxs_auart_enable_ms()
772 if (s->gpio_irq[UART_GPIO_RI] >= 0) in mxs_auart_enable_ms()
773 enable_irq(s->gpio_irq[UART_GPIO_RI]); in mxs_auart_enable_ms()
775 if (s->gpio_irq[UART_GPIO_DCD] >= 0) in mxs_auart_enable_ms()
776 enable_irq(s->gpio_irq[UART_GPIO_DCD]); in mxs_auart_enable_ms()
789 if (!s->ms_irq_enabled) in mxs_auart_disable_ms()
792 s->ms_irq_enabled = false; in mxs_auart_disable_ms()
794 if (s->gpio_irq[UART_GPIO_CTS] >= 0) in mxs_auart_disable_ms()
795 disable_irq(s->gpio_irq[UART_GPIO_CTS]); in mxs_auart_disable_ms()
798 if (s->gpio_irq[UART_GPIO_DSR] >= 0) in mxs_auart_disable_ms()
799 disable_irq(s->gpio_irq[UART_GPIO_DSR]); in mxs_auart_disable_ms()
801 if (s->gpio_irq[UART_GPIO_RI] >= 0) in mxs_auart_disable_ms()
802 disable_irq(s->gpio_irq[UART_GPIO_RI]); in mxs_auart_disable_ms()
804 if (s->gpio_irq[UART_GPIO_DCD] >= 0) in mxs_auart_disable_ms()
805 disable_irq(s->gpio_irq[UART_GPIO_DCD]); in mxs_auart_disable_ms()
812 struct tty_port *port = &s->port.state->port; in dma_rx_callback()
816 dma_unmap_sg(s->dev, &s->rx_sgl, 1, DMA_FROM_DEVICE); in dma_rx_callback()
823 tty_insert_flip_string(port, s->rx_dma_buf, count); in dma_rx_callback()
835 struct scatterlist *sgl = &s->rx_sgl; in mxs_auart_dma_prep_rx()
836 struct dma_chan *channel = s->rx_dma_chan; in mxs_auart_dma_prep_rx()
846 dev_err(s->dev, "step 1 error\n"); in mxs_auart_dma_prep_rx()
847 return -EINVAL; in mxs_auart_dma_prep_rx()
851 sg_init_one(sgl, s->rx_dma_buf, UART_XMIT_SIZE); in mxs_auart_dma_prep_rx()
852 dma_map_sg(s->dev, sgl, 1, DMA_FROM_DEVICE); in mxs_auart_dma_prep_rx()
856 dev_err(s->dev, "step 2 error\n"); in mxs_auart_dma_prep_rx()
857 return -1; in mxs_auart_dma_prep_rx()
861 desc->callback = dma_rx_callback; in mxs_auart_dma_prep_rx()
862 desc->callback_param = s; in mxs_auart_dma_prep_rx()
870 if (s->tx_dma_chan) { in mxs_auart_dma_exit_channel()
871 dma_release_channel(s->tx_dma_chan); in mxs_auart_dma_exit_channel()
872 s->tx_dma_chan = NULL; in mxs_auart_dma_exit_channel()
874 if (s->rx_dma_chan) { in mxs_auart_dma_exit_channel()
875 dma_release_channel(s->rx_dma_chan); in mxs_auart_dma_exit_channel()
876 s->rx_dma_chan = NULL; in mxs_auart_dma_exit_channel()
879 kfree(s->tx_dma_buf); in mxs_auart_dma_exit_channel()
880 kfree(s->rx_dma_buf); in mxs_auart_dma_exit_channel()
881 s->tx_dma_buf = NULL; in mxs_auart_dma_exit_channel()
882 s->rx_dma_buf = NULL; in mxs_auart_dma_exit_channel()
892 s->flags &= ~MXS_AUART_DMA_ENABLED; in mxs_auart_dma_exit()
893 clear_bit(MXS_AUART_DMA_TX_SYNC, &s->flags); in mxs_auart_dma_exit()
894 clear_bit(MXS_AUART_DMA_RX_READY, &s->flags); in mxs_auart_dma_exit()
905 chan = dma_request_chan(s->dev, "rx"); in mxs_auart_dma_init()
908 s->rx_dma_chan = chan; in mxs_auart_dma_init()
910 s->rx_dma_buf = kzalloc(UART_XMIT_SIZE, GFP_KERNEL | GFP_DMA); in mxs_auart_dma_init()
911 if (!s->rx_dma_buf) in mxs_auart_dma_init()
915 chan = dma_request_chan(s->dev, "tx"); in mxs_auart_dma_init()
918 s->tx_dma_chan = chan; in mxs_auart_dma_init()
920 s->tx_dma_buf = kzalloc(UART_XMIT_SIZE, GFP_KERNEL | GFP_DMA); in mxs_auart_dma_init()
921 if (!s->tx_dma_buf) in mxs_auart_dma_init()
925 s->flags |= MXS_AUART_DMA_ENABLED; in mxs_auart_dma_init()
926 dev_dbg(s->dev, "enabled the DMA support."); in mxs_auart_dma_init()
929 s->port.fifosize = UART_XMIT_SIZE; in mxs_auart_dma_init()
935 return -EINVAL; in mxs_auart_dma_init()
939 #define RTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_RTS)
940 #define CTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_CTS)
947 unsigned int cflag, baud, baud_min, baud_max; in mxs_auart_settermios() local
949 cflag = termios->c_cflag; in mxs_auart_settermios()
965 u->read_status_mask = AUART_STAT_OERR; in mxs_auart_settermios()
967 if (termios->c_iflag & INPCK) in mxs_auart_settermios()
968 u->read_status_mask |= AUART_STAT_PERR; in mxs_auart_settermios()
969 if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK)) in mxs_auart_settermios()
970 u->read_status_mask |= AUART_STAT_BERR; in mxs_auart_settermios()
975 u->ignore_status_mask = 0; in mxs_auart_settermios()
976 if (termios->c_iflag & IGNPAR) in mxs_auart_settermios()
977 u->ignore_status_mask |= AUART_STAT_PERR; in mxs_auart_settermios()
978 if (termios->c_iflag & IGNBRK) { in mxs_auart_settermios()
979 u->ignore_status_mask |= AUART_STAT_BERR; in mxs_auart_settermios()
984 if (termios->c_iflag & IGNPAR) in mxs_auart_settermios()
985 u->ignore_status_mask |= AUART_STAT_OERR; in mxs_auart_settermios()
1010 && test_bit(MXS_AUART_RTSCTS, &s->flags)) { in mxs_auart_settermios()
1023 /* set baud rate */ in mxs_auart_settermios()
1025 baud = uart_get_baud_rate(u, termios, old, in mxs_auart_settermios()
1026 u->uartclk * 4 / 0x3FFFFF, in mxs_auart_settermios()
1027 u->uartclk / 16); in mxs_auart_settermios()
1028 div = u->uartclk * 4 / baud; in mxs_auart_settermios()
1030 baud_min = DIV_ROUND_UP(u->uartclk * 32, in mxs_auart_settermios()
1032 baud_max = u->uartclk * 32 / AUART_LINECTRL_BAUD_DIV_MIN; in mxs_auart_settermios()
1033 baud = uart_get_baud_rate(u, termios, old, baud_min, baud_max); in mxs_auart_settermios()
1034 div = DIV_ROUND_CLOSEST(u->uartclk * 32, baud); in mxs_auart_settermios()
1043 uart_update_timeout(u, termios->c_cflag, baud); in mxs_auart_settermios()
1047 !test_and_set_bit(MXS_AUART_DMA_RX_READY, &s->flags)) { in mxs_auart_settermios()
1054 dev_err(s->dev, "We can not start up the DMA.\n"); in mxs_auart_settermios()
1058 /* CTS flow-control and modem-status interrupts */ in mxs_auart_settermios()
1059 if (UART_ENABLE_MS(u, termios->c_cflag)) in mxs_auart_settermios()
1068 if (termios->c_line == N_PPS) { in mxs_auart_set_ldisc()
1069 port->flags |= UPF_HARDPPS_CD; in mxs_auart_set_ldisc()
1072 port->flags &= ~UPF_HARDPPS_CD; in mxs_auart_set_ldisc()
1080 u32 mctrl_temp = s->mctrl_prev; in mxs_auart_irq_handle()
1082 uart_port_lock(&s->port); in mxs_auart_irq_handle()
1094 if (irq == s->gpio_irq[UART_GPIO_CTS] || in mxs_auart_irq_handle()
1095 irq == s->gpio_irq[UART_GPIO_DCD] || in mxs_auart_irq_handle()
1096 irq == s->gpio_irq[UART_GPIO_DSR] || in mxs_auart_irq_handle()
1097 irq == s->gpio_irq[UART_GPIO_RI]) in mxs_auart_irq_handle()
1099 mctrl_gpio_get(s->gpios, &mctrl_temp)); in mxs_auart_irq_handle()
1102 if (CTS_AT_AUART() && s->ms_irq_enabled) in mxs_auart_irq_handle()
1103 uart_handle_cts_change(&s->port, in mxs_auart_irq_handle()
1120 uart_port_unlock(&s->port); in mxs_auart_irq_handle()
1162 dev_err(s->dev, "Failed to reset the unit."); in mxs_auart_reset_assert()
1170 ret = clk_prepare_enable(s->clk); in mxs_auart_startup()
1188 u->fifosize = MXS_AUART_FIFO_SIZE; in mxs_auart_startup()
1197 mctrl_gpio_get(s->gpios, &s->mctrl_prev); in mxs_auart_startup()
1199 s->ms_irq_enabled = false; in mxs_auart_startup()
1222 clk_disable_unprepare(s->clk); in mxs_auart_shutdown()
1299 if (!to--) in mxs_auart_console_putchar()
1315 if (co->index >= MXS_AUART_PORTS || co->index < 0) in auart_console_write()
1318 s = auart_port[co->index]; in auart_console_write()
1319 port = &s->port; in auart_console_write()
1321 clk_enable(s->clk); in auart_console_write()
1335 if (!to--) in auart_console_write()
1350 clk_disable(s->clk); in auart_console_write()
1354 auart_console_get_options(struct mxs_auart_port *s, int *baud, in auart_console_get_options() argument
1357 struct uart_port *port = &s->port; in auart_console_get_options()
1379 >> (AUART_LINECTRL_BAUD_DIVINT_SHIFT - 6); in auart_console_get_options()
1385 *baud = (port->uartclk << 2) / quot; in auart_console_get_options()
1392 int baud = 9600; in auart_console_setup() local
1403 if (co->index == -1 || co->index >= ARRAY_SIZE(auart_port)) in auart_console_setup()
1404 co->index = 0; in auart_console_setup()
1405 s = auart_port[co->index]; in auart_console_setup()
1407 return -ENODEV; in auart_console_setup()
1409 ret = clk_prepare_enable(s->clk); in auart_console_setup()
1414 uart_parse_options(options, &baud, &parity, &bits, &flow); in auart_console_setup()
1416 auart_console_get_options(s, &baud, &parity, &bits); in auart_console_setup()
1418 ret = uart_set_options(&s->port, co, baud, parity, bits, flow); in auart_console_setup()
1420 clk_disable_unprepare(s->clk); in auart_console_setup()
1431 .index = -1,
1451 s->vendor = &vendor_alphascale_asm9260; in mxs_init_regs()
1453 s->vendor = &vendor_freescale_stmp37xx; in mxs_init_regs()
1462 s->clk = devm_clk_get(&pdev->dev, NULL); in mxs_get_clks()
1463 return PTR_ERR_OR_ZERO(s->clk); in mxs_get_clks()
1466 s->clk = devm_clk_get(s->dev, "mod"); in mxs_get_clks()
1467 if (IS_ERR(s->clk)) { in mxs_get_clks()
1468 dev_err(s->dev, "Failed to get \"mod\" clk\n"); in mxs_get_clks()
1469 return PTR_ERR(s->clk); in mxs_get_clks()
1472 s->clk_ahb = devm_clk_get(s->dev, "ahb"); in mxs_get_clks()
1473 if (IS_ERR(s->clk_ahb)) { in mxs_get_clks()
1474 dev_err(s->dev, "Failed to get \"ahb\" clk\n"); in mxs_get_clks()
1475 return PTR_ERR(s->clk_ahb); in mxs_get_clks()
1478 err = clk_prepare_enable(s->clk_ahb); in mxs_get_clks()
1480 dev_err(s->dev, "Failed to enable ahb_clk!\n"); in mxs_get_clks()
1484 err = clk_set_rate(s->clk, clk_get_rate(s->clk_ahb)); in mxs_get_clks()
1486 dev_err(s->dev, "Failed to set rate!\n"); in mxs_get_clks()
1490 err = clk_prepare_enable(s->clk); in mxs_get_clks()
1492 dev_err(s->dev, "Failed to enable clk!\n"); in mxs_get_clks()
1499 clk_disable_unprepare(s->clk_ahb); in mxs_get_clks()
1508 s->gpios = mctrl_gpio_init_noauto(dev, 0); in mxs_auart_init_gpios()
1509 if (IS_ERR(s->gpios)) in mxs_auart_init_gpios()
1510 return PTR_ERR(s->gpios); in mxs_auart_init_gpios()
1514 if (test_bit(MXS_AUART_RTSCTS, &s->flags)) in mxs_auart_init_gpios()
1517 clear_bit(MXS_AUART_RTSCTS, &s->flags); in mxs_auart_init_gpios()
1521 gpiod = mctrl_gpio_to_gpiod(s->gpios, i); in mxs_auart_init_gpios()
1523 s->gpio_irq[i] = gpiod_to_irq(gpiod); in mxs_auart_init_gpios()
1525 s->gpio_irq[i] = -EINVAL; in mxs_auart_init_gpios()
1536 if (s->gpio_irq[i] >= 0) in mxs_auart_free_gpio_irq()
1537 free_irq(s->gpio_irq[i], s); in mxs_auart_free_gpio_irq()
1542 int *irq = s->gpio_irq; in mxs_auart_request_gpio_irq()
1552 IRQ_TYPE_EDGE_BOTH, dev_name(s->dev), s); in mxs_auart_request_gpio_irq()
1554 dev_err(s->dev, "%s - Can't get %d irq\n", in mxs_auart_request_gpio_irq()
1562 while (err && (i-- > 0)) in mxs_auart_request_gpio_irq()
1571 struct device_node *np = pdev->dev.of_node; in mxs_auart_probe()
1577 s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL); in mxs_auart_probe()
1579 return -ENOMEM; in mxs_auart_probe()
1581 s->port.dev = &pdev->dev; in mxs_auart_probe()
1582 s->dev = &pdev->dev; in mxs_auart_probe()
1586 dev_err(&pdev->dev, "failed to get alias id: %d\n", ret); in mxs_auart_probe()
1589 s->port.line = ret; in mxs_auart_probe()
1591 if (of_property_read_bool(np, "uart-has-rtscts") || in mxs_auart_probe()
1592 of_property_read_bool(np, "fsl,uart-has-rtscts") /* deprecated */) in mxs_auart_probe()
1593 set_bit(MXS_AUART_RTSCTS, &s->flags); in mxs_auart_probe()
1595 if (s->port.line >= ARRAY_SIZE(auart_port)) { in mxs_auart_probe()
1596 dev_err(&pdev->dev, "serial%d out of range\n", s->port.line); in mxs_auart_probe()
1597 return -EINVAL; in mxs_auart_probe()
1600 s->devtype = (enum mxs_auart_type)of_device_get_match_data(&pdev->dev); in mxs_auart_probe()
1608 ret = -ENXIO; in mxs_auart_probe()
1612 s->port.mapbase = r->start; in mxs_auart_probe()
1613 s->port.membase = ioremap(r->start, resource_size(r)); in mxs_auart_probe()
1614 if (!s->port.membase) { in mxs_auart_probe()
1615 ret = -ENOMEM; in mxs_auart_probe()
1618 s->port.ops = &mxs_auart_ops; in mxs_auart_probe()
1619 s->port.iotype = UPIO_MEM; in mxs_auart_probe()
1620 s->port.fifosize = MXS_AUART_FIFO_SIZE; in mxs_auart_probe()
1621 s->port.uartclk = clk_get_rate(s->clk); in mxs_auart_probe()
1622 s->port.type = PORT_IMX; in mxs_auart_probe()
1623 s->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_MXS_AUART_CONSOLE); in mxs_auart_probe()
1627 s->mctrl_prev = 0; in mxs_auart_probe()
1635 s->port.irq = irq; in mxs_auart_probe()
1636 ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0, in mxs_auart_probe()
1637 dev_name(&pdev->dev), s); in mxs_auart_probe()
1643 ret = mxs_auart_init_gpios(s, &pdev->dev); in mxs_auart_probe()
1645 dev_err(&pdev->dev, "Failed to initialize GPIOs.\n"); in mxs_auart_probe()
1656 auart_port[s->port.line] = s; in mxs_auart_probe()
1660 ret = uart_add_one_port(&auart_driver, &s->port); in mxs_auart_probe()
1666 dev_info(&pdev->dev, "Found APPUART ASM9260\n"); in mxs_auart_probe()
1669 dev_info(&pdev->dev, "Found APPUART %d.%d.%d\n", in mxs_auart_probe()
1678 auart_port[pdev->id] = NULL; in mxs_auart_probe()
1681 iounmap(s->port.membase); in mxs_auart_probe()
1685 clk_disable_unprepare(s->clk); in mxs_auart_probe()
1686 clk_disable_unprepare(s->clk_ahb); in mxs_auart_probe()
1695 uart_remove_one_port(&auart_driver, &s->port); in mxs_auart_remove()
1696 auart_port[pdev->id] = NULL; in mxs_auart_remove()
1698 iounmap(s->port.membase); in mxs_auart_remove()
1700 clk_disable_unprepare(s->clk); in mxs_auart_remove()
1701 clk_disable_unprepare(s->clk_ahb); in mxs_auart_remove()
1709 .name = "mxs-auart",
1743 MODULE_ALIAS("platform:mxs-auart");