ourport 159 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 160 drivers/tty/serial/samsung.c struct s3c24xx_uart_dma *dma = ourport->dma; ourport 171 drivers/tty/serial/samsung.c disable_irq_nosync(ourport->tx_irq); ourport 173 drivers/tty/serial/samsung.c if (dma && dma->tx_chan && ourport->tx_in_progress == S3C24XX_TX_DMA) { ourport 177 drivers/tty/serial/samsung.c dma_sync_single_for_cpu(ourport->port.dev, ourport 186 drivers/tty/serial/samsung.c ourport->tx_in_progress = 0; ourport 191 drivers/tty/serial/samsung.c ourport->tx_mode = 0; ourport 194 drivers/tty/serial/samsung.c static void s3c24xx_serial_start_next_tx(struct s3c24xx_uart_port *ourport); ourport 198 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = args; ourport 199 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 201 drivers/tty/serial/samsung.c struct s3c24xx_uart_dma *dma = ourport->dma; ourport 211 drivers/tty/serial/samsung.c dma_sync_single_for_cpu(ourport->port.dev, dma->tx_transfer_addr, ourport 218 drivers/tty/serial/samsung.c ourport->tx_in_progress = 0; ourport 223 drivers/tty/serial/samsung.c s3c24xx_serial_start_next_tx(ourport); ourport 227 drivers/tty/serial/samsung.c static void enable_tx_dma(struct s3c24xx_uart_port *ourport) ourport 229 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 236 drivers/tty/serial/samsung.c disable_irq_nosync(ourport->tx_irq); ourport 246 drivers/tty/serial/samsung.c ourport->tx_mode = S3C24XX_TX_DMA; ourport 249 drivers/tty/serial/samsung.c static void enable_tx_pio(struct s3c24xx_uart_port *ourport) ourport 251 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 255 drivers/tty/serial/samsung.c ourport->tx_in_progress = S3C24XX_TX_PIO; ourport 270 drivers/tty/serial/samsung.c enable_irq(ourport->tx_irq); ourport 272 drivers/tty/serial/samsung.c ourport->tx_mode = S3C24XX_TX_PIO; ourport 275 drivers/tty/serial/samsung.c static void s3c24xx_serial_start_tx_pio(struct s3c24xx_uart_port *ourport) ourport 277 drivers/tty/serial/samsung.c if (ourport->tx_mode != S3C24XX_TX_PIO) ourport 278 drivers/tty/serial/samsung.c enable_tx_pio(ourport); ourport 281 drivers/tty/serial/samsung.c static int s3c24xx_serial_start_tx_dma(struct s3c24xx_uart_port *ourport, ourport 284 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 286 drivers/tty/serial/samsung.c struct s3c24xx_uart_dma *dma = ourport->dma; ourport 289 drivers/tty/serial/samsung.c if (ourport->tx_mode != S3C24XX_TX_DMA) ourport 290 drivers/tty/serial/samsung.c enable_tx_dma(ourport); ourport 295 drivers/tty/serial/samsung.c dma_sync_single_for_device(ourport->port.dev, dma->tx_transfer_addr, ourport 302 drivers/tty/serial/samsung.c dev_err(ourport->port.dev, "Unable to get desc for Tx\n"); ourport 307 drivers/tty/serial/samsung.c dma->tx_desc->callback_param = ourport; ourport 310 drivers/tty/serial/samsung.c ourport->tx_in_progress = S3C24XX_TX_DMA; ourport 316 drivers/tty/serial/samsung.c static void s3c24xx_serial_start_next_tx(struct s3c24xx_uart_port *ourport) ourport 318 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 330 drivers/tty/serial/samsung.c if (!ourport->dma || !ourport->dma->tx_chan || ourport 331 drivers/tty/serial/samsung.c count < ourport->min_dma_size || ourport 333 drivers/tty/serial/samsung.c s3c24xx_serial_start_tx_pio(ourport); ourport 335 drivers/tty/serial/samsung.c s3c24xx_serial_start_tx_dma(ourport, count); ourport 340 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 348 drivers/tty/serial/samsung.c if (!ourport->dma || !ourport->dma->tx_chan) ourport 349 drivers/tty/serial/samsung.c s3c24xx_serial_start_tx_pio(ourport); ourport 352 drivers/tty/serial/samsung.c if (ourport->dma && ourport->dma->tx_chan) { ourport 353 drivers/tty/serial/samsung.c if (!uart_circ_empty(xmit) && !ourport->tx_in_progress) ourport 354 drivers/tty/serial/samsung.c s3c24xx_serial_start_next_tx(ourport); ourport 358 drivers/tty/serial/samsung.c static void s3c24xx_uart_copy_rx_to_tty(struct s3c24xx_uart_port *ourport, ourport 361 drivers/tty/serial/samsung.c struct s3c24xx_uart_dma *dma = ourport->dma; ourport 367 drivers/tty/serial/samsung.c dma_sync_single_for_cpu(ourport->port.dev, dma->rx_addr, ourport 370 drivers/tty/serial/samsung.c ourport->port.icount.rx += count; ourport 372 drivers/tty/serial/samsung.c dev_err(ourport->port.dev, "No tty port\n"); ourport 376 drivers/tty/serial/samsung.c ((unsigned char *)(ourport->dma->rx_buf)), count); ourport 379 drivers/tty/serial/samsung.c dev_err(ourport->port.dev, "RxData copy to tty layer failed\n"); ourport 385 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 386 drivers/tty/serial/samsung.c struct s3c24xx_uart_dma *dma = ourport->dma; ourport 398 drivers/tty/serial/samsung.c disable_irq_nosync(ourport->rx_irq); ourport 409 drivers/tty/serial/samsung.c s3c24xx_uart_copy_rx_to_tty(ourport, t, received); ourport 423 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport; ourport 428 drivers/tty/serial/samsung.c ourport = container_of(port, struct s3c24xx_uart_port, port); ourport 429 drivers/tty/serial/samsung.c return ourport->cfg; ourport 432 drivers/tty/serial/samsung.c static int s3c24xx_serial_rx_fifocnt(struct s3c24xx_uart_port *ourport, ourport 435 drivers/tty/serial/samsung.c struct s3c24xx_uart_info *info = ourport->info; ourport 438 drivers/tty/serial/samsung.c return ourport->port.fifosize; ourport 443 drivers/tty/serial/samsung.c static void s3c64xx_start_rx_dma(struct s3c24xx_uart_port *ourport); ourport 446 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = args; ourport 447 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 449 drivers/tty/serial/samsung.c struct s3c24xx_uart_dma *dma = ourport->dma; ourport 451 drivers/tty/serial/samsung.c struct tty_struct *tty = tty_port_tty_get(&ourport->port.state->port); ourport 464 drivers/tty/serial/samsung.c s3c24xx_uart_copy_rx_to_tty(ourport, t, received); ourport 471 drivers/tty/serial/samsung.c s3c64xx_start_rx_dma(ourport); ourport 476 drivers/tty/serial/samsung.c static void s3c64xx_start_rx_dma(struct s3c24xx_uart_port *ourport) ourport 478 drivers/tty/serial/samsung.c struct s3c24xx_uart_dma *dma = ourport->dma; ourport 480 drivers/tty/serial/samsung.c dma_sync_single_for_device(ourport->port.dev, dma->rx_addr, ourport 487 drivers/tty/serial/samsung.c dev_err(ourport->port.dev, "Unable to get desc for Rx\n"); ourport 492 drivers/tty/serial/samsung.c dma->rx_desc->callback_param = ourport; ourport 502 drivers/tty/serial/samsung.c static void enable_rx_dma(struct s3c24xx_uart_port *ourport) ourport 504 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 522 drivers/tty/serial/samsung.c ourport->rx_mode = S3C24XX_RX_DMA; ourport 525 drivers/tty/serial/samsung.c static void enable_rx_pio(struct s3c24xx_uart_port *ourport) ourport 527 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 542 drivers/tty/serial/samsung.c ourport->rx_mode = S3C24XX_RX_PIO; ourport 545 drivers/tty/serial/samsung.c static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport); ourport 550 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = dev_id; ourport 551 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 552 drivers/tty/serial/samsung.c struct s3c24xx_uart_dma *dma = ourport->dma; ourport 553 drivers/tty/serial/samsung.c struct tty_struct *tty = tty_port_tty_get(&ourport->port.state->port); ourport 564 drivers/tty/serial/samsung.c s3c64xx_start_rx_dma(ourport); ourport 565 drivers/tty/serial/samsung.c if (ourport->rx_mode == S3C24XX_RX_PIO) ourport 566 drivers/tty/serial/samsung.c enable_rx_dma(ourport); ourport 570 drivers/tty/serial/samsung.c if (ourport->rx_mode == S3C24XX_RX_DMA) { ourport 575 drivers/tty/serial/samsung.c s3c24xx_uart_copy_rx_to_tty(ourport, t, received); ourport 577 drivers/tty/serial/samsung.c enable_rx_pio(ourport); ourport 580 drivers/tty/serial/samsung.c s3c24xx_serial_rx_drain_fifo(ourport); ourport 595 drivers/tty/serial/samsung.c static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport) ourport 597 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 609 drivers/tty/serial/samsung.c fifocnt = s3c24xx_serial_rx_fifocnt(ourport, ufstat); ourport 683 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = dev_id; ourport 684 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 688 drivers/tty/serial/samsung.c s3c24xx_serial_rx_drain_fifo(ourport); ourport 697 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = dev_id; ourport 699 drivers/tty/serial/samsung.c if (ourport->dma && ourport->dma->rx_chan) ourport 706 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = id; ourport 707 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 716 drivers/tty/serial/samsung.c if (ourport->dma && ourport->dma->tx_chan && ourport 717 drivers/tty/serial/samsung.c count >= ourport->min_dma_size) { ourport 720 drivers/tty/serial/samsung.c if (count-align >= ourport->min_dma_size) { ourport 750 drivers/tty/serial/samsung.c if (rd_regl(port, S3C2410_UFSTAT) & ourport->info->tx_fifofull) ourport 760 drivers/tty/serial/samsung.c s3c24xx_serial_start_tx_dma(ourport, dma_count); ourport 781 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = id; ourport 782 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 976 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 978 drivers/tty/serial/samsung.c if (ourport->tx_claimed) { ourport 980 drivers/tty/serial/samsung.c free_irq(ourport->tx_irq, ourport); ourport 982 drivers/tty/serial/samsung.c ourport->tx_claimed = 0; ourport 983 drivers/tty/serial/samsung.c ourport->tx_mode = 0; ourport 986 drivers/tty/serial/samsung.c if (ourport->rx_claimed) { ourport 988 drivers/tty/serial/samsung.c free_irq(ourport->rx_irq, ourport); ourport 989 drivers/tty/serial/samsung.c ourport->rx_claimed = 0; ourport 995 drivers/tty/serial/samsung.c free_irq(port->irq, ourport); ourport 1001 drivers/tty/serial/samsung.c if (ourport->dma) ourport 1002 drivers/tty/serial/samsung.c s3c24xx_serial_release_dma(ourport); ourport 1004 drivers/tty/serial/samsung.c ourport->tx_in_progress = 0; ourport 1009 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 1017 drivers/tty/serial/samsung.c ret = request_irq(ourport->rx_irq, s3c24xx_serial_rx_chars, 0, ourport 1018 drivers/tty/serial/samsung.c s3c24xx_serial_portname(port), ourport); ourport 1021 drivers/tty/serial/samsung.c dev_err(port->dev, "cannot get irq %d\n", ourport->rx_irq); ourport 1025 drivers/tty/serial/samsung.c ourport->rx_claimed = 1; ourport 1031 drivers/tty/serial/samsung.c ret = request_irq(ourport->tx_irq, s3c24xx_serial_tx_chars, 0, ourport 1032 drivers/tty/serial/samsung.c s3c24xx_serial_portname(port), ourport); ourport 1035 drivers/tty/serial/samsung.c dev_err(port->dev, "cannot get irq %d\n", ourport->tx_irq); ourport 1039 drivers/tty/serial/samsung.c ourport->tx_claimed = 1; ourport 1055 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 1064 drivers/tty/serial/samsung.c if (ourport->dma) { ourport 1065 drivers/tty/serial/samsung.c ret = s3c24xx_serial_request_dma(ourport); ourport 1067 drivers/tty/serial/samsung.c devm_kfree(port->dev, ourport->dma); ourport 1068 drivers/tty/serial/samsung.c ourport->dma = NULL; ourport 1073 drivers/tty/serial/samsung.c s3c24xx_serial_portname(port), ourport); ourport 1081 drivers/tty/serial/samsung.c ourport->rx_claimed = 1; ourport 1083 drivers/tty/serial/samsung.c ourport->tx_claimed = 1; ourport 1093 drivers/tty/serial/samsung.c enable_rx_pio(ourport); ourport 1109 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 1112 drivers/tty/serial/samsung.c ourport->pm_level = level; ourport 1119 drivers/tty/serial/samsung.c if (!IS_ERR(ourport->baudclk)) ourport 1120 drivers/tty/serial/samsung.c clk_disable_unprepare(ourport->baudclk); ourport 1122 drivers/tty/serial/samsung.c clk_disable_unprepare(ourport->clk); ourport 1126 drivers/tty/serial/samsung.c clk_prepare_enable(ourport->clk); ourport 1128 drivers/tty/serial/samsung.c if (!IS_ERR(ourport->baudclk)) ourport 1129 drivers/tty/serial/samsung.c clk_prepare_enable(ourport->baudclk); ourport 1183 drivers/tty/serial/samsung.c static unsigned int s3c24xx_serial_getclk(struct s3c24xx_uart_port *ourport, ourport 1187 drivers/tty/serial/samsung.c struct s3c24xx_uart_info *info = ourport->info; ourport 1194 drivers/tty/serial/samsung.c clk_sel = (ourport->cfg->clk_sel) ? ourport->cfg->clk_sel : ourport 1195 drivers/tty/serial/samsung.c ourport->info->def_clk_sel; ourport 1201 drivers/tty/serial/samsung.c clk = clk_get(ourport->port.dev, clkname); ourport 1209 drivers/tty/serial/samsung.c if (ourport->info->has_divslot) { ourport 1272 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 1291 drivers/tty/serial/samsung.c quot = s3c24xx_serial_getclk(ourport, baud, &clk, &clk_sel); ourport 1299 drivers/tty/serial/samsung.c if (ourport->baudclk != clk) { ourport 1304 drivers/tty/serial/samsung.c if (!IS_ERR(ourport->baudclk)) { ourport 1305 drivers/tty/serial/samsung.c clk_disable_unprepare(ourport->baudclk); ourport 1306 drivers/tty/serial/samsung.c ourport->baudclk = ERR_PTR(-EINVAL); ourport 1309 drivers/tty/serial/samsung.c ourport->baudclk = clk; ourport 1310 drivers/tty/serial/samsung.c ourport->baudclk_rate = clk ? clk_get_rate(clk) : 0; ourport 1313 drivers/tty/serial/samsung.c if (ourport->info->has_divslot) { ourport 1314 drivers/tty/serial/samsung.c unsigned int div = ourport->baudclk_rate / baud; ourport 1381 drivers/tty/serial/samsung.c if (ourport->info->has_divslot) ourport 1697 drivers/tty/serial/samsung.c static int s3c24xx_serial_enable_baudclk(struct s3c24xx_uart_port *ourport) ourport 1699 drivers/tty/serial/samsung.c struct device *dev = ourport->port.dev; ourport 1700 drivers/tty/serial/samsung.c struct s3c24xx_uart_info *info = ourport->info; ourport 1707 drivers/tty/serial/samsung.c clk_sel = ourport->cfg->clk_sel ? : info->def_clk_sel; ourport 1723 drivers/tty/serial/samsung.c ourport->baudclk = clk; ourport 1724 drivers/tty/serial/samsung.c ourport->baudclk_rate = clk_get_rate(clk); ourport 1725 drivers/tty/serial/samsung.c s3c24xx_serial_setsource(&ourport->port, clk_num); ourport 1738 drivers/tty/serial/samsung.c static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, ourport 1741 drivers/tty/serial/samsung.c struct uart_port *port = &ourport->port; ourport 1742 drivers/tty/serial/samsung.c struct s3c2410_uartcfg *cfg = ourport->cfg; ourport 1790 drivers/tty/serial/samsung.c ourport->rx_irq = ret; ourport 1791 drivers/tty/serial/samsung.c ourport->tx_irq = ret + 1; ourport 1796 drivers/tty/serial/samsung.c ourport->tx_irq = ret; ourport 1803 drivers/tty/serial/samsung.c ourport->dma = devm_kzalloc(port->dev, ourport 1804 drivers/tty/serial/samsung.c sizeof(*ourport->dma), ourport 1806 drivers/tty/serial/samsung.c if (!ourport->dma) { ourport 1812 drivers/tty/serial/samsung.c ourport->clk = clk_get(&platdev->dev, "uart"); ourport 1813 drivers/tty/serial/samsung.c if (IS_ERR(ourport->clk)) { ourport 1816 drivers/tty/serial/samsung.c ret = PTR_ERR(ourport->clk); ourport 1820 drivers/tty/serial/samsung.c ret = clk_prepare_enable(ourport->clk); ourport 1823 drivers/tty/serial/samsung.c clk_put(ourport->clk); ourport 1827 drivers/tty/serial/samsung.c ret = s3c24xx_serial_enable_baudclk(ourport); ourport 1840 drivers/tty/serial/samsung.c ourport->rx_irq, ourport->tx_irq, port->uartclk); ourport 1874 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport; ourport 1890 drivers/tty/serial/samsung.c ourport = &s3c24xx_serial_ports[index]; ourport 1892 drivers/tty/serial/samsung.c ourport->drv_data = s3c24xx_get_driver_data(pdev); ourport 1893 drivers/tty/serial/samsung.c if (!ourport->drv_data) { ourport 1898 drivers/tty/serial/samsung.c ourport->baudclk = ERR_PTR(-EINVAL); ourport 1899 drivers/tty/serial/samsung.c ourport->info = ourport->drv_data->info; ourport 1900 drivers/tty/serial/samsung.c ourport->cfg = (dev_get_platdata(&pdev->dev)) ? ourport 1902 drivers/tty/serial/samsung.c ourport->drv_data->def_cfg; ourport 1906 drivers/tty/serial/samsung.c "samsung,uart-fifosize", &ourport->port.fifosize); ourport 1908 drivers/tty/serial/samsung.c if (ourport->drv_data->fifosize[index]) ourport 1909 drivers/tty/serial/samsung.c ourport->port.fifosize = ourport->drv_data->fifosize[index]; ourport 1910 drivers/tty/serial/samsung.c else if (ourport->info->fifosize) ourport 1911 drivers/tty/serial/samsung.c ourport->port.fifosize = ourport->info->fifosize; ourport 1917 drivers/tty/serial/samsung.c ourport->min_dma_size = max_t(int, ourport->port.fifosize, ourport 1920 drivers/tty/serial/samsung.c dbg("%s: initialising port %p...\n", __func__, ourport); ourport 1922 drivers/tty/serial/samsung.c ret = s3c24xx_serial_init_port(ourport, pdev); ourport 1935 drivers/tty/serial/samsung.c uart_add_one_port(&s3c24xx_uart_drv, &ourport->port); ourport 1936 drivers/tty/serial/samsung.c platform_set_drvdata(pdev, &ourport->port); ourport 1943 drivers/tty/serial/samsung.c clk_disable_unprepare(ourport->clk); ourport 1944 drivers/tty/serial/samsung.c if (!IS_ERR(ourport->baudclk)) ourport 1945 drivers/tty/serial/samsung.c clk_disable_unprepare(ourport->baudclk); ourport 1947 drivers/tty/serial/samsung.c ret = s3c24xx_serial_cpufreq_register(ourport); ourport 1985 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 1988 drivers/tty/serial/samsung.c clk_prepare_enable(ourport->clk); ourport 1989 drivers/tty/serial/samsung.c if (!IS_ERR(ourport->baudclk)) ourport 1990 drivers/tty/serial/samsung.c clk_prepare_enable(ourport->baudclk); ourport 1992 drivers/tty/serial/samsung.c if (!IS_ERR(ourport->baudclk)) ourport 1993 drivers/tty/serial/samsung.c clk_disable_unprepare(ourport->baudclk); ourport 1994 drivers/tty/serial/samsung.c clk_disable_unprepare(ourport->clk); ourport 2005 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 2015 drivers/tty/serial/samsung.c clk_prepare_enable(ourport->clk); ourport 2016 drivers/tty/serial/samsung.c if (!IS_ERR(ourport->baudclk)) ourport 2017 drivers/tty/serial/samsung.c clk_prepare_enable(ourport->baudclk); ourport 2019 drivers/tty/serial/samsung.c if (!IS_ERR(ourport->baudclk)) ourport 2020 drivers/tty/serial/samsung.c clk_disable_unprepare(ourport->baudclk); ourport 2021 drivers/tty/serial/samsung.c clk_disable_unprepare(ourport->clk); ourport 2080 drivers/tty/serial/samsung.c struct s3c24xx_uart_port *ourport = to_ourport(port); ourport 2084 drivers/tty/serial/samsung.c if (s3c24xx_serial_rx_fifocnt(ourport, ufstat) == 0)