/openbmc/linux/drivers/tty/serial/jsm/ |
H A D | jsm_cls.c | 54 u8 lcrb = readb(&ch->ch_cls_uart->lcr); in cls_set_cts_flow_control() 62 writeb(UART_EXAR654_ENHANCED_REGISTER_SET, &ch->ch_cls_uart->lcr); in cls_set_cts_flow_control() 73 writeb(lcrb, &ch->ch_cls_uart->lcr); in cls_set_cts_flow_control() 95 u8 lcrb = readb(&ch->ch_cls_uart->lcr); in cls_set_ixon_flow_control() 103 writeb(UART_EXAR654_ENHANCED_REGISTER_SET, &ch->ch_cls_uart->lcr); in cls_set_ixon_flow_control() 120 writeb(lcrb, &ch->ch_cls_uart->lcr); in cls_set_ixon_flow_control() 140 u8 lcrb = readb(&ch->ch_cls_uart->lcr); in cls_set_no_output_flow_control() 148 writeb(UART_EXAR654_ENHANCED_REGISTER_SET, &ch->ch_cls_uart->lcr); in cls_set_no_output_flow_control() 159 writeb(lcrb, &ch->ch_cls_uart->lcr); in cls_set_no_output_flow_control() 183 u8 lcrb = readb(&ch->ch_cls_uart->lcr); in cls_set_rts_flow_control() [all …]
|
H A D | jsm_neo.c | 689 u8 temp = readb(&ch->ch_neo_uart->lcr); in neo_clear_break() 690 writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr); in neo_clear_break() 928 u8 lcr = 0; in neo_param() local 995 lcr |= UART_LCR_PARITY; in neo_param() 998 lcr |= UART_LCR_EPAR; in neo_param() 1001 lcr |= UART_LCR_SPAR; in neo_param() 1004 lcr |= UART_LCR_STOP; in neo_param() 1006 lcr |= UART_LCR_WLEN(tty_get_char_size(ch->ch_c_cflag)); in neo_param() 1009 uart_lcr = readb(&ch->ch_neo_uart->lcr); in neo_param() 1014 writeb(UART_LCR_DLAB, &ch->ch_neo_uart->lcr); in neo_param() [all …]
|
/openbmc/linux/drivers/usb/serial/ |
H A D | ark3116.c | 66 __u32 lcr; /* line control register value */ member 168 priv->lcr = UART_LCR_WLEN8; in ark3116_port_probe() 200 __u8 lcr, hcr, eval; in ark3116_set_termios() local 203 lcr = UART_LCR_WLEN(tty_get_char_size(cflag)); in ark3116_set_termios() 206 lcr |= UART_LCR_STOP; in ark3116_set_termios() 208 lcr |= UART_LCR_PARITY; in ark3116_set_termios() 210 lcr |= UART_LCR_EPAR; in ark3116_set_termios() 212 lcr |= UART_LCR_SPAR; in ark3116_set_termios() 243 lcr |= (priv->lcr & UART_LCR_SBC); in ark3116_set_termios() 246 __func__, hcr, lcr, quot); in ark3116_set_termios() [all …]
|
H A D | ch341.c | 99 u8 lcr; member 241 speed_t baud_rate, u8 lcr) in ch341_set_baudrate_lcr() argument 279 CH341_REG_LCR2 << 8 | CH341_REG_LCR, lcr); in ch341_set_baudrate_lcr() 329 r = ch341_set_baudrate_lcr(dev, priv, priv->baud_rate, priv->lcr); in ch341_configure() 390 priv->lcr = CH341_LCR_ENABLE_RX | CH341_LCR_ENABLE_TX | CH341_LCR_CS8; in ch341_port_probe() 491 u8 lcr; in ch341_set_termios() local 500 lcr = CH341_LCR_ENABLE_RX | CH341_LCR_ENABLE_TX; in ch341_set_termios() 504 lcr |= CH341_LCR_CS5; in ch341_set_termios() 507 lcr |= CH341_LCR_CS6; in ch341_set_termios() 510 lcr |= CH341_LCR_CS7; in ch341_set_termios() [all …]
|
H A D | mct_u232.c | 250 unsigned char lcr) in mct_u232_set_line_ctrl() argument 259 buf[0] = lcr; in mct_u232_set_line_ctrl() 266 dev_err(&port->dev, "Set LINE CTRL 0x%x failed (error = %d)\n", lcr, rc); in mct_u232_set_line_ctrl() 267 dev_dbg(&port->dev, "set_line_ctrl: 0x%x\n", lcr); in mct_u232_set_line_ctrl() 684 unsigned char lcr; in mct_u232_break_ctl() local 688 lcr = priv->last_lcr; in mct_u232_break_ctl() 691 lcr |= MCT_U232_SET_BREAK; in mct_u232_break_ctl() 694 return mct_u232_set_line_ctrl(port, lcr); in mct_u232_break_ctl()
|
H A D | keyspan.c | 2086 msg.lcr = (p_priv->cflag & CSTOPB) ? STOPBITS_678_2 : STOPBITS_5678_1; in keyspan_usa26_send_setup() 2089 msg.lcr |= USA_DATABITS_5; in keyspan_usa26_send_setup() 2092 msg.lcr |= USA_DATABITS_6; in keyspan_usa26_send_setup() 2095 msg.lcr |= USA_DATABITS_7; in keyspan_usa26_send_setup() 2098 msg.lcr |= USA_DATABITS_8; in keyspan_usa26_send_setup() 2103 msg.lcr |= (p_priv->cflag & PARODD) ? in keyspan_usa26_send_setup() 2356 msg.lcr = (p_priv->cflag & CSTOPB) ? STOPBITS_678_2 : STOPBITS_5678_1; in keyspan_usa49_send_setup() 2359 msg.lcr |= USA_DATABITS_5; in keyspan_usa49_send_setup() 2362 msg.lcr |= USA_DATABITS_6; in keyspan_usa49_send_setup() 2365 msg.lcr |= USA_DATABITS_7; in keyspan_usa49_send_setup() [all …]
|
/openbmc/linux/drivers/tty/serial/ |
H A D | vt8500_serial.c | 261 unsigned int lcr = vt8500_read(port, VT8500_URLCR); in vt8500_set_mctrl() local 264 lcr |= VT8500_RTS; in vt8500_set_mctrl() 266 lcr &= ~VT8500_RTS; in vt8500_set_mctrl() 268 vt8500_write(port, lcr, VT8500_URLCR); in vt8500_set_mctrl() 342 unsigned int baud, lcr; in vt8500_set_termios() local 354 lcr = vt8500_read(&vt8500_port->uart, VT8500_URLCR); in vt8500_set_termios() 355 lcr &= ~(VT8500_PARENB | VT8500_PARODD); in vt8500_set_termios() 357 lcr |= VT8500_PARENB; in vt8500_set_termios() 360 lcr |= VT8500_PARODD; in vt8500_set_termios() 364 lcr &= ~VT8500_CS8; in vt8500_set_termios() [all …]
|
H A D | sunplus-uart.c | 185 unsigned int lcr; in sunplus_break_ctl() local 189 lcr = readl(port->membase + SUP_UART_LCR); in sunplus_break_ctl() 192 lcr |= SUP_UART_LCR_SBC; /* start break */ in sunplus_break_ctl() 194 lcr &= ~SUP_UART_LCR_SBC; /* stop break */ in sunplus_break_ctl() 196 writel(lcr, port->membase + SUP_UART_LCR); in sunplus_break_ctl() 336 u32 ext, div, div_l, div_h, baud, lcr; in sunplus_set_termios() local 352 lcr = UART_LCR_WLEN5; in sunplus_set_termios() 355 lcr = UART_LCR_WLEN6; in sunplus_set_termios() 358 lcr = UART_LCR_WLEN7; in sunplus_set_termios() 361 lcr = UART_LCR_WLEN8; in sunplus_set_termios() [all …]
|
H A D | serial-tegra.c | 254 unsigned long lcr; in tegra_uart_break_ctl() local 256 lcr = tup->lcr_shadow; in tegra_uart_break_ctl() 258 lcr |= UART_LCR_SBC; in tegra_uart_break_ctl() 260 lcr &= ~UART_LCR_SBC; in tegra_uart_break_ctl() 261 tegra_uart_write(tup, lcr, UART_LCR); in tegra_uart_break_ctl() 262 tup->lcr_shadow = lcr; in tegra_uart_break_ctl() 384 unsigned long lcr; in tegra_set_baudrate() local 415 lcr = tup->lcr_shadow; in tegra_set_baudrate() 416 lcr |= UART_LCR_DLAB; in tegra_set_baudrate() 417 tegra_uart_write(tup, lcr, UART_LCR); in tegra_set_baudrate() [all …]
|
H A D | men_z135_uart.c | 654 u8 lcr; in men_z135_set_termios() local 657 lcr = LCR(conf_reg); in men_z135_set_termios() 662 lcr |= MEN_Z135_WL5; in men_z135_set_termios() 665 lcr |= MEN_Z135_WL6; in men_z135_set_termios() 668 lcr |= MEN_Z135_WL7; in men_z135_set_termios() 671 lcr |= MEN_Z135_WL8; in men_z135_set_termios() 677 lcr |= MEN_Z135_NSTB2 << MEN_Z135_STB_SHIFT; in men_z135_set_termios() 681 lcr |= MEN_Z135_PAR_ENA << MEN_Z135_PEN_SHIFT; in men_z135_set_termios() 684 lcr |= MEN_Z135_PTY_ODD << MEN_Z135_PTY_SHIFT; in men_z135_set_termios() 686 lcr |= MEN_Z135_PTY_EVN << MEN_Z135_PTY_SHIFT; in men_z135_set_termios() [all …]
|
H A D | ma35d1_serial.c | 153 u8 lcr; member 365 u32 lcr; in ma35d1serial_break_ctl() local 368 lcr = serial_in(up, MA35_LCR_REG); in ma35d1serial_break_ctl() 370 lcr |= MA35_LCR_BREAK; in ma35d1serial_break_ctl() 372 lcr &= ~MA35_LCR_BREAK; in ma35d1serial_break_ctl() 373 serial_out(up, MA35_LCR_REG, lcr); in ma35d1serial_break_ctl() 420 u32 lcr = 0; in ma35d1serial_set_termios() local 422 lcr = UART_LCR_WLEN(tty_get_char_size(termios->c_cflag)); in ma35d1serial_set_termios() 425 lcr |= MA35_LCR_NSB; in ma35d1serial_set_termios() 427 lcr |= MA35_LCR_PBE; in ma35d1serial_set_termios() [all …]
|
H A D | sprd_serial.c | 753 unsigned int lcr = 0, fc; in sprd_set_termios() local 764 lcr |= SPRD_LCR_DATA_LEN5; in sprd_set_termios() 767 lcr |= SPRD_LCR_DATA_LEN6; in sprd_set_termios() 770 lcr |= SPRD_LCR_DATA_LEN7; in sprd_set_termios() 774 lcr |= SPRD_LCR_DATA_LEN8; in sprd_set_termios() 779 lcr &= ~(SPRD_LCR_STOP_1BIT | SPRD_LCR_STOP_2BIT); in sprd_set_termios() 781 lcr |= SPRD_LCR_STOP_2BIT; in sprd_set_termios() 783 lcr |= SPRD_LCR_STOP_1BIT; in sprd_set_termios() 786 lcr &= ~SPRD_LCR_PARITY; in sprd_set_termios() 789 lcr |= SPRD_LCR_PARITY_EN; in sprd_set_termios() [all …]
|
H A D | sc16is7xx.c | 500 u8 lcr; in sc16is7xx_set_baud() local 524 lcr = sc16is7xx_port_read(port, SC16IS7XX_LCR_REG); in sc16is7xx_set_baud() 539 sc16is7xx_port_write(port, SC16IS7XX_LCR_REG, lcr); in sc16is7xx_set_baud() 561 sc16is7xx_port_write(port, SC16IS7XX_LCR_REG, lcr); in sc16is7xx_set_baud() 1021 unsigned int lcr, flow = 0; in sc16is7xx_set_termios() local 1033 lcr = SC16IS7XX_LCR_WORD_LEN_5; in sc16is7xx_set_termios() 1036 lcr = SC16IS7XX_LCR_WORD_LEN_6; in sc16is7xx_set_termios() 1039 lcr = SC16IS7XX_LCR_WORD_LEN_7; in sc16is7xx_set_termios() 1042 lcr = SC16IS7XX_LCR_WORD_LEN_8; in sc16is7xx_set_termios() 1045 lcr = SC16IS7XX_LCR_WORD_LEN_8; in sc16is7xx_set_termios() [all …]
|
/openbmc/linux/drivers/media/pci/cx18/ |
H A D | cx18-av-vbi.c | 181 u8 lcr[24]; in cx18_av_s_sliced_fmt() local 184 lcr[x] = 0x00; in cx18_av_s_sliced_fmt() 214 lcr[i] |= 1 << (4 * x); in cx18_av_s_sliced_fmt() 217 lcr[i] |= 4 << (4 * x); in cx18_av_s_sliced_fmt() 220 lcr[i] |= 6 << (4 * x); in cx18_av_s_sliced_fmt() 223 lcr[i] |= 9 << (4 * x); in cx18_av_s_sliced_fmt() 231 cx18_av_write(cx, i, lcr[6 + x]); in cx18_av_s_sliced_fmt() 234 cx18_av_write(cx, i, lcr[9 + x]); in cx18_av_s_sliced_fmt()
|
/openbmc/linux/drivers/media/i2c/cx25840/ |
H A D | cx25840-vbi.c | 144 u8 lcr[24]; in cx25840_s_sliced_fmt() local 147 lcr[x] = 0x00; in cx25840_s_sliced_fmt() 179 lcr[i] |= 1 << (4 * x); in cx25840_s_sliced_fmt() 182 lcr[i] |= 4 << (4 * x); in cx25840_s_sliced_fmt() 185 lcr[i] |= 6 << (4 * x); in cx25840_s_sliced_fmt() 188 lcr[i] |= 9 << (4 * x); in cx25840_s_sliced_fmt() 197 cx25840_write(client, i, lcr[6 + x]); in cx25840_s_sliced_fmt() 201 cx25840_write(client, i, lcr[9 + x]); in cx25840_s_sliced_fmt()
|
/openbmc/linux/drivers/tty/serial/8250/ |
H A D | 8250_dwlib.c | 141 u32 lcr = dw8250_readl_ext(p, DW_UART_LCR_EXT); in dw8250_rs485_set_addr() local 144 lcr |= DW_UART_LCR_EXT_DLS_E; in dw8250_rs485_set_addr() 161 lcr |= DW_UART_LCR_EXT_ADDR_MATCH; in dw8250_rs485_set_addr() 163 lcr &= ~DW_UART_LCR_EXT_ADDR_MATCH; in dw8250_rs485_set_addr() 172 lcr |= DW_UART_LCR_EXT_SEND_ADDR; in dw8250_rs485_set_addr() 175 lcr = 0; in dw8250_rs485_set_addr() 177 dw8250_writel_ext(p, DW_UART_LCR_EXT, lcr); in dw8250_rs485_set_addr()
|
H A D | 8250_mtk.c | 159 int lcr = serial_in(up, UART_LCR); in mtk8250_dma_enable() local 177 serial_out(up, UART_LCR, lcr); in mtk8250_dma_enable() 246 int lcr = serial_in(up, UART_LCR); in mtk8250_set_flow_ctrl() local 253 serial_out(up, UART_LCR, lcr); in mtk8250_set_flow_ctrl() 254 lcr = serial_in(up, UART_LCR); in mtk8250_set_flow_ctrl() 263 serial_out(up, UART_LCR, lcr); in mtk8250_set_flow_ctrl() 279 serial_out(up, UART_LCR, lcr); in mtk8250_set_flow_ctrl() 296 serial_out(up, UART_LCR, lcr); in mtk8250_set_flow_ctrl() 383 serial_port_out(port, UART_LCR, up->lcr | UART_LCR_DLAB); in mtk8250_set_termios() 387 serial_port_out(port, UART_LCR, up->lcr); in mtk8250_set_termios()
|
H A D | 8250_em.c | 87 unsigned int ier, fcr, lcr, mcr, hcr0; in serial8250_em_reg_update() local 91 lcr = serial8250_em_serial_in(p, UART_LCR); in serial8250_em_reg_update() 108 lcr = value; in serial8250_em_reg_update() 118 serial8250_em_serial_out_helper(p, UART_LCR, lcr); in serial8250_em_reg_update()
|
H A D | 8250_pericom.c | 74 int lcr = serial_port_in(port, UART_LCR); in pericom_do_set_divisor() local 76 serial_port_out(port, UART_LCR, lcr | UART_LCR_DLAB); in pericom_do_set_divisor() 79 serial_port_out(port, UART_LCR, lcr); in pericom_do_set_divisor()
|
/openbmc/linux/arch/x86/boot/ |
H A D | early_serial_console.c | 104 unsigned char lcr, dll, dlh; in probe_baud() local 107 lcr = inb(port + LCR); in probe_baud() 108 outb(lcr | DLAB, port + LCR); in probe_baud() 111 outb(lcr, port + LCR); in probe_baud()
|
/openbmc/u-boot/drivers/serial/ |
H A D | ns16550.c | 152 int lcr_val = serial_in(&com_port->lcr) & ~UART_LCR_BKSE; in NS16550_setbrg() 154 serial_out(UART_LCR_BKSE | lcr_val, &com_port->lcr); in NS16550_setbrg() 157 serial_out(lcr_val, &com_port->lcr); in NS16550_setbrg() 188 serial_out(UART_LCRVAL, &com_port->lcr); in NS16550_init() 269 serial_dout(&com_port->lcr, UART_LCR_BKSE | UART_LCRVAL); in _debug_uart_init() 272 serial_dout(&com_port->lcr, UART_LCRVAL); in _debug_uart_init() 279 serial_dout(&com_port->lcr, UART_LCR_BKSE | UART_LCRVAL); in NS16550_read_baud_divisor() 282 serial_dout(&com_port->lcr, UART_LCRVAL); in NS16550_read_baud_divisor() 387 serial_out(lcr_val, &com_port->lcr); in ns16550_serial_setconfig()
|
H A D | serial_mtk.c | 23 u32 lcr; member 105 writel(UART_LCR_WLS_8 | UART_LCR_DLAB, &priv->regs->lcr); in _mtk_serial_setbrg() 108 writel(UART_LCR_WLS_8, &priv->regs->lcr); in _mtk_serial_setbrg()
|
/openbmc/qemu/hw/char/ |
H A D | serial.c | 156 if (s->lcr & 0x08) { in serial_update_parameters() 159 if (s->lcr & 0x10) in serial_update_parameters() 166 if (s->lcr & 0x04) { in serial_update_parameters() 172 data_bits = (s->lcr & 0x03) + 5; in serial_update_parameters() 342 if (s->lcr & UART_LCR_DLAB) { in serial_ioport_write() 364 if (s->lcr & UART_LCR_DLAB) { in serial_ioport_write() 434 s->lcr = val; in serial_ioport_write() 478 if (s->lcr & UART_LCR_DLAB) { in serial_ioport_read() 502 if (s->lcr & UART_LCR_DLAB) { in serial_ioport_read() 516 ret = s->lcr; in serial_ioport_read() [all …]
|
H A D | pl011.c | 150 return (s->lcr & LCR_FEN) != 0; in pl011_is_fifo_enabled() 296 r = s->lcr; in pl011_read() 337 if (s->lcr & LCR_FEN) in pl011_set_read_trigger() 443 if ((s->lcr ^ value) & LCR_FEN) { in pl011_write() 447 if ((s->lcr ^ value) & LCR_BRK) { in pl011_write() 453 s->lcr = value; in pl011_write() 491 trace_pl011_can_receive(s->lcr, s->read_count, r); in pl011_can_receive() 584 VMSTATE_UINT32(lcr, PL011State), 642 s->lcr = 0; in pl011_reset()
|
/openbmc/linux/drivers/clk/ingenic/ |
H A D | jz4780-cgu.c | 230 u32 lcr, clkgr1; in jz4780_core1_enable() local 234 lcr = readl(cgu->base + CGU_REG_LCR); in jz4780_core1_enable() 235 lcr &= ~LCR_PD_SCPU; in jz4780_core1_enable() 236 writel(lcr, cgu->base + CGU_REG_LCR); in jz4780_core1_enable() 245 retval = readl_poll_timeout(cgu->base + CGU_REG_LCR, lcr, in jz4780_core1_enable() 246 !(lcr & LCR_SCPUS), 10, timeout); in jz4780_core1_enable()
|