diff options
author | John Crispin <john@openwrt.org> | 2012-11-07 20:25:34 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2012-11-07 20:25:34 +0000 |
commit | ca1fcaed5be02f18bf9c06473e3e554aa6801ab5 (patch) | |
tree | 1abe66efe47fe9848a14f92d7b49eb0babbb9ed6 /target/linux/ramips/patches-3.6/101-rt288x_serial_driver_hack.patch | |
parent | cc826486008092661ad72a57f3715948501a6f30 (diff) | |
download | upstream-ca1fcaed5be02f18bf9c06473e3e554aa6801ab5.tar.gz upstream-ca1fcaed5be02f18bf9c06473e3e554aa6801ab5.tar.bz2 upstream-ca1fcaed5be02f18bf9c06473e3e554aa6801ab5.zip |
ramips: port patches to linux-3.6
Signed-off-by: Daniel Golle <dgolle@allnet.de>
create mode 100644 target/linux/ramips/patches-3.6/001-mips-add-cp0-compare-irq-function.patch
create mode 100644 target/linux/ramips/patches-3.6/010-mtd_fix_cfi_cmdset_0002_erase_status_check.patch
create mode 100644 target/linux/ramips/patches-3.6/011-mtd-cfi_cmdset_0002-force-word-write.patch
create mode 100644 target/linux/ramips/patches-3.6/100-mips-ralink-core.patch
create mode 100644 target/linux/ramips/patches-3.6/101-rt288x_serial_driver_hack.patch
create mode 100644 target/linux/ramips/patches-3.6/102-rt288x-pci-driver-hook.patch
create mode 100644 target/linux/ramips/patches-3.6/103-ethernet.patch
create mode 100644 target/linux/ramips/patches-3.6/104-ramips-watchdog-driver.patch
create mode 100644 target/linux/ramips/patches-3.6/105-ramips-spi-driver.patch
create mode 100644 target/linux/ramips/patches-3.6/105-usb_dwc_otg.patch
create mode 100644 target/linux/ramips/patches-3.6/106-rt3883-pci-support.patch
create mode 100644 target/linux/ramips/patches-3.6/200-rt3883-ehci-glue.patch
create mode 100644 target/linux/ramips/patches-3.6/201-rt3883-ohci-glue.patch
SVN-Revision: 34108
Diffstat (limited to 'target/linux/ramips/patches-3.6/101-rt288x_serial_driver_hack.patch')
-rw-r--r-- | target/linux/ramips/patches-3.6/101-rt288x_serial_driver_hack.patch | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-3.6/101-rt288x_serial_driver_hack.patch b/target/linux/ramips/patches-3.6/101-rt288x_serial_driver_hack.patch new file mode 100644 index 0000000000..5f059cd1b7 --- /dev/null +++ b/target/linux/ramips/patches-3.6/101-rt288x_serial_driver_hack.patch @@ -0,0 +1,89 @@ +--- a/drivers/tty/serial/8250/Kconfig ++++ b/drivers/tty/serial/8250/Kconfig +@@ -249,6 +249,14 @@ config SERIAL_8250_ACORN + system, say Y to this option. The driver can handle 1, 2, or 3 port + cards. If unsure, say N. + ++config SERIAL_8250_RT288X ++ bool "Ralink RT288x/RT305x/RT3662/RT3883 serial port support" ++ depends on SERIAL_8250 != n && (SOC_RT288X || SOC_RT305X || SOC_RT3883) ++ help ++ If you have a Ralink RT288x/RT305x SoC based board and want to use the ++ serial port, say Y to this option. The driver can handle up to 2 serial ++ ports. If unsure, say N. ++ + config SERIAL_8250_RM9K + bool "Support for MIPS RM9xxx integrated serial port" + depends on SERIAL_8250 != n && SERIAL_RM9000 +--- a/include/linux/serial_core.h ++++ b/include/linux/serial_core.h +@@ -325,7 +325,7 @@ struct uart_port { + #define UPIO_HUB6 (1) + #define UPIO_MEM (2) + #define UPIO_MEM32 (3) +-#define UPIO_AU (4) /* Au1x00 type IO */ ++#define UPIO_AU (4) /* Au1x00 and RT288x type IO */ + #define UPIO_TSI (5) /* Tsi108/109 type IO */ + #define UPIO_RM9000 (6) /* RM9000 type IO */ + +--- a/drivers/tty/serial/8250/8250.c ++++ b/drivers/tty/serial/8250/8250.c +@@ -305,9 +305,9 @@ static void default_serial_dl_write(stru + serial_out(up, UART_DLM, value >> 8 & 0xff); + } + +-#ifdef CONFIG_MIPS_ALCHEMY ++#if defined CONFIG_MIPS_ALCHEMY || defined (CONFIG_SERIAL_8250_RT288X) + +-/* Au1x00 UART hardware has a weird register layout */ ++/* Au1x00 and RT288x UART hardware has a weird register layout */ + static const u8 au_io_in_map[] = { + [UART_RX] = 0, + [UART_IER] = 2, +@@ -486,7 +486,7 @@ static void set_io_from_upio(struct uart + break; + #endif + +-#ifdef CONFIG_MIPS_ALCHEMY ++#if defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_SERIAL_8250_RT288X) + case UPIO_AU: + p->serial_in = au_serial_in; + p->serial_out = au_serial_out; +@@ -698,22 +698,19 @@ static int size_fifo(struct uart_8250_po + */ + static unsigned int autoconfig_read_divisor_id(struct uart_8250_port *p) + { +- unsigned char old_dll, old_dlm, old_lcr; ++ unsigned char old_lcr; ++ unsigned int old_dl; + unsigned int id; + + old_lcr = serial_in(p, UART_LCR); + serial_out(p, UART_LCR, UART_LCR_CONF_MODE_A); + +- old_dll = serial_in(p, UART_DLL); +- old_dlm = serial_in(p, UART_DLM); ++ old_dl = serial_dl_read(p); + +- serial_out(p, UART_DLL, 0); +- serial_out(p, UART_DLM, 0); ++ serial_dl_write(p, 0); ++ id = serial_dl_read(p); + +- id = serial_in(p, UART_DLL) | serial_in(p, UART_DLM) << 8; +- +- serial_out(p, UART_DLL, old_dll); +- serial_out(p, UART_DLM, old_dlm); ++ serial_dl_write(p, old_dl); + serial_out(p, UART_LCR, old_lcr); + + return id; +@@ -839,7 +836,7 @@ static int broken_efr(struct uart_8250_p + /* + * Exar ST16C2550 "A2" devices incorrectly detect as + * having an EFR, and report an ID of 0x0201. See +- * http://linux.derkeiler.com/Mailing-Lists/Kernel/2004-11/4812.html ++ * http://linux.derkeiler.com/Mailing-Lists/Kernel/2004-11/4812.html + */ + if (autoconfig_read_divisor_id(up) == 0x0201 && size_fifo(up) == 16) + return 1; |