uap 470 drivers/s390/char/raw3270.c struct raw3270_ua *uap; uap 473 drivers/s390/char/raw3270.c uap = (struct raw3270_ua *) (rp->init_data + 1); uap 476 drivers/s390/char/raw3270.c uap->uab.qcode != 0x81) { uap 484 drivers/s390/char/raw3270.c rp->rows = uap->uab.h; uap 485 drivers/s390/char/raw3270.c rp->cols = uap->uab.w; uap 487 drivers/s390/char/raw3270.c if ((uap->uab.flags0 & 0x0d) == 0x01) uap 490 drivers/s390/char/raw3270.c if (uap->uab.l == sizeof(struct raw3270_ua) && uap 491 drivers/s390/char/raw3270.c uap->aua.sdpid == 0x02) { uap 492 drivers/s390/char/raw3270.c rp->rows = uap->aua.hauai; uap 493 drivers/s390/char/raw3270.c rp->cols = uap->aua.wauai; uap 65 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 69 drivers/tty/serial/amba-pl010.c cr = readb(uap->port.membase + UART010_CR); uap 71 drivers/tty/serial/amba-pl010.c writel(cr, uap->port.membase + UART010_CR); uap 76 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 80 drivers/tty/serial/amba-pl010.c cr = readb(uap->port.membase + UART010_CR); uap 82 drivers/tty/serial/amba-pl010.c writel(cr, uap->port.membase + UART010_CR); uap 87 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 91 drivers/tty/serial/amba-pl010.c cr = readb(uap->port.membase + UART010_CR); uap 93 drivers/tty/serial/amba-pl010.c writel(cr, uap->port.membase + UART010_CR); uap 98 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = (struct uart_amba_port *)port; uap 101 drivers/tty/serial/amba-pl010.c cr = readb(uap->port.membase + UART010_CR); uap 103 drivers/tty/serial/amba-pl010.c writel(cr, uap->port.membase + UART010_CR); uap 108 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 112 drivers/tty/serial/amba-pl010.c cr = readb(uap->port.membase + UART010_CR); uap 114 drivers/tty/serial/amba-pl010.c writel(cr, uap->port.membase + UART010_CR); uap 117 drivers/tty/serial/amba-pl010.c static void pl010_rx_chars(struct uart_amba_port *uap) uap 121 drivers/tty/serial/amba-pl010.c status = readb(uap->port.membase + UART01x_FR); uap 123 drivers/tty/serial/amba-pl010.c ch = readb(uap->port.membase + UART01x_DR); uap 126 drivers/tty/serial/amba-pl010.c uap->port.icount.rx++; uap 132 drivers/tty/serial/amba-pl010.c rsr = readb(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX; uap 134 drivers/tty/serial/amba-pl010.c writel(0, uap->port.membase + UART01x_ECR); uap 138 drivers/tty/serial/amba-pl010.c uap->port.icount.brk++; uap 139 drivers/tty/serial/amba-pl010.c if (uart_handle_break(&uap->port)) uap 142 drivers/tty/serial/amba-pl010.c uap->port.icount.parity++; uap 144 drivers/tty/serial/amba-pl010.c uap->port.icount.frame++; uap 146 drivers/tty/serial/amba-pl010.c uap->port.icount.overrun++; uap 148 drivers/tty/serial/amba-pl010.c rsr &= uap->port.read_status_mask; uap 158 drivers/tty/serial/amba-pl010.c if (uart_handle_sysrq_char(&uap->port, ch)) uap 161 drivers/tty/serial/amba-pl010.c uart_insert_char(&uap->port, rsr, UART01x_RSR_OE, ch, flag); uap 164 drivers/tty/serial/amba-pl010.c status = readb(uap->port.membase + UART01x_FR); uap 166 drivers/tty/serial/amba-pl010.c spin_unlock(&uap->port.lock); uap 167 drivers/tty/serial/amba-pl010.c tty_flip_buffer_push(&uap->port.state->port); uap 168 drivers/tty/serial/amba-pl010.c spin_lock(&uap->port.lock); uap 171 drivers/tty/serial/amba-pl010.c static void pl010_tx_chars(struct uart_amba_port *uap) uap 173 drivers/tty/serial/amba-pl010.c struct circ_buf *xmit = &uap->port.state->xmit; uap 176 drivers/tty/serial/amba-pl010.c if (uap->port.x_char) { uap 177 drivers/tty/serial/amba-pl010.c writel(uap->port.x_char, uap->port.membase + UART01x_DR); uap 178 drivers/tty/serial/amba-pl010.c uap->port.icount.tx++; uap 179 drivers/tty/serial/amba-pl010.c uap->port.x_char = 0; uap 182 drivers/tty/serial/amba-pl010.c if (uart_circ_empty(xmit) || uart_tx_stopped(&uap->port)) { uap 183 drivers/tty/serial/amba-pl010.c pl010_stop_tx(&uap->port); uap 187 drivers/tty/serial/amba-pl010.c count = uap->port.fifosize >> 1; uap 189 drivers/tty/serial/amba-pl010.c writel(xmit->buf[xmit->tail], uap->port.membase + UART01x_DR); uap 191 drivers/tty/serial/amba-pl010.c uap->port.icount.tx++; uap 197 drivers/tty/serial/amba-pl010.c uart_write_wakeup(&uap->port); uap 200 drivers/tty/serial/amba-pl010.c pl010_stop_tx(&uap->port); uap 203 drivers/tty/serial/amba-pl010.c static void pl010_modem_status(struct uart_amba_port *uap) uap 207 drivers/tty/serial/amba-pl010.c writel(0, uap->port.membase + UART010_ICR); uap 209 drivers/tty/serial/amba-pl010.c status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; uap 211 drivers/tty/serial/amba-pl010.c delta = status ^ uap->old_status; uap 212 drivers/tty/serial/amba-pl010.c uap->old_status = status; uap 218 drivers/tty/serial/amba-pl010.c uart_handle_dcd_change(&uap->port, status & UART01x_FR_DCD); uap 221 drivers/tty/serial/amba-pl010.c uap->port.icount.dsr++; uap 224 drivers/tty/serial/amba-pl010.c uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS); uap 226 drivers/tty/serial/amba-pl010.c wake_up_interruptible(&uap->port.state->port.delta_msr_wait); uap 231 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = dev_id; uap 235 drivers/tty/serial/amba-pl010.c spin_lock(&uap->port.lock); uap 237 drivers/tty/serial/amba-pl010.c status = readb(uap->port.membase + UART010_IIR); uap 241 drivers/tty/serial/amba-pl010.c pl010_rx_chars(uap); uap 243 drivers/tty/serial/amba-pl010.c pl010_modem_status(uap); uap 245 drivers/tty/serial/amba-pl010.c pl010_tx_chars(uap); uap 250 drivers/tty/serial/amba-pl010.c status = readb(uap->port.membase + UART010_IIR); uap 256 drivers/tty/serial/amba-pl010.c spin_unlock(&uap->port.lock); uap 263 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 265 drivers/tty/serial/amba-pl010.c unsigned int status = readb(uap->port.membase + UART01x_FR); uap 271 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 276 drivers/tty/serial/amba-pl010.c status = readb(uap->port.membase + UART01x_FR); uap 289 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 292 drivers/tty/serial/amba-pl010.c if (uap->data) uap 293 drivers/tty/serial/amba-pl010.c uap->data->set_mctrl(uap->dev, uap->port.membase, mctrl); uap 298 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 303 drivers/tty/serial/amba-pl010.c spin_lock_irqsave(&uap->port.lock, flags); uap 304 drivers/tty/serial/amba-pl010.c lcr_h = readb(uap->port.membase + UART010_LCRH); uap 309 drivers/tty/serial/amba-pl010.c writel(lcr_h, uap->port.membase + UART010_LCRH); uap 310 drivers/tty/serial/amba-pl010.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 315 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 322 drivers/tty/serial/amba-pl010.c retval = clk_prepare_enable(uap->clk); uap 326 drivers/tty/serial/amba-pl010.c uap->port.uartclk = clk_get_rate(uap->clk); uap 331 drivers/tty/serial/amba-pl010.c retval = request_irq(uap->port.irq, pl010_int, 0, "uart-pl010", uap); uap 338 drivers/tty/serial/amba-pl010.c uap->old_status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; uap 344 drivers/tty/serial/amba-pl010.c uap->port.membase + UART010_CR); uap 349 drivers/tty/serial/amba-pl010.c clk_disable_unprepare(uap->clk); uap 356 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 362 drivers/tty/serial/amba-pl010.c free_irq(uap->port.irq, uap); uap 367 drivers/tty/serial/amba-pl010.c writel(0, uap->port.membase + UART010_CR); uap 370 drivers/tty/serial/amba-pl010.c writel(readb(uap->port.membase + UART010_LCRH) & uap 372 drivers/tty/serial/amba-pl010.c uap->port.membase + UART010_LCRH); uap 377 drivers/tty/serial/amba-pl010.c clk_disable_unprepare(uap->clk); uap 384 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 393 drivers/tty/serial/amba-pl010.c baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); uap 417 drivers/tty/serial/amba-pl010.c if (uap->port.fifosize > 1) uap 420 drivers/tty/serial/amba-pl010.c spin_lock_irqsave(&uap->port.lock, flags); uap 427 drivers/tty/serial/amba-pl010.c uap->port.read_status_mask = UART01x_RSR_OE; uap 429 drivers/tty/serial/amba-pl010.c uap->port.read_status_mask |= UART01x_RSR_FE | UART01x_RSR_PE; uap 431 drivers/tty/serial/amba-pl010.c uap->port.read_status_mask |= UART01x_RSR_BE; uap 436 drivers/tty/serial/amba-pl010.c uap->port.ignore_status_mask = 0; uap 438 drivers/tty/serial/amba-pl010.c uap->port.ignore_status_mask |= UART01x_RSR_FE | UART01x_RSR_PE; uap 440 drivers/tty/serial/amba-pl010.c uap->port.ignore_status_mask |= UART01x_RSR_BE; uap 446 drivers/tty/serial/amba-pl010.c uap->port.ignore_status_mask |= UART01x_RSR_OE; uap 453 drivers/tty/serial/amba-pl010.c uap->port.ignore_status_mask |= UART_DUMMY_RSR_RX; uap 456 drivers/tty/serial/amba-pl010.c old_cr = readb(uap->port.membase + UART010_CR) & ~UART010_CR_MSIE; uap 461 drivers/tty/serial/amba-pl010.c writel(0, uap->port.membase + UART010_CR); uap 465 drivers/tty/serial/amba-pl010.c writel((quot & 0xf00) >> 8, uap->port.membase + UART010_LCRM); uap 466 drivers/tty/serial/amba-pl010.c writel(quot & 0xff, uap->port.membase + UART010_LCRL); uap 473 drivers/tty/serial/amba-pl010.c writel(lcr_h, uap->port.membase + UART010_LCRH); uap 474 drivers/tty/serial/amba-pl010.c writel(old_cr, uap->port.membase + UART010_CR); uap 476 drivers/tty/serial/amba-pl010.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 570 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = uap 575 drivers/tty/serial/amba-pl010.c status = readb(uap->port.membase + UART01x_FR); uap 578 drivers/tty/serial/amba-pl010.c writel(ch, uap->port.membase + UART01x_DR); uap 584 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = amba_ports[co->index]; uap 587 drivers/tty/serial/amba-pl010.c clk_enable(uap->clk); uap 592 drivers/tty/serial/amba-pl010.c old_cr = readb(uap->port.membase + UART010_CR); uap 593 drivers/tty/serial/amba-pl010.c writel(UART01x_CR_UARTEN, uap->port.membase + UART010_CR); uap 595 drivers/tty/serial/amba-pl010.c uart_console_write(&uap->port, s, count, pl010_console_putchar); uap 602 drivers/tty/serial/amba-pl010.c status = readb(uap->port.membase + UART01x_FR); uap 605 drivers/tty/serial/amba-pl010.c writel(old_cr, uap->port.membase + UART010_CR); uap 607 drivers/tty/serial/amba-pl010.c clk_disable(uap->clk); uap 611 drivers/tty/serial/amba-pl010.c pl010_console_get_options(struct uart_amba_port *uap, int *baud, uap 614 drivers/tty/serial/amba-pl010.c if (readb(uap->port.membase + UART010_CR) & UART01x_CR_UARTEN) { uap 616 drivers/tty/serial/amba-pl010.c lcr_h = readb(uap->port.membase + UART010_LCRH); uap 631 drivers/tty/serial/amba-pl010.c quot = readb(uap->port.membase + UART010_LCRL) | uap 632 drivers/tty/serial/amba-pl010.c readb(uap->port.membase + UART010_LCRM) << 8; uap 633 drivers/tty/serial/amba-pl010.c *baud = uap->port.uartclk / (16 * (quot + 1)); uap 639 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap; uap 653 drivers/tty/serial/amba-pl010.c uap = amba_ports[co->index]; uap 654 drivers/tty/serial/amba-pl010.c if (!uap) uap 657 drivers/tty/serial/amba-pl010.c ret = clk_prepare(uap->clk); uap 661 drivers/tty/serial/amba-pl010.c uap->port.uartclk = clk_get_rate(uap->clk); uap 666 drivers/tty/serial/amba-pl010.c pl010_console_get_options(uap, &baud, &parity, &bits); uap 668 drivers/tty/serial/amba-pl010.c return uart_set_options(&uap->port, co, baud, parity, bits, flow); uap 700 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap; uap 711 drivers/tty/serial/amba-pl010.c uap = devm_kzalloc(&dev->dev, sizeof(struct uart_amba_port), uap 713 drivers/tty/serial/amba-pl010.c if (!uap) uap 721 drivers/tty/serial/amba-pl010.c uap->clk = devm_clk_get(&dev->dev, NULL); uap 722 drivers/tty/serial/amba-pl010.c if (IS_ERR(uap->clk)) uap 723 drivers/tty/serial/amba-pl010.c return PTR_ERR(uap->clk); uap 725 drivers/tty/serial/amba-pl010.c uap->port.dev = &dev->dev; uap 726 drivers/tty/serial/amba-pl010.c uap->port.mapbase = dev->res.start; uap 727 drivers/tty/serial/amba-pl010.c uap->port.membase = base; uap 728 drivers/tty/serial/amba-pl010.c uap->port.iotype = UPIO_MEM; uap 729 drivers/tty/serial/amba-pl010.c uap->port.irq = dev->irq[0]; uap 730 drivers/tty/serial/amba-pl010.c uap->port.fifosize = 16; uap 731 drivers/tty/serial/amba-pl010.c uap->port.ops = &amba_pl010_pops; uap 732 drivers/tty/serial/amba-pl010.c uap->port.flags = UPF_BOOT_AUTOCONF; uap 733 drivers/tty/serial/amba-pl010.c uap->port.line = i; uap 734 drivers/tty/serial/amba-pl010.c uap->dev = dev; uap 735 drivers/tty/serial/amba-pl010.c uap->data = dev_get_platdata(&dev->dev); uap 737 drivers/tty/serial/amba-pl010.c amba_ports[i] = uap; uap 739 drivers/tty/serial/amba-pl010.c amba_set_drvdata(dev, uap); uap 746 drivers/tty/serial/amba-pl010.c dev_err(uap->port.dev, uap 753 drivers/tty/serial/amba-pl010.c ret = uart_add_one_port(&amba_reg, &uap->port); uap 762 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = amba_get_drvdata(dev); uap 766 drivers/tty/serial/amba-pl010.c uart_remove_one_port(&amba_reg, &uap->port); uap 769 drivers/tty/serial/amba-pl010.c if (amba_ports[i] == uap) uap 783 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = dev_get_drvdata(dev); uap 785 drivers/tty/serial/amba-pl010.c if (uap) uap 786 drivers/tty/serial/amba-pl010.c uart_suspend_port(&amba_reg, &uap->port); uap 793 drivers/tty/serial/amba-pl010.c struct uart_amba_port *uap = dev_get_drvdata(dev); uap 795 drivers/tty/serial/amba-pl010.c if (uap) uap 796 drivers/tty/serial/amba-pl010.c uart_resume_port(&amba_reg, &uap->port); uap 283 drivers/tty/serial/amba-pl011.c static unsigned int pl011_reg_to_offset(const struct uart_amba_port *uap, uap 286 drivers/tty/serial/amba-pl011.c return uap->reg_offset[reg]; uap 289 drivers/tty/serial/amba-pl011.c static unsigned int pl011_read(const struct uart_amba_port *uap, uap 292 drivers/tty/serial/amba-pl011.c void __iomem *addr = uap->port.membase + pl011_reg_to_offset(uap, reg); uap 294 drivers/tty/serial/amba-pl011.c return (uap->port.iotype == UPIO_MEM32) ? uap 298 drivers/tty/serial/amba-pl011.c static void pl011_write(unsigned int val, const struct uart_amba_port *uap, uap 301 drivers/tty/serial/amba-pl011.c void __iomem *addr = uap->port.membase + pl011_reg_to_offset(uap, reg); uap 303 drivers/tty/serial/amba-pl011.c if (uap->port.iotype == UPIO_MEM32) uap 314 drivers/tty/serial/amba-pl011.c static int pl011_fifo_to_tty(struct uart_amba_port *uap) uap 320 drivers/tty/serial/amba-pl011.c status = pl011_read(uap, REG_FR); uap 325 drivers/tty/serial/amba-pl011.c ch = pl011_read(uap, REG_DR) | UART_DUMMY_DR_RX; uap 327 drivers/tty/serial/amba-pl011.c uap->port.icount.rx++; uap 332 drivers/tty/serial/amba-pl011.c uap->port.icount.brk++; uap 333 drivers/tty/serial/amba-pl011.c if (uart_handle_break(&uap->port)) uap 336 drivers/tty/serial/amba-pl011.c uap->port.icount.parity++; uap 338 drivers/tty/serial/amba-pl011.c uap->port.icount.frame++; uap 340 drivers/tty/serial/amba-pl011.c uap->port.icount.overrun++; uap 342 drivers/tty/serial/amba-pl011.c ch &= uap->port.read_status_mask; uap 352 drivers/tty/serial/amba-pl011.c if (uart_handle_sysrq_char(&uap->port, ch & 255)) uap 355 drivers/tty/serial/amba-pl011.c uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); uap 400 drivers/tty/serial/amba-pl011.c static void pl011_dma_probe(struct uart_amba_port *uap) uap 403 drivers/tty/serial/amba-pl011.c struct amba_pl011_data *plat = dev_get_platdata(uap->port.dev); uap 404 drivers/tty/serial/amba-pl011.c struct device *dev = uap->port.dev; uap 406 drivers/tty/serial/amba-pl011.c .dst_addr = uap->port.mapbase + uap 407 drivers/tty/serial/amba-pl011.c pl011_reg_to_offset(uap, REG_DR), uap 410 drivers/tty/serial/amba-pl011.c .dst_maxburst = uap->fifosize >> 1, uap 416 drivers/tty/serial/amba-pl011.c uap->dma_probed = true; uap 420 drivers/tty/serial/amba-pl011.c uap->dma_probed = false; uap 426 drivers/tty/serial/amba-pl011.c dev_info(uap->port.dev, "no DMA platform data\n"); uap 437 drivers/tty/serial/amba-pl011.c dev_err(uap->port.dev, "no TX DMA channel!\n"); uap 443 drivers/tty/serial/amba-pl011.c uap->dmatx.chan = chan; uap 445 drivers/tty/serial/amba-pl011.c dev_info(uap->port.dev, "DMA channel TX %s\n", uap 446 drivers/tty/serial/amba-pl011.c dma_chan_name(uap->dmatx.chan)); uap 455 drivers/tty/serial/amba-pl011.c dev_err(uap->port.dev, "no RX DMA channel!\n"); uap 462 drivers/tty/serial/amba-pl011.c .src_addr = uap->port.mapbase + uap 463 drivers/tty/serial/amba-pl011.c pl011_reg_to_offset(uap, REG_DR), uap 466 drivers/tty/serial/amba-pl011.c .src_maxburst = uap->fifosize >> 2, uap 480 drivers/tty/serial/amba-pl011.c dev_info(uap->port.dev, uap 486 drivers/tty/serial/amba-pl011.c uap->dmarx.chan = chan; uap 488 drivers/tty/serial/amba-pl011.c uap->dmarx.auto_poll_rate = false; uap 492 drivers/tty/serial/amba-pl011.c uap->dmarx.auto_poll_rate = false; uap 493 drivers/tty/serial/amba-pl011.c uap->dmarx.poll_rate = plat->dma_rx_poll_rate; uap 500 drivers/tty/serial/amba-pl011.c uap->dmarx.auto_poll_rate = true; uap 501 drivers/tty/serial/amba-pl011.c uap->dmarx.poll_rate = 100; uap 505 drivers/tty/serial/amba-pl011.c uap->dmarx.poll_timeout = uap 508 drivers/tty/serial/amba-pl011.c uap->dmarx.poll_timeout = 3000; uap 510 drivers/tty/serial/amba-pl011.c uap->dmarx.auto_poll_rate = of_property_read_bool( uap 512 drivers/tty/serial/amba-pl011.c if (uap->dmarx.auto_poll_rate) { uap 517 drivers/tty/serial/amba-pl011.c uap->dmarx.poll_rate = x; uap 519 drivers/tty/serial/amba-pl011.c uap->dmarx.poll_rate = 100; uap 522 drivers/tty/serial/amba-pl011.c uap->dmarx.poll_timeout = x; uap 524 drivers/tty/serial/amba-pl011.c uap->dmarx.poll_timeout = 3000; uap 527 drivers/tty/serial/amba-pl011.c dev_info(uap->port.dev, "DMA channel RX %s\n", uap 528 drivers/tty/serial/amba-pl011.c dma_chan_name(uap->dmarx.chan)); uap 532 drivers/tty/serial/amba-pl011.c static void pl011_dma_remove(struct uart_amba_port *uap) uap 534 drivers/tty/serial/amba-pl011.c if (uap->dmatx.chan) uap 535 drivers/tty/serial/amba-pl011.c dma_release_channel(uap->dmatx.chan); uap 536 drivers/tty/serial/amba-pl011.c if (uap->dmarx.chan) uap 537 drivers/tty/serial/amba-pl011.c dma_release_channel(uap->dmarx.chan); uap 541 drivers/tty/serial/amba-pl011.c static int pl011_dma_tx_refill(struct uart_amba_port *uap); uap 542 drivers/tty/serial/amba-pl011.c static void pl011_start_tx_pio(struct uart_amba_port *uap); uap 550 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = data; uap 551 drivers/tty/serial/amba-pl011.c struct pl011_dmatx_data *dmatx = &uap->dmatx; uap 555 drivers/tty/serial/amba-pl011.c spin_lock_irqsave(&uap->port.lock, flags); uap 556 drivers/tty/serial/amba-pl011.c if (uap->dmatx.queued) uap 560 drivers/tty/serial/amba-pl011.c dmacr = uap->dmacr; uap 561 drivers/tty/serial/amba-pl011.c uap->dmacr = dmacr & ~UART011_TXDMAE; uap 562 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 573 drivers/tty/serial/amba-pl011.c if (!(dmacr & UART011_TXDMAE) || uart_tx_stopped(&uap->port) || uap 574 drivers/tty/serial/amba-pl011.c uart_circ_empty(&uap->port.state->xmit)) { uap 575 drivers/tty/serial/amba-pl011.c uap->dmatx.queued = false; uap 576 drivers/tty/serial/amba-pl011.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 580 drivers/tty/serial/amba-pl011.c if (pl011_dma_tx_refill(uap) <= 0) uap 585 drivers/tty/serial/amba-pl011.c pl011_start_tx_pio(uap); uap 587 drivers/tty/serial/amba-pl011.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 598 drivers/tty/serial/amba-pl011.c static int pl011_dma_tx_refill(struct uart_amba_port *uap) uap 600 drivers/tty/serial/amba-pl011.c struct pl011_dmatx_data *dmatx = &uap->dmatx; uap 604 drivers/tty/serial/amba-pl011.c struct circ_buf *xmit = &uap->port.state->xmit; uap 614 drivers/tty/serial/amba-pl011.c if (count < (uap->fifosize >> 1)) { uap 615 drivers/tty/serial/amba-pl011.c uap->dmatx.queued = false; uap 647 drivers/tty/serial/amba-pl011.c uap->dmatx.queued = false; uap 648 drivers/tty/serial/amba-pl011.c dev_dbg(uap->port.dev, "unable to map TX DMA\n"); uap 656 drivers/tty/serial/amba-pl011.c uap->dmatx.queued = false; uap 661 drivers/tty/serial/amba-pl011.c dev_dbg(uap->port.dev, "TX DMA busy\n"); uap 667 drivers/tty/serial/amba-pl011.c desc->callback_param = uap; uap 675 drivers/tty/serial/amba-pl011.c uap->dmacr |= UART011_TXDMAE; uap 676 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 677 drivers/tty/serial/amba-pl011.c uap->dmatx.queued = true; uap 684 drivers/tty/serial/amba-pl011.c uap->port.icount.tx += count; uap 687 drivers/tty/serial/amba-pl011.c uart_write_wakeup(&uap->port); uap 700 drivers/tty/serial/amba-pl011.c static bool pl011_dma_tx_irq(struct uart_amba_port *uap) uap 702 drivers/tty/serial/amba-pl011.c if (!uap->using_tx_dma) uap 710 drivers/tty/serial/amba-pl011.c if (uap->dmatx.queued) { uap 711 drivers/tty/serial/amba-pl011.c uap->dmacr |= UART011_TXDMAE; uap 712 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 713 drivers/tty/serial/amba-pl011.c uap->im &= ~UART011_TXIM; uap 714 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 722 drivers/tty/serial/amba-pl011.c if (pl011_dma_tx_refill(uap) > 0) { uap 723 drivers/tty/serial/amba-pl011.c uap->im &= ~UART011_TXIM; uap 724 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 734 drivers/tty/serial/amba-pl011.c static inline void pl011_dma_tx_stop(struct uart_amba_port *uap) uap 736 drivers/tty/serial/amba-pl011.c if (uap->dmatx.queued) { uap 737 drivers/tty/serial/amba-pl011.c uap->dmacr &= ~UART011_TXDMAE; uap 738 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 750 drivers/tty/serial/amba-pl011.c static inline bool pl011_dma_tx_start(struct uart_amba_port *uap) uap 754 drivers/tty/serial/amba-pl011.c if (!uap->using_tx_dma) uap 757 drivers/tty/serial/amba-pl011.c if (!uap->port.x_char) { uap 761 drivers/tty/serial/amba-pl011.c if (!uap->dmatx.queued) { uap 762 drivers/tty/serial/amba-pl011.c if (pl011_dma_tx_refill(uap) > 0) { uap 763 drivers/tty/serial/amba-pl011.c uap->im &= ~UART011_TXIM; uap 764 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 767 drivers/tty/serial/amba-pl011.c } else if (!(uap->dmacr & UART011_TXDMAE)) { uap 768 drivers/tty/serial/amba-pl011.c uap->dmacr |= UART011_TXDMAE; uap 769 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 778 drivers/tty/serial/amba-pl011.c dmacr = uap->dmacr; uap 779 drivers/tty/serial/amba-pl011.c uap->dmacr &= ~UART011_TXDMAE; uap 780 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 782 drivers/tty/serial/amba-pl011.c if (pl011_read(uap, REG_FR) & UART01x_FR_TXFF) { uap 791 drivers/tty/serial/amba-pl011.c pl011_write(uap->port.x_char, uap, REG_DR); uap 792 drivers/tty/serial/amba-pl011.c uap->port.icount.tx++; uap 793 drivers/tty/serial/amba-pl011.c uap->port.x_char = 0; uap 796 drivers/tty/serial/amba-pl011.c uap->dmacr = dmacr; uap 797 drivers/tty/serial/amba-pl011.c pl011_write(dmacr, uap, REG_DMACR); uap 807 drivers/tty/serial/amba-pl011.c __releases(&uap->port.lock) uap 808 drivers/tty/serial/amba-pl011.c __acquires(&uap->port.lock) uap 810 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 813 drivers/tty/serial/amba-pl011.c if (!uap->using_tx_dma) uap 816 drivers/tty/serial/amba-pl011.c dmaengine_terminate_async(uap->dmatx.chan); uap 818 drivers/tty/serial/amba-pl011.c if (uap->dmatx.queued) { uap 819 drivers/tty/serial/amba-pl011.c dma_unmap_sg(uap->dmatx.chan->device->dev, &uap->dmatx.sg, 1, uap 821 drivers/tty/serial/amba-pl011.c uap->dmatx.queued = false; uap 822 drivers/tty/serial/amba-pl011.c uap->dmacr &= ~UART011_TXDMAE; uap 823 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 829 drivers/tty/serial/amba-pl011.c static int pl011_dma_rx_trigger_dma(struct uart_amba_port *uap) uap 831 drivers/tty/serial/amba-pl011.c struct dma_chan *rxchan = uap->dmarx.chan; uap 832 drivers/tty/serial/amba-pl011.c struct pl011_dmarx_data *dmarx = &uap->dmarx; uap 840 drivers/tty/serial/amba-pl011.c sgbuf = uap->dmarx.use_buf_b ? uap 841 drivers/tty/serial/amba-pl011.c &uap->dmarx.sgbuf_b : &uap->dmarx.sgbuf_a; uap 851 drivers/tty/serial/amba-pl011.c uap->dmarx.running = false; uap 858 drivers/tty/serial/amba-pl011.c desc->callback_param = uap; uap 862 drivers/tty/serial/amba-pl011.c uap->dmacr |= UART011_RXDMAE; uap 863 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 864 drivers/tty/serial/amba-pl011.c uap->dmarx.running = true; uap 866 drivers/tty/serial/amba-pl011.c uap->im &= ~UART011_RXIM; uap 867 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 877 drivers/tty/serial/amba-pl011.c static void pl011_dma_rx_chars(struct uart_amba_port *uap, uap 881 drivers/tty/serial/amba-pl011.c struct tty_port *port = &uap->port.state->port; uap 883 drivers/tty/serial/amba-pl011.c &uap->dmarx.sgbuf_b : &uap->dmarx.sgbuf_a; uap 887 drivers/tty/serial/amba-pl011.c struct pl011_dmarx_data *dmarx = &uap->dmarx; uap 890 drivers/tty/serial/amba-pl011.c if (uap->dmarx.poll_rate) { uap 909 drivers/tty/serial/amba-pl011.c uap->port.icount.rx += dma_count; uap 911 drivers/tty/serial/amba-pl011.c dev_warn(uap->port.dev, uap 916 drivers/tty/serial/amba-pl011.c if (uap->dmarx.poll_rate) uap 926 drivers/tty/serial/amba-pl011.c UART011_FEIS, uap, REG_ICR); uap 939 drivers/tty/serial/amba-pl011.c fifotaken = pl011_fifo_to_tty(uap); uap 942 drivers/tty/serial/amba-pl011.c spin_unlock(&uap->port.lock); uap 943 drivers/tty/serial/amba-pl011.c dev_vdbg(uap->port.dev, uap 947 drivers/tty/serial/amba-pl011.c spin_lock(&uap->port.lock); uap 950 drivers/tty/serial/amba-pl011.c static void pl011_dma_rx_irq(struct uart_amba_port *uap) uap 952 drivers/tty/serial/amba-pl011.c struct pl011_dmarx_data *dmarx = &uap->dmarx; uap 966 drivers/tty/serial/amba-pl011.c dev_err(uap->port.dev, "unable to pause DMA transfer\n"); uap 970 drivers/tty/serial/amba-pl011.c dev_err(uap->port.dev, "unable to pause DMA transfer\n"); uap 973 drivers/tty/serial/amba-pl011.c uap->dmacr &= ~UART011_RXDMAE; uap 974 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 975 drivers/tty/serial/amba-pl011.c uap->dmarx.running = false; uap 986 drivers/tty/serial/amba-pl011.c pl011_dma_rx_chars(uap, pending, dmarx->use_buf_b, true); uap 990 drivers/tty/serial/amba-pl011.c if (pl011_dma_rx_trigger_dma(uap)) { uap 991 drivers/tty/serial/amba-pl011.c dev_dbg(uap->port.dev, "could not retrigger RX DMA job " uap 993 drivers/tty/serial/amba-pl011.c uap->im |= UART011_RXIM; uap 994 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1000 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = data; uap 1001 drivers/tty/serial/amba-pl011.c struct pl011_dmarx_data *dmarx = &uap->dmarx; uap 1017 drivers/tty/serial/amba-pl011.c spin_lock_irq(&uap->port.lock); uap 1028 drivers/tty/serial/amba-pl011.c uap->dmarx.running = false; uap 1030 drivers/tty/serial/amba-pl011.c ret = pl011_dma_rx_trigger_dma(uap); uap 1032 drivers/tty/serial/amba-pl011.c pl011_dma_rx_chars(uap, pending, lastbuf, false); uap 1033 drivers/tty/serial/amba-pl011.c spin_unlock_irq(&uap->port.lock); uap 1039 drivers/tty/serial/amba-pl011.c dev_dbg(uap->port.dev, "could not retrigger RX DMA job " uap 1041 drivers/tty/serial/amba-pl011.c uap->im |= UART011_RXIM; uap 1042 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1051 drivers/tty/serial/amba-pl011.c static inline void pl011_dma_rx_stop(struct uart_amba_port *uap) uap 1054 drivers/tty/serial/amba-pl011.c uap->dmacr &= ~UART011_RXDMAE; uap 1055 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 1065 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = from_timer(uap, t, dmarx.timer); uap 1066 drivers/tty/serial/amba-pl011.c struct tty_port *port = &uap->port.state->port; uap 1067 drivers/tty/serial/amba-pl011.c struct pl011_dmarx_data *dmarx = &uap->dmarx; uap 1068 drivers/tty/serial/amba-pl011.c struct dma_chan *rxchan = uap->dmarx.chan; uap 1076 drivers/tty/serial/amba-pl011.c sgbuf = dmarx->use_buf_b ? &uap->dmarx.sgbuf_b : &uap->dmarx.sgbuf_a; uap 1094 drivers/tty/serial/amba-pl011.c > uap->dmarx.poll_timeout) { uap 1096 drivers/tty/serial/amba-pl011.c spin_lock_irqsave(&uap->port.lock, flags); uap 1097 drivers/tty/serial/amba-pl011.c pl011_dma_rx_stop(uap); uap 1098 drivers/tty/serial/amba-pl011.c uap->im |= UART011_RXIM; uap 1099 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1100 drivers/tty/serial/amba-pl011.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 1102 drivers/tty/serial/amba-pl011.c uap->dmarx.running = false; uap 1104 drivers/tty/serial/amba-pl011.c del_timer(&uap->dmarx.timer); uap 1106 drivers/tty/serial/amba-pl011.c mod_timer(&uap->dmarx.timer, uap 1107 drivers/tty/serial/amba-pl011.c jiffies + msecs_to_jiffies(uap->dmarx.poll_rate)); uap 1111 drivers/tty/serial/amba-pl011.c static void pl011_dma_startup(struct uart_amba_port *uap) uap 1115 drivers/tty/serial/amba-pl011.c if (!uap->dma_probed) uap 1116 drivers/tty/serial/amba-pl011.c pl011_dma_probe(uap); uap 1118 drivers/tty/serial/amba-pl011.c if (!uap->dmatx.chan) uap 1121 drivers/tty/serial/amba-pl011.c uap->dmatx.buf = kmalloc(PL011_DMA_BUFFER_SIZE, GFP_KERNEL | __GFP_DMA); uap 1122 drivers/tty/serial/amba-pl011.c if (!uap->dmatx.buf) { uap 1123 drivers/tty/serial/amba-pl011.c dev_err(uap->port.dev, "no memory for DMA TX buffer\n"); uap 1124 drivers/tty/serial/amba-pl011.c uap->port.fifosize = uap->fifosize; uap 1128 drivers/tty/serial/amba-pl011.c sg_init_one(&uap->dmatx.sg, uap->dmatx.buf, PL011_DMA_BUFFER_SIZE); uap 1131 drivers/tty/serial/amba-pl011.c uap->port.fifosize = PL011_DMA_BUFFER_SIZE; uap 1132 drivers/tty/serial/amba-pl011.c uap->using_tx_dma = true; uap 1134 drivers/tty/serial/amba-pl011.c if (!uap->dmarx.chan) uap 1138 drivers/tty/serial/amba-pl011.c ret = pl011_sgbuf_init(uap->dmarx.chan, &uap->dmarx.sgbuf_a, uap 1141 drivers/tty/serial/amba-pl011.c dev_err(uap->port.dev, "failed to init DMA %s: %d\n", uap 1146 drivers/tty/serial/amba-pl011.c ret = pl011_sgbuf_init(uap->dmarx.chan, &uap->dmarx.sgbuf_b, uap 1149 drivers/tty/serial/amba-pl011.c dev_err(uap->port.dev, "failed to init DMA %s: %d\n", uap 1151 drivers/tty/serial/amba-pl011.c pl011_sgbuf_free(uap->dmarx.chan, &uap->dmarx.sgbuf_a, uap 1156 drivers/tty/serial/amba-pl011.c uap->using_rx_dma = true; uap 1160 drivers/tty/serial/amba-pl011.c uap->dmacr |= UART011_DMAONERR; uap 1161 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 1168 drivers/tty/serial/amba-pl011.c if (uap->vendor->dma_threshold) uap 1170 drivers/tty/serial/amba-pl011.c uap, REG_ST_DMAWM); uap 1172 drivers/tty/serial/amba-pl011.c if (uap->using_rx_dma) { uap 1173 drivers/tty/serial/amba-pl011.c if (pl011_dma_rx_trigger_dma(uap)) uap 1174 drivers/tty/serial/amba-pl011.c dev_dbg(uap->port.dev, "could not trigger initial " uap 1176 drivers/tty/serial/amba-pl011.c if (uap->dmarx.poll_rate) { uap 1177 drivers/tty/serial/amba-pl011.c timer_setup(&uap->dmarx.timer, pl011_dma_rx_poll, 0); uap 1178 drivers/tty/serial/amba-pl011.c mod_timer(&uap->dmarx.timer, uap 1180 drivers/tty/serial/amba-pl011.c msecs_to_jiffies(uap->dmarx.poll_rate)); uap 1181 drivers/tty/serial/amba-pl011.c uap->dmarx.last_residue = PL011_DMA_BUFFER_SIZE; uap 1182 drivers/tty/serial/amba-pl011.c uap->dmarx.last_jiffies = jiffies; uap 1187 drivers/tty/serial/amba-pl011.c static void pl011_dma_shutdown(struct uart_amba_port *uap) uap 1189 drivers/tty/serial/amba-pl011.c if (!(uap->using_tx_dma || uap->using_rx_dma)) uap 1193 drivers/tty/serial/amba-pl011.c while (pl011_read(uap, REG_FR) & uap->vendor->fr_busy) uap 1196 drivers/tty/serial/amba-pl011.c spin_lock_irq(&uap->port.lock); uap 1197 drivers/tty/serial/amba-pl011.c uap->dmacr &= ~(UART011_DMAONERR | UART011_RXDMAE | UART011_TXDMAE); uap 1198 drivers/tty/serial/amba-pl011.c pl011_write(uap->dmacr, uap, REG_DMACR); uap 1199 drivers/tty/serial/amba-pl011.c spin_unlock_irq(&uap->port.lock); uap 1201 drivers/tty/serial/amba-pl011.c if (uap->using_tx_dma) { uap 1203 drivers/tty/serial/amba-pl011.c dmaengine_terminate_all(uap->dmatx.chan); uap 1204 drivers/tty/serial/amba-pl011.c if (uap->dmatx.queued) { uap 1205 drivers/tty/serial/amba-pl011.c dma_unmap_sg(uap->dmatx.chan->device->dev, &uap->dmatx.sg, 1, uap 1207 drivers/tty/serial/amba-pl011.c uap->dmatx.queued = false; uap 1210 drivers/tty/serial/amba-pl011.c kfree(uap->dmatx.buf); uap 1211 drivers/tty/serial/amba-pl011.c uap->using_tx_dma = false; uap 1214 drivers/tty/serial/amba-pl011.c if (uap->using_rx_dma) { uap 1215 drivers/tty/serial/amba-pl011.c dmaengine_terminate_all(uap->dmarx.chan); uap 1217 drivers/tty/serial/amba-pl011.c pl011_sgbuf_free(uap->dmarx.chan, &uap->dmarx.sgbuf_a, DMA_FROM_DEVICE); uap 1218 drivers/tty/serial/amba-pl011.c pl011_sgbuf_free(uap->dmarx.chan, &uap->dmarx.sgbuf_b, DMA_FROM_DEVICE); uap 1219 drivers/tty/serial/amba-pl011.c if (uap->dmarx.poll_rate) uap 1220 drivers/tty/serial/amba-pl011.c del_timer_sync(&uap->dmarx.timer); uap 1221 drivers/tty/serial/amba-pl011.c uap->using_rx_dma = false; uap 1225 drivers/tty/serial/amba-pl011.c static inline bool pl011_dma_rx_available(struct uart_amba_port *uap) uap 1227 drivers/tty/serial/amba-pl011.c return uap->using_rx_dma; uap 1230 drivers/tty/serial/amba-pl011.c static inline bool pl011_dma_rx_running(struct uart_amba_port *uap) uap 1232 drivers/tty/serial/amba-pl011.c return uap->using_rx_dma && uap->dmarx.running; uap 1237 drivers/tty/serial/amba-pl011.c static inline void pl011_dma_probe(struct uart_amba_port *uap) uap 1241 drivers/tty/serial/amba-pl011.c static inline void pl011_dma_remove(struct uart_amba_port *uap) uap 1245 drivers/tty/serial/amba-pl011.c static inline void pl011_dma_startup(struct uart_amba_port *uap) uap 1249 drivers/tty/serial/amba-pl011.c static inline void pl011_dma_shutdown(struct uart_amba_port *uap) uap 1253 drivers/tty/serial/amba-pl011.c static inline bool pl011_dma_tx_irq(struct uart_amba_port *uap) uap 1258 drivers/tty/serial/amba-pl011.c static inline void pl011_dma_tx_stop(struct uart_amba_port *uap) uap 1262 drivers/tty/serial/amba-pl011.c static inline bool pl011_dma_tx_start(struct uart_amba_port *uap) uap 1267 drivers/tty/serial/amba-pl011.c static inline void pl011_dma_rx_irq(struct uart_amba_port *uap) uap 1271 drivers/tty/serial/amba-pl011.c static inline void pl011_dma_rx_stop(struct uart_amba_port *uap) uap 1275 drivers/tty/serial/amba-pl011.c static inline int pl011_dma_rx_trigger_dma(struct uart_amba_port *uap) uap 1280 drivers/tty/serial/amba-pl011.c static inline bool pl011_dma_rx_available(struct uart_amba_port *uap) uap 1285 drivers/tty/serial/amba-pl011.c static inline bool pl011_dma_rx_running(struct uart_amba_port *uap) uap 1295 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1298 drivers/tty/serial/amba-pl011.c uap->im &= ~UART011_TXIM; uap 1299 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1300 drivers/tty/serial/amba-pl011.c pl011_dma_tx_stop(uap); uap 1303 drivers/tty/serial/amba-pl011.c static bool pl011_tx_chars(struct uart_amba_port *uap, bool from_irq); uap 1306 drivers/tty/serial/amba-pl011.c static void pl011_start_tx_pio(struct uart_amba_port *uap) uap 1308 drivers/tty/serial/amba-pl011.c if (pl011_tx_chars(uap, false)) { uap 1309 drivers/tty/serial/amba-pl011.c uap->im |= UART011_TXIM; uap 1310 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1316 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1319 drivers/tty/serial/amba-pl011.c if (!pl011_dma_tx_start(uap)) uap 1320 drivers/tty/serial/amba-pl011.c pl011_start_tx_pio(uap); uap 1325 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1328 drivers/tty/serial/amba-pl011.c uap->im &= ~(UART011_RXIM|UART011_RTIM|UART011_FEIM| uap 1330 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1332 drivers/tty/serial/amba-pl011.c pl011_dma_rx_stop(uap); uap 1337 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1340 drivers/tty/serial/amba-pl011.c uap->im |= UART011_RIMIM|UART011_CTSMIM|UART011_DCDMIM|UART011_DSRMIM; uap 1341 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1344 drivers/tty/serial/amba-pl011.c static void pl011_rx_chars(struct uart_amba_port *uap) uap 1345 drivers/tty/serial/amba-pl011.c __releases(&uap->port.lock) uap 1346 drivers/tty/serial/amba-pl011.c __acquires(&uap->port.lock) uap 1348 drivers/tty/serial/amba-pl011.c pl011_fifo_to_tty(uap); uap 1350 drivers/tty/serial/amba-pl011.c spin_unlock(&uap->port.lock); uap 1351 drivers/tty/serial/amba-pl011.c tty_flip_buffer_push(&uap->port.state->port); uap 1356 drivers/tty/serial/amba-pl011.c if (pl011_dma_rx_available(uap)) { uap 1357 drivers/tty/serial/amba-pl011.c if (pl011_dma_rx_trigger_dma(uap)) { uap 1358 drivers/tty/serial/amba-pl011.c dev_dbg(uap->port.dev, "could not trigger RX DMA job " uap 1360 drivers/tty/serial/amba-pl011.c uap->im |= UART011_RXIM; uap 1361 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1365 drivers/tty/serial/amba-pl011.c if (uap->dmarx.poll_rate) { uap 1366 drivers/tty/serial/amba-pl011.c uap->dmarx.last_jiffies = jiffies; uap 1367 drivers/tty/serial/amba-pl011.c uap->dmarx.last_residue = PL011_DMA_BUFFER_SIZE; uap 1368 drivers/tty/serial/amba-pl011.c mod_timer(&uap->dmarx.timer, uap 1370 drivers/tty/serial/amba-pl011.c msecs_to_jiffies(uap->dmarx.poll_rate)); uap 1375 drivers/tty/serial/amba-pl011.c spin_lock(&uap->port.lock); uap 1378 drivers/tty/serial/amba-pl011.c static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, uap 1382 drivers/tty/serial/amba-pl011.c pl011_read(uap, REG_FR) & UART01x_FR_TXFF) uap 1385 drivers/tty/serial/amba-pl011.c pl011_write(c, uap, REG_DR); uap 1386 drivers/tty/serial/amba-pl011.c uap->port.icount.tx++; uap 1392 drivers/tty/serial/amba-pl011.c static bool pl011_tx_chars(struct uart_amba_port *uap, bool from_irq) uap 1394 drivers/tty/serial/amba-pl011.c struct circ_buf *xmit = &uap->port.state->xmit; uap 1395 drivers/tty/serial/amba-pl011.c int count = uap->fifosize >> 1; uap 1397 drivers/tty/serial/amba-pl011.c if (uap->port.x_char) { uap 1398 drivers/tty/serial/amba-pl011.c if (!pl011_tx_char(uap, uap->port.x_char, from_irq)) uap 1400 drivers/tty/serial/amba-pl011.c uap->port.x_char = 0; uap 1403 drivers/tty/serial/amba-pl011.c if (uart_circ_empty(xmit) || uart_tx_stopped(&uap->port)) { uap 1404 drivers/tty/serial/amba-pl011.c pl011_stop_tx(&uap->port); uap 1409 drivers/tty/serial/amba-pl011.c if (pl011_dma_tx_irq(uap)) uap 1416 drivers/tty/serial/amba-pl011.c if (!pl011_tx_char(uap, xmit->buf[xmit->tail], from_irq)) uap 1423 drivers/tty/serial/amba-pl011.c uart_write_wakeup(&uap->port); uap 1426 drivers/tty/serial/amba-pl011.c pl011_stop_tx(&uap->port); uap 1432 drivers/tty/serial/amba-pl011.c static void pl011_modem_status(struct uart_amba_port *uap) uap 1436 drivers/tty/serial/amba-pl011.c status = pl011_read(uap, REG_FR) & UART01x_FR_MODEM_ANY; uap 1438 drivers/tty/serial/amba-pl011.c delta = status ^ uap->old_status; uap 1439 drivers/tty/serial/amba-pl011.c uap->old_status = status; uap 1445 drivers/tty/serial/amba-pl011.c uart_handle_dcd_change(&uap->port, status & UART01x_FR_DCD); uap 1447 drivers/tty/serial/amba-pl011.c if (delta & uap->vendor->fr_dsr) uap 1448 drivers/tty/serial/amba-pl011.c uap->port.icount.dsr++; uap 1450 drivers/tty/serial/amba-pl011.c if (delta & uap->vendor->fr_cts) uap 1451 drivers/tty/serial/amba-pl011.c uart_handle_cts_change(&uap->port, uap 1452 drivers/tty/serial/amba-pl011.c status & uap->vendor->fr_cts); uap 1454 drivers/tty/serial/amba-pl011.c wake_up_interruptible(&uap->port.state->port.delta_msr_wait); uap 1457 drivers/tty/serial/amba-pl011.c static void check_apply_cts_event_workaround(struct uart_amba_port *uap) uap 1461 drivers/tty/serial/amba-pl011.c if (!uap->vendor->cts_event_workaround) uap 1465 drivers/tty/serial/amba-pl011.c pl011_write(0x00, uap, REG_ICR); uap 1472 drivers/tty/serial/amba-pl011.c dummy_read = pl011_read(uap, REG_ICR); uap 1473 drivers/tty/serial/amba-pl011.c dummy_read = pl011_read(uap, REG_ICR); uap 1478 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = dev_id; uap 1483 drivers/tty/serial/amba-pl011.c spin_lock_irqsave(&uap->port.lock, flags); uap 1484 drivers/tty/serial/amba-pl011.c status = pl011_read(uap, REG_RIS) & uap->im; uap 1487 drivers/tty/serial/amba-pl011.c check_apply_cts_event_workaround(uap); uap 1491 drivers/tty/serial/amba-pl011.c uap, REG_ICR); uap 1494 drivers/tty/serial/amba-pl011.c if (pl011_dma_rx_running(uap)) uap 1495 drivers/tty/serial/amba-pl011.c pl011_dma_rx_irq(uap); uap 1497 drivers/tty/serial/amba-pl011.c pl011_rx_chars(uap); uap 1501 drivers/tty/serial/amba-pl011.c pl011_modem_status(uap); uap 1503 drivers/tty/serial/amba-pl011.c pl011_tx_chars(uap, true); uap 1508 drivers/tty/serial/amba-pl011.c status = pl011_read(uap, REG_RIS) & uap->im; uap 1513 drivers/tty/serial/amba-pl011.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 1520 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1524 drivers/tty/serial/amba-pl011.c unsigned int status = pl011_read(uap, REG_FR) ^ uap->vendor->inv_fr; uap 1526 drivers/tty/serial/amba-pl011.c return status & (uap->vendor->fr_busy | UART01x_FR_TXFF) ? uap 1532 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1535 drivers/tty/serial/amba-pl011.c unsigned int status = pl011_read(uap, REG_FR); uap 1542 drivers/tty/serial/amba-pl011.c TIOCMBIT(uap->vendor->fr_dsr, TIOCM_DSR); uap 1543 drivers/tty/serial/amba-pl011.c TIOCMBIT(uap->vendor->fr_cts, TIOCM_CTS); uap 1544 drivers/tty/serial/amba-pl011.c TIOCMBIT(uap->vendor->fr_ri, TIOCM_RNG); uap 1551 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1555 drivers/tty/serial/amba-pl011.c cr = pl011_read(uap, REG_CR); uap 1575 drivers/tty/serial/amba-pl011.c pl011_write(cr, uap, REG_CR); uap 1580 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1585 drivers/tty/serial/amba-pl011.c spin_lock_irqsave(&uap->port.lock, flags); uap 1586 drivers/tty/serial/amba-pl011.c lcr_h = pl011_read(uap, REG_LCRH_TX); uap 1591 drivers/tty/serial/amba-pl011.c pl011_write(lcr_h, uap, REG_LCRH_TX); uap 1592 drivers/tty/serial/amba-pl011.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 1599 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1602 drivers/tty/serial/amba-pl011.c pl011_write(pl011_read(uap, REG_MIS), uap, REG_ICR); uap 1616 drivers/tty/serial/amba-pl011.c pl011_write(pl011_read(uap, REG_IMSC) & ~UART011_TXIM, uap, uap 1622 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1632 drivers/tty/serial/amba-pl011.c status = pl011_read(uap, REG_FR); uap 1636 drivers/tty/serial/amba-pl011.c return pl011_read(uap, REG_DR); uap 1642 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1645 drivers/tty/serial/amba-pl011.c while (pl011_read(uap, REG_FR) & UART01x_FR_TXFF) uap 1648 drivers/tty/serial/amba-pl011.c pl011_write(ch, uap, REG_DR); uap 1655 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1665 drivers/tty/serial/amba-pl011.c retval = clk_prepare_enable(uap->clk); uap 1669 drivers/tty/serial/amba-pl011.c uap->port.uartclk = clk_get_rate(uap->clk); uap 1674 drivers/tty/serial/amba-pl011.c uap, REG_ICR); uap 1680 drivers/tty/serial/amba-pl011.c uap->im = pl011_read(uap, REG_IMSC); uap 1681 drivers/tty/serial/amba-pl011.c pl011_write(UART011_RTIM | UART011_RXIM, uap, REG_IMSC); uap 1683 drivers/tty/serial/amba-pl011.c if (dev_get_platdata(uap->port.dev)) { uap 1686 drivers/tty/serial/amba-pl011.c plat = dev_get_platdata(uap->port.dev); uap 1693 drivers/tty/serial/amba-pl011.c static bool pl011_split_lcrh(const struct uart_amba_port *uap) uap 1695 drivers/tty/serial/amba-pl011.c return pl011_reg_to_offset(uap, REG_LCRH_RX) != uap 1696 drivers/tty/serial/amba-pl011.c pl011_reg_to_offset(uap, REG_LCRH_TX); uap 1699 drivers/tty/serial/amba-pl011.c static void pl011_write_lcr_h(struct uart_amba_port *uap, unsigned int lcr_h) uap 1701 drivers/tty/serial/amba-pl011.c pl011_write(lcr_h, uap, REG_LCRH_RX); uap 1702 drivers/tty/serial/amba-pl011.c if (pl011_split_lcrh(uap)) { uap 1709 drivers/tty/serial/amba-pl011.c pl011_write(0xff, uap, REG_MIS); uap 1710 drivers/tty/serial/amba-pl011.c pl011_write(lcr_h, uap, REG_LCRH_TX); uap 1714 drivers/tty/serial/amba-pl011.c static int pl011_allocate_irq(struct uart_amba_port *uap) uap 1716 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1718 drivers/tty/serial/amba-pl011.c return request_irq(uap->port.irq, pl011_int, IRQF_SHARED, "uart-pl011", uap); uap 1726 drivers/tty/serial/amba-pl011.c static void pl011_enable_interrupts(struct uart_amba_port *uap) uap 1730 drivers/tty/serial/amba-pl011.c spin_lock_irq(&uap->port.lock); uap 1733 drivers/tty/serial/amba-pl011.c pl011_write(UART011_RTIS | UART011_RXIS, uap, REG_ICR); uap 1741 drivers/tty/serial/amba-pl011.c for (i = 0; i < uap->fifosize * 2; ++i) { uap 1742 drivers/tty/serial/amba-pl011.c if (pl011_read(uap, REG_FR) & UART01x_FR_RXFE) uap 1745 drivers/tty/serial/amba-pl011.c pl011_read(uap, REG_DR); uap 1748 drivers/tty/serial/amba-pl011.c uap->im = UART011_RTIM; uap 1749 drivers/tty/serial/amba-pl011.c if (!pl011_dma_rx_running(uap)) uap 1750 drivers/tty/serial/amba-pl011.c uap->im |= UART011_RXIM; uap 1751 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1752 drivers/tty/serial/amba-pl011.c spin_unlock_irq(&uap->port.lock); uap 1757 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1766 drivers/tty/serial/amba-pl011.c retval = pl011_allocate_irq(uap); uap 1770 drivers/tty/serial/amba-pl011.c pl011_write(uap->vendor->ifls, uap, REG_IFLS); uap 1772 drivers/tty/serial/amba-pl011.c spin_lock_irq(&uap->port.lock); uap 1775 drivers/tty/serial/amba-pl011.c cr = uap->old_cr & (UART011_CR_RTS | UART011_CR_DTR); uap 1777 drivers/tty/serial/amba-pl011.c pl011_write(cr, uap, REG_CR); uap 1779 drivers/tty/serial/amba-pl011.c spin_unlock_irq(&uap->port.lock); uap 1784 drivers/tty/serial/amba-pl011.c uap->old_status = pl011_read(uap, REG_FR) & UART01x_FR_MODEM_ANY; uap 1787 drivers/tty/serial/amba-pl011.c pl011_dma_startup(uap); uap 1789 drivers/tty/serial/amba-pl011.c pl011_enable_interrupts(uap); uap 1794 drivers/tty/serial/amba-pl011.c clk_disable_unprepare(uap->clk); uap 1800 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1808 drivers/tty/serial/amba-pl011.c retval = pl011_allocate_irq(uap); uap 1813 drivers/tty/serial/amba-pl011.c uap->old_status = 0; uap 1815 drivers/tty/serial/amba-pl011.c pl011_enable_interrupts(uap); uap 1820 drivers/tty/serial/amba-pl011.c static void pl011_shutdown_channel(struct uart_amba_port *uap, uap 1825 drivers/tty/serial/amba-pl011.c val = pl011_read(uap, lcrh); uap 1827 drivers/tty/serial/amba-pl011.c pl011_write(val, uap, lcrh); uap 1835 drivers/tty/serial/amba-pl011.c static void pl011_disable_uart(struct uart_amba_port *uap) uap 1839 drivers/tty/serial/amba-pl011.c uap->port.status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS); uap 1840 drivers/tty/serial/amba-pl011.c spin_lock_irq(&uap->port.lock); uap 1841 drivers/tty/serial/amba-pl011.c cr = pl011_read(uap, REG_CR); uap 1842 drivers/tty/serial/amba-pl011.c uap->old_cr = cr; uap 1845 drivers/tty/serial/amba-pl011.c pl011_write(cr, uap, REG_CR); uap 1846 drivers/tty/serial/amba-pl011.c spin_unlock_irq(&uap->port.lock); uap 1851 drivers/tty/serial/amba-pl011.c pl011_shutdown_channel(uap, REG_LCRH_RX); uap 1852 drivers/tty/serial/amba-pl011.c if (pl011_split_lcrh(uap)) uap 1853 drivers/tty/serial/amba-pl011.c pl011_shutdown_channel(uap, REG_LCRH_TX); uap 1856 drivers/tty/serial/amba-pl011.c static void pl011_disable_interrupts(struct uart_amba_port *uap) uap 1858 drivers/tty/serial/amba-pl011.c spin_lock_irq(&uap->port.lock); uap 1861 drivers/tty/serial/amba-pl011.c uap->im = 0; uap 1862 drivers/tty/serial/amba-pl011.c pl011_write(uap->im, uap, REG_IMSC); uap 1863 drivers/tty/serial/amba-pl011.c pl011_write(0xffff, uap, REG_ICR); uap 1865 drivers/tty/serial/amba-pl011.c spin_unlock_irq(&uap->port.lock); uap 1870 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1873 drivers/tty/serial/amba-pl011.c pl011_disable_interrupts(uap); uap 1875 drivers/tty/serial/amba-pl011.c pl011_dma_shutdown(uap); uap 1877 drivers/tty/serial/amba-pl011.c free_irq(uap->port.irq, uap); uap 1879 drivers/tty/serial/amba-pl011.c pl011_disable_uart(uap); uap 1884 drivers/tty/serial/amba-pl011.c clk_disable_unprepare(uap->clk); uap 1888 drivers/tty/serial/amba-pl011.c if (dev_get_platdata(uap->port.dev)) { uap 1891 drivers/tty/serial/amba-pl011.c plat = dev_get_platdata(uap->port.dev); uap 1896 drivers/tty/serial/amba-pl011.c if (uap->port.ops->flush_buffer) uap 1897 drivers/tty/serial/amba-pl011.c uap->port.ops->flush_buffer(port); uap 1902 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1905 drivers/tty/serial/amba-pl011.c pl011_disable_interrupts(uap); uap 1907 drivers/tty/serial/amba-pl011.c free_irq(uap->port.irq, uap); uap 1909 drivers/tty/serial/amba-pl011.c if (uap->port.ops->flush_buffer) uap 1910 drivers/tty/serial/amba-pl011.c uap->port.ops->flush_buffer(port); uap 1949 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 1955 drivers/tty/serial/amba-pl011.c if (uap->vendor->oversampling) uap 1969 drivers/tty/serial/amba-pl011.c if (uap->dmarx.auto_poll_rate) uap 1970 drivers/tty/serial/amba-pl011.c uap->dmarx.poll_rate = DIV_ROUND_UP(10000000, baud); uap 2001 drivers/tty/serial/amba-pl011.c if (uap->fifosize > 1) uap 2017 drivers/tty/serial/amba-pl011.c old_cr = pl011_read(uap, REG_CR); uap 2018 drivers/tty/serial/amba-pl011.c pl011_write(0, uap, REG_CR); uap 2031 drivers/tty/serial/amba-pl011.c if (uap->vendor->oversampling) { uap 2044 drivers/tty/serial/amba-pl011.c if (uap->vendor->oversampling) { uap 2051 drivers/tty/serial/amba-pl011.c pl011_write(quot & 0x3f, uap, REG_FBRD); uap 2052 drivers/tty/serial/amba-pl011.c pl011_write(quot >> 6, uap, REG_IBRD); uap 2060 drivers/tty/serial/amba-pl011.c pl011_write_lcr_h(uap, lcr_h); uap 2061 drivers/tty/serial/amba-pl011.c pl011_write(old_cr, uap, REG_CR); uap 2070 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 2074 drivers/tty/serial/amba-pl011.c tty_termios_encode_baud_rate(termios, uap->fixed_baud, uap->fixed_baud); uap 2082 drivers/tty/serial/amba-pl011.c uart_update_timeout(port, CS8, uap->fixed_baud); uap 2089 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 2091 drivers/tty/serial/amba-pl011.c return uap->port.type == PORT_AMBA ? uap->type : NULL; uap 2199 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = uap 2202 drivers/tty/serial/amba-pl011.c while (pl011_read(uap, REG_FR) & UART01x_FR_TXFF) uap 2204 drivers/tty/serial/amba-pl011.c pl011_write(ch, uap, REG_DR); uap 2210 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = amba_ports[co->index]; uap 2215 drivers/tty/serial/amba-pl011.c clk_enable(uap->clk); uap 2218 drivers/tty/serial/amba-pl011.c if (uap->port.sysrq) uap 2221 drivers/tty/serial/amba-pl011.c locked = spin_trylock(&uap->port.lock); uap 2223 drivers/tty/serial/amba-pl011.c spin_lock(&uap->port.lock); uap 2228 drivers/tty/serial/amba-pl011.c if (!uap->vendor->always_enabled) { uap 2229 drivers/tty/serial/amba-pl011.c old_cr = pl011_read(uap, REG_CR); uap 2232 drivers/tty/serial/amba-pl011.c pl011_write(new_cr, uap, REG_CR); uap 2235 drivers/tty/serial/amba-pl011.c uart_console_write(&uap->port, s, count, pl011_console_putchar); uap 2242 drivers/tty/serial/amba-pl011.c while ((pl011_read(uap, REG_FR) ^ uap->vendor->inv_fr) uap 2243 drivers/tty/serial/amba-pl011.c & uap->vendor->fr_busy) uap 2245 drivers/tty/serial/amba-pl011.c if (!uap->vendor->always_enabled) uap 2246 drivers/tty/serial/amba-pl011.c pl011_write(old_cr, uap, REG_CR); uap 2249 drivers/tty/serial/amba-pl011.c spin_unlock(&uap->port.lock); uap 2252 drivers/tty/serial/amba-pl011.c clk_disable(uap->clk); uap 2256 drivers/tty/serial/amba-pl011.c pl011_console_get_options(struct uart_amba_port *uap, int *baud, uap 2259 drivers/tty/serial/amba-pl011.c if (pl011_read(uap, REG_CR) & UART01x_CR_UARTEN) { uap 2262 drivers/tty/serial/amba-pl011.c lcr_h = pl011_read(uap, REG_LCRH_TX); uap 2277 drivers/tty/serial/amba-pl011.c ibrd = pl011_read(uap, REG_IBRD); uap 2278 drivers/tty/serial/amba-pl011.c fbrd = pl011_read(uap, REG_FBRD); uap 2280 drivers/tty/serial/amba-pl011.c *baud = uap->port.uartclk * 4 / (64 * ibrd + fbrd); uap 2282 drivers/tty/serial/amba-pl011.c if (uap->vendor->oversampling) { uap 2283 drivers/tty/serial/amba-pl011.c if (pl011_read(uap, REG_CR) uap 2292 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap; uap 2306 drivers/tty/serial/amba-pl011.c uap = amba_ports[co->index]; uap 2307 drivers/tty/serial/amba-pl011.c if (!uap) uap 2311 drivers/tty/serial/amba-pl011.c pinctrl_pm_select_default_state(uap->port.dev); uap 2313 drivers/tty/serial/amba-pl011.c ret = clk_prepare(uap->clk); uap 2317 drivers/tty/serial/amba-pl011.c if (dev_get_platdata(uap->port.dev)) { uap 2320 drivers/tty/serial/amba-pl011.c plat = dev_get_platdata(uap->port.dev); uap 2325 drivers/tty/serial/amba-pl011.c uap->port.uartclk = clk_get_rate(uap->clk); uap 2327 drivers/tty/serial/amba-pl011.c if (uap->vendor->fixed_options) { uap 2328 drivers/tty/serial/amba-pl011.c baud = uap->fixed_baud; uap 2334 drivers/tty/serial/amba-pl011.c pl011_console_get_options(uap, &baud, &parity, &bits); uap 2337 drivers/tty/serial/amba-pl011.c return uart_set_options(&uap->port, co, baud, parity, bits, flow); uap 2543 drivers/tty/serial/amba-pl011.c static void pl011_unregister_port(struct uart_amba_port *uap) uap 2549 drivers/tty/serial/amba-pl011.c if (amba_ports[i] == uap) uap 2554 drivers/tty/serial/amba-pl011.c pl011_dma_remove(uap); uap 2570 drivers/tty/serial/amba-pl011.c static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, uap 2581 drivers/tty/serial/amba-pl011.c uap->old_cr = 0; uap 2582 drivers/tty/serial/amba-pl011.c uap->port.dev = dev; uap 2583 drivers/tty/serial/amba-pl011.c uap->port.mapbase = mmiobase->start; uap 2584 drivers/tty/serial/amba-pl011.c uap->port.membase = base; uap 2585 drivers/tty/serial/amba-pl011.c uap->port.fifosize = uap->fifosize; uap 2586 drivers/tty/serial/amba-pl011.c uap->port.flags = UPF_BOOT_AUTOCONF; uap 2587 drivers/tty/serial/amba-pl011.c uap->port.line = index; uap 2589 drivers/tty/serial/amba-pl011.c amba_ports[index] = uap; uap 2594 drivers/tty/serial/amba-pl011.c static int pl011_register_port(struct uart_amba_port *uap) uap 2599 drivers/tty/serial/amba-pl011.c pl011_write(0, uap, REG_IMSC); uap 2600 drivers/tty/serial/amba-pl011.c pl011_write(0xffff, uap, REG_ICR); uap 2605 drivers/tty/serial/amba-pl011.c dev_err(uap->port.dev, uap 2611 drivers/tty/serial/amba-pl011.c ret = uart_add_one_port(&amba_reg, &uap->port); uap 2613 drivers/tty/serial/amba-pl011.c pl011_unregister_port(uap); uap 2620 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap; uap 2628 drivers/tty/serial/amba-pl011.c uap = devm_kzalloc(&dev->dev, sizeof(struct uart_amba_port), uap 2630 drivers/tty/serial/amba-pl011.c if (!uap) uap 2633 drivers/tty/serial/amba-pl011.c uap->clk = devm_clk_get(&dev->dev, NULL); uap 2634 drivers/tty/serial/amba-pl011.c if (IS_ERR(uap->clk)) uap 2635 drivers/tty/serial/amba-pl011.c return PTR_ERR(uap->clk); uap 2637 drivers/tty/serial/amba-pl011.c uap->reg_offset = vendor->reg_offset; uap 2638 drivers/tty/serial/amba-pl011.c uap->vendor = vendor; uap 2639 drivers/tty/serial/amba-pl011.c uap->fifosize = vendor->get_fifosize(dev); uap 2640 drivers/tty/serial/amba-pl011.c uap->port.iotype = vendor->access_32b ? UPIO_MEM32 : UPIO_MEM; uap 2641 drivers/tty/serial/amba-pl011.c uap->port.irq = dev->irq[0]; uap 2642 drivers/tty/serial/amba-pl011.c uap->port.ops = &amba_pl011_pops; uap 2644 drivers/tty/serial/amba-pl011.c snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev)); uap 2646 drivers/tty/serial/amba-pl011.c ret = pl011_setup_port(&dev->dev, uap, &dev->res, portnr); uap 2650 drivers/tty/serial/amba-pl011.c amba_set_drvdata(dev, uap); uap 2652 drivers/tty/serial/amba-pl011.c return pl011_register_port(uap); uap 2657 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = amba_get_drvdata(dev); uap 2659 drivers/tty/serial/amba-pl011.c uart_remove_one_port(&amba_reg, &uap->port); uap 2660 drivers/tty/serial/amba-pl011.c pl011_unregister_port(uap); uap 2667 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = dev_get_drvdata(dev); uap 2669 drivers/tty/serial/amba-pl011.c if (!uap) uap 2672 drivers/tty/serial/amba-pl011.c return uart_suspend_port(&amba_reg, &uap->port); uap 2677 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = dev_get_drvdata(dev); uap 2679 drivers/tty/serial/amba-pl011.c if (!uap) uap 2682 drivers/tty/serial/amba-pl011.c return uart_resume_port(&amba_reg, &uap->port); uap 2690 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap; uap 2713 drivers/tty/serial/amba-pl011.c uap = devm_kzalloc(&pdev->dev, sizeof(struct uart_amba_port), uap 2715 drivers/tty/serial/amba-pl011.c if (!uap) uap 2721 drivers/tty/serial/amba-pl011.c uap->port.irq = ret; uap 2726 drivers/tty/serial/amba-pl011.c uap->vendor = &vendor_qdt_qdf2400_e44; uap 2729 drivers/tty/serial/amba-pl011.c uap->vendor = &vendor_sbsa; uap 2731 drivers/tty/serial/amba-pl011.c uap->reg_offset = uap->vendor->reg_offset; uap 2732 drivers/tty/serial/amba-pl011.c uap->fifosize = 32; uap 2733 drivers/tty/serial/amba-pl011.c uap->port.iotype = uap->vendor->access_32b ? UPIO_MEM32 : UPIO_MEM; uap 2734 drivers/tty/serial/amba-pl011.c uap->port.ops = &sbsa_uart_pops; uap 2735 drivers/tty/serial/amba-pl011.c uap->fixed_baud = baudrate; uap 2737 drivers/tty/serial/amba-pl011.c snprintf(uap->type, sizeof(uap->type), "SBSA"); uap 2741 drivers/tty/serial/amba-pl011.c ret = pl011_setup_port(&pdev->dev, uap, r, portnr); uap 2745 drivers/tty/serial/amba-pl011.c platform_set_drvdata(pdev, uap); uap 2747 drivers/tty/serial/amba-pl011.c return pl011_register_port(uap); uap 2752 drivers/tty/serial/amba-pl011.c struct uart_amba_port *uap = platform_get_drvdata(pdev); uap 2754 drivers/tty/serial/amba-pl011.c uart_remove_one_port(&amba_reg, &uap->port); uap 2755 drivers/tty/serial/amba-pl011.c pl011_unregister_port(uap); uap 487 drivers/tty/serial/mxs-auart.c static unsigned int mxs_reg_to_offset(const struct mxs_auart_port *uap, uap 490 drivers/tty/serial/mxs-auart.c return uap->vendor->reg_offset[reg]; uap 493 drivers/tty/serial/mxs-auart.c static unsigned int mxs_read(const struct mxs_auart_port *uap, uap 496 drivers/tty/serial/mxs-auart.c void __iomem *addr = uap->port.membase + mxs_reg_to_offset(uap, reg); uap 501 drivers/tty/serial/mxs-auart.c static void mxs_write(unsigned int val, struct mxs_auart_port *uap, uap 504 drivers/tty/serial/mxs-auart.c void __iomem *addr = uap->port.membase + mxs_reg_to_offset(uap, reg); uap 509 drivers/tty/serial/mxs-auart.c static void mxs_set(unsigned int val, struct mxs_auart_port *uap, uap 512 drivers/tty/serial/mxs-auart.c void __iomem *addr = uap->port.membase + mxs_reg_to_offset(uap, reg); uap 517 drivers/tty/serial/mxs-auart.c static void mxs_clr(unsigned int val, struct mxs_auart_port *uap, uap 520 drivers/tty/serial/mxs-auart.c void __iomem *addr = uap->port.membase + mxs_reg_to_offset(uap, reg); uap 91 drivers/tty/serial/pmac_zilog.c #define pmz_debug(fmt, arg...) pr_debug("ttyPZ%d: " fmt, uap->port.line, ## arg) uap 92 drivers/tty/serial/pmac_zilog.c #define pmz_error(fmt, arg...) pr_err("ttyPZ%d: " fmt, uap->port.line, ## arg) uap 93 drivers/tty/serial/pmac_zilog.c #define pmz_info(fmt, arg...) pr_info("ttyPZ%d: " fmt, uap->port.line, ## arg) uap 116 drivers/tty/serial/pmac_zilog.c static void pmz_load_zsregs(struct uart_pmac_port *uap, u8 *regs) uap 122 drivers/tty/serial/pmac_zilog.c unsigned char stat = read_zsreg(uap, R1); uap 128 drivers/tty/serial/pmac_zilog.c ZS_CLEARERR(uap); uap 129 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 130 drivers/tty/serial/pmac_zilog.c ZS_CLEARFIFO(uap); uap 131 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 132 drivers/tty/serial/pmac_zilog.c ZS_CLEARERR(uap); uap 135 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R1, uap 139 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R4, regs[R4]); uap 142 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R10, regs[R10]); uap 145 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R3, regs[R3] & ~RxENABLE); uap 146 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, regs[R5] & ~TxENABLE); uap 149 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R15, regs[R15] | EN85C30); uap 150 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R7, regs[R7P]); uap 153 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R15, regs[R15] & ~EN85C30); uap 156 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R6, regs[R6]); uap 157 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R7, regs[R7]); uap 160 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R14, regs[R14] & ~BRENAB); uap 163 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R11, regs[R11]); uap 166 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R12, regs[R12]); uap 167 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R13, regs[R13]); uap 170 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R14, regs[R14]); uap 173 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R0, RES_EXT_INT); uap 174 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R0, RES_EXT_INT); uap 177 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R3, regs[R3]); uap 178 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, regs[R5]); uap 181 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R1, regs[R1]); uap 184 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R9, regs[R9]); uap 195 drivers/tty/serial/pmac_zilog.c static void pmz_maybe_update_regs(struct uart_pmac_port *uap) uap 197 drivers/tty/serial/pmac_zilog.c if (!ZS_REGS_HELD(uap)) { uap 198 drivers/tty/serial/pmac_zilog.c if (ZS_TX_ACTIVE(uap)) { uap 199 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_REGS_HELD; uap 202 drivers/tty/serial/pmac_zilog.c pmz_load_zsregs(uap, uap->curregs); uap 207 drivers/tty/serial/pmac_zilog.c static void pmz_interrupt_control(struct uart_pmac_port *uap, int enable) uap 210 drivers/tty/serial/pmac_zilog.c uap->curregs[1] |= INT_ALL_Rx | TxINT_ENAB; uap 211 drivers/tty/serial/pmac_zilog.c if (!ZS_IS_EXTCLK(uap)) uap 212 drivers/tty/serial/pmac_zilog.c uap->curregs[1] |= EXT_INT_ENAB; uap 214 drivers/tty/serial/pmac_zilog.c uap->curregs[1] &= ~(EXT_INT_ENAB | TxINT_ENAB | RxINT_MASK); uap 216 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R1, uap->curregs[1]); uap 219 drivers/tty/serial/pmac_zilog.c static bool pmz_receive_chars(struct uart_pmac_port *uap) uap 226 drivers/tty/serial/pmac_zilog.c if (uap->port.state == NULL) { uap 228 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 231 drivers/tty/serial/pmac_zilog.c port = &uap->port.state->port; uap 236 drivers/tty/serial/pmac_zilog.c r1 = read_zsreg(uap, R1); uap 237 drivers/tty/serial/pmac_zilog.c ch = read_zsdata(uap); uap 240 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R0, ERR_RES); uap 241 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 244 drivers/tty/serial/pmac_zilog.c ch &= uap->parity_mask; uap 245 drivers/tty/serial/pmac_zilog.c if (ch == 0 && uap->flags & PMACZILOG_FLAG_BREAK) { uap 246 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_BREAK; uap 253 drivers/tty/serial/pmac_zilog.c uap->port.sysrq = jiffies + HZ*5; uap 257 drivers/tty/serial/pmac_zilog.c if (uap->port.sysrq) { uap 259 drivers/tty/serial/pmac_zilog.c spin_unlock(&uap->port.lock); uap 260 drivers/tty/serial/pmac_zilog.c swallow = uart_handle_sysrq_char(&uap->port, ch); uap 261 drivers/tty/serial/pmac_zilog.c spin_lock(&uap->port.lock); uap 272 drivers/tty/serial/pmac_zilog.c uap->port.icount.rx++; uap 278 drivers/tty/serial/pmac_zilog.c uap->port.icount.brk++; uap 279 drivers/tty/serial/pmac_zilog.c if (uart_handle_break(&uap->port)) uap 283 drivers/tty/serial/pmac_zilog.c uap->port.icount.parity++; uap 285 drivers/tty/serial/pmac_zilog.c uap->port.icount.frame++; uap 287 drivers/tty/serial/pmac_zilog.c uap->port.icount.overrun++; uap 288 drivers/tty/serial/pmac_zilog.c r1 &= uap->port.read_status_mask; uap 297 drivers/tty/serial/pmac_zilog.c if (uap->port.ignore_status_mask == 0xff || uap 298 drivers/tty/serial/pmac_zilog.c (r1 & uap->port.ignore_status_mask) == 0) { uap 313 drivers/tty/serial/pmac_zilog.c ch = read_zsreg(uap, R0); uap 320 drivers/tty/serial/pmac_zilog.c pmz_interrupt_control(uap, 0); uap 325 drivers/tty/serial/pmac_zilog.c static void pmz_status_handle(struct uart_pmac_port *uap) uap 329 drivers/tty/serial/pmac_zilog.c status = read_zsreg(uap, R0); uap 330 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R0, RES_EXT_INT); uap 331 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 333 drivers/tty/serial/pmac_zilog.c if (ZS_IS_OPEN(uap) && ZS_WANTS_MODEM_STATUS(uap)) { uap 335 drivers/tty/serial/pmac_zilog.c uap->port.icount.dsr++; uap 342 drivers/tty/serial/pmac_zilog.c if ((status ^ uap->prev_status) & DCD) uap 343 drivers/tty/serial/pmac_zilog.c uart_handle_dcd_change(&uap->port, uap 345 drivers/tty/serial/pmac_zilog.c if ((status ^ uap->prev_status) & CTS) uap 346 drivers/tty/serial/pmac_zilog.c uart_handle_cts_change(&uap->port, uap 349 drivers/tty/serial/pmac_zilog.c wake_up_interruptible(&uap->port.state->port.delta_msr_wait); uap 353 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_BREAK; uap 355 drivers/tty/serial/pmac_zilog.c uap->prev_status = status; uap 358 drivers/tty/serial/pmac_zilog.c static void pmz_transmit_chars(struct uart_pmac_port *uap) uap 362 drivers/tty/serial/pmac_zilog.c if (ZS_IS_CONS(uap)) { uap 363 drivers/tty/serial/pmac_zilog.c unsigned char status = read_zsreg(uap, R0); uap 377 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_TX_ACTIVE; uap 379 drivers/tty/serial/pmac_zilog.c if (ZS_REGS_HELD(uap)) { uap 380 drivers/tty/serial/pmac_zilog.c pmz_load_zsregs(uap, uap->curregs); uap 381 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_REGS_HELD; uap 384 drivers/tty/serial/pmac_zilog.c if (ZS_TX_STOPPED(uap)) { uap 385 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_TX_STOPPED; uap 397 drivers/tty/serial/pmac_zilog.c if (!ZS_IS_OPEN(uap)) uap 400 drivers/tty/serial/pmac_zilog.c if (uap->port.x_char) { uap 401 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_TX_ACTIVE; uap 402 drivers/tty/serial/pmac_zilog.c write_zsdata(uap, uap->port.x_char); uap 403 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 404 drivers/tty/serial/pmac_zilog.c uap->port.icount.tx++; uap 405 drivers/tty/serial/pmac_zilog.c uap->port.x_char = 0; uap 409 drivers/tty/serial/pmac_zilog.c if (uap->port.state == NULL) uap 411 drivers/tty/serial/pmac_zilog.c xmit = &uap->port.state->xmit; uap 413 drivers/tty/serial/pmac_zilog.c uart_write_wakeup(&uap->port); uap 416 drivers/tty/serial/pmac_zilog.c if (uart_tx_stopped(&uap->port)) uap 419 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_TX_ACTIVE; uap 420 drivers/tty/serial/pmac_zilog.c write_zsdata(uap, xmit->buf[xmit->tail]); uap 421 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 424 drivers/tty/serial/pmac_zilog.c uap->port.icount.tx++; uap 427 drivers/tty/serial/pmac_zilog.c uart_write_wakeup(&uap->port); uap 432 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R0, RES_Tx_P); uap 433 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 439 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = dev_id; uap 446 drivers/tty/serial/pmac_zilog.c uap_a = pmz_get_port_A(uap); uap 475 drivers/tty/serial/pmac_zilog.c tty_flip_buffer_push(&uap->port.state->port); uap 500 drivers/tty/serial/pmac_zilog.c tty_flip_buffer_push(&uap->port.state->port); uap 509 drivers/tty/serial/pmac_zilog.c static inline u8 pmz_peek_status(struct uart_pmac_port *uap) uap 514 drivers/tty/serial/pmac_zilog.c spin_lock_irqsave(&uap->port.lock, flags); uap 515 drivers/tty/serial/pmac_zilog.c status = read_zsreg(uap, R0); uap 516 drivers/tty/serial/pmac_zilog.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 543 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 547 drivers/tty/serial/pmac_zilog.c if (ZS_IS_IRDA(uap)) uap 550 drivers/tty/serial/pmac_zilog.c if (!(ZS_IS_OPEN(uap) || ZS_IS_CONS(uap))) uap 555 drivers/tty/serial/pmac_zilog.c if (ZS_IS_INTMODEM(uap)) { uap 567 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] |= set_bits; uap 568 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] &= ~clear_bits; uap 570 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, uap->curregs[R5]); uap 572 drivers/tty/serial/pmac_zilog.c set_bits, clear_bits, uap->curregs[R5]); uap 573 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 583 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 587 drivers/tty/serial/pmac_zilog.c status = read_zsreg(uap, R0); uap 616 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 621 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_TX_ACTIVE; uap 622 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_TX_STOPPED; uap 624 drivers/tty/serial/pmac_zilog.c status = read_zsreg(uap, R0); uap 634 drivers/tty/serial/pmac_zilog.c write_zsdata(uap, port->x_char); uap 635 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 643 drivers/tty/serial/pmac_zilog.c write_zsdata(uap, xmit->buf[xmit->tail]); uap 644 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 649 drivers/tty/serial/pmac_zilog.c uart_write_wakeup(&uap->port); uap 663 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 668 drivers/tty/serial/pmac_zilog.c uap->curregs[R1] &= ~RxINT_MASK; uap 669 drivers/tty/serial/pmac_zilog.c pmz_maybe_update_regs(uap); uap 680 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 683 drivers/tty/serial/pmac_zilog.c if (ZS_IS_IRDA(uap)) uap 685 drivers/tty/serial/pmac_zilog.c new_reg = uap->curregs[R15] | (DCDIE | SYNCIE | CTSIE); uap 686 drivers/tty/serial/pmac_zilog.c if (new_reg != uap->curregs[R15]) { uap 687 drivers/tty/serial/pmac_zilog.c uap->curregs[R15] = new_reg; uap 690 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R15, uap->curregs[R15]); uap 700 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 713 drivers/tty/serial/pmac_zilog.c new_reg = (uap->curregs[R5] | set_bits) & ~clear_bits; uap 714 drivers/tty/serial/pmac_zilog.c if (new_reg != uap->curregs[R5]) { uap 715 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] = new_reg; uap 716 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, uap->curregs[R5]); uap 730 drivers/tty/serial/pmac_zilog.c static int pmz_set_scc_power(struct uart_pmac_port *uap, int state) uap 737 drivers/tty/serial/pmac_zilog.c PMAC_FTR_SCC_ENABLE, uap->node, uap->port_type, 1); uap 739 drivers/tty/serial/pmac_zilog.c if (ZS_IS_INTMODEM(uap)) { uap 741 drivers/tty/serial/pmac_zilog.c PMAC_FTR_MODEM_ENABLE, uap->node, 0, 1); uap 749 drivers/tty/serial/pmac_zilog.c if (ZS_IS_INTMODEM(uap)) { uap 751 drivers/tty/serial/pmac_zilog.c PMAC_FTR_MODEM_ENABLE, uap->node, 0, 0); uap 754 drivers/tty/serial/pmac_zilog.c pmac_call_feature(PMAC_FTR_SCC_ENABLE, uap->node, uap->port_type, 0); uap 761 drivers/tty/serial/pmac_zilog.c static int pmz_set_scc_power(struct uart_pmac_port *uap, int state) uap 788 drivers/tty/serial/pmac_zilog.c static void pmz_fix_zero_bug_scc(struct uart_pmac_port *uap) uap 790 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 9, ZS_IS_CHANNEL_A(uap) ? CHRA : CHRB); uap 791 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 793 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 9, (ZS_IS_CHANNEL_A(uap) ? CHRA : CHRB) | NV); uap 794 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 796 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 4, X1CLK | MONSYNC); uap 797 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 3, Rx8); uap 798 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 5, Tx8 | RTS); uap 799 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 9, NV); /* Didn't we already do this? */ uap 800 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 11, RCBR | TCBR); uap 801 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 12, 0); uap 802 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 13, 0); uap 803 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 14, (LOOPBAK | BRSRC)); uap 804 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 14, (LOOPBAK | BRSRC | BRENAB)); uap 805 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 3, Rx8 | RxENABLE); uap 806 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 0, RES_EXT_INT); uap 807 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 0, RES_EXT_INT); uap 808 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 0, RES_EXT_INT); /* to kill some time */ uap 815 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 9, NV); uap 816 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 4, X16CLK | SB_MASK); uap 817 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 3, Rx8); uap 819 drivers/tty/serial/pmac_zilog.c while (read_zsreg(uap, 0) & Rx_CH_AV) { uap 820 drivers/tty/serial/pmac_zilog.c (void)read_zsreg(uap, 8); uap 821 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 0, RES_EXT_INT); uap 822 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 0, ERR_RES); uap 832 drivers/tty/serial/pmac_zilog.c static int __pmz_startup(struct uart_pmac_port *uap) uap 836 drivers/tty/serial/pmac_zilog.c memset(&uap->curregs, 0, sizeof(uap->curregs)); uap 839 drivers/tty/serial/pmac_zilog.c pwr_delay = pmz_set_scc_power(uap, 1); uap 842 drivers/tty/serial/pmac_zilog.c pmz_fix_zero_bug_scc(uap); uap 845 drivers/tty/serial/pmac_zilog.c uap->curregs[R9] = 0; uap 846 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 9, ZS_IS_CHANNEL_A(uap) ? CHRA : CHRB); uap 847 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 849 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, 9, 0); uap 850 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 853 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R1, 0); uap 854 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R0, ERR_RES); uap 855 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R0, ERR_RES); uap 856 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R0, RES_H_IUS); uap 857 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R0, RES_H_IUS); uap 860 drivers/tty/serial/pmac_zilog.c uap->curregs[R4] = X16CLK | SB1; uap 861 drivers/tty/serial/pmac_zilog.c uap->curregs[R3] = Rx8; uap 862 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] = Tx8 | RTS; uap 863 drivers/tty/serial/pmac_zilog.c if (!ZS_IS_IRDA(uap)) uap 864 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] |= DTR; uap 865 drivers/tty/serial/pmac_zilog.c uap->curregs[R12] = 0; uap 866 drivers/tty/serial/pmac_zilog.c uap->curregs[R13] = 0; uap 867 drivers/tty/serial/pmac_zilog.c uap->curregs[R14] = BRENAB; uap 870 drivers/tty/serial/pmac_zilog.c uap->curregs[R15] = BRKIE; uap 873 drivers/tty/serial/pmac_zilog.c uap->curregs[R9] |= NV | MIE; uap 875 drivers/tty/serial/pmac_zilog.c pmz_load_zsregs(uap, uap->curregs); uap 878 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R3, uap->curregs[R3] |= RxENABLE); uap 879 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, uap->curregs[R5] |= TxENABLE); uap 882 drivers/tty/serial/pmac_zilog.c uap->prev_status = read_zsreg(uap, R0); uap 887 drivers/tty/serial/pmac_zilog.c static void pmz_irda_reset(struct uart_pmac_port *uap) uap 891 drivers/tty/serial/pmac_zilog.c spin_lock_irqsave(&uap->port.lock, flags); uap 892 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] |= DTR; uap 893 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, uap->curregs[R5]); uap 894 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 895 drivers/tty/serial/pmac_zilog.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 898 drivers/tty/serial/pmac_zilog.c spin_lock_irqsave(&uap->port.lock, flags); uap 899 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] &= ~DTR; uap 900 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, uap->curregs[R5]); uap 901 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 902 drivers/tty/serial/pmac_zilog.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 912 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 918 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_IS_OPEN; uap 923 drivers/tty/serial/pmac_zilog.c if (!ZS_IS_CONS(uap)) { uap 925 drivers/tty/serial/pmac_zilog.c pwr_delay = __pmz_startup(uap); uap 928 drivers/tty/serial/pmac_zilog.c sprintf(uap->irq_name, PMACZILOG_NAME"%d", uap->port.line); uap 929 drivers/tty/serial/pmac_zilog.c if (request_irq(uap->port.irq, pmz_interrupt, IRQF_SHARED, uap 930 drivers/tty/serial/pmac_zilog.c uap->irq_name, uap)) { uap 932 drivers/tty/serial/pmac_zilog.c pmz_set_scc_power(uap, 0); uap 945 drivers/tty/serial/pmac_zilog.c if (ZS_IS_IRDA(uap)) uap 946 drivers/tty/serial/pmac_zilog.c pmz_irda_reset(uap); uap 950 drivers/tty/serial/pmac_zilog.c pmz_interrupt_control(uap, 1); uap 960 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 968 drivers/tty/serial/pmac_zilog.c pmz_interrupt_control(uap, 0); uap 970 drivers/tty/serial/pmac_zilog.c if (!ZS_IS_CONS(uap)) { uap 972 drivers/tty/serial/pmac_zilog.c uap->curregs[R3] &= ~RxENABLE; uap 973 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] &= ~TxENABLE; uap 976 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] &= ~SND_BRK; uap 977 drivers/tty/serial/pmac_zilog.c pmz_maybe_update_regs(uap); uap 983 drivers/tty/serial/pmac_zilog.c free_irq(uap->port.irq, uap); uap 987 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_IS_OPEN; uap 989 drivers/tty/serial/pmac_zilog.c if (!ZS_IS_CONS(uap)) uap 990 drivers/tty/serial/pmac_zilog.c pmz_set_scc_power(uap, 0); /* Shut the chip down */ uap 1000 drivers/tty/serial/pmac_zilog.c static void pmz_convert_to_zs(struct uart_pmac_port *uap, unsigned int cflag, uap 1009 drivers/tty/serial/pmac_zilog.c if (baud >= 115200 && ZS_IS_IRDA(uap)) { uap 1010 drivers/tty/serial/pmac_zilog.c uap->curregs[R4] = X1CLK; uap 1011 drivers/tty/serial/pmac_zilog.c uap->curregs[R11] = RCTRxCP | TCTRxCP; uap 1012 drivers/tty/serial/pmac_zilog.c uap->curregs[R14] = 0; /* BRG off */ uap 1013 drivers/tty/serial/pmac_zilog.c uap->curregs[R12] = 0; uap 1014 drivers/tty/serial/pmac_zilog.c uap->curregs[R13] = 0; uap 1015 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_IS_EXTCLK; uap 1019 drivers/tty/serial/pmac_zilog.c uap->curregs[R4] = X16CLK; uap 1020 drivers/tty/serial/pmac_zilog.c uap->curregs[R11] = 0; uap 1021 drivers/tty/serial/pmac_zilog.c uap->curregs[R14] = 0; uap 1024 drivers/tty/serial/pmac_zilog.c uap->curregs[R4] = X32CLK; uap 1025 drivers/tty/serial/pmac_zilog.c uap->curregs[R11] = 0; uap 1026 drivers/tty/serial/pmac_zilog.c uap->curregs[R14] = 0; uap 1029 drivers/tty/serial/pmac_zilog.c uap->curregs[R4] = X16CLK; uap 1030 drivers/tty/serial/pmac_zilog.c uap->curregs[R11] = TCBR | RCBR; uap 1032 drivers/tty/serial/pmac_zilog.c uap->curregs[R12] = (brg & 255); uap 1033 drivers/tty/serial/pmac_zilog.c uap->curregs[R13] = ((brg >> 8) & 255); uap 1034 drivers/tty/serial/pmac_zilog.c uap->curregs[R14] = BRENAB; uap 1036 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_IS_EXTCLK; uap 1040 drivers/tty/serial/pmac_zilog.c uap->curregs[3] &= ~RxN_MASK; uap 1041 drivers/tty/serial/pmac_zilog.c uap->curregs[5] &= ~TxN_MASK; uap 1045 drivers/tty/serial/pmac_zilog.c uap->curregs[3] |= Rx5; uap 1046 drivers/tty/serial/pmac_zilog.c uap->curregs[5] |= Tx5; uap 1047 drivers/tty/serial/pmac_zilog.c uap->parity_mask = 0x1f; uap 1050 drivers/tty/serial/pmac_zilog.c uap->curregs[3] |= Rx6; uap 1051 drivers/tty/serial/pmac_zilog.c uap->curregs[5] |= Tx6; uap 1052 drivers/tty/serial/pmac_zilog.c uap->parity_mask = 0x3f; uap 1055 drivers/tty/serial/pmac_zilog.c uap->curregs[3] |= Rx7; uap 1056 drivers/tty/serial/pmac_zilog.c uap->curregs[5] |= Tx7; uap 1057 drivers/tty/serial/pmac_zilog.c uap->parity_mask = 0x7f; uap 1061 drivers/tty/serial/pmac_zilog.c uap->curregs[3] |= Rx8; uap 1062 drivers/tty/serial/pmac_zilog.c uap->curregs[5] |= Tx8; uap 1063 drivers/tty/serial/pmac_zilog.c uap->parity_mask = 0xff; uap 1066 drivers/tty/serial/pmac_zilog.c uap->curregs[4] &= ~(SB_MASK); uap 1068 drivers/tty/serial/pmac_zilog.c uap->curregs[4] |= SB2; uap 1070 drivers/tty/serial/pmac_zilog.c uap->curregs[4] |= SB1; uap 1072 drivers/tty/serial/pmac_zilog.c uap->curregs[4] |= PAR_ENAB; uap 1074 drivers/tty/serial/pmac_zilog.c uap->curregs[4] &= ~PAR_ENAB; uap 1076 drivers/tty/serial/pmac_zilog.c uap->curregs[4] |= PAR_EVEN; uap 1078 drivers/tty/serial/pmac_zilog.c uap->curregs[4] &= ~PAR_EVEN; uap 1080 drivers/tty/serial/pmac_zilog.c uap->port.read_status_mask = Rx_OVR; uap 1082 drivers/tty/serial/pmac_zilog.c uap->port.read_status_mask |= CRC_ERR | PAR_ERR; uap 1084 drivers/tty/serial/pmac_zilog.c uap->port.read_status_mask |= BRK_ABRT; uap 1086 drivers/tty/serial/pmac_zilog.c uap->port.ignore_status_mask = 0; uap 1088 drivers/tty/serial/pmac_zilog.c uap->port.ignore_status_mask |= CRC_ERR | PAR_ERR; uap 1090 drivers/tty/serial/pmac_zilog.c uap->port.ignore_status_mask |= BRK_ABRT; uap 1092 drivers/tty/serial/pmac_zilog.c uap->port.ignore_status_mask |= Rx_OVR; uap 1096 drivers/tty/serial/pmac_zilog.c uap->port.ignore_status_mask = 0xff; uap 1103 drivers/tty/serial/pmac_zilog.c static void pmz_irda_setup(struct uart_pmac_port *uap, unsigned long *baud) uap 1148 drivers/tty/serial/pmac_zilog.c while ((read_zsreg(uap, R0) & Tx_BUF_EMP) == 0 uap 1149 drivers/tty/serial/pmac_zilog.c || (read_zsreg(uap, R1) & ALL_SNT) == 0) { uap 1159 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 1160 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 1161 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 1163 drivers/tty/serial/pmac_zilog.c while (read_zsreg(uap, R0) & Rx_CH_AV) { uap 1164 drivers/tty/serial/pmac_zilog.c read_zsdata(uap); uap 1173 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] |= DTR; uap 1174 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, uap->curregs[R5]); uap 1175 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 1179 drivers/tty/serial/pmac_zilog.c pmz_convert_to_zs(uap, CS8, 0, 19200); uap 1180 drivers/tty/serial/pmac_zilog.c pmz_load_zsregs(uap, uap->curregs); uap 1184 drivers/tty/serial/pmac_zilog.c write_zsdata(uap, 1); uap 1186 drivers/tty/serial/pmac_zilog.c while ((read_zsreg(uap, R0) & Rx_CH_AV) == 0) { uap 1193 drivers/tty/serial/pmac_zilog.c version = read_zsdata(uap); uap 1201 drivers/tty/serial/pmac_zilog.c write_zsdata(uap, cmdbyte); uap 1203 drivers/tty/serial/pmac_zilog.c while ((read_zsreg(uap, R0) & Rx_CH_AV) == 0) { uap 1210 drivers/tty/serial/pmac_zilog.c t = read_zsdata(uap); uap 1217 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 1218 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 1219 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 1223 drivers/tty/serial/pmac_zilog.c uap->curregs[R5] &= ~DTR; uap 1224 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, uap->curregs[R5]); uap 1225 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 1227 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 1228 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 1229 drivers/tty/serial/pmac_zilog.c (void)read_zsdata(uap); uap 1236 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 1241 drivers/tty/serial/pmac_zilog.c memcpy(&uap->termios_cache, termios, sizeof(struct ktermios)); uap 1250 drivers/tty/serial/pmac_zilog.c if (ZS_IS_IRDA(uap)) { uap 1255 drivers/tty/serial/pmac_zilog.c pmz_irda_setup(uap, &baud); uap 1257 drivers/tty/serial/pmac_zilog.c pmz_convert_to_zs(uap, termios->c_cflag, termios->c_iflag, baud); uap 1258 drivers/tty/serial/pmac_zilog.c pmz_load_zsregs(uap, uap->curregs); uap 1259 drivers/tty/serial/pmac_zilog.c zssync(uap); uap 1262 drivers/tty/serial/pmac_zilog.c pmz_convert_to_zs(uap, termios->c_cflag, termios->c_iflag, baud); uap 1264 drivers/tty/serial/pmac_zilog.c if (UART_ENABLE_MS(&uap->port, termios->c_cflag)) { uap 1265 drivers/tty/serial/pmac_zilog.c uap->curregs[R15] |= DCDIE | SYNCIE | CTSIE; uap 1266 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_MODEM_STATUS; uap 1268 drivers/tty/serial/pmac_zilog.c uap->curregs[R15] &= ~(DCDIE | SYNCIE | CTSIE); uap 1269 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_MODEM_STATUS; uap 1273 drivers/tty/serial/pmac_zilog.c pmz_maybe_update_regs(uap); uap 1284 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 1290 drivers/tty/serial/pmac_zilog.c pmz_interrupt_control(uap, 0); uap 1296 drivers/tty/serial/pmac_zilog.c if (ZS_IS_OPEN(uap)) uap 1297 drivers/tty/serial/pmac_zilog.c pmz_interrupt_control(uap, 1); uap 1304 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = to_pmz(port); uap 1306 drivers/tty/serial/pmac_zilog.c if (ZS_IS_IRDA(uap)) uap 1308 drivers/tty/serial/pmac_zilog.c else if (ZS_IS_INTMODEM(uap)) uap 1340 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = uap 1345 drivers/tty/serial/pmac_zilog.c if ((read_zsreg(uap, R0) & Rx_CH_AV) != 0) uap 1346 drivers/tty/serial/pmac_zilog.c return read_zsdata(uap); uap 1356 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = uap 1360 drivers/tty/serial/pmac_zilog.c while ((read_zsreg(uap, R0) & Tx_BUF_EMP) == 0) uap 1362 drivers/tty/serial/pmac_zilog.c write_zsdata(uap, c); uap 1397 drivers/tty/serial/pmac_zilog.c static int __init pmz_init_port(struct uart_pmac_port *uap) uap 1399 drivers/tty/serial/pmac_zilog.c struct device_node *np = uap->node; uap 1413 drivers/tty/serial/pmac_zilog.c uap->port.mapbase = r_ports.start; uap 1414 drivers/tty/serial/pmac_zilog.c uap->port.membase = ioremap(uap->port.mapbase, 0x1000); uap 1416 drivers/tty/serial/pmac_zilog.c uap->control_reg = uap->port.membase; uap 1417 drivers/tty/serial/pmac_zilog.c uap->data_reg = uap->control_reg + 0x10; uap 1425 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_HAS_DMA; uap 1430 drivers/tty/serial/pmac_zilog.c if (ZS_HAS_DMA(uap)) { uap 1431 drivers/tty/serial/pmac_zilog.c uap->tx_dma_regs = ioremap(r_txdma.start, 0x100); uap 1432 drivers/tty/serial/pmac_zilog.c if (uap->tx_dma_regs == NULL) { uap 1433 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; uap 1436 drivers/tty/serial/pmac_zilog.c uap->rx_dma_regs = ioremap(r_rxdma.start, 0x100); uap 1437 drivers/tty/serial/pmac_zilog.c if (uap->rx_dma_regs == NULL) { uap 1438 drivers/tty/serial/pmac_zilog.c iounmap(uap->tx_dma_regs); uap 1439 drivers/tty/serial/pmac_zilog.c uap->tx_dma_regs = NULL; uap 1440 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; uap 1443 drivers/tty/serial/pmac_zilog.c uap->tx_dma_irq = irq_of_parse_and_map(np, 1); uap 1444 drivers/tty/serial/pmac_zilog.c uap->rx_dma_irq = irq_of_parse_and_map(np, 2); uap 1452 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_IS_INTMODEM; uap 1455 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_IS_IRDA; uap 1456 drivers/tty/serial/pmac_zilog.c uap->port_type = PMAC_SCC_ASYNC; uap 1461 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_IS_IRDA; uap 1463 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_IS_INTMODEM; uap 1465 drivers/tty/serial/pmac_zilog.c if (ZS_IS_IRDA(uap)) uap 1466 drivers/tty/serial/pmac_zilog.c uap->port_type = PMAC_SCC_IRDA; uap 1467 drivers/tty/serial/pmac_zilog.c if (ZS_IS_INTMODEM(uap)) { uap 1480 drivers/tty/serial/pmac_zilog.c uap->port_type = PMAC_SCC_I2S1; uap 1493 drivers/tty/serial/pmac_zilog.c uap->port.iotype = UPIO_MEM; uap 1494 drivers/tty/serial/pmac_zilog.c uap->port.irq = irq_of_parse_and_map(np, 0); uap 1495 drivers/tty/serial/pmac_zilog.c uap->port.uartclk = ZS_CLOCK; uap 1496 drivers/tty/serial/pmac_zilog.c uap->port.fifosize = 1; uap 1497 drivers/tty/serial/pmac_zilog.c uap->port.ops = &pmz_pops; uap 1498 drivers/tty/serial/pmac_zilog.c uap->port.type = PORT_PMAC_ZILOG; uap 1499 drivers/tty/serial/pmac_zilog.c uap->port.flags = 0; uap 1507 drivers/tty/serial/pmac_zilog.c if (uap->port.irq == 0 && uap 1511 drivers/tty/serial/pmac_zilog.c uap->port.irq = irq_create_mapping(NULL, 64 + 15); uap 1512 drivers/tty/serial/pmac_zilog.c uap->tx_dma_irq = irq_create_mapping(NULL, 64 + 4); uap 1513 drivers/tty/serial/pmac_zilog.c uap->rx_dma_irq = irq_create_mapping(NULL, 64 + 5); uap 1520 drivers/tty/serial/pmac_zilog.c pmz_convert_to_zs(uap, CS8, 0, 9600); uap 1528 drivers/tty/serial/pmac_zilog.c static void pmz_dispose_port(struct uart_pmac_port *uap) uap 1532 drivers/tty/serial/pmac_zilog.c np = uap->node; uap 1533 drivers/tty/serial/pmac_zilog.c iounmap(uap->rx_dma_regs); uap 1534 drivers/tty/serial/pmac_zilog.c iounmap(uap->tx_dma_regs); uap 1535 drivers/tty/serial/pmac_zilog.c iounmap(uap->control_reg); uap 1536 drivers/tty/serial/pmac_zilog.c uap->node = NULL; uap 1538 drivers/tty/serial/pmac_zilog.c memset(uap, 0, sizeof(struct uart_pmac_port)); uap 1546 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap; uap 1558 drivers/tty/serial/pmac_zilog.c uap = &pmz_ports[i]; uap 1559 drivers/tty/serial/pmac_zilog.c uap->dev = mdev; uap 1560 drivers/tty/serial/pmac_zilog.c uap->port.dev = &mdev->ofdev.dev; uap 1561 drivers/tty/serial/pmac_zilog.c dev_set_drvdata(&mdev->ofdev.dev, uap); uap 1566 drivers/tty/serial/pmac_zilog.c if (macio_request_resources(uap->dev, "pmac_zilog")) uap 1569 drivers/tty/serial/pmac_zilog.c uap->node); uap 1571 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_RSRC_REQUESTED; uap 1573 drivers/tty/serial/pmac_zilog.c return uart_add_one_port(&pmz_uart_reg, &uap->port); uap 1582 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev); uap 1584 drivers/tty/serial/pmac_zilog.c if (!uap) uap 1587 drivers/tty/serial/pmac_zilog.c uart_remove_one_port(&pmz_uart_reg, &uap->port); uap 1589 drivers/tty/serial/pmac_zilog.c if (uap->flags & PMACZILOG_FLAG_RSRC_REQUESTED) { uap 1590 drivers/tty/serial/pmac_zilog.c macio_release_resources(uap->dev); uap 1591 drivers/tty/serial/pmac_zilog.c uap->flags &= ~PMACZILOG_FLAG_RSRC_REQUESTED; uap 1594 drivers/tty/serial/pmac_zilog.c uap->dev = NULL; uap 1595 drivers/tty/serial/pmac_zilog.c uap->port.dev = NULL; uap 1603 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev); uap 1605 drivers/tty/serial/pmac_zilog.c if (uap == NULL) { uap 1610 drivers/tty/serial/pmac_zilog.c uart_suspend_port(&pmz_uart_reg, &uap->port); uap 1618 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev); uap 1620 drivers/tty/serial/pmac_zilog.c if (uap == NULL) uap 1623 drivers/tty/serial/pmac_zilog.c uart_resume_port(&pmz_uart_reg, &uap->port); uap 1701 drivers/tty/serial/pmac_zilog.c static int __init pmz_init_port(struct uart_pmac_port *uap) uap 1706 drivers/tty/serial/pmac_zilog.c r_ports = platform_get_resource(uap->pdev, IORESOURCE_MEM, 0); uap 1707 drivers/tty/serial/pmac_zilog.c irq = platform_get_irq(uap->pdev, 0); uap 1711 drivers/tty/serial/pmac_zilog.c uap->port.mapbase = r_ports->start; uap 1712 drivers/tty/serial/pmac_zilog.c uap->port.membase = (unsigned char __iomem *) r_ports->start; uap 1713 drivers/tty/serial/pmac_zilog.c uap->port.iotype = UPIO_MEM; uap 1714 drivers/tty/serial/pmac_zilog.c uap->port.irq = irq; uap 1715 drivers/tty/serial/pmac_zilog.c uap->port.uartclk = ZS_CLOCK; uap 1716 drivers/tty/serial/pmac_zilog.c uap->port.fifosize = 1; uap 1717 drivers/tty/serial/pmac_zilog.c uap->port.ops = &pmz_pops; uap 1718 drivers/tty/serial/pmac_zilog.c uap->port.type = PORT_PMAC_ZILOG; uap 1719 drivers/tty/serial/pmac_zilog.c uap->port.flags = 0; uap 1721 drivers/tty/serial/pmac_zilog.c uap->control_reg = uap->port.membase; uap 1722 drivers/tty/serial/pmac_zilog.c uap->data_reg = uap->control_reg + 4; uap 1723 drivers/tty/serial/pmac_zilog.c uap->port_type = 0; uap 1725 drivers/tty/serial/pmac_zilog.c pmz_convert_to_zs(uap, CS8, 0, 9600); uap 1757 drivers/tty/serial/pmac_zilog.c static void pmz_dispose_port(struct uart_pmac_port *uap) uap 1759 drivers/tty/serial/pmac_zilog.c memset(uap, 0, sizeof(struct uart_pmac_port)); uap 1764 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap; uap 1774 drivers/tty/serial/pmac_zilog.c uap = &pmz_ports[i]; uap 1775 drivers/tty/serial/pmac_zilog.c uap->port.dev = &pdev->dev; uap 1776 drivers/tty/serial/pmac_zilog.c platform_set_drvdata(pdev, uap); uap 1778 drivers/tty/serial/pmac_zilog.c return uart_add_one_port(&pmz_uart_reg, &uap->port); uap 1783 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = platform_get_drvdata(pdev); uap 1785 drivers/tty/serial/pmac_zilog.c if (!uap) uap 1788 drivers/tty/serial/pmac_zilog.c uart_remove_one_port(&pmz_uart_reg, &uap->port); uap 1790 drivers/tty/serial/pmac_zilog.c uap->port.dev = NULL; uap 1943 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = uap 1947 drivers/tty/serial/pmac_zilog.c while ((read_zsreg(uap, R0) & Tx_BUF_EMP) == 0) uap 1949 drivers/tty/serial/pmac_zilog.c write_zsdata(uap, ch); uap 1958 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap = &pmz_ports[con->index]; uap 1961 drivers/tty/serial/pmac_zilog.c spin_lock_irqsave(&uap->port.lock, flags); uap 1964 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R1, uap->curregs[1] & ~TxINT_ENAB); uap 1965 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R5, uap->curregs[5] | TxENABLE | RTS | DTR); uap 1967 drivers/tty/serial/pmac_zilog.c uart_console_write(&uap->port, s, count, pmz_console_putchar); uap 1970 drivers/tty/serial/pmac_zilog.c write_zsreg(uap, R1, uap->curregs[1]); uap 1973 drivers/tty/serial/pmac_zilog.c spin_unlock_irqrestore(&uap->port.lock, flags); uap 1981 drivers/tty/serial/pmac_zilog.c struct uart_pmac_port *uap; uap 2004 drivers/tty/serial/pmac_zilog.c uap = &pmz_ports[co->index]; uap 2006 drivers/tty/serial/pmac_zilog.c if (uap->node == NULL) uap 2009 drivers/tty/serial/pmac_zilog.c if (uap->pdev == NULL) uap 2012 drivers/tty/serial/pmac_zilog.c port = &uap->port; uap 2017 drivers/tty/serial/pmac_zilog.c uap->flags |= PMACZILOG_FLAG_IS_CONS; uap 2027 drivers/tty/serial/pmac_zilog.c pwr_delay = __pmz_startup(uap); uap 72 drivers/tty/serial/pmac_zilog.h static inline struct uart_pmac_port *pmz_get_port_A(struct uart_pmac_port *uap) uap 74 drivers/tty/serial/pmac_zilog.h if (uap->flags & PMACZILOG_FLAG_IS_CHANNEL_A) uap 75 drivers/tty/serial/pmac_zilog.h return uap; uap 76 drivers/tty/serial/pmac_zilog.h return uap->mate;