From 50f83cd3327c5d24222b6375d77362c9ecdd29b5 Mon Sep 17 00:00:00 2001 From: blogic Date: Thu, 7 Jul 2011 20:20:46 +0000 Subject: adds 2 ASC related patches to lantiq Signed-off-by: Thomas Langer git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27549 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-2.6.32/990-fix-asc-drv-timeout.patch | 14 ++++++++++++ .../patches-2.6.32/990-fix-early_printk.patch | 26 ++++++++++++++++++++++ .../patches-2.6.39/990-fix-asc-drv-timeout.patch | 14 ++++++++++++ .../patches-2.6.39/990-fix-early_printk.patch | 26 ++++++++++++++++++++++ .../patches-3.0/990-fix-asc-drv-timeout.patch | 14 ++++++++++++ .../lantiq/patches-3.0/990-fix-early_printk.patch | 26 ++++++++++++++++++++++ 6 files changed, 120 insertions(+) create mode 100644 target/linux/lantiq/patches-2.6.32/990-fix-asc-drv-timeout.patch create mode 100644 target/linux/lantiq/patches-2.6.32/990-fix-early_printk.patch create mode 100644 target/linux/lantiq/patches-2.6.39/990-fix-asc-drv-timeout.patch create mode 100644 target/linux/lantiq/patches-2.6.39/990-fix-early_printk.patch create mode 100644 target/linux/lantiq/patches-3.0/990-fix-asc-drv-timeout.patch create mode 100644 target/linux/lantiq/patches-3.0/990-fix-early_printk.patch (limited to 'target/linux/lantiq') diff --git a/target/linux/lantiq/patches-2.6.32/990-fix-asc-drv-timeout.patch b/target/linux/lantiq/patches-2.6.32/990-fix-asc-drv-timeout.patch new file mode 100644 index 000000000..52b2a6138 --- /dev/null +++ b/target/linux/lantiq/patches-2.6.32/990-fix-asc-drv-timeout.patch @@ -0,0 +1,14 @@ +--- a/drivers/serial/lantiq.c ++++ b/drivers/serial/lantiq.c +@@ -478,8 +478,10 @@ + spin_unlock_irqrestore(<q_asc_lock, flags); + + /* Don't rewrite B0 */ +- if (tty_termios_baud_rate(new)) ++ if (tty_termios_baud_rate(new)) + tty_termios_encode_baud_rate(new, baud, baud); ++ ++ uart_update_timeout(port, cflag, baud); + } + + static const char* diff --git a/target/linux/lantiq/patches-2.6.32/990-fix-early_printk.patch b/target/linux/lantiq/patches-2.6.32/990-fix-early_printk.patch new file mode 100644 index 000000000..3b3b85690 --- /dev/null +++ b/target/linux/lantiq/patches-2.6.32/990-fix-early_printk.patch @@ -0,0 +1,26 @@ +--- a/arch/mips/lantiq/early_printk.c ++++ b/arch/mips/lantiq/early_printk.c +@@ -20,7 +20,12 @@ + #endif + #define ASC_BUF 1024 + #define LTQ_ASC_FSTAT ((u32 *)(LTQ_ASC_BASE + 0x0048)) +-#define LTQ_ASC_TBUF ((u32 *)(LTQ_ASC_BASE + 0x0020)) ++#ifdef __BIG_ENDIAN ++#define LTQ_ASC_TBUF ((u8 *)(LTQ_ASC_BASE + 0x0023)) ++#else ++#define LTQ_ASC_TBUF ((u8 *)(LTQ_ASC_BASE + 0x0020)) ++#endif ++ + #define TXMASK 0x3F00 + #define TXOFFSET 8 + +@@ -30,8 +35,6 @@ void prom_putchar(char c) + + local_irq_save(flags); + do { } while ((ltq_r32(LTQ_ASC_FSTAT) & TXMASK) >> TXOFFSET); +- if (c == '\n') +- ltq_w32('\r', LTQ_ASC_TBUF); +- ltq_w32(c, LTQ_ASC_TBUF); ++ ltq_w8(c, LTQ_ASC_TBUF); + local_irq_restore(flags); + } diff --git a/target/linux/lantiq/patches-2.6.39/990-fix-asc-drv-timeout.patch b/target/linux/lantiq/patches-2.6.39/990-fix-asc-drv-timeout.patch new file mode 100644 index 000000000..ccc01a772 --- /dev/null +++ b/target/linux/lantiq/patches-2.6.39/990-fix-asc-drv-timeout.patch @@ -0,0 +1,14 @@ +--- a/drivers/tty/serial/lantiq.c ++++ b/drivers/tty/serial/lantiq.c +@@ -478,8 +478,10 @@ lqasc_set_termios(struct uart_port *port + spin_unlock_irqrestore(<q_asc_lock, flags); + + /* Don't rewrite B0 */ +- if (tty_termios_baud_rate(new)) ++ if (tty_termios_baud_rate(new)) + tty_termios_encode_baud_rate(new, baud, baud); ++ ++ uart_update_timeout(port, cflag, baud); + } + + static const char* diff --git a/target/linux/lantiq/patches-2.6.39/990-fix-early_printk.patch b/target/linux/lantiq/patches-2.6.39/990-fix-early_printk.patch new file mode 100644 index 000000000..3b3b85690 --- /dev/null +++ b/target/linux/lantiq/patches-2.6.39/990-fix-early_printk.patch @@ -0,0 +1,26 @@ +--- a/arch/mips/lantiq/early_printk.c ++++ b/arch/mips/lantiq/early_printk.c +@@ -20,7 +20,12 @@ + #endif + #define ASC_BUF 1024 + #define LTQ_ASC_FSTAT ((u32 *)(LTQ_ASC_BASE + 0x0048)) +-#define LTQ_ASC_TBUF ((u32 *)(LTQ_ASC_BASE + 0x0020)) ++#ifdef __BIG_ENDIAN ++#define LTQ_ASC_TBUF ((u8 *)(LTQ_ASC_BASE + 0x0023)) ++#else ++#define LTQ_ASC_TBUF ((u8 *)(LTQ_ASC_BASE + 0x0020)) ++#endif ++ + #define TXMASK 0x3F00 + #define TXOFFSET 8 + +@@ -30,8 +35,6 @@ void prom_putchar(char c) + + local_irq_save(flags); + do { } while ((ltq_r32(LTQ_ASC_FSTAT) & TXMASK) >> TXOFFSET); +- if (c == '\n') +- ltq_w32('\r', LTQ_ASC_TBUF); +- ltq_w32(c, LTQ_ASC_TBUF); ++ ltq_w8(c, LTQ_ASC_TBUF); + local_irq_restore(flags); + } diff --git a/target/linux/lantiq/patches-3.0/990-fix-asc-drv-timeout.patch b/target/linux/lantiq/patches-3.0/990-fix-asc-drv-timeout.patch new file mode 100644 index 000000000..ccc01a772 --- /dev/null +++ b/target/linux/lantiq/patches-3.0/990-fix-asc-drv-timeout.patch @@ -0,0 +1,14 @@ +--- a/drivers/tty/serial/lantiq.c ++++ b/drivers/tty/serial/lantiq.c +@@ -478,8 +478,10 @@ lqasc_set_termios(struct uart_port *port + spin_unlock_irqrestore(<q_asc_lock, flags); + + /* Don't rewrite B0 */ +- if (tty_termios_baud_rate(new)) ++ if (tty_termios_baud_rate(new)) + tty_termios_encode_baud_rate(new, baud, baud); ++ ++ uart_update_timeout(port, cflag, baud); + } + + static const char* diff --git a/target/linux/lantiq/patches-3.0/990-fix-early_printk.patch b/target/linux/lantiq/patches-3.0/990-fix-early_printk.patch new file mode 100644 index 000000000..3b3b85690 --- /dev/null +++ b/target/linux/lantiq/patches-3.0/990-fix-early_printk.patch @@ -0,0 +1,26 @@ +--- a/arch/mips/lantiq/early_printk.c ++++ b/arch/mips/lantiq/early_printk.c +@@ -20,7 +20,12 @@ + #endif + #define ASC_BUF 1024 + #define LTQ_ASC_FSTAT ((u32 *)(LTQ_ASC_BASE + 0x0048)) +-#define LTQ_ASC_TBUF ((u32 *)(LTQ_ASC_BASE + 0x0020)) ++#ifdef __BIG_ENDIAN ++#define LTQ_ASC_TBUF ((u8 *)(LTQ_ASC_BASE + 0x0023)) ++#else ++#define LTQ_ASC_TBUF ((u8 *)(LTQ_ASC_BASE + 0x0020)) ++#endif ++ + #define TXMASK 0x3F00 + #define TXOFFSET 8 + +@@ -30,8 +35,6 @@ void prom_putchar(char c) + + local_irq_save(flags); + do { } while ((ltq_r32(LTQ_ASC_FSTAT) & TXMASK) >> TXOFFSET); +- if (c == '\n') +- ltq_w32('\r', LTQ_ASC_TBUF); +- ltq_w32(c, LTQ_ASC_TBUF); ++ ltq_w8(c, LTQ_ASC_TBUF); + local_irq_restore(flags); + } -- cgit v1.2.3