9
0
Fork 0
Commit Graph

34 Commits

Author SHA1 Message Date
Sascha Hauer dac65f99e8 console: Set Linux console parameter automatically
Linux specifies the linux,stdout-path property in the /chosen node
in the devicetree. Unfortunately this is ignored in most cases.
For cases in which barebox uses this property for its own use we
translate this into a Linux boot arg with:

- the console name provided by the serial driver
- the the instance from the 'serial' alias
- the baudrate from the actual baudrate.

So with this it's for devicetee enabled boards no longer necessary
to manually assign a console= parameter. Should a user not want
to use the automatically assigned parameter it should do:

global.linux.bootargs.console=

in the environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-22 07:53:21 +01:00
Sascha Hauer 9ed42fa866 serial: ns16550: Add device ids for omap
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 10:56:49 +01:00
Sascha Hauer 904298deb0 Merge branch 'for-next/socfpga'
Conflicts:
	scripts/Makefile
2013-10-07 08:02:24 +02:00
Sascha Hauer ff05a46c28 serial: ns16550: Add compatible entry for snps,dw-apb-uart
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-23 08:40:31 +02:00
Jean-Christophe PLAGNIOL-VILLARD 770e1a4d63 serial: do not set default baudrate at init
this will be done at activation

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-22 16:46:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD e62d425517 console: drop f_caps and check the function pointer getc/putc instead
None of the driver make the difference between STDOUT and STDERR.
So we just need to check if putc or getc are filled in the console_device

save 32 bytes on versatilepb

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-21 09:59:16 +02:00
Antony Pavlov f9ae3fb01c serial: ns16550: fill cdev just-in-time
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-24 18:53:47 +02:00
Antony Pavlov fe290ec08f serial: ns16550: get clock-frequency from dt
This patch helps clk-less boards to use device
tree for clock frequency probing (taken from
linux.git/drivers/tty/serial/of_serial.c).

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-24 18:53:47 +02:00
Sascha Hauer c841e7a262 serial: ns16550: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 08:32:49 +02:00
Sascha Hauer 4b557daac9 serial: ns16550: Add clk support and make platform_data optional
The clockrate was the only really needed field from platform data.
Add clk support to retrieve the clockrate and make platform data
optional.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 08:32:21 +02:00
Sascha Hauer 38438d4a0f serial: ns16550: remove f_caps from platform_data
So far no user had the need to set the flags, so just remove them
from platform data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 08:28:31 +02:00
Sascha Hauer 25c9ecfa82 serial: ns16550: introduce private struct
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 08:28:30 +02:00
Sascha Hauer ffd44fc14c serial: ns16550: reorder functions to avoid forward declaration
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 08:28:30 +02:00
Alexander Shiyan 54cbf39fca Introduce console_platform_driver() macro and use it for serial drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-14 07:15:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Antony Pavlov dab7dfcec3 serial_ns16550: change the driver's name
The name "serial_ns16550" is not handy because the devices
will have the names like "serial_ns165500", "serial_ns165501",
"serial_ns165502" etc.

The names like "ns16550_serial0" and "ns16550_serial1" look
much better.

Also it is reasonable to make serial driver's names unification.
E.g. see the names for drivers in drivers/serial directory:
 "netx_serial",
 "mpc5xxx_serial",
 "altera_serial",
 "s3c_serial",
 "imx_serial",
 "pxa_serial",
 "blackfin_serial",
 "stm_serial",
 "pl010_serial",
and even "g_serial" in ./drivers/usb/gadget/serial.c

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 10:01:25 +02:00
Sascha Hauer 837a0c2e04 serial drivers: remove unused type_data
Several serial drivers set the type_data field without ever using it,
so just remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Antony Pavlov cb76204fa8 ns16550: fix ier selection
The document "PC16550D Universal Asynchronous
Receiver Transmitter with FIFOs" (vers. June 1995,
http://www.national.com/ds/PC/PC16550D.pdf) states
that IER (Interrupt Enable Register) is accessible
if the bit DLAB = 0 (DLAB is bit 7 in LCR; in barebox
DLAB known as LCR_BKSE).

So before IER access we need set DLAB to 0.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Antony Pavlov b36dd65f15 ns16550: write zero to ier only once
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Antony Pavlov fd434ce24a ns16550: make ns16550_serial_init_port() shorter
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Antony Pavlov 5891ba14b8 ns16550: support for UART with broken FIFO
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD 454f331bfe serial_ns16550: drop the non working check
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-04 09:04:25 +02:00
Jean-Christophe PLAGNIOL-VILLARD c71a77ab87 ns16550: switch to resource
use generic read/write depending on the memory size
if no reg_read/write defined

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-08-01 16:33:09 +08:00
Jean-Christophe PLAGNIOL-VILLARD 931c1cc5a6 ns16550: if not specific f_caps defined use default stdin, stdout, stderr
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-30 02:05:27 +08:00
Antony Pavlov f4f952faa4 serial_ns16550: remove legacy code copied from U-Boot v1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-17 17:42:21 +02:00
Sascha Hauer a03277592f serial 16550: use xzalloc
No need to check for the result and increases the chance that we
build a binary without the rarely used calloc function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 12:36:08 +02:00
Marc Kleine-Budde ca8ec6c9d5 Cleanup some more collateral damage from renaming
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-12-15 21:23:42 +01:00
Sascha Hauer 9491ec7800 Cleanup colleteral damage from renaming
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:19:08 +01:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Juergen Beisert b8b205c72b Improve or fix various parameter documentation
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2009-07-31 13:24:43 +02:00
Sascha Hauer ae302919c6 Get rid of DEVICE_TYPE_CONSOLE usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:45 +02:00
Nishanth Menon cd008fb265 009-add-NS16550
[Patch 09/17] U-Boot-V2:Serial: Add support for NS16550 Driver.

This introduces support for NS16550 and related OMAP support. This driver is a port from Uboot v1 driver from OMAP's Uboot tree.
OMAP U-Boot V1 source is available here: http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz

Signed-off-by: Nishanth Menon<x0nishan@ti.com>
2008-06-05 19:45:21 +02:00