zport 142 drivers/tty/serial/zs.c static u8 read_zsreg(struct zs_port *zport, int reg) zport 144 drivers/tty/serial/zs.c void __iomem *control = zport->port.membase + ZS_CHAN_IO_OFFSET; zport 157 drivers/tty/serial/zs.c static void write_zsreg(struct zs_port *zport, int reg, u8 value) zport 159 drivers/tty/serial/zs.c void __iomem *control = zport->port.membase + ZS_CHAN_IO_OFFSET; zport 171 drivers/tty/serial/zs.c static u8 read_zsdata(struct zs_port *zport) zport 173 drivers/tty/serial/zs.c void __iomem *data = zport->port.membase + zport 182 drivers/tty/serial/zs.c static void write_zsdata(struct zs_port *zport, u8 value) zport 184 drivers/tty/serial/zs.c void __iomem *data = zport->port.membase + zport 196 drivers/tty/serial/zs.c struct zs_port *zport; zport 200 drivers/tty/serial/zs.c zport = &zs_sccs[i / ZS_NUM_CHAN].zport[i % ZS_NUM_CHAN]; zport 202 drivers/tty/serial/zs.c if (!zport->scc) zport 206 drivers/tty/serial/zs.c printk("W%-2d = 0x%02x\t", j, zport->regs[j]); zport 209 drivers/tty/serial/zs.c printk("R%-2d = 0x%02x\t", j, read_zsreg(zport, j)); zport 232 drivers/tty/serial/zs.c static int zs_receive_drain(struct zs_port *zport) zport 236 drivers/tty/serial/zs.c while ((read_zsreg(zport, R0) & Rx_CH_AV) && --loops) zport 237 drivers/tty/serial/zs.c read_zsdata(zport); zport 241 drivers/tty/serial/zs.c static int zs_transmit_drain(struct zs_port *zport, int irq) zport 243 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 246 drivers/tty/serial/zs.c while (!(read_zsreg(zport, R0) & Tx_BUF_EMP) && --loops) { zport 254 drivers/tty/serial/zs.c static int zs_line_drain(struct zs_port *zport, int irq) zport 256 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 259 drivers/tty/serial/zs.c while (!(read_zsreg(zport, R1) & ALL_SNT) && --loops) { zport 268 drivers/tty/serial/zs.c static void load_zsregs(struct zs_port *zport, u8 *regs, int irq) zport 271 drivers/tty/serial/zs.c zs_line_drain(zport, irq); zport 273 drivers/tty/serial/zs.c write_zsreg(zport, R3, regs[3] & ~RxENABLE); zport 274 drivers/tty/serial/zs.c write_zsreg(zport, R5, regs[5] & ~TxENAB); zport 275 drivers/tty/serial/zs.c write_zsreg(zport, R4, regs[4]); zport 276 drivers/tty/serial/zs.c write_zsreg(zport, R9, regs[9]); zport 277 drivers/tty/serial/zs.c write_zsreg(zport, R1, regs[1]); zport 278 drivers/tty/serial/zs.c write_zsreg(zport, R2, regs[2]); zport 279 drivers/tty/serial/zs.c write_zsreg(zport, R10, regs[10]); zport 280 drivers/tty/serial/zs.c write_zsreg(zport, R14, regs[14] & ~BRENABL); zport 281 drivers/tty/serial/zs.c write_zsreg(zport, R11, regs[11]); zport 282 drivers/tty/serial/zs.c write_zsreg(zport, R12, regs[12]); zport 283 drivers/tty/serial/zs.c write_zsreg(zport, R13, regs[13]); zport 284 drivers/tty/serial/zs.c write_zsreg(zport, R14, regs[14]); zport 285 drivers/tty/serial/zs.c write_zsreg(zport, R15, regs[15]); zport 287 drivers/tty/serial/zs.c write_zsreg(zport, R3, regs[3]); zport 289 drivers/tty/serial/zs.c write_zsreg(zport, R5, regs[5]); zport 310 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 311 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 316 drivers/tty/serial/zs.c status = read_zsreg(zport, R1); zport 339 drivers/tty/serial/zs.c static unsigned int zs_raw_get_mctrl(struct zs_port *zport) zport 341 drivers/tty/serial/zs.c struct zs_port *zport_a = &zport->scc->zport[ZS_CHAN_A]; zport 343 drivers/tty/serial/zs.c return zport != zport_a ? zs_raw_get_ab_mctrl(zport_a, zport) : 0; zport 346 drivers/tty/serial/zs.c static unsigned int zs_raw_xor_mctrl(struct zs_port *zport) zport 348 drivers/tty/serial/zs.c struct zs_port *zport_a = &zport->scc->zport[ZS_CHAN_A]; zport 352 drivers/tty/serial/zs.c if (zport == zport_a) zport 356 drivers/tty/serial/zs.c mask_b = zport->regs[15]; zport 363 drivers/tty/serial/zs.c mctrl = zport->mctrl; zport 366 drivers/tty/serial/zs.c mctrl |= zs_raw_get_ab_mctrl(zport_a, zport) & mmask; zport 369 drivers/tty/serial/zs.c delta = mctrl ^ zport->mctrl; zport 371 drivers/tty/serial/zs.c zport->mctrl = mctrl; zport 378 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 379 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 383 drivers/tty/serial/zs.c mctrl = zs_raw_get_mctrl(zport); zport 391 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 392 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 393 drivers/tty/serial/zs.c struct zs_port *zport_a = &scc->zport[ZS_CHAN_A]; zport 397 drivers/tty/serial/zs.c if (zport != zport_a) { zport 410 drivers/tty/serial/zs.c oldloop = zport->regs[14]; zport 417 drivers/tty/serial/zs.c zport->regs[14] = newloop; zport 418 drivers/tty/serial/zs.c write_zsreg(zport, R14, zport->regs[14]); zport 423 drivers/tty/serial/zs.c static void zs_raw_stop_tx(struct zs_port *zport) zport 425 drivers/tty/serial/zs.c write_zsreg(zport, R0, RES_Tx_P); zport 426 drivers/tty/serial/zs.c zport->tx_stopped = 1; zport 431 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 432 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 435 drivers/tty/serial/zs.c zs_raw_stop_tx(zport); zport 443 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 444 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 447 drivers/tty/serial/zs.c if (zport->tx_stopped) { zport 448 drivers/tty/serial/zs.c zs_transmit_drain(zport, 0); zport 449 drivers/tty/serial/zs.c zport->tx_stopped = 0; zport 450 drivers/tty/serial/zs.c zs_raw_transmit_chars(zport); zport 457 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 458 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 459 drivers/tty/serial/zs.c struct zs_port *zport_a = &scc->zport[ZS_CHAN_A]; zport 462 drivers/tty/serial/zs.c zport->regs[15] &= ~BRKIE; zport 463 drivers/tty/serial/zs.c zport->regs[1] &= ~(RxINT_MASK | TxINT_ENAB); zport 464 drivers/tty/serial/zs.c zport->regs[1] |= RxINT_DISAB; zport 466 drivers/tty/serial/zs.c if (zport != zport_a) { zport 476 drivers/tty/serial/zs.c zport->regs[15] &= ~(DCDIE | CTSIE); zport 477 drivers/tty/serial/zs.c zport->regs[1] &= ~EXT_INT_ENAB; zport 480 drivers/tty/serial/zs.c if (!(zport->regs[15] & (DCDIE | SYNCIE))) zport 481 drivers/tty/serial/zs.c zport->regs[1] &= ~EXT_INT_ENAB; zport 484 drivers/tty/serial/zs.c write_zsreg(zport, R15, zport->regs[15]); zport 485 drivers/tty/serial/zs.c write_zsreg(zport, R1, zport->regs[1]); zport 491 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 492 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 493 drivers/tty/serial/zs.c struct zs_port *zport_a = &scc->zport[ZS_CHAN_A]; zport 495 drivers/tty/serial/zs.c if (zport == zport_a) zport 509 drivers/tty/serial/zs.c zport->regs[15] |= DCDIE | CTSIE; zport 511 drivers/tty/serial/zs.c zs_raw_xor_mctrl(zport); zport 515 drivers/tty/serial/zs.c write_zsreg(zport, R15, zport->regs[15]); zport 521 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 522 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 527 drivers/tty/serial/zs.c zport->regs[5] |= SND_BRK; zport 529 drivers/tty/serial/zs.c zport->regs[5] &= ~SND_BRK; zport 530 drivers/tty/serial/zs.c write_zsreg(zport, R5, zport->regs[5]); zport 541 drivers/tty/serial/zs.c static void zs_receive_chars(struct zs_port *zport) zport 543 drivers/tty/serial/zs.c struct uart_port *uport = &zport->port; zport 544 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 551 drivers/tty/serial/zs.c avail = read_zsreg(zport, R0) & Rx_CH_AV; zport 557 drivers/tty/serial/zs.c status = read_zsreg(zport, R1) & (Rx_OVR | FRM_ERR | PAR_ERR); zport 558 drivers/tty/serial/zs.c ch = read_zsdata(zport); zport 568 drivers/tty/serial/zs.c status |= zport->tty_break; zport 571 drivers/tty/serial/zs.c zport->tty_break = 0; zport 576 drivers/tty/serial/zs.c write_zsreg(zport, R0, ERR_RES); zport 610 drivers/tty/serial/zs.c static void zs_raw_transmit_chars(struct zs_port *zport) zport 612 drivers/tty/serial/zs.c struct circ_buf *xmit = &zport->port.state->xmit; zport 615 drivers/tty/serial/zs.c if (zport->port.x_char) { zport 616 drivers/tty/serial/zs.c write_zsdata(zport, zport->port.x_char); zport 617 drivers/tty/serial/zs.c zport->port.icount.tx++; zport 618 drivers/tty/serial/zs.c zport->port.x_char = 0; zport 623 drivers/tty/serial/zs.c if (uart_circ_empty(xmit) || uart_tx_stopped(&zport->port)) { zport 624 drivers/tty/serial/zs.c zs_raw_stop_tx(zport); zport 629 drivers/tty/serial/zs.c write_zsdata(zport, xmit->buf[xmit->tail]); zport 631 drivers/tty/serial/zs.c zport->port.icount.tx++; zport 634 drivers/tty/serial/zs.c uart_write_wakeup(&zport->port); zport 638 drivers/tty/serial/zs.c zs_raw_stop_tx(zport); zport 641 drivers/tty/serial/zs.c static void zs_transmit_chars(struct zs_port *zport) zport 643 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 646 drivers/tty/serial/zs.c zs_raw_transmit_chars(zport); zport 650 drivers/tty/serial/zs.c static void zs_status_handle(struct zs_port *zport, struct zs_port *zport_a) zport 652 drivers/tty/serial/zs.c struct uart_port *uport = &zport->port; zport 653 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 660 drivers/tty/serial/zs.c status = read_zsreg(zport, R0); zport 662 drivers/tty/serial/zs.c if (zport->regs[15] & BRKIE) { zport 664 drivers/tty/serial/zs.c if (brk && !zport->brk) { zport 667 drivers/tty/serial/zs.c zport->tty_break = Rx_SYS; zport 669 drivers/tty/serial/zs.c zport->tty_break = Rx_BRK; zport 672 drivers/tty/serial/zs.c zport->brk = brk; zport 675 drivers/tty/serial/zs.c if (zport != zport_a) { zport 676 drivers/tty/serial/zs.c delta = zs_raw_xor_mctrl(zport); zport 681 drivers/tty/serial/zs.c zport->mctrl & TIOCM_CTS); zport 684 drivers/tty/serial/zs.c zport->mctrl & TIOCM_CAR); zport 697 drivers/tty/serial/zs.c write_zsreg(zport, R0, RES_EXT_INT); zport 708 drivers/tty/serial/zs.c struct zs_port *zport_a = &scc->zport[ZS_CHAN_A]; zport 709 drivers/tty/serial/zs.c struct zs_port *zport_b = &scc->zport[ZS_CHAN_B]; zport 758 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 759 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 766 drivers/tty/serial/zs.c ret = request_irq(zport->port.irq, zs_interrupt, zport 771 drivers/tty/serial/zs.c zport->port.irq); zport 779 drivers/tty/serial/zs.c zs_receive_drain(zport); zport 782 drivers/tty/serial/zs.c write_zsreg(zport, R0, ERR_RES); zport 783 drivers/tty/serial/zs.c write_zsreg(zport, R0, RES_Tx_P); zport 785 drivers/tty/serial/zs.c if (!(zport->regs[1] & EXT_INT_ENAB)) zport 786 drivers/tty/serial/zs.c write_zsreg(zport, R0, RES_EXT_INT); zport 789 drivers/tty/serial/zs.c zport->regs[1] &= ~RxINT_MASK; zport 790 drivers/tty/serial/zs.c zport->regs[1] |= RxINT_ALL | TxINT_ENAB | EXT_INT_ENAB; zport 791 drivers/tty/serial/zs.c zport->regs[3] |= RxENABLE; zport 792 drivers/tty/serial/zs.c zport->regs[15] |= BRKIE; zport 793 drivers/tty/serial/zs.c write_zsreg(zport, R1, zport->regs[1]); zport 794 drivers/tty/serial/zs.c write_zsreg(zport, R3, zport->regs[3]); zport 795 drivers/tty/serial/zs.c write_zsreg(zport, R5, zport->regs[5]); zport 796 drivers/tty/serial/zs.c write_zsreg(zport, R15, zport->regs[15]); zport 799 drivers/tty/serial/zs.c zport->mctrl = zs_raw_get_mctrl(zport); zport 800 drivers/tty/serial/zs.c zport->brk = read_zsreg(zport, R0) & BRK_ABRT; zport 802 drivers/tty/serial/zs.c zport->tx_stopped = 1; zport 811 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 812 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 818 drivers/tty/serial/zs.c zport->regs[3] &= ~RxENABLE; zport 819 drivers/tty/serial/zs.c write_zsreg(zport, R5, zport->regs[5]); zport 820 drivers/tty/serial/zs.c write_zsreg(zport, R3, zport->regs[3]); zport 826 drivers/tty/serial/zs.c free_irq(zport->port.irq, scc); zport 830 drivers/tty/serial/zs.c static void zs_reset(struct zs_port *zport) zport 832 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 840 drivers/tty/serial/zs.c read_zsreg(zport, R0); zport 842 drivers/tty/serial/zs.c zs_line_drain(zport, irq); zport 843 drivers/tty/serial/zs.c write_zsreg(zport, R9, FHWRES); zport 845 drivers/tty/serial/zs.c write_zsreg(zport, R9, 0); zport 848 drivers/tty/serial/zs.c load_zsregs(zport, zport->regs, irq); zport 855 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 856 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 857 drivers/tty/serial/zs.c struct zs_port *zport_a = &scc->zport[ZS_CHAN_A]; zport 866 drivers/tty/serial/zs.c zport->regs[3] &= ~RxNBITS_MASK; zport 867 drivers/tty/serial/zs.c zport->regs[5] &= ~TxNBITS_MASK; zport 870 drivers/tty/serial/zs.c zport->regs[3] |= Rx5; zport 871 drivers/tty/serial/zs.c zport->regs[5] |= Tx5; zport 874 drivers/tty/serial/zs.c zport->regs[3] |= Rx6; zport 875 drivers/tty/serial/zs.c zport->regs[5] |= Tx6; zport 878 drivers/tty/serial/zs.c zport->regs[3] |= Rx7; zport 879 drivers/tty/serial/zs.c zport->regs[5] |= Tx7; zport 883 drivers/tty/serial/zs.c zport->regs[3] |= Rx8; zport 884 drivers/tty/serial/zs.c zport->regs[5] |= Tx8; zport 889 drivers/tty/serial/zs.c zport->regs[4] &= ~(XCLK_MASK | SB_MASK | PAR_ENA | PAR_EVEN); zport 891 drivers/tty/serial/zs.c zport->regs[4] |= SB2; zport 893 drivers/tty/serial/zs.c zport->regs[4] |= SB1; zport 895 drivers/tty/serial/zs.c zport->regs[4] |= PAR_ENA; zport 897 drivers/tty/serial/zs.c zport->regs[4] |= PAR_EVEN; zport 898 drivers/tty/serial/zs.c switch (zport->clk_mode) { zport 900 drivers/tty/serial/zs.c zport->regs[4] |= X64CLK; zport 903 drivers/tty/serial/zs.c zport->regs[4] |= X32CLK; zport 906 drivers/tty/serial/zs.c zport->regs[4] |= X16CLK; zport 909 drivers/tty/serial/zs.c zport->regs[4] |= X1CLK; zport 916 drivers/tty/serial/zs.c uport->uartclk / zport->clk_mode / 4); zport 918 drivers/tty/serial/zs.c brg = ZS_BPS_TO_BRG(baud, uport->uartclk / zport->clk_mode); zport 919 drivers/tty/serial/zs.c zport->regs[12] = brg & 0xff; zport 920 drivers/tty/serial/zs.c zport->regs[13] = (brg >> 8) & 0xff; zport 940 drivers/tty/serial/zs.c zport->regs[3] |= RxENABLE; zport 942 drivers/tty/serial/zs.c zport->regs[3] &= ~RxENABLE; zport 944 drivers/tty/serial/zs.c if (zport != zport_a) { zport 946 drivers/tty/serial/zs.c zport->regs[15] |= DCDIE; zport 948 drivers/tty/serial/zs.c zport->regs[15] &= ~DCDIE; zport 950 drivers/tty/serial/zs.c zport->regs[15] |= CTSIE; zport 952 drivers/tty/serial/zs.c zport->regs[15] &= ~CTSIE; zport 953 drivers/tty/serial/zs.c zs_raw_xor_mctrl(zport); zport 957 drivers/tty/serial/zs.c load_zsregs(zport, zport->regs, irq); zport 970 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 973 drivers/tty/serial/zs.c zport->regs[5] |= TxENAB; zport 975 drivers/tty/serial/zs.c zport->regs[5] &= ~TxENAB; zport 976 drivers/tty/serial/zs.c write_zsreg(zport, R5, zport->regs[5]); zport 1022 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 1030 drivers/tty/serial/zs.c zs_reset(zport); zport 1036 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 1043 drivers/tty/serial/zs.c if (ser->baud_base != uport->uartclk / zport->clk_mode / 4) zport 1103 drivers/tty/serial/zs.c struct zs_port *zport = &zs_sccs[chip].zport[side]; zport 1104 drivers/tty/serial/zs.c struct uart_port *uport = &zport->port; zport 1106 drivers/tty/serial/zs.c zport->scc = &zs_sccs[chip]; zport 1107 drivers/tty/serial/zs.c zport->clk_mode = 16; zport 1121 drivers/tty/serial/zs.c zport->regs[i] = zs_init_regs[i]; zport 1132 drivers/tty/serial/zs.c struct zs_port *zport = to_zport(uport); zport 1133 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 1139 drivers/tty/serial/zs.c if (zs_transmit_drain(zport, irq)) zport 1140 drivers/tty/serial/zs.c write_zsdata(zport, ch); zport 1152 drivers/tty/serial/zs.c struct zs_port *zport = &zs_sccs[chip].zport[side]; zport 1153 drivers/tty/serial/zs.c struct zs_scc *scc = zport->scc; zport 1160 drivers/tty/serial/zs.c txint = zport->regs[1]; zport 1161 drivers/tty/serial/zs.c txenb = zport->regs[5]; zport 1163 drivers/tty/serial/zs.c zport->regs[1] = txint & ~TxINT_ENAB; zport 1164 drivers/tty/serial/zs.c write_zsreg(zport, R1, zport->regs[1]); zport 1167 drivers/tty/serial/zs.c zport->regs[5] = txenb | TxENAB; zport 1168 drivers/tty/serial/zs.c write_zsreg(zport, R5, zport->regs[5]); zport 1172 drivers/tty/serial/zs.c uart_console_write(&zport->port, s, count, zs_console_putchar); zport 1177 drivers/tty/serial/zs.c zs_line_drain(zport, irq); zport 1179 drivers/tty/serial/zs.c zport->regs[5] &= ~TxENAB; zport 1180 drivers/tty/serial/zs.c write_zsreg(zport, R5, zport->regs[5]); zport 1183 drivers/tty/serial/zs.c zport->regs[1] |= TxINT_ENAB; zport 1184 drivers/tty/serial/zs.c write_zsreg(zport, R1, zport->regs[1]); zport 1187 drivers/tty/serial/zs.c if (!zport->tx_stopped) zport 1188 drivers/tty/serial/zs.c zs_raw_transmit_chars(zport); zport 1202 drivers/tty/serial/zs.c struct zs_port *zport = &zs_sccs[chip].zport[side]; zport 1203 drivers/tty/serial/zs.c struct uart_port *uport = &zport->port; zport 1214 drivers/tty/serial/zs.c zs_reset(zport); zport 1283 drivers/tty/serial/zs.c struct zs_port *zport = &scc->zport[i % ZS_NUM_CHAN]; zport 1284 drivers/tty/serial/zs.c struct uart_port *uport = &zport->port; zport 1286 drivers/tty/serial/zs.c if (zport->scc) zport 1299 drivers/tty/serial/zs.c struct zs_port *zport = &scc->zport[i % ZS_NUM_CHAN]; zport 1300 drivers/tty/serial/zs.c struct uart_port *uport = &zport->port; zport 1302 drivers/tty/serial/zs.c if (zport->scc) zport 41 drivers/tty/serial/zs.h struct zs_port zport[2];