You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/target/linux/brcm63xx/patches-2.6.27/003-add_serial_driver_for_b...

67 lines
2.3 KiB
Diff

From 6c489656b09998ed6a6f857e01ccf630e29358dd Mon Sep 17 00:00:00 2001
From: Maxime Bizon <mbizon@freebox.fr>
Date: Fri, 18 Jul 2008 19:35:55 +0200
Subject: [PATCH] [MIPS] BCM63XX: Add serial driver for bcm63xx integrated UART.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
arch/mips/bcm63xx/Makefile | 1 +
arch/mips/bcm63xx/dev-uart.c | 41 +
drivers/serial/Kconfig | 19 +
drivers/serial/Makefile | 1 +
drivers/serial/bcm63xx_uart.c | 890 ++++++++++++++++++++++
include/asm-mips/mach-bcm63xx/bcm63xx_dev_uart.h | 6 +
include/linux/serial_core.h | 2 +
7 files changed, 960 insertions(+), 0 deletions(-)
create mode 100644 arch/mips/bcm63xx/dev-uart.c
create mode 100644 drivers/serial/bcm63xx_uart.c
create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_dev_uart.h
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -1421,4 +1421,23 @@ config SPORT_BAUD_RATE
default 19200 if (SERIAL_SPORT_BAUD_RATE_19200)
default 9600 if (SERIAL_SPORT_BAUD_RATE_9600)
+config SERIAL_BCM63XX
+ tristate "bcm63xx serial port support"
+ select SERIAL_CORE
+ depends on BCM63XX
+ help
+ If you have a bcm63xx CPU, you can enable its onboard
+ serial port by enabling this options.
+
+ To compile this driver as a module, choose M here: the
+ module will be called bcm963xx_uart.
+
+config SERIAL_BCM63XX_CONSOLE
+ bool "Console on bcm63xx serial port"
+ depends on SERIAL_BCM63XX
+ select SERIAL_CORE_CONSOLE
+ help
+ If you have enabled the serial port on the bcm63xx CPU
+ you can make it the console by answering Y to this option.
+
endmenu
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -24,6 +24,7 @@ obj-$(CONFIG_SERIAL_CLPS711X) += clps711
obj-$(CONFIG_SERIAL_PXA) += pxa.o
obj-$(CONFIG_SERIAL_PNX8XXX) += pnx8xxx_uart.o
obj-$(CONFIG_SERIAL_SA1100) += sa1100.o
+obj-$(CONFIG_SERIAL_BCM63XX) += bcm63xx_uart.o
obj-$(CONFIG_SERIAL_BFIN) += bfin_5xx.o
obj-$(CONFIG_SERIAL_BFIN_SPORT) += bfin_sport_uart.o
obj-$(CONFIG_SERIAL_SAMSUNG) += samsung.o
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -155,6 +155,8 @@
#define PORT_SC26XX 82
+#define PORT_BCM63XX 83
+
#ifdef __KERNEL__
#include <linux/compiler.h>