Commit graph

40 commits

Author SHA1 Message Date
Sonic Zhang
f30ac0ce34 Blackfin Serial Driver: Use timer to poll CTS PIN instead of workqueue.
This allows other threads to run when the serial driver polls the CTS
PIN in a loop.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-06-19 17:46:39 +08:00
Graf Yang
3b8458a979 Blackfin serial driver: fix up tty core set_ldisc API change breakage bug
This is the patch that follows Linus's modification about set_ldisc.
Graf has built and tested it on BF537 using Linus's git Tree.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-06-07 15:36:33 +08:00
Sonic Zhang
1feaa51d84 Blackfin Serial Driver: Clean up BF54x macro in blackfin UART driver.
Hide difference in head file.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-06-03 12:19:45 +08:00
Mike Frysinger
45828b812d Blackfin Serial Driver: abstract away DLAB differences into header
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-07 11:41:26 +08:00
Mike Frysinger
89bf6dc51a Blackfin Serial Driver: macro away the IER differences between processors
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-07 11:41:26 +08:00
Harvey Harrison
71cc2c2152 serial: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30 08:29:54 -07:00
Sonic Zhang
0a27842337 Blackfin Serial Driver: fix bug - use mod_timer to replace only add_timer.
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=4045
If adding timer in both timer handler and rx interrupt, a timer may be
added when it is till in the pending list.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-25 04:36:47 +08:00
Mike Frysinger
50e2e15afa Blackfin Serial Driver: the uart break anomaly has been given its own number, so switch to it
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-25 03:03:03 +08:00
Graf Yang
2ade972996 Blackfin Serial Driver: use BFIN_UART_NR_PORTS to help SIR driver in uart port.
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-25 02:55:49 +08:00
Sonic Zhang
1a3a4c7130 Blackfin Serial Driver: Fix bug - kernel hangs when accessing uart 0 on bf537 when booting u-boot and linux on uart 1
Wait only when this UART is enabled.
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3995

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-23 09:43:20 +08:00
Mike Frysinger
0c44a86d9e Blackfin Serial Driver: punt unused lsr variable
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-24 04:56:02 +08:00
Graf Yang
7d01b475ab Blackfin Serial Driver: Enable IR function when user application (irattach /dev/ttyBFx -s) call TIOCSETD ioctl with line discipline N_IRDA
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-29 11:31:08 +08:00
Kay Sievers
e169c13964 serial: fix platform driver hotplug/coldplug
Since 43cc71eed1, the platform modalias is
prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable serial
platform drivers, to re-enable auto loading.

NOTE that Kconfig for some of these drivers doesn't allow modular builds, and
thus doesn't match the driver source's unload support.  Presumably their
unload code is buggy and/or weakly tested...

[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-15 19:35:40 -07:00
Sonic Zhang
0aef456451 Blackfin Serial Driver: Fix bug - Only insert UART rx char in timer task.
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3910

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-29 12:08:42 +08:00
Sonic Zhang
56f5de8fe7 Blackfin Serial Driver: Fix bug - update tx dma buffer tail before wake up processes.
Also make rx dma buffer work as a loop.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 15:19:09 +08:00
Sonic Zhang
0711d85760 Blackfin Serial Driver: Fix bug - Increase buffer tail immediately before starting tx dma.
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=2920

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 15:16:50 +08:00
Sonic Zhang
db288381e2 [Blackfin] serial driver: Add flow control support to bf54x
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 17:05:02 +08:00
Sonic Zhang
4cb4f22b19 [Blackfin] serial driver: Fix bug Poll RTS/CTS status in DMA mode as well
https://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3858

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 14:29:25 +08:00
Mike Frysinger
1ba7a3ee31 [Blackfin] serial driver: use simpler comment headers and strip out information that is maintained in the scm's log
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-11 15:56:26 +08:00
Mike Frysinger
8851c71eb9 [Blackfin] serial driver: rework break flood anomaly handling to be more robust/realistic about what we can actually work around
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 19:48:04 +08:00
Mike Frysinger
0bcfd70ea1 [Blackfin] serial driver: fix bug - cache the bits of the LSR on systems where the LSR is read-to-clear
Cache the bits of the LSR on systems where the LSR is read-to-clear
so that we can safely read the LSR in random places.  this fixes
older parts where break/framing/parity/overflow was not being detected
at all in PIO mode, and this fixes newer parts where
break/framing/parity/overflow was being reported all the time
without being cleared.

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 19:40:05 +08:00
Sonic Zhang
4c195ad88b [Blackfin] serial driver: fix bug - should not wait for the TFI bit, just clear it when tx stop.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-23 23:18:08 +08:00
Sonic Zhang
99ee7b5f3a [Blackfin] serial driver: Fix bug serial driver in DMA mode spams history to console on shell restart
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=2920
Fix by increasing buffer tail immediately before starting tx dma.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-21 17:12:55 +08:00
Sonic Zhang
75b780bd99 [Blackfin] serial driver: Fix bug Free rx dma buffer in shutdown.
Kernel crash for the serial driver in DMA mode:
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3679

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-21 17:03:39 +08:00
Sonic Zhang
1b73351c6a [Blackfin] serial driver: Clean up UART DMA code.
Start next TX DMA in tx dma handler instead of rx timer handler.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-21 16:45:12 +08:00
Sonic Zhang
759eb04090 Blackfin Serial driver: Fix bug - serial driver in PIO mode cant handle input very quickly
Output as many bytes as possible in PIO tx handler.
This reduce the number of tx interrupts and shorten the delay to handle
rx interrupt. So, rx overrun disappears.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-11-21 17:00:32 +08:00
Michael Hennerich
2047e40d72 [Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-22 15:29:18 +08:00
Mike Frysinger
bbf275f092 Blackfin serial driver: pending a unique anomaly id, tie the break flood issue to ANOMALY_05000230
pending a unique anomaly id, tie the break flood issue to ANOMALY_05000230
as when that was fixed, the fallout also fixed the break flood

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-05 16:48:08 +08:00
Sonic Zhang
a359cca71e Blackfin arch: update kgdb patch
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-10 16:47:58 +08:00
Robin Getz
0ae53640b5 Blackfin arch: Initial patch to add earlyprintk support
This allows debugging of problems which happen eary in the kernel
boot process (after bootargs are parsed, but before serial subsystem
is fully initialized)

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-09 17:24:49 +08:00
Mike Frysinger
d5148ffa60 Blackfin arch: use the [CS]SYNC() macros which include anomaly workarounds rather than __builtin_bfin_[cs]sync()
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-25 11:57:42 +08:00
Roy Huang
f4d640c9be Blackfin serial driver: supporting BF548-EZKIT serial port
Signed-off-by: Roy Huang <roy.huang@analog.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 16:43:46 +08:00
Sonic Zhang
474f1a667d Blackfin arch: kgdb specific code
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-29 16:35:17 +08:00
Mike Frysinger
19aa6382e3 Blackfin serial driver: decouple PARODD and CMSPAR checking from PARENB
as the termios info does not stipulate that the former are dependent on the latter

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-11 16:16:45 +08:00
Mike Frysinger
cf68676222 Blackfin serial driver: actually implement the break_ctl() function
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-11 16:12:49 +08:00
Mike Frysinger
9808901b6c Blackfin serial driver: ignore framing and parity errors
if we get a break signal, we want to ignore framing and parity errors
because those will always be set (by nature of the signal)

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-11 15:31:30 +08:00
Mike Frysinger
c16c3ca79a Blackfin serial driver: hook up our UARTs STP bit with userspaces CMSPAR
so we can now do spaced/marked parity

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-11 15:31:30 +08:00
Mike Frysinger
2ac5ee4738 Blackfin serial driver: implement support for ignoring parity/break errors
properly setting up and respecting the read_status_mask / ignore_status_mask fields of the serial core

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:50:23 -07:00
Aubrey Li
5c4e472b0a Blackfin serial driver: fix overhead issue
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:50:23 -07:00
Bryan Wu
194de56127 blackfin: serial driver
This patch implements the driver necessary use the Analog Devices Blackfin
processor's Serial Port.

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:12:58 -07:00