summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/fsl_lpuart.c
AgeCommit message (Collapse)AuthorFilesLines
2014-07-17tty: serial: fsl_lpuart: add 32-bit register interface supportJingchang Lu1-8/+637
This add the 32-bit register version LPUART support with big-endian byte order. Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10serial: fsl_lpuart: calculate DMA burstStefan Agner1-14/+13
The DMA burst size must match the transmit FIFO depth in order to make sure all character are transmitted. This patch calculates DMA burst size by using FIFO depth rather than use the hardcoded 16 bytes. This is required since some UARTs (e.g. UART2 on Vybrid) have a FIFO depth of 8 bytes. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10serial: fsl_lpuart: move DMA RX timeout calculationStefan Agner1-7/+11
The DMA RX timeout calculation is done based on FIFO buffer size and port timeout when setting up DMA. However, both variables are not necessarily initialized at DMA initialization time, which can lead to a division by zero. Move the timeout calculation to set_termios where both variables are initialized. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09serial: treewide: Remove empty implementations of enable_ms()Alexander Shiyan1-5/+0
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19serial: Fix IGNBRK handlingPeter Hurley1-1/+1
If IGNBRK is set without either BRKINT or PARMRK set, some uart drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the line discipline, when it should send either nothing or the TTYBREAK flag set. This happens because the read_status_mask masks out the BI condition, which uart_insert_char() then interprets as a normal 0x00 byte. SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General Terminal Interface - Input Modes, states: "If IGNBRK is set, a break condition detected on input shall be ignored; that is, not put on the input queue and therefore not read by any process." Fix read_status_mask to include the BI bit if IGNBRK is set; the lsr status retains the BI bit if a BREAK is recv'd, which is subsequently ignored in uart_insert_char() when masked with the ignore_status_mask. Affected drivers: 8250 - all serial_txx9 mfd amba-pl010 amba-pl011 atmel_serial bfin_uart dz ip22zilog max310x mxs-auart netx-serial pnx8xxx_uart pxa sb1250-duart sccnxp serial_ks8695 sirfsoc_uart st-asc vr41xx_siu zs sunzilog fsl_lpuart sunsab ucc_uart bcm63xx_uart sunsu efm32-uart pmac_zilog mpsc msm_serial m32r_sio Unaffected drivers: omap-serial rp2 sa1100 imx icom Annotated for fixes: altera_uart mcf Drivers without break detection: 21285 xilinx-uartps altera_jtaguart apbuart arc-uart clps711x max3100 uartlite msm_serial_hs nwpserial lantiq vt8500_serial Unknown: samsung mpc52xx_uart bfin_sport_uart cpm_uart/core Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag' Reported-by: Ivan <athlon_@mail.ru> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18serial: fsl_lpuart: add DMA supportYuan Yao1-12/+418
Add dma support for lpuart. This function depend on DMA driver. You can turn on it by write both the dmas and dma-name properties in dts node. Signed-off-by: Yuan Yao <yao.yuan@freescale.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-26serial: fsl_lpuart: Return proper error on lpuart_serial_init error pathAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-26serial: fsl_lpuart: restore UARTCR2 after watermark setup is doneShawn Guo1-0/+5
Function lpuart_setup_watermark() clears some bits in register UARTCR2 before writing FIFO configuration registers as required by hardware. But it should restore UARTCR2 after that. Otherwise, we end up changing UARTCR2 register when setting up watermark, and that is not really desirable. At least, when low-level debug and earlyprint is enabled, serial console is broken due to it. Fix the problem by restoring UARTCR2 register at the end of function lpuart_setup_watermark(). Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-08tty: serial: add Freescale lpuart driver supportJingchang Lu1-0/+874
Add Freescale lpuart driver support. The lpuart device can be found on Vybrid VF610 and Layerscape LS-1 SoCs. Signed-off-by: Jingchang Lu <b35083@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>