aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial
AgeCommit message (Collapse)AuthorFilesLines
2012-10-15serial: pxa: Move serial registration from serial_initialize()Marek Vasut1-0/+13
Move the registration of serial_XXuart 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 pxa_serial_initialize() function, which is implemented inside of the serial_pxa driver allows encapsulation of serial_XXuart within the serial_pxa driver itself. Also, remove the exports of serial_XXuart from include/serial.h as they are no longer needed. This is simply because the implementation of default_serial_console() is wrapped into the serial_pxa driver and the default console is picked by CONFIG_CONS_IDX 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>
2012-10-15serial: s3c24xx: Move serial registration from serial_initialize()Marek Vasut1-0/+7
Move the registration of s3c24xx_serialN_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 s3c24xx_serial_initialize() function, which is implemented inside of the serial_s3c24xx driver allows encapsulation of s3c24xx_serialN_device within the serial_s3c24xx driver itself. Also, remove the exports of s3c24xx_serialN_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 serial_s3c24xx 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: C Nauman <cnauman@diagraph.com>
2012-10-15serial: pxa: Make local functions staticMarek Vasut1-3/+3
Make functions that are local-only static, so no hairy symbols stick out of the serial_pxa driver file. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
2012-10-15serial: pxa: Implement default_serial_console in serial_pxa.cMarek Vasut1-0/+16
Implement weak default_serial_console() function in serial_pxa driver, which gets available in case CONFIG_SERIAL_MULTI is enabled. This will get helpful in subsequent patches, which will encapsulate PXA's struct serial_device instances in serial_pxa driver. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
2012-10-15serial: Properly spell out the structure member names of serial_driverMarek Vasut5-44/+47
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-10-15serial: Rename .init() and .uninit() in serial_deviceMarek Vasut1-2/+2
Rename .init() to .start() and .uninit() to .stop() in struct serial_device. This allows aligning struct serial_device with closer to struct stdio_dev. The real goal here is to allow these two structures to converge together and eventually make one to be a superset of the other. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Tom Rini <trini@ti.com>
2012-10-04serial: Add Zynq serial driverMichal Simek2-0/+248
The driver is used on Xilinx Zynq platform. Signed-off-by: Michal Simek <monstr@monstr.eu> CC: Joe Hershberger <joe.hershberger@gmail.com> CC: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de>
2012-09-11serial: uartlite: Init all uartlites for serial multiMichal Simek1-15/+19
Initialize all possible uartlites and return the first initialized port. For static configuration is initialization done in userial_ports array. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephan Linz <linz@li-pro.net>
2012-09-02Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingWolfgang Denk1-3/+0
* 'agust@denx.de' of git://git.denx.de/u-boot-staging: tx25: Use generic gpio_* calls config: Always use GNU ld tools: add kwboot binary to .gitignore file fdt: Include arch specific gpio.h instead of asm-generic/gpio.h serial: CONSOLE macro is not used Conflicts: board/karo/tx25/tx25.c Signed-off-by: Wolfgang Denk <wd@denx.de>
2012-09-01AT91: Small fix on AT91 USART initialization codeXu, Hong1-1/+10
Before reset dbgu transmitter, we just wait TXEMPTY to drain the transmitter register(Just in case). If not doing this, we may sometimes see several weird characters from DBGU. A short delay is also added to make sure the new serial settings are settled. Signed-off-by: Hong Xu <hong.xu@atmel.com> [cherry-picked from u-boot-atmel/old-next] Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-09-01snowball: Add support for ux500 based snowball boardMathieu J. Poirier1-0/+2
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: John Rigby <john.rigby@linaro.org> Acked-by: Tom Rini <trini@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Conflicts: drivers/gpio/Makefile
2012-09-01serial/ns16550: ns16550 has a different register layout on SOC_DA8XXMikhail Kshevetskiy1-1/+1
also fix NS16550_init() as we need 16x divider Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com> Acked-by: Christian Riesch <christian.riesch@omicron.at> Tested-by: Christian Riesch <christian.riesch@omicron.at> Acked-by: Sughosh Ganu <urwithsughosh@gmail.com> Tested-by: Sughosh Ganu <urwithsughosh@gmail.com>
2012-08-10serial: CONSOLE macro is not usedMichal Simek1-3/+0
Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-08-08serial: sh: Add support Renesas R8A7740Hideyuki Sano1-7/+14
The serial device of R8A7740 has the same structure as SH7372 of SH, etc. Signed-off-by: Hideyuki Sano <hideyuki.sano.dn@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-08-08serial: sh: Add support Renesas SH73A0Nobuhiro Iwamatsu1-7/+14
The serial device of SH73A0 has the same structure as SH7372 of SH, etc. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-05-28sh: Add SH7269 device and RSK2+SH7269 boardPhil Edworthy2-0/+14
This is an sh2a device (max 266MHz) with FPU, video display controller (VDC), 8 serial ports, 4 I2C channels, 3 CAN ports, SD and on-chip USB. The RSK2+SH7269 board uses the SH7269 processor. It is often referred to as just rsk7269. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-05-28sh: Add support Renesas SH7734Nobuhiro Iwamatsu1-0/+10
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-05-15serial: add LPC32X0 high-speed UART devices supportVladimir Zapolskiy2-0/+113
This change adds an implementation of high-speed UART found on NXP LPC32X0 SoCs. Such UARTs are enumerated as UART1, UART2 and UART7. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2012-03-28Enable high speed support for USB device framework and usbttyVipin KUMAR2-1/+53
This patch adds the support for high speed in usb device framework and usbtty driver. This feature has been kept within a macro CONFIG_USBD_HS, so the board configuration files have to define this macro to enable high speed support. Along with that specific peripheral drivers also need to define a function to let the framework know that the enumeration has happened at high speed. This function prototype is "int is_usbd_high_speed(void)" Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com>
2012-03-19USB:gadget:designware USB device controller (UDC) implementationVipin KUMAR1-2/+2
The earlier usb device controller driver was specific to spear platforms. This patch implements the usb device controller driver as a generic controller which can be reused by other platforms using this peripheral. Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com> Acked-by: Marek Vasut <marex@denx.de>
2012-03-08sh: Fix sh7264 clock speed and related serial settingPhil Edworthy1-2/+0
The generalised calculation of the serial bit rate reg also applies to sh7264, it was just the clock speed that was set incorrectly. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2011-12-16USB: Use (get|put)_unaligned for accessing wMaxPacketSizeTom Rini1-4/+6
In 9792987721c7980453fe6447c3fa6593b44f8458 Stefan describes a usecase where the previous behavior of leaving wMaxPacketSize be unaligned caused fatal problems. The initial fix for this problem was incomplete however as it showed another cases of non-aligned access that previously worked implicitly. This switches to making sure that all access of wMaxPacketSize are done via (get|put)_unaligned. In order to maintain a level of readability to the code in some cases we now use a variable for the value of wMaxPacketSize and in others, a macro. Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Remy Bohmer <linux@bohmer.net> OpenRISC: Tested-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Beagleboard xM, Pandaboard run-tested, s5p_goni build-tested. Signed-off-by: Tom Rini <trini@ti.com>
2011-12-11usbtty: init endpoints prior to startup eventsStefan Herbrechtsmeier1-2/+2
On some usb device controllers (pxa) the endpoint configuration must be programmed prior to enable it. Signed-off-by: Stefan Herbrechtsmeier <sherbrec@cit-ec.uni-bielefeld.de> CC: Marek Vasut <marek.vasut@gmail.com> CC: Remy Bohmer <linux@bohmer.net>
2011-12-09tegra2: Remove unused low-level Tegra2 UART codeSimon Glass3-107/+0
This was used by the AVP in early boot but is no longer used. Unless we plan to enable it somehow it is not needed. In any case we should try to use the ns16550 driver instead as it has the same code. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2011-12-06MX: serial_mxc: cleanup removing nasty #ifdefStefano Babic1-33/+4
The serial driver for iMX SOCs is continuosly changed if a new SOC or not yet used port is used. CONFIG_SYS_<SOC>_<UART Port> defines were used only to find the base address for the selected UART. Instead of that, move the base address to the board configuration file and drop all #ifdef from driver. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Marek Vasut <marek.vasut@gmail.com> CC: Wolfgang Denk <wd@denx.de> CC: Fabio Estevam <fabio.estevam@freescale.com> CC: Helmut Raiger <helmut.raiger@hale.at> CC: John Rigby <jcrigby@gmail.com> CC: Matthias Weisser <weisserm@arcor.de> CC: Jason Liu <jason.hui@linaro.org> Acked-by: Jason Liu <jason.hui@linaro.org>
2011-12-06PXA: Rename CONFIG_PXA2[57]X to CONFIG_CPU_PXA2[57]XMarek Vasut2-3/+3
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-15PXA: Cleanup serial_pxaMarek Vasut1-276/+188
* Cleanup register definitions by introducing new regs-uart.h, compliant with rest of U-Boot. * Remove old register definitions from pxa-regs.h * Convert serial_pxa to new regs-uart.h * Cleanup serial_pxa Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-03sandbox: put stdin into raw modeMike Frysinger1-0/+1
This allows us to act like a serial device: we get tab chars and CTRL+C and respond appropriately. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Simon Glass <sjg@chromium.org>
2011-11-03serial: sandbox: use ssize_t to match os_readMike Frysinger1-1/+1
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Simon Glass <sjg@chromium.org>
2011-11-03serial: sandbox: optimize putsMike Frysinger1-2/+1
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Simon Glass <sjg@chromium.org>
2011-10-27ARM:AM33XX: Add support for TI AM335X EVMChandan Nath1-2/+5
This patch adds basic support for booting the board. This patch adds support for the UART necessary to get to the u-boot prompt. Signed-off-by: Chandan Nath <chandan.nath@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-10-27serial: reduce include platform file for marvell chipLei Wen1-9/+0
Build pass with following config: dkb_config aspenite_config edminiv2_config openrd_ultimate_config sheevaplug_config mv88f6281gtw_ge_config rd6281a_config guruplug_config km_kirkwood_config Signed-off-by: Lei Wen <leiwen@marvell.com> Acked-by: Wolfgang Denk <wd@denx.de>
2011-10-23NS16550: trivial code clean for checkpatchSimon Glass1-17/+20
This removes most checkpatch warnings from the ns16550 driver and its header. Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-23serial: uartlite: Fix compilation warningsMichal Simek1-1/+1
Do not setup userial_ports array as const because in uartlite_serial_putc is out_be32 which can't write to tx_fifo if is const. Warning log: serial_xuartlite.c: In function 'uartlite_serial_putc': serial_xuartlite.c:60: warning: initialization discards qualifiers from pointer target type serial_xuartlite.c: In function 'uartlite_serial_getc': serial_xuartlite.c:78: warning: initialization discards qualifiers from pointer target type serial_xuartlite.c: In function 'uartlite_serial_tstc': serial_xuartlite.c:87: warning: initialization discards qualifiers from pointer target type Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-22serial: pl01x: drain PL01x FIFO before baudrate changeLinus Walleij1-0/+10
Not draining the FIFO and waiting for the UART to be non-busy before changing baudrate results in crap characters on the console, so let's wait for the FIFO to drain and the last character to be clocked out before we do that. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-10-17Move timestamp and version files into 'generated' subdirSimon Glass1-1/+1
There is a rather subtle build problem where the build time stamp is not updated for out-of-tree builds if there exists an in-tree build which has a valid timestamp file. So if you do an in-tree build, then an out-of-tree build your timestamp will not change. The correct timestamp_autogenerated.h lives in the object tree, but it is not always found there. The source still lives in the source tree and when compiling version.h, it includes timestamp_autogenerated.h. Since the current directory is always searched first, this will come from the source tree rather than the object tree if it exists there. This affects dependency generation also, which means that common/cmd_version.o will not even be rebuilt if you have ever done an in-tree build. A similar problem exists with the version file. This change moves both files into the 'generated' subdir, which is already used for asm-offsets.h. Then timestamp.h and version.h are updated to include the files from there. There are other places where these generated files are included, but I cannot see why these don't just use the timestamp.h and version.h headers. So this change also tidies that up. I have tested this with in- and out-of-tree builds, but not SPL. I have looked at various other options for fixing this, including sed on the dep files, -I- and -include flags to gcc, but I don't think they can be made to work. Comments welcome. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-17sandbox: Add serial uartSimon Glass2-0/+64
This uart simply writes to stdout and reads from stdin. We might imagine instead buffering the data so that a test interface can check output and inject input. Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-09serial: uartlite: Support for SERIAL_MULTIMichal Simek1-19/+121
Add support for SERIAL MULTI for uartlite. Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-01ns16550: change to allow 32 bit access to registersDave Aldridge1-0/+6
If CONFIG_SYS_NS16550_MEM32 is defined then 32 bit memory mapped access will be used to read/write the uart registers. This is especially useful for SoC devices that implement 16550 compatible uarts but that have peripheral access width constraints. Signed-off-by: Dave Aldridge <fovsoft@gmail.com>
2011-08-22sh: Add Renesas rsk7264 boardPhil Edworthy1-1/+4
The rsk7264 (also know as rsk2+sh7264) is an SH2A based board with 64MB NAND flash and 64MB SDRAM. It is very similar to the rsk7203 board. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2011-07-26serial: drop useless ctlr fieldMike Frysinger4-20/+14
The multi serial support has a "ctlr" field which almost no one uses, but everyone is forced to set to useless strings. So punt it. Funny enough, the only code that actually reads this field (the mpc8xx driver) has a typo where it meant to look for the SCC driver. Fix it while converting the check to use the name field. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Heiko Schocher <hs@denx.de> CC: Anatolij Gustschin <agust@denx.de> CC: Tom Rix <Tom.Rix@windriver.com> CC: Minkyu Kang <mk7.kang@samsung.com> CC: Craig Nauman <cnauman@diagraph.com> CC: Marek Vasut <marek.vasut@gmail.com> CC: Prafulla Wadaskar <prafulla@marvell.com> CC: Mahavir Jain <mjain@marvell.com>
2011-07-26serial: push default_serial_console to driversMike Frysinger3-0/+47
Rather than sticking arch/board/driver specific logic in the common serial code, push it all out to the respective drivers. The serial drivers declare these funcs weak so that boards can still override things with their own definition. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Heiko Schocher <hs@denx.de> CC: Anatolij Gustschin <agust@denx.de> CC: Tom Rix <Tom.Rix@windriver.com> CC: Minkyu Kang <mk7.kang@samsung.com> CC: Craig Nauman <cnauman@diagraph.com> CC: Prafulla Wadaskar <prafulla@marvell.com> CC: Mahavir Jain <mjain@marvell.com> Tested-by: Minkyu Kang <mk7.kang@samsung.com>
2011-07-26scaled down version of generic libraries for SPLAneesh V1-0/+3
Signed-off-by: Aneesh V <aneesh@ti.com>
2011-07-04driver/serial: delete at91rm9200_usartAndreas Bießmann2-127/+0
The at91rm9200_usart driver could be fully replaced by atmel_usart driver. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2011-06-23Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk1-2/+5
* 'master' of git://git.denx.de/u-boot-arm: run arm_pci_init after relocation IXP42x PCI rewrite update/fix PDNB3 board update/fix IXDP425 / IXDPG425 boards add dvlhost (dLAN 200 AV Wireless G) board IXP NPE: add support for fixed-speed MII ports update/fix AcTux4 board update/fix AcTux3 board update/fix AcTux2 board update/fix AcTux1 board use -ffunction-sections / --gc-sections on IXP42x support CONFIG_SYS_LDSCRIPT on ARM fix "depend" target in npe directory Fix IXP code to work after relocation was added trigger hardware watchdog in IXP42x serial driver add support for IXP42x Rev. B1 and newer add XScale sub architecture (IXP/PXA) to maintainer list Conflicts: arch/arm/lib/board.c Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-06-23trigger hardware watchdog in IXP42x serial driverMichael Schwingen1-2/+5
Signed-off-by: Michael Schwingen <michael@schwingen.org>
2011-06-22ARM: drop unsupported 'trab' boardWolfgang Denk1-6/+0
The 'trab' board configuration is broken, and there is nobody who is interested and willing to fix it. Drop it. This includes support for VFD displays which have always been used by this board only. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-05-18ATMEL: fix related common atmel driver filesReinhard Meyer1-21/+7
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-12Serial: p1011: new vendor init optionsJohn Rigby2-3/+31
Two new options: CONFIG_PL011_SERIAL_RLCR Some vendor versions of PL011 serial ports (e.g. ST-Ericsson U8500) have separate receive and transmit line control registers. Set this variable to initialize the extra register. CONFIG_PL011_SERIAL_FLUSH_ON_INIT On some platforms (e.g. U8500) U-Boot is loaded by a second stage boot loader that has already initialized the UART. Define this variable to flush the UART at init time. empty fifo on init Signed-off-by: John Rigby <john.rigby@linaro.org> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
2011-04-27IMX: MX31: Cleanup include files and drop nasty #ifdef in driversStefano Babic1-4/+0
As exception among the i.MX processors, the i.MX31 has headers without general names (mx31-regs.h, mx31.h instead of imx-regs.h and clock.h). This requires several nasty #ifdef in the drivers to include the correct header. The patch cleans up the driver and renames the header files as for the other i.MX processors. Signed-off-by: Stefano Babic <sbabic@denx.de>