summaryrefslogtreecommitdiffstats
path: root/drivers/serial
Commit message (Collapse)AuthorAgeFilesLines
* serial: pl01x: Add support for devices with the rate pre-configured.Eric Anholt2016-03-221-2/+8
| | | | | | | | | | | | | For Raspberry Pi, we had the input clock rate to the pl011 fixed in the rpi.c file, but it may be changed by firmware due to user changes to config.txt. Since the firmware always sets up the uart (default 115200 output unless the user changes it), we can just skip our own uart init to simplify the boot process and more reliably get serial output. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
* dm: ns16550: Add support for reg-offset propertyMichal Simek2016-03-171-2/+4
| | | | | | | | | | | | reg-offset is the part of standard 8250 binding in the kernel. It is shifting start of address space by reg-offset. On Xilinx platform this offset is typically 0x1000. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Moved the new field to the end of the struct to avoid problems: Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Allow use of serial soon after relocationSimon Glass2016-03-171-1/+1
| | | | | | | | | | | | | | | At present on x86 machines with use cache-as-RAM, the memory goes away just before board_init_r() is called. This means that serial drivers are no-longer unavailable, until initr_dm() it called, etc. Any attempt to use printf() within this period will cause a hang. To fix this, mark the serial devices as 'unavailable' when it is no-longer available. Bring it back when serial_initialize() is called. This means that the debug UART will be used instead for this period. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: serial: Remove duplicated carriage return characterAlison Wang2016-03-142-9/+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>
* serial: Move carriage return before line feed for some serial driversAlison Wang2016-03-144-15/+16
| | | | | | | | | In general, a carriage return needs to execute before a line feed. The patch is to change some serial drivers based on this rule, such as serial_mxc.c, serial_pxa.c, serial_s3c24x0.c and usbtty.c. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: serial-uclass: Move a carriage return before a line feedAlison Wang2016-03-141-2/+3
| | | | | | | | In general, a carriage return needs to execute before a line feed. The patch is to change serial DM driver serial-uclass.c based on this rule. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Revert "dm: ns16550: Add support for reg-offset property"Tom Rini2016-02-291-4/+2
| | | | | | | | | | | This reverts commit d9a3bec682f9756621615f4306718a356a3230e3. While this is a correct change to do long term it unfortunately breaks a number of platforms that are using pdata and not named struct members so they are getting all of their data after 'base' incorrect. Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* serial: dcc: Move driver to DMMichal Simek2016-02-252-25/+49
| | | | | | | | | | | | | | | | | | | | | | Enabling this driver requires some DT changes. Adding DCC to root or main bus: dcc: dcc { compatible = "arm,dcc"; u-boot,dm-pre-reloc; }; Extend alias list to link DCC: serial0 = &uart0; serial1 = &uart1; serial2 = &dcc; Change stdout-path to point to dcc port. stdout-path = "serial2:115200n8"; Also add support for debug uart to help with early debug. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* stm32x7: add support for stm32x7 serial driverVikas Manocha2016-02-243-0/+121
| | | | | | | This patch adds support for stm32f7 family usart peripheral. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: ns16550: Add support for reg-offset propertyMichal Simek2016-02-221-2/+4
| | | | | | | | | | reg-offset is the part of standard 8250 binding in the kernel. It is shifting start of address space by reg-offset. On Xilinx platform this offset is typically 0x1000. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* serial: zynq: Change logic in putcMichal Simek2016-02-221-2/+2
| | | | | | | | | | | | | | | | Sync logic with Linux kernel where TX empty flag is checked before char is sent. This logic is fixing problem with console on zynqmp platform. For example: DRAM: 2 GiB Enabling Caches... EL Level: �� sdhci@ff170000: 0 Using default environment Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
* s3c24xx: serial: Remove dead codeDavid Müller (ELSOFT AG)2016-02-081-6/+0
| | | | Signed-off-by: David Müller <d.mueller@elsoft.ch>
* Remove unused CONFIG_HWFLOW option and associated dead code.David Müller (ELSOFT AG)2016-02-081-35/+0
| | | | Signed-off-by: David Müller <d.mueller@elsoft.ch>
* Remove unused CONFIG_MODEM_SUPPORT option and associated dead code.David Müller (ELSOFT AG)2016-02-081-18/+0
| | | | Signed-off-by: David Müller <d.mueller@elsoft.ch>
* dm: pxa: serial: Drop serial_sa1100 serial driverSimon Glass2016-02-082-163/+0
| | | | | | | | This does not appear to be used, and has not been converted to driver model by the deadline (doc/driver-model/serial-howto.txt). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* dm: serial: Drop serial_max3100 serial driverSimon Glass2016-02-082-295/+0
| | | | | | | | This does not appear to be used, and has not been converted to driver model by the deadline (doc/driver-model/serial-howto.txt). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* dm: freescale: serial: Drop serial_imx serial driverSimon Glass2016-02-082-224/+0
| | | | | | | | This does not appear to be used, and has not been converted to driver model by the deadline (doc/driver-model/serial-howto.txt). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* dm: opencores: Drop opencores_yanu serial driverSimon Glass2016-02-082-243/+0
| | | | | | | | This does not appear to be used, and has not been converted to driver model by the deadline (doc/driver-model/serial-howto.txt). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* dm: freescale: Drop mxs_auart serial driverSimon Glass2016-02-082-152/+0
| | | | | | | This does not appear to be used, and has not been converted to driver model by the deadline (doc/driver-model/serial-howto.txt). Signed-off-by: Simon Glass <sjg@chromium.org>
* serial: serial_stm32: move clock config from driver to boardVikas Manocha2016-02-081-40/+0
| | | | | | | | This patch removes the uart clock enable from serial driver & move it in the board code. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Use correct spelling of "U-Boot"Bin Meng2016-02-062-2/+2
| | | | | | | | | | Correct spelling of "U-Boot" shall be used in all written text (documentation, comments in source files etc.). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
* dm: lpuart: Drop the legacy codeBhuvanchandra DV2016-02-021-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>
* drivers: serial: add driver for Microchip PIC32 UART controller.Paul Thacker2016-02-013-0/+214
| | | | | | | | | | This adds PIC32 UART controller support based on driver model. Signed-off-by: Paul Thacker <paul.thacker@microchip.com> Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* ppc: xilinx-ppc4xx: Port to DM serialRicardo Ribalda Delgado2016-01-271-1/+1
| | | | | | | | | | | xilinx_uartlite has been ported to DM, this patch makes the xilinx-ppc405-generic and the xilinx-ppc440-generic boards use the new DM driver. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
* serial: zynq: Fix address reading from DMMichal Simek2016-01-271-6/+1
| | | | | | | Use dev_get_addr() instead of reading reg base directly in the driver. Core function is also more robust. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* serial: zynq: Extend compatible string listMichal Simek2016-01-271-0/+1
| | | | | | | ZynqMP is using updated core with cdns,uart-r1p12 compatible string. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* serial: uartlite: Add uartlite to KconfigMichal Simek2016-01-271-0/+7
| | | | | | | | - Move config option out of board file. - Remove uartlite address from config file Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* serial: uartlite: Add support for debug consoleMichal Simek2016-01-272-0/+33
| | | | | | | Add support for debug console. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* serial: uartlite: Move driver to DMMichal Simek2016-01-271-111/+65
| | | | | | | Enable SPL DM too. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* ns16550: zap the rockchip serial compatible stringThomas Chou2016-01-251-1/+5
| | | | | | | | Zap the rockchip serial compatible string, because rockchip serial has "snps,dw-apb-uart" compatible string in the dts. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Simon Glass <sjg@chromium.org>
* serial: Remove serial_putc_raw_devTom Rini2016-01-251-11/+0
| | | | | | | | | clang-3.8 reports that serial_putc_raw_dev in serial_ns16550.c is unused. Further investigation shows that we have 3 places that implement this function and no callers, remove. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: video: sandbox: Convert sandbox to use driver model for videoSimon Glass2016-01-201-3/+2
| | | | | | | | Now that driver model support is available, convert sandbox over to use it. We can remove a few of the special hooks that sandbox currently has. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* serial: lpuart: Add driver model serial supportBin Meng2016-01-201-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-201-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-201-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-201-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>
* serial: lpuart: Move CONFIG_FSL_LPUART to KconfigBin Meng2016-01-201-0/+6
| | | | | | | | | | | LPUART is seen on Freescale VF610 and QorIQ Layerscape devices. Create a Kconfig option and move it to defconfig for all boards that have this serial driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Simon Glass <sjg@chromium.org>
* arm: serial: Add Kconfig entries to facilitate usage of the pl01x driver for ↵Sergey Temerkhanov2016-01-191-0/+22
| | | | | | | | | | | | early debug output This patch adds Kconfig entries to facilitate usage of pl01x as a debug UART. Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Acked-by: Simon Glass <sjg@chromium.org>
* arm: serial: Add debug UART capability to the pl01x driverSergey Temerkhanov2016-01-191-0/+28
| | | | | | | | | | | This patch adds an ability to use pl01x as a debug UART. It must be configured like other types of debug UARTs Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com> [trini: Update for _debug_uart_init change] Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* Add more SPDX-License-Identifier tagsTom Rini2016-01-191-12/+1
| | | | | | | | | In a number of places we had wordings of the GPL (or LGPL in a few cases) license text that were split in such a way that it wasn't caught previously. Convert all of these to the correct SPDX-License-Identifier tag. Signed-off-by: Tom Rini <trini@konsulko.com>
* serial: lpc32xx hsuart: port driver to driver modelVladimir Zapolskiy2016-01-131-39/+64
| | | | | | | | The change ports NXP LPC32xx 14-clock UART device driver to driver model. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: ns16550: Allow the driver to be omitted if requestedSimon Glass2016-01-121-0/+2
| | | | | | | Allow the ns16550 debug UART to be used without the full driver. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* dm: serial: Allow the UART driver to be dropped from the imageSimon Glass2016-01-122-1/+23
| | | | | | | | | | | In very very space-constrained devices even the full UART driver is too large. In this case the debug UART can still be used in some cases. Add options to enable the UART driver in SPL and U-Boot proper. Enable both options by default. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* dm: serial: Convert ns16550 driver to use driver model PCI APISimon Glass2016-01-121-3/+2
| | | | | | | | | | | | | | | | | Use the driver model version of the function to find the BAR. This updates the fdtdec function, of which ns16550 is the only user. The fdtdec_get_pci_bdf() function is dropped for several reasons: - with driver model we should use 'struct udevice *' rather than passing the device tree offset explicitly - there are no other users in the tree - the function parses for information which is already available in the PCI device structure (specifically struct pci_child_platdata which is available at dev_get_parent_platdata(dev) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* serial: zynq: Use static inline for _debug_uart_init()Michal Simek2016-01-081-1/+1
| | | | | | | | | | | | Mark _debug_uart_init() as static to avoid sparse warning and inline it to debug_uart_init(). Reported-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2016-01-031-1/+8
|\
| * serial_mxc: Fix setup of UARTx_UFCR registerMaximilian Schwerin2016-01-031-1/+8
| | | | | | | | | | | | | | | | This patch writes the default values for TXTL and RXTL to UARTx_UFCR. Without this patch some older kernel versions crash as UARTx_UFCR was not always correctly initialized. Signed-off-by: Maximilian Schwerin <maximilian.schwerin@tigris.de>
* | stm32: Convert serial driver to DMKamil Lulko2015-12-121-107/+96
| | | | | | | | | | | | Signed-off-by: Kamil Lulko <kamil.lulko@gmail.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* | dm: serial: Minor coding style cleanup of some commentsStefan Roese2015-12-101-10/+10
| | | | | | | | | | | | | | | | | | Fix incorrect comment alignments. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | serial: zynq: Remove duplicated headerMichal Simek2015-12-071-3/+0
| | | | | | | | | | | | | | | | debug_uart.h is included twice. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud