Commit Graph

27 Commits

Author SHA1 Message Date
Marek Vasut afad40299e arm: Remove support for s3c4510
This stuff has been rotting in the tree for a year now. Remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-26 22:37:12 +02:00
Marek Vasut 6f62f42071 arm: Remove support for lpc2292
This stuff has been rotting in the tree for a year now. Remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-26 22:35:20 +02:00
Marek Vasut 9cd2b9e47e kerneldoc: Annotate drivers/serial/serial.c
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-17 07:58:43 -07:00
Marek Vasut dee1941604 serial: Reorder get_current()
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-17 07:55:51 -07:00
Marek Vasut 6d93e25806 serial: Reorder serial_assign()
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-17 07:55:50 -07:00
Marek Vasut bfb7d7a3d6 serial: Implement default_serial_puts()
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-17 07:55:50 -07:00
Marek Vasut f2760c4acd serial: Enhance the manual relocation
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-15 11:53:59 -07:00
Marek Vasut 7742aa65a8 serial: Move common/serial.c to drivers/serial/
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-15 11:53:58 -07:00
Marek Vasut 19b8fa0b61 serial: ns16550: Rename serial.c to serial_ns16550.c
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-15 11:53:58 -07:00
Marek Vasut abc0ed8da1 serial: ns16550: Move serial registration from serial_initialize()
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-15 11:53:50 -07:00
Marek Vasut 90bad891e1 serial: Properly spell out the structure member names of serial_driver
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-15 11:53:48 -07:00
Michal Simek fc3608513b serial: CONSOLE macro is not used
Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-08-10 23:25:35 +02:00
Lei Wen 93554271b9 serial: reduce include platform file for marvell chip
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-27 21:56:33 +02:00
Mike Frysinger 1c9a5606d8 serial: drop useless ctlr field
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-26 16:38:05 +02:00
Mike Frysinger 6c768ca746 serial: push default_serial_console to drivers
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-26 16:37:57 +02:00
Lei Wen b5d807f64d serial: add pantheon soc support
Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-02-21 08:30:55 +01:00
Prafulla Wadaskar a042ec33b7 Serial: Add UART support for Marvell ARMADA 100 SoCs.
ARMADA 100 SoCs has NS16550 compatible UART peripheral
This patch enables the same for ARMADA100 platforms

Signed-off-by: Mahavir Jain <mjain@marvell.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-12-16 23:02:57 +01:00
Albert Aribaud 83142c112d Add Orion5x support to 16550 device driver
This patch provides access to the 16550-compatible
serial device of the Orion5x SoC.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-06-17 19:37:01 +05:30
Anatolij Gustschin fbb0030e38 serial: struct serial_device: add uninit() entry for drivers
Subsequent patch extends mpc512x serial driver to support
multiple PSC ports. The driver will provide an uninit()
function to stop the serial controller and to disable the
controller's clock. Adding uninit() entry to struct serial_device
allows disabling the serial controller after usage of
a stdio serial device.

This patch adds uninit() entry to the struct serial_device
and fixes initialization of this structure in the code
accordingly.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-04-24 21:34:07 +02:00
Prafulla Wadaskar 4efb77d41f arm: Kirkwood: Basic SOCs support
Kirkwood family controllers are highly integrated SOCs
based on Feroceon-88FR131/Sheeva-88SV131/arm926ejs cpu core.

SOC versions supported:-
1) 88F6281-A0       define CONFIG_KW88F6281_A0
2) 88F6192-A0       define CONFIG_KW88F6192_A0

Other supported features:-
1) get_random_hex() fucntion
2) PCI Express port initialization
3) NS16550 driver support

Contributors:
Yotam Admon <yotam@marvell.com>
Michael Blostein <michaelbl@marvell.com

Reviewed-by: Ronen Shitrit <rshitrit@marvell.com>
Acked-by: Stefan Rose <sr@denx.de>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-07-06 21:52:17 +02:00
Mike Frysinger b4746d8bf9 drivers/serial/ns16550: move ifdef into Makefile COBJS-$(...)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-21 22:49:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
Jean-Christophe PLAGNIOL-VILLARD 55d6d2d39f drivers/misc: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13 01:40:40 +02:00
Hugo Villeneuve bcab74baa6 Round the serial port clock divisor value returned by calc_divisor()
Round the serial port clock divisor value returned by
calc_divisor()

Signed-off-by: Hugo Villeneuve <hugo.villeneuve@lyrtech.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2008-07-15 21:53:29 +02:00
Hugo Villeneuve ef130d3093 Fix integer overflow warning in calc_divisor()
which happened when rounding the serial port clock divisor

Signed-off-by: Hugo Villeneuve <hugo.villeneuve@lyrtech.com>
2008-07-13 15:13:31 +02:00
Hugo Villeneuve 89134ea1f6 Round the serial port clock divisor value returned by calc_divisor()
Round the serial port clock divisor value returned by
calc_divisor().

Signed-off-by: Hugo Villeneuve <hugo.villeneuve@lyrtech.com>
Signed-off-by: John Roberts <john.roberts@pwav.com>
2008-07-10 00:48:31 +02:00
Jean-Christophe PLAGNIOL-VILLARD 1378df792a drivers/serial : move serial drivers to drivers/serial
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2007-11-25 23:24:16 +01:00