summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_lpuart.c
Commit message (Collapse)AuthorAgeLines
* lpuart: add a get_lpuart_clk functionShaohui Xie2016-11-21-1/+6
| | | | | | | | | | | It's not always true that LPUART clock is CONFIG_SYS_CLK_FREQ. This patch provides a weak function get_lpuart_clk(), so that the clock can be ovreridden on a specific board which uses different clock for LPUART. Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com> [YS: Reformat commit message] Reviewed-by: York Sun <york.sun@nxp.com>
* dm: serial: Remove duplicated carriage return characterAlison Wang2016-03-14-6/+0
| | | | | | | | | As the handling for carriage return and line feed is done in the common DM driver serial-uclass.c, such handling in some serial DM drivers is duplicated and need to be removed. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: lpuart: Drop the legacy codeBhuvanchandra DV2016-02-02-99/+2
| | | | | | | | All boards using this driver are with device tree support, hence drop the legacy code in driver to have a pure DT solution. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* serial: lpuart: Add driver model serial supportBin Meng2016-01-20-0/+167
| | | | | | | | This adds driver model support to lpuart serial driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Tested-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
* serial: lpuart: Prepare the driver for DM conversionBin Meng2016-01-20-22/+66
| | | | | | | | | Create internal routines which take lpuart's register base as a parameter, in preparation for driver model conversion. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* serial: lpuart: Call local version of setbrg and putc directlyBin Meng2016-01-20-4/+4
| | | | | | | | | There is no need to go through serial driver subsystem, instead call the driver's setbrg and putc routines directly. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* serial: lpuart: Fix several cosmetic issuesBin Meng2016-01-20-20/+15
| | | | | | | | | | | Clean up the driver codes a little bit, by: - Use tab instead of space in the macro defines - Use single line comment whenever possible - Fix insertion of blank lines Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-09-17-6/+13
|\
| * arm: vf610: lpuart: disable FIFO on initializatonStefan Agner2014-09-09-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | UART does not use the UART FIFO, but we should also not rely that the UART FIFO is diabled by default. For instance, when loading U-Boot using the boot ROMs serial downloader protocol over UART, FIFO is enabled at U-Boot start time. This patch disables the RX and TX FIFO, sets back their thresholds and flushes them. Signed-off-by: Stefan Agner <stefan@agner.ch>
| * arm: vf610: lpuart: fix status register handlingStefan Agner2014-09-09-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The status register 1 (S1) is not writeable, hence we should not write it. In order to clear the RDRF flag we only need to read the data register. Also, when stressing U-Boot a lot with serial input, an overflow can occur which asserts the S1_OR flag (while not asserting the S1_RDRF flag). To clear this flag we again just need to read the data register, hence add this flag to the abort conditions for the while loop. Insert a compiler barrier to make sure reading the data register gets executed after reading the status register. Signed-off-by: Stefan Agner <stefan@agner.ch>
* | serial: lpuart: add 32-bit registers lpuart supportJingchang Lu2014-09-08-0/+118
|/ | | | | | | | | On vybrid, lpuart's registers are 8-bit. On LS102xA, lpuart's registers are 32-bit. This patch adds the support for 32-bit registers on LS102xA. Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com> Signed-off-by: Yuan Yao <yao.yuan@freescale.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-14/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* arm: vf610: Add uart support for Vybrid VF610Alison Wang2013-06-03-0/+132
This patch adds lpuart support for Vybrid VF610 platform. Signed-off-by: TsiChung Liew <tsicliew@gmail.com> Signed-off-by: Alison Wang <b18965@freescale.com>