Commit Graph

42 Commits

Author SHA1 Message Date
Gerlando Falauto 7813ca9b66 serial: constify serial_assign()
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-12-05 22:48:10 +01:00
Gerlando Falauto a6e6f7f4d0 serial: cosmetic checkpatch compliance
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-12-05 22:47:45 +01:00
Michal Simek 49a23e4a41 serial: uartlite: Support for SERIAL_MULTI
Add support for SERIAL MULTI for uartlite.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-09 23:24:47 +02:00
Simon Glass 857c283e9b Small refactor to remove duplicate serial code
This tidies up duplicate code, and checks that default_serial_console() does
in fact produce a device.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-01 21:52:48 +02:00
Wolfgang Denk 1902692aa0 Merge branch 'master' of git://git.denx.de/u-boot-blackfin
* 'master' of git://git.denx.de/u-boot-blackfin:
  Blackfin: jtag-console: fix timer usage
  Blackfin: switch to common display_options()
  Blackfin: serial: move early debug strings into .rodata section
  Blackfin: adi boards: also set stderr to nc with helper
  Blackfin: update anomaly lists to latest public info
  Blackfin: serial: convert to bfin_{read,write} helpers
  Blackfin: split out async setup
  Blackfin: adi boards: enable pretty flash progress output
  Blackfin: drop unused dma.h header from start code
  Blackfin: portmux: allow header to be included in assembly files
  Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support
  Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings
  Blackfin: sync MMR read/write helpers with Linux
  Blackfin: gpio: optimize free path a little
  Blackfin: post: setup default CONFIG_SYS_POST_WORD_ADDR
  Blackfin: uart: fix printf warning
  Blackfin: add init.elf helper code
  Blackfin: dont reset SWRST on newer bf526 parts
  Blackfin: adi boards: enable multi serial support by default
  Blackfin: uart: add multiple serial support
  Blackfin: uart: move debug buffers into local bss
2011-08-02 21:46:53 +02:00
Mike Frysinger 7b826c2f35 serial: implement common uart post test
The current arch/driver specific UART posts basically boil down to setting
the UART to loop back mode, then reading and writing data.  If we ignore
the loop back part, the rest can be built upon the existing common serial
API.  So let's do just that.

First add a call back for serial drivers to implement loop back control.
Then write a post test that walks all of the serial drivers, puts them
into loop back mode, and verifies that reading/writing at all the diff
baud rates is OK.

If a serial driver doesn't support loop back mode (either it can't or
it hasn't done so yet), then skip it.  This should allow for people to
easily migrate to the new post test with existing serial drivers.

I haven't touched the few already existing uart post tests as I don't
the hardware or knowledge of converting them over.  So I've marked the
new test as weak which will allow the existing tests to override the
default until they are converted.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26 16:39:03 +02:00
Mike Frysinger c52b4f7945 serial: drop serial_register return value
The serial_register function never fails (always return 0), so change it
to a void function to avoid wasting overhead on it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26 16:38:01 +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
Mike Frysinger 635f330fc7 Blackfin: uart: add multiple serial support
This brings CONFIG_SERIAL_MULTI support to the Blackfin on-chip UARTs.
Ends up adding only ~512bytes per additional UART.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-12 02:17:45 -04:00
Tom Warren 2ee3678159 serial: Add Tegra2 serial port support
Signed-off-by: Tom Warren <twarren@nvidia.com>
2011-02-21 08:30:55 +01:00
Wolfgang Denk 2e5167ccad Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC
By now, the majority of architectures have working relocation
support, so the few remaining architectures have become exceptions.
To make this more obvious, we make working relocation now the default
case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-10-29 21:32:07 +02:00
Marek Vasut dd88d79e31 common: Enable serial for PXA250
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-19 22:46:59 +02:00
Stefan Roese e64901c01a serial.c: Fix build breakage introduced with commit e3c78c9b
This patch fixes the compilation problem introduced with commit
e3c78c9b [ppc4xx: Remove now unused CONFIG_UART1_CONSOLE]:

-> ./MAKEALL TB5200
Configuring for TB5200 board...
serial.c: In function '__default_serial_console':
serial.c:94: warning: no return statement in function returning non-void

I accidentally removed an "#else" line. This patch adds it back.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-06 22:35:49 +02:00
Stefan Roese e3c78c9b3c ppc4xx: Remove now unused CONFIG_UART1_CONSOLE
CONFIG_UART1_CONSOLE was a PPC4xx specific implementation and is now
removed since the move from the 4xx UART driver to the common NS16550
UART driver. Let's remove all references to this define now.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese 550650ddd0 ppc4xx: Use common NS16550 driver for PPC4xx UART
This patch removes the PPC4xx UART driver. Instead the common NS16550
driver is used, since all PPC4xx SoC's use this peripheral device.

The file 4xx_uart.c now only implements the UART clock calculation
function which also sets the SoC internal UART divisors.

All PPC4xx board config headers are changed to use this common NS16550
driver now.

Tested on these boards:
acadia, canyonlands, katmai, kilauea, sequoia, zeus

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Wolfgang Denk 09b4a9cf40 Merge branch 'master' of git://git.denx.de/u-boot-samsung 2010-09-08 00:03:22 +02:00
Minkyu Kang 889a275d42 ARMV7: S5P: rename from CONFIG_S5PC1XX to CONFIG_S5P
Use the same configuration around S5P SoCs.
(s5pc100, s5pc110, s5pc210 and so on)

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-08-26 17:33:23 +09:00
Matthias Weisser 6052ac8386 ARM: Add support for MB86R0x SoCs
Signed-off-by: Matthias Weisser <weisserm@arcor.de>
2010-08-10 23:13:28 +02:00
Graeme Russ bf16500f79 x86: Use CONFIG_SERIAL_MULTI
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:16:46 +02:00
Minkyu Kang 46a3b5c8df SAMSUNG: serial: modify name from s5pc1xx to s5p
Because of other s5p series SoC will use these serial functions,
modify function's name and structure's name.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-04-30 05:23:23 -05:00
Anatolij Gustschin e3b28e6732 mpc512x: add multi serial PSC support
Extend mpc512x serial driver to support multiple PSC ports.

Subsequent patches for PDM360NG board support make use of this
functionality by defining CONFIG_SERIAL_MULTI in the board config
file. Additionally the used PSC devices are specified by defining
e.g. CONFIG_SYS_PSC1, CONFIG_SYS_PSC4 and CONFIG_SYS_PSC6.

Support for PSC devices other than 1, 3, 4 and 6 is not added
by this patch because these aren't used currently. In the future
it can be easily added using DECLARE_PSC_SERIAL_FUNCTIONS(N) and
INIT_PSC_SERIAL_STRUCTURE(N) macros in cpu/mpc512x/serial.c.
Additionally you have to add code for registering added
devices in serial_initialize() in common/serial.c.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-04-24 22:56:30 +02:00
Minkyu Kang dd2c9e6a3b s5pc1xx: support serial driver
This patch includes the serial driver for s5pc1xx.
s5pc1xx uart driver needs own register setting and clock configuration.
So, need to special driver.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2009-10-13 21:13:55 -05:00
Peter Tyser 521af04d85 Conditionally perform common relocation fixups
Add #ifdefs where necessary to not perform relocation fixups.  This
allows boards/architectures which support relocation to trim a decent
chunk of code.

Note that this patch doesn't add #ifdefs to architecture-specific code
which does not support relocation.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-03 10:17:57 +02:00
Jean-Christophe PLAGNIOL-VILLARD 52cb4d4fb3 stdio/device: rework function naming convention
So far the console API uses the following naming convention:

	======Extract======
	typedef struct device_t;

	int	device_register (device_t * dev);
	int	devices_init (void);
	int	device_deregister(char *devname);
	struct list_head* device_get_list(void);
	device_t* device_get_by_name(char* name);
	device_t* device_clone(device_t *dev);
	=======

which is too generic and confusing.

Instead of using device_XX and device_t we change this
into stdio_XX and stdio_dev

This will also allow to add later a generic device mechanism in order
to have support for multiple devices and driver instances.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Edited commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-18 00:27:46 +02:00
Poonam Aggrwal 039594a430 8xxx: Second UART port added for MPC85xx, MPC83xx, MPC86xx processors
Defining the next two configs allows to switch the serial port from the
console using the setenv stdin and stdout
  1. #define CONFIG_SERIAL_MULTI 1 /* Enable both serial ports */
  2. #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* determine from environment */

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-02 08:34:13 -05:00
Tom Rix 660888b7fb ZOOM2 Add serial support.
Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board.
The default serial is from the USB connector on left side of the debug board.
The USB connector will produce 2 of the 4 UARTS.  On your host pick the first
enumeration.

The details of the setting of the serial gpmc setup are not available.
The values were provided by another party.

The serial port set up is the same with Zoom1.
Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.

The kernel bootargs are
console=ttyS3,115200n8

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-06-12 20:39:53 +02:00
Mike Frysinger e915f8bb73 common/{hush, kgdb, serial}.c: build by COBJS-$(...) in Makefile
Move global '#ifdef CONFIG_xxx .... #endif' out of the .c files and into
the COBJS-$(CONFIG_xxx) in the Makefile.  Also delete unused var in kgdb
code in the process.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-11 23:05:57 +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
Harald Welte a7c185ed3d ARM: s3c24xx: Multiple serial port support
This patch adds support for CONFIG_SERIAL_MULTI on s3c24x0 CPU's

Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-02-04 23:52:49 +01:00
Matthias Fuchs 1208a2dfde serial: Make default_serial_console() a weak function
With this patch it is possible to reimplement default_serial_console()
in board specific code. This will be done in the upcomming PMC440
U-Boot port. This also allows the lwmon board maintainer to
remove the '#if !defined(CONFIG_LWMON) ...' from common/serial.c.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-01-09 13:27:39 +01:00
Stefan Roese dbbd125721 ppc4xx: Add PPC405EX support
Signed-off-by: Stefan Roese <sr@denx.de>
2007-10-31 21:20:49 +01:00
stefano babic 80172c6181 PXA270: Add support for multiple serial ports.
This patch adds support for multiple serial ports to the PXA target.
FFUART, BTUART and STUART are supported.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2007-09-07 01:04:59 +02:00
Stefan Roese 3cb86f3e40 [PATCH] Clean up 40EZ/Acadia support
This patch cleans up all the open issue of the preliminary
Acadia support.

Signed-off-by: Stefan Roese <sr@denx.de>
2007-03-24 15:45:34 +01:00
Wolfgang Denk 0fd30252c8 Make the serial driver framework work with CONFIG_SERIAL_MULTI enabled 2006-08-30 23:02:10 +02:00
Marian Balakowicz f6e5739a68 Merge: Add support for AMCC 440SPe CPU based eval board (Yucca). 2006-06-30 18:19:42 +02:00
Marian Balakowicz 6c5879f380 Add support for AMCC 440SPe CPU based eval board (Yucca). 2006-06-30 16:30:46 +02:00
Wolfgang Denk c12cffc543 Add support for CONFIG_SERIAL_MULTI on MPC5xxx
Patch by Martin Krause, 8 Jun 2006

This patch supports two serial consoles on boards with
a MPC5xxx CPU. The console can be switched at runtime
by setting stdin, stdout and stderr to the desired serial
interface (serial0 or serial1). The PSCs to be used as
console port are definded by CONFIG_PSC_CONSOLE
and CONFIG_PSC_CONSOLE2.
See README.serial_multi for details.
2006-06-16 17:04:45 +02:00
Wolfgang Denk d87080b721 GCC-4.x fixes: clean up global data pointer initialization for all boards. 2006-03-31 18:32:53 +02:00
wdenk ff36fd8591 * Patch by Leif Lindholm, 23 Sep 2004:
add support for the AMD db1550 board

* Patch by Travis Sawyer, 15 Sep 2004:
  Add CONFIG_SERIAL_MULTI support for ppc4xx,
  update README.serial_multi
2005-01-09 22:28:56 +00:00
wdenk 8b74bf31fe Cleanup 2004-10-11 23:10:30 +00:00
wdenk 2ee665339b * Patch by Pantelis Antoniou, 14 Sep 2004:
Fix early serial hang when CONFIG_SERIAL_MULTI is defined.

* Patch by Pantelis Antoniou, 14 Sep 2004:
  Kick watchdog when bz-decompressing
2004-10-11 22:43:02 +00:00
wdenk 281e00a3be * Code cleanup
* Patch by Sascha Hauer, 28 Jun:
  - add generic support for Motorola i.MX architecture
  - add support for mx1ads, mx1fs2 and scb9328 boards

* Patches by Marc Leeman, 23 Jul 2004:
  - Add define for the PCI/Memory Buffer Configuration Register
  - corrected comments in cpu/mpc824x/cpu_init.c

* Add support for multiple serial interfaces
  (for example to allow modem dial-in / dial-out)
2004-08-01 22:48:16 +00:00