summaryrefslogtreecommitdiff
path: root/drivers/serial/serial.c
AgeCommit message (Collapse)AuthorFilesLines
2018-12-03drivers: serial: get rid of non DM mpc8xx driverChristophe Leroy1-2/+0
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-08-10drivers: serial: document on_baudrate()Heinrich Schuchardt1-0/+8
Add parameter description. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-08-08mips: au1x00: Remove support for these SoCsTom Rini1-2/+0
The only platform left for the AU1x00 SoCs was the pb1x00 platform, an apparent clone of the dbau1x00 platform. As pb1x00 had no listed maintainer I am assuming that it is also orphaned. Remove this platform and then remove the unused SoC support. Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-07drivers: serial: remove nonexisting initialisation functionsChristophe Leroy1-64/+0
This patch removes call of serial initialisation functions that are not implemented anymore. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc: Remove 8260 remaindersChristophe Leroy1-3/+0
commit 2eb48ff7a210d ("powerpc, 8260: remove support for mpc8260") removed support for 8260 CPU. This patch remove some remainders. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-06serial: make serial_stub_* to static functionsMasahiro Yamada1-2/+2
Add missing static to serial_stub_puts(). Unexport serial_stub_{getc,tstc} because they are used locally. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-16powerpc, 5xx: remove some "5xx" remainsHeiko Schocher1-1/+0
we removed 5xx support. So delete some forgotten remains. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-16powerpc, 82xx: remove some missed mpc82xx remainsHeiko Schocher1-2/+0
we removed 82xx support. Missed some 82xx remains, remove them now. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-16powerpc, 5xxx, 512x: remove support for mpc5xxx and mpc512xHeiko Schocher1-2/+0
There was for long time no activity in the mpx5xxx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in mpc5xxx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
2015-12-06Fix typo: firstly -> first.Vagrant Cascadian1-1/+1
Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Acked-by: Marek Vasut <marex@denx.de>
2015-10-23serial: remove altera serial initializationsThomas Chou1-4/+0
Both altera_jtag_serial_initialize() and altera_serial_initialize() are no longer used after they are converted to driver model. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
2015-04-22stm32f4: Add serial driverrev13@wp.pl1-0/+2
Signed-off-by: Kamil Lulko <rev13@wp.pl> Reviewed-by: Tom Rini <trini@konsulko.com>
2015-02-25ARM: remove cm4008 and cm41xx board supportMasahiro Yamada1-2/+0
These are still non-generic boards. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Greg Ungerer <greg.ungerer@opengear.com> Acked-by: Marek Vasut <marex@denx.de>
2014-11-04serial: add prototypes for init functionsJeroen Hofstee1-70/+70
While at it, sort them. Cc: Tom Rini <trini@ti.com> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-26Merge git://git.denx.de/u-boot-dmTom Rini1-2/+0
Fix a trivial conflict over adding <dm.h> Conflicts: arch/arm/cpu/armv7/omap3/board.c Signed-off-by: Tom Rini <trini@ti.com>
2014-10-25serial: make local functions staticJeroen Hofstee1-4/+4
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-24serial: remove uniphier_serial_initialize() callMasahiro Yamada1-2/+0
The UniPhier serial driver has been converted to driver model. Let's remove uniphier_serial_initialize() call from the old serial driver framework. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-05serial: add UniPhier serial driverMasahiro Yamada1-0/+2
The driver for on-chip UART used on Panasonic UniPhier platform. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-09-10serial: Set up the 'priv' pointer when creating a serial deviceSimon Glass1-0/+1
The stdio_dev structure has a private pointer for its creator, but it is not set up by the serial system. Set it to point to the serial device so that it can be found by code called by stdio. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-07-23Add a flag indicating when the serial console is readySimon Glass1-0/+1
For sandbox we have a fallback console which is used very early in U-Boot, before serial drivers are available. Rather than try to guess when to switch to the real console, add a flag so we can be sure. This makes sure that sandbox can always output a panic() message, for example, and avoids silent failure (which is very annoying in sandbox). Signed-off-by: Simon Glass <sjg@chromium.org>
2014-07-23stdio: Pass device pointer to stdio methodsSimon Glass1-6/+48
At present stdio device functions do not get any clue as to which stdio device is being acted on. Some implementations go to great lengths to work around this, such as defining a whole separate set of functions for each possible device. For driver model we need to associate a stdio_dev with a device. It doesn't seem possible to continue with this work-around approach. Instead, add a stdio_dev pointer to each of the stdio member functions. Note: The serial drivers have the same problem, but it is not strictly necessary to fix that to get driver model running. Also, if we convert serial over to driver model the problem will go away. Code size increases by 244 bytes for Thumb2 and 428 for PowerPC. 22: stdio: Pass device pointer to stdio methods arm: (for 2/2 boards) all +244.0 bss -4.0 text +248.0 powerpc: (for 1/1 boards) all +428.0 text +428.0 Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
2014-05-12bd_info: remove bi_barudrate member from struct bd_infoMasahiro Yamada1-7/+3
gd->bd->bi_baudrate is a copy of gd->baudrate. Since baudrate is a common feature for all architectures, keep gd->baudrate only. It is true that bi_baudrate was passed to the kernel in that structure but it was a long time ago. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de> Acked-by: Michal Simek <monstr@monstr.eu> (For microblaze)
2014-05-06serial: zynq: Fix typo in suffix function nameMichal Simek1-2/+2
's/zynq_serial_initalize/zynq_serial_initialize/g' serial_initialize is used by all serial drivers. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-02-19Merge branch 'u-boot-pxa/master' into 'u-boot-arm/master'Albert ARIBAUD1-2/+0
2014-02-07serial/serial_arc - add driver for ARC UARTAlexey Brodkin1-0/+2
Driver for non-standard on-chip UART, instantiated in the ARC (Synopsys) FPGA Boards such as ARCAngel4/ML50x Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Mischa Jonker <mjonker@synopsys.com> Cc: Francois Bedard <fbedard@synopsys.com> Cc: Tom Rini <trini@ti.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2014-02-06ARM: serial: Remove the IXP UART driverMarek Vasut1-2/+0
This driver is no longer used, remove it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Michael Schwingen <michael@schwingen.org> Cc: Tom Rini <trini@ti.com>
2013-09-19drivers: serial_s3c44b0: delete an unused driverMasahiro Yamada1-2/+0
Since commit 5dc5f36 removed B2 board support, there are no boards enabling serial_s3c44b0. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Andrea Scian <andrea.scian@dave-tech.it>
2013-09-05Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD1-0/+2
Conflicts: drivers/serial/serial.c The conflict above was a trivial case of adding one init function in each branch, and manually resolved in merge.
2013-08-21ARM: mxs: Added application UART driverAndreas Wass1-0/+2
The driver makes it possible to use an application UART as the U-Boot output console for Freescale i.MX23/i.MX28 devices. Signed-off-by: Andreas Wass <andreas.wass@dalelven.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de>
2013-08-13serial: arm_dcc: Register with serial coreJagannadha Sutradharudu Teki1-0/+2
Register arm_dcc with drivers/serial/serial.c Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk1-17/+1
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-06-26serial: Use ARRAY_SIZE instead of reinventing itAxel Lin1-3/+2
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2013-05-15Power: remove support for Freescale MPC8220Wolfgang Denk1-2/+0
The Freescale MPC8220 Power Architecture processors have long reached EOL; Freescale does not even list these any more on their web site. Remove the code to avoid wasting maitaining efforts on dead stuff. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Andy Fleming <afleming@gmail.com>
2013-04-12arm: Remove support for unused s3c64xxBenoît Thébaudeau1-2/+0
Following the removal of the smdk6400 board, the s3c64xx SoC becomes unused, so remove associated code. It will still be possible to restore it later from the Git history if necessary. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-02-28ARM: ns9750dev: remove remainders of dead boardWolfgang Denk1-2/+0
Commit 8b710b1 started removing code for the unmaintained "ns9750dev" board; the board support is still broken, and not included anywhere in the Makefile or boards.cfg. Remove the remaining dead code. Signed-off-by: Wolfgang Denk <wd@denx.de>
2012-12-13env: Add a baudrate env handlerJoe Hershberger1-0/+70
Remove the hard-coded baudrate handler and use a callback instead Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-27arm: Remove support for NETARMMarek Vasut1-2/+0
This stuff has been rotting in the tree for a while now. Remove it. Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-27arm: Remove support for s3c4510Marek Vasut1-2/+0
This stuff has been rotting in the tree for a year now. Remove it. Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-27arm: Remove support for lpc2292Marek Vasut1-2/+0
This stuff has been rotting in the tree for a year now. Remove it. Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-17kerneldoc: Annotate drivers/serial/serial.cMarek Vasut1-0/+165
Add kerneldoc annotations into serial core. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
2012-10-17serial: Reorder get_current()Marek Vasut1-9/+12
Reorder the get_current() function to make it a bit more readable. The code does not grow and there is minor change in the code logic, where dev != NULL is now checked in any case. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
2012-10-17serial: Reorder serial_assign()Marek Vasut1-5/+6
Reorder serial_assign() function to get rid of the extra level of indentation. Also, adjust the return value to be -EINVAL instead of positive one to be more consistent. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
2012-10-17serial: Implement default_serial_puts()Marek Vasut1-0/+7
U-Boot contains a lot of duplicit implementations of serial_puts() call which just pipes single characters into the port in loop. Implement function that does this behavior into common code, so others can make easy use of it. This function is called default_serial_puts() and it's sole purpose is to call putc() in loop on the whole string passed to it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
2012-10-15serial: Enhance the manual relocationMarek Vasut1-6/+14
Enhance the manual relocation of drivers operations structure by checking if the entries are NULL and increment them only if they are not. This allows for setting any entry to NULL and it will survive the manual relocation. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de>
2012-10-15serial: Move common/serial.c to drivers/serial/Marek Vasut1-0/+354
Move the common/serial.c into driver/serial/, since this file provides serial multiplexing functions and it is imperative to be linked with libserial.o instead of libcommon.o. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
2012-10-15serial: ns16550: Rename serial.c to serial_ns16550.cMarek Vasut1-359/+0
This serial driver had wrong name of the source file for some time now. The name of the driver was serial.c instead of any more logical and fitting name. Thus, rename the driver source file to serial_ns16550.c and be done with it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Michal Simek <monstr@monstr.eu>
2012-10-15serial: ns16550: Move serial registration from serial_initialize()Marek Vasut1-0/+16
Move the registration of eserialN_device ports from default serial_initialize() into driver specific function called from serial_initialize(). This slims down the serial_initialize() call to a bare tracker of all possible serial port registration routines in U-Boot. The newly implemented ns16550_serial_initialize() function, which is implemented inside of the ns16550 serial driver allows encapsulation of eserialN_device within the ns16550 serial driver itself. Also, remove the exports of eserialN_device from include/serial.h as they are no longer needed. This is simply because the implementation of default_serial_console() is wrapped into the ns16550 serial driver and the default console is picked by CONFIG_SERIAL<N> macro in config file. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Michal Simek <monstr@monstr.eu>
2012-10-15serial: Properly spell out the structure member names of serial_driverMarek Vasut1-9/+10
Properly spell out the whole structure member names when an initialized varible is instantiated from the struct serial_driver. In case the structure definition for struct serial_driver undergoes reordering, there will be no impact on variables defined based on this structure. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: C Nauman <cnauman@diagraph.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Michal Simek <monstr@monstr.eu>
2012-08-11serial: CONSOLE macro is not usedMichal Simek1-3/+0
Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Mike Frysinger <vapier@gentoo.org>