Skip to content

Commit b45d527

Browse files
Maciej W. RozyckiLinus Torvalds
authored andcommitted
sb1250-duart.c: SB1250 DUART serial support
This is a driver for the SB1250 DUART, a dual serial port implementation included in the Broadcom family of SOCs descending from the SiByte SB1250 MIPS64 chip multiprocessor. It is a new implementation replacing the old-fashioned driver currently present in the linux-mips.org tree. It supports all the usual features one would expect from a(n asynchronous) serial driver, including modem line control (as far as hardware supports it -- there is edge detection logic missing from the DCD and RI lines and the driver does not implement polling of these lines at the moment), the serial console, BREAK transmission and reception, including the magic SysRq. The receive FIFO threshold is not maintained though. The driver was tested with a SWARM board which uses a BCM1250 SOC (which is dual MIPS64 CMP) and has both ports of the single DUART implemented wired externally. Both were tested. Testing included using the ports as terminal lines at 1200bps (which is the ports minimum), 115200bps and a couple of random speeds inbetween. The modem lines were verified to operate correctly. No testing was performed with a use as a network interface, like with SLIP or PPP. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Acked-by: Ralf Baechle <ralf@linux-mips.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f9e86f4 commit b45d527

9 files changed

Lines changed: 1074 additions & 45 deletions

File tree

‎arch/mips/sibyte/bcm1480/setup.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
unsigned int sb1_pass;
3232
unsigned int soc_pass;
3333
unsigned int soc_type;
34+
EXPORT_SYMBOL(soc_type);
3435
unsigned int periph_rev;
3536
unsigned int zbbus_mhz;
3637

‎arch/mips/sibyte/sb1250/setup.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
unsigned int sb1_pass;
3232
unsigned int soc_pass;
3333
unsigned int soc_type;
34+
EXPORT_SYMBOL(soc_type);
3435
unsigned int periph_rev;
3536
unsigned int zbbus_mhz;
3637
EXPORT_SYMBOL(zbbus_mhz);

‎drivers/serial/Kconfig‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,34 @@ config SERIAL_AMBA_PL011_CONSOLE
338338
your boot loader (lilo or loadlin) about how to pass options to the
339339
kernel at boot time.)
340340

341+
config SERIAL_SB1250_DUART
342+
tristate "BCM1xxx on-chip DUART serial support"
343+
depends on SIBYTE_SB1xxx_SOC=y
344+
select SERIAL_CORE
345+
default y
346+
---help---
347+
Support for the asynchronous serial interface (DUART) included in
348+
the BCM1250 and derived System-On-a-Chip (SOC) devices. Note that
349+
the letter D in DUART stands for "dual", which is how the device
350+
is implemented. Depending on the SOC configuration there may be
351+
one or more DUARTs available of which all are handled.
352+
353+
If unsure, say Y. To compile this driver as a module, choose M here:
354+
the module will be called sb1250-duart.
355+
356+
config SERIAL_SB1250_DUART_CONSOLE
357+
bool "Support for console on a BCM1xxx DUART serial port"
358+
depends on SERIAL_SB1250_DUART=y
359+
select SERIAL_CORE_CONSOLE
360+
default y
361+
---help---
362+
If you say Y here, it will be possible to use a serial port as the
363+
system console (the system console is the device which receives all
364+
kernel messages and warnings and which allows logins in single user
365+
mode).
366+
367+
If unsure, say Y.
368+
341369
config SERIAL_ATMEL
342370
bool "AT91 / AT32 on-chip serial port support"
343371
depends on (ARM && ARCH_AT91) || AVR32

‎drivers/serial/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ obj-$(CONFIG_SERIAL_MPC52xx) += mpc52xx_uart.o
5151
obj-$(CONFIG_SERIAL_ICOM) += icom.o
5252
obj-$(CONFIG_SERIAL_M32R_SIO) += m32r_sio.o
5353
obj-$(CONFIG_SERIAL_MPSC) += mpsc.o
54+
obj-$(CONFIG_SERIAL_SB1250_DUART) += sb1250-duart.o
5455
obj-$(CONFIG_ETRAX_SERIAL) += crisv10.o
5556
obj-$(CONFIG_SERIAL_JSM) += jsm/
5657
obj-$(CONFIG_SERIAL_TXX9) += serial_txx9.o

0 commit comments

Comments
 (0)