Skip to content

Commit

Permalink
serial: fit blackfin uart over sport driver into common uart infrastr…
Browse files Browse the repository at this point in the history
…ucture

Fit blackfin uart over sport driver into common uart inftrastructure.  It
is based on the early platform interfaces to get the platform data early
when the console is initilized.

1. Enable sport uart driver to change uart baud, data bit, stop bit at
   runtime.  Bind the index of uart device nodes to physical index of
   sports.

2. Move all platform data into arch specific board files.  Register
   and probe platform device data in both early and normal stages.

3. Console is registered in sport uart driver as well.

4. Remove 500 us block waiting in sport tx stop code by putting a
   dummy data into tx fifo to make sure the sport tx stops when all bytes
   are shifted out except for the dummy data.

5. clean up a bit and fix up coding style.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
sonic zhang authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 13dda80 commit ccf68e5
Show file tree
Hide file tree
Showing 3 changed files with 511 additions and 280 deletions.
52 changes: 24 additions & 28 deletions drivers/serial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1418,38 +1418,34 @@ config SERIAL_BFIN_SPORT
To compile this driver as a module, choose M here: the
module will be called bfin_sport_uart.

choice
prompt "Baud rate for Blackfin SPORT UART"
depends on SERIAL_BFIN_SPORT
default SERIAL_SPORT_BAUD_RATE_57600
help
Choose a baud rate for the SPORT UART, other uart settings are
8 bit, 1 stop bit, no parity, no flow control.

config SERIAL_SPORT_BAUD_RATE_115200
bool "115200"

config SERIAL_SPORT_BAUD_RATE_57600
bool "57600"
config SERIAL_BFIN_SPORT_CONSOLE
bool "Console on Blackfin sport emulated uart"
depends on SERIAL_BFIN_SPORT=y
select SERIAL_CORE_CONSOLE

config SERIAL_SPORT_BAUD_RATE_38400
bool "38400"
config SERIAL_BFIN_SPORT0_UART
bool "Enable UART over SPORT0"
depends on SERIAL_BFIN_SPORT && !(BF542 || BF542M || BF544 || BF544M)
help
Enable UART over SPORT0

config SERIAL_SPORT_BAUD_RATE_19200
bool "19200"
config SERIAL_BFIN_SPORT1_UART
bool "Enable UART over SPORT1"
depends on SERIAL_BFIN_SPORT
help
Enable UART over SPORT1

config SERIAL_SPORT_BAUD_RATE_9600
bool "9600"
endchoice
config SERIAL_BFIN_SPORT2_UART
bool "Enable UART over SPORT2"
depends on SERIAL_BFIN_SPORT && (BF54x || BF538 || BF539)
help
Enable UART over SPORT2

config SPORT_BAUD_RATE
int
depends on SERIAL_BFIN_SPORT
default 115200 if (SERIAL_SPORT_BAUD_RATE_115200)
default 57600 if (SERIAL_SPORT_BAUD_RATE_57600)
default 38400 if (SERIAL_SPORT_BAUD_RATE_38400)
default 19200 if (SERIAL_SPORT_BAUD_RATE_19200)
default 9600 if (SERIAL_SPORT_BAUD_RATE_9600)
config SERIAL_BFIN_SPORT3_UART
bool "Enable UART over SPORT3"
depends on SERIAL_BFIN_SPORT && (BF54x || BF538 || BF539)
help
Enable UART over SPORT3

config SERIAL_TIMBERDALE
tristate "Support for timberdale UART"
Expand Down
Loading

0 comments on commit ccf68e5

Please sign in to comment.