9
0
Fork 0
Commit Graph

193 Commits

Author SHA1 Message Date
Fabio Estevam f20bcf91f6 serial: imx: Fix buggy transmissions when baudrate mismatches
Bit 7 of UCR3 is described in the i.MX reference manuals (with the exception
of i.MX1) as follows:

ADNIMP: Autobaud Detection Not Improved-. Disables new features of
	autobaud detection (See Baud Rate Automatic Detection
	Protocol, for more details).

	0 Autobaud detection new features selected
	1 Keep old autobaud detection mechanism

The "new features" mechanism occasionally causes the receiver to get out of sync
and continuously produces received characters of '0xff'.

In order to reproduce the problem:

$ cs0.baudrate=19200
- Change the terminal baudrate to 19200
- Type in the console and it should look good
- Change the terminal baudrate back to 115200
- Type 'b' in the console, then a stream of '0xff' is transmitted in loop

Setting the ADNIMP bit avoids the transmission of '0xff' in loop.

Also rename the bit definition as per the reference manual.

Tested on mx6q.

Based on a patch from Eric Nelson for U-boot.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-03 08:41:50 +02:00
Sascha Hauer f8327af20c Merge branch 'for-next/ioresource' 2014-05-05 11:05:51 +02:00
Sascha Hauer a115d5f943 serial: ns16550: omap: set register shift from code
The upstream dts files do not contain the register shift. As
we have Omap specific init code anyway we can just set the register
shift from there instead of relying on the devicetree properties.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-28 09:08:46 +02:00
Michel Stam 9f556d4b6f x86: ns16550: Rework driver to allow for x86 I/O space
The current implementation fakes a memory-mapped I/O device
at 0x3f8 and 0x2f8, then uses platform read/write functions
to do the actual reading and writing. These platform functions
only exist for the x86 platform; better to move the I/O
routines into the driver and have the driver request I/O ports
using request_ioport_region.

Signed-off-by: Michel Stam <michel@reverze.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-09 19:31:42 +02:00
Antony Pavlov dbee996459 serial: add Atheros AR933x driver
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 10:28:15 +01:00
Antony Pavlov c56e8ca71c serial: ns16550: add compatible entry for "ingenic,jz4740-uart"
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-26 09:02:41 +01:00
Antony Pavlov e203955994 serial: ns16550: add compatible entry for "ns16450"
"ns16450" uses the same code as "ns16550a" but with FIFO disabled.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-26 09:02:41 +01:00
Antony Pavlov 6683b892ea serial: ns16550: make FCR setup value part of struct ns16550_priv
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-26 09:02:41 +01:00
Antony Pavlov 494ca69454 serial: ns16550: fix whitespaces
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-26 09:02:41 +01:00
Sascha Hauer 601bf0fcc6 Merge branch 'for-next/misc' 2014-02-03 09:55:54 +01:00
Alexander Shiyan 32d6d2ae76 serial: clps711x: Update driver
This patch updates the CLPS711X UART driver.
The update adds support for use with devicetree and
makes driver comatible with current driver from kernel.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-24 23:10:04 +01:00
Alexander Shiyan 624454160b ARM: clps711x: Remove the special name for the syscon driver
No reason to make SYSCON driver name unique to that processor.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-24 23:10:04 +01:00
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 ed039cd72b Merge branch 'for-next/omap-drivers' 2013-12-06 08:23:27 +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 b67b2671c2 treewide: Add missing includes
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:04 +01:00
Sascha Hauer 904298deb0 Merge branch 'for-next/socfpga'
Conflicts:
	scripts/Makefile
2013-10-07 08:02:24 +02:00
Sascha Hauer ebf9022f2e Merge branch 'for-next/rs485'
Conflicts:
	common/console_common.c
2013-10-07 08:02:14 +02:00
Jean-Christophe PLAGNIOL-VILLARD 568e628974 atmel_serial: add rs485 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-24 09:21:40 +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
Eric Bénard e4ee1943fe serial_auart: fix compile error
this fix :
drivers/serial/serial_auart.c:49:22: fatal error: mach/mxs.h: No such file or directory
and
drivers/serial/serial_auart.c: In function 'auart_serial_init_port':
drivers/serial/serial_auart.c:174:2: warning: implicit declaration of function 'stmp_reset_block' [-Wimplicit-function-declaration]

only compile tested ATM

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-10 08:19:35 +02:00
Sascha Hauer df6494123f Merge branch 'for-next/serial' 2013-08-05 12:50:09 +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 ca13a84ac2 ARM: MXS: introduce stmp device support
MXS specific devices have some common infrastructure in the kernel
known as STMP devices. We have the same in barebox, but with a
mxs_ prefix instead of a stmp_ prefix. As some STMP devices are
also found on i.MX6 move the common infrastructure out of MXS
specific files and use the stmp_ prefix.

This is done in preparation for i.MX6 NAND support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +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
Sascha Hauer 3d8304d628 serial: stm: Use clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 08:49:56 +02:00
Sascha Hauer aee8a91bed serial: auart: Use clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 08:49:56 +02:00
Sascha Hauer 0a637bcc3c Merge branch 'for-next/zynq'
Conflicts:
	arch/arm/Makefile
2013-04-04 23:23:19 +02:00
Sascha Hauer 0e291a853a Merge branch 'for-next/device-driver-macros' 2013-04-04 12:03:20 +02:00
Sascha Hauer 7845fd7af6 Merge branch 'for-next/clps711x' 2013-04-04 12:03:20 +02:00
Steffen Trumtrar a89e378be0 serial: Add driver for Cadence UART
Support for Cadence UART core.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-27 09:22:37 +01:00
Marc Kleine-Budde a613c6848f driver/serial: stm-serial: fix flush
Wait until fifo is empty, not until fifo is not full.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-15 08:22:21 +01:00
Marc Kleine-Budde b304bb0f15 driver/serial: auart: fix flush
Actually wait until fifo is empty.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-15 08:22:21 +01: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
Alexander Shiyan 4fa748368b serial: clps711x: Migrate to using SYSCON driver
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-11 22:17:43 +01:00
Sascha Hauer ea0f831cd0 Merge branch 'for-next/mxs' 2013-03-04 09:21:54 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Marc Kleine-Budde 439eefcfe4 driver/serial: add driver for the mxs application uart
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:27:14 +01:00
Marc Kleine-Budde 0150bf0ba1 driver/serial: Kconfig: explicitly state that existing mxs driver is for the debug uart
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:27:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 91786b5bc8 serial/Makefile: drop out of date comments
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 15:05:22 +01:00
Rob Herring d7ff8c47ec amba: pl011: set RTS during initialization
RTS is an output. Either flow control is used and you care about the state or
it is not used and you don't care. So setting it to active does no harm in
either case. This is inline with what Linux does.

Mandatory for Highbank as example

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-18 15:40:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD b1da925c8a introduce console none support
this will allow to have no console support

Use full for bootstrap as we can save 6.5 KiB (barebox.bin) and
3.8 KiB (zbarebox.bin lzo) on at91sam9263 as example vs console simple

As on bootstrap we have often very limited size.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 20:34:16 +01:00
Alexander Shiyan 4c20f9af97 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format, removing
extraneous lines and spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00