Skip to contentSkip to conversation

Blackfin Serial Driver bug fixing and update

PATCH In review Bryan Wu 5 participants 37 messages Mar 6, 2009 – Mar 11, 2009

lore
Share & tools
lore

Bryan Wu

author
#0 lore raw

cover Blackfin Serial Driver bug fixing and update

Hi Alan,

We still got 18 Blackfin serial driver patches pending here. Is that possible to merge them into 2.6.29 release?

Thanks
-Bryan

author
#1 lore raw

PATCH 1/18 Blackfin Serial Driver: Add a debug function to serial driver.

From: Graf Yang <[email protected]>

---
 drivers/serial/bfin_5xx.c |   44 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)
drivers/serial/bfin_5xx.c +44 -0
index 318d69d..52ccc27 100644
@@ -21,6 +21,7 @@
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
 #include <linux/serial_core.h>
+#include <stdarg.h>
 
 #if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
 	defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
@@ -1177,6 +1178,49 @@ struct console __init *bfin_earlyserial_init(unsigned int port,
 
 #endif /* CONFIG_EARLY_PRINTK */
 
+#ifdef CONFIG_DEBUG_KERNEL
+void bfin_serial_debug(const char *fmt, ...)
+{
+	struct bfin_serial_port *uart = &bfin_serial_ports[0];
+	unsigned short status, tmp;
+	int flags, i, count;
+	char buf[128];
+	va_list ap;
+
+	if (bfin_serial_console.index < 0)
+		return;		/* Too early. */
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	spin_lock_irqsave(&uart->port.lock, flags);
+
+	for (i = 0; i < count; i++) {
+		do {
+			status = UART_GET_LSR(uart);
+		} while (!(status & THRE));
+
+#ifndef CONFIG_BF54x
+		tmp = UART_GET_LCR(uart);
+		tmp &= ~DLAB;
+		UART_PUT_LCR(uart, tmp);
+#endif
+		UART_PUT_CHAR(uart, buf[i]);
+		if (buf[i] == '\n') {
+			do {
+				status = UART_GET_LSR(uart);
+			} while (!(status & THRE));
+			UART_PUT_CHAR(uart, '\r');
+		}
+	}
+
+	spin_unlock_irqrestore(&uart->port.lock, flags);
+}
+EXPORT_SYMBOL(bfin_serial_debug);
+#endif
+
 static struct uart_driver bfin_serial_reg = {
 	.owner			= THIS_MODULE,
 	.driver_name		= "bfin-uart",
Signature · 1 line
1.5.6.3
#2 lore raw

Re: [PATCH 01/18] Blackfin Serial Driver: Add a debug function to serial driver.

Quoted 56 lines · On Fri, 6 Mar 2009 14:42:43 +0800 Bryan Wu <[email protected]> wrote:

From: Graf Yang <[email protected]>

---
 drivers/serial/bfin_5xx.c |   44 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)
drivers/serial/bfin_5xx.c +33 -0
index 318d69d..52ccc27 100644
@@ -21,6 +21,7 @@
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
 #include <linux/serial_core.h>
+#include <stdarg.h>
 
 #if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
 	defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
@@ -1177,6 +1178,49 @@ struct console __init *bfin_earlyserial_init(unsigned int port,
 
 #endif /* CONFIG_EARLY_PRINTK */
 
+#ifdef CONFIG_DEBUG_KERNEL
+void bfin_serial_debug(const char *fmt, ...)
+{
+	struct bfin_serial_port *uart = &bfin_serial_ports[0];
+	unsigned short status, tmp;
+	int flags, i, count;
+	char buf[128];
+	va_list ap;
+
+	if (bfin_serial_console.index < 0)
+		return;		/* Too early. */
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	spin_lock_irqsave(&uart->port.lock, flags);
+
+	for (i = 0; i < count; i++) {
+		do {
+			status = UART_GET_LSR(uart);
+		} while (!(status & THRE));
+
+#ifndef CONFIG_BF54x
+		tmp = UART_GET_LCR(uart);
+		tmp &= ~DLAB;
+		UART_PUT_LCR(uart, tmp);
+#endif
+		UART_PUT_CHAR(uart, buf[i]);
+		if (buf[i] == '\n') {
+			do {

drivers/serial/bfin_5xx.c struct console __init *bfin_earlyserial_init(unsigned int port, · line 1222

Quoted 10 lines
drivers/serial/bfin_5xx.c +10 -0
+				status = UART_GET_LSR(uart);
+			} while (!(status & THRE));
+			UART_PUT_CHAR(uart, '\r');
+		}
+	}
+
+	spin_unlock_irqrestore(&uart->port.lock, flags);
+}
+EXPORT_SYMBOL(bfin_serial_debug);
+#endif

This function is used in later bugfix patches - otherwise it wouldn't be a 2.6.29 patch.

I shall update the changelog to reflect this.

author
#3 lore raw

PATCH 2/18 Blackfin Serial Driver: use barrier instead of cpu_relax for Blackfin SMP like patch

In reply to Bryan Wu

From: Graf Yang <[email protected]>

We are making a SMP like patch to blackfin, cpu_relax() is replaced by a data cache flush function which will count it to a per-cpu counter. If this serial function is called too early, the per-cpu data area have not been initialized, this call will cause crash.
So we'd like to use barrier() instead of cpu_relax().

---
 drivers/serial/bfin_5xx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/serial/bfin_5xx.c +2 -1
index 52ccc27..350bfc4 100644
@@ -1129,7 +1129,8 @@ static __init void early_serial_putc(struct uart_port *port, int ch)
 	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
 
 	while ((!(UART_GET_LSR(uart) & THRE)) && --timeout)
-		cpu_relax();
+		barrier();
+
 	UART_PUT_CHAR(uart, ch);
 }
 
Signature · 1 line
1.5.6.3
#4 lore raw

Re: [PATCH 02/18] Blackfin Serial Driver: use barrier instead of cpu_relax for Blackfin SMP like patch

Quoted 6 lines · On Fri, 6 Mar 2009 14:42:44 +0800 Bryan Wu <[email protected]> wrote:

From: Graf Yang <[email protected]>

We are making a SMP like patch to blackfin, cpu_relax() is replaced by a data cache flush function which will count it to a per-cpu counter. If this serial function is called too early, the per-cpu data area have not been initialized, this call will cause crash.

That's a bug in blackfin architecture support. The kernel should be able to call cpu_relax() at any time, surely. It's a very low-level and simple thing.

Quoted 2 lines

So we'd like to use barrier() instead of cpu_relax().

barrier() is purely a compiler concept. We might as well just remove the cpu_relax() altogether.

Quoted 8 lines
 drivers/serial/bfin_5xx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/serial/bfin_5xx.c +0 -0
index 52ccc27..350bfc4 100644

drivers/serial/bfin_5xx.c static __init void early_serial_putc(struct uart_port *port, int ch) · line 1135

Quoted 8 lines
drivers/serial/bfin_5xx.c +2 -1
@@ -1129,7 +1129,8 @@ static __init void early_serial_putc(struct uart_port *port, int ch)
 	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
 
 	while ((!(UART_GET_LSR(uart) & THRE)) && --timeout)
-		cpu_relax();
+		barrier();
+
 	UART_PUT_CHAR(uart, ch);
 }

I grumpily queued this, but it seems all wrong.

#5 lore raw

Re: [PATCH 02/18] Blackfin Serial Driver: use barrier instead of cpu_relax for Blackfin SMP like patch

Quoted 14 lines · Andrew Morton
Quoted 6 lines · On Fri, 6 Mar 2009 14:42:44 +0800 Bryan Wu <[email protected]> wrote:

From: Graf Yang <[email protected]>

We are making a SMP like patch to blackfin, cpu_relax() is replaced by a data cache flush function which will count it to a per-cpu counter. If this serial function is called too early, the per-cpu data area have not been initialized, this call will cause crash.

That's a bug in blackfin architecture support. The kernel should be able to call cpu_relax() at any time, surely. It's a very low-level and simple thing.

Quoted 5 lines
Quoted 2 lines

So we'd like to use barrier() instead of cpu_relax().

barrier() is purely a compiler concept. We might as well just remove the cpu_relax() altogether.

Do you mean remove cpu_relax(), and either not add barrier() here?

Quoted 20 lines
Quoted 10 lines

 drivers/serial/bfin_5xx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/serial/bfin_5xx.c +0 -0
index 52ccc27..350bfc4 100644

drivers/serial/bfin_5xx.c static __init void early_serial_putc(struct uart_port *port, int ch) · line 1135

Quoted 8 lines
drivers/serial/bfin_5xx.c +2 -1
@@ -1129,7 +1129,8 @@ static __init void early_serial_putc(struct uart_port *port, int ch)
 	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
 
 	while ((!(UART_GET_LSR(uart) & THRE)) && --timeout)
-		cpu_relax();
+		barrier();
+
 	UART_PUT_CHAR(uart, ch);
 }

I grumpily queued this, but it seems all wrong.

#6 lore raw

Re: [PATCH 02/18] Blackfin Serial Driver: use barrier instead of cpu_relax for Blackfin SMP like patch

Quoted 15 lines · gyang
Quoted 14 lines · Andrew Morton
Quoted 6 lines · On Fri,  6 Mar 2009 14:42:44 +0800 Bryan Wu <[email protected]> wrote:

From: Graf Yang <[email protected]>

We are making a SMP like patch to blackfin, cpu_relax() is replaced by a data cache flush function which will count it to a per-cpu counter. If this serial function is called too early, the per-cpu data area have not been initialized, this call will cause crash.

That's a bug in blackfin architecture support.  The kernel should be able to call cpu_relax() at any time, surely.  It's a very low-level and simple thing.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

So we'd like to use barrier() instead of cpu_relax().

barrier() is purely a compiler concept.  We might as well just remove the cpu_relax() altogether.

Do you mean remove cpu_relax(), and either not add barrier() here?

afaik, early printk all runs before SMP is setup, so having it be a 100% busy wait is fine
-mike

#7 lore raw

Re: [PATCH 02/18] Blackfin Serial Driver: use barrier instead of cpu_relax for Blackfin SMP like patch

Quoted 19 lines · On Tue, 10 Mar 2009 06:25:08 -0400 Mike Frysinger <[email protected]> wrote:
Quoted 18 lines · gyang
Quoted 17 lines · Andrew Morton
Quoted 6 lines · On Fri,  6 Mar 2009 14:42:44 +0800 Bryan Wu <[email protected]> wrote:

From: Graf Yang <[email protected]>

We are making a SMP like patch to blackfin, cpu_relax() is replaced by a data cache flush function which will count it to a per-cpu counter. If this serial function is called too early, the per-cpu data area have not been initialized, this call will cause crash.

That's a bug in blackfin architecture support.  The kernel should be able to call cpu_relax() at any time, surely.  It's a very low-level and simple thing.

Quoted 2 lines

So we'd like to use barrier() instead of cpu_relax().

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

barrier() is purely a compiler concept.  We might as well just remove the cpu_relax() altogether.

Do you mean remove cpu_relax(), and either not add barrier() here?

afaik, early printk all runs before SMP is setup, so having it be a 100% busy wait is fine

No, blackfin is busted, please fix this bug in blackfin core.

What happens if core kernel code decides to run cpu_relax() prior to initialising per-cpu data?

#8 lore raw

Re: [PATCH 02/18] Blackfin Serial Driver: use barrier instead of cpu_relax for Blackfin SMP like patch

Quoted 27 lines · Andrew Morton
Quoted 24 lines · On Tue, 10 Mar 2009 06:25:08 -0400 Mike Frysinger <[email protected]> wrote:
Quoted 22 lines · gyang
Quoted 14 lines · Andrew Morton
Quoted 6 lines · On Fri,  6 Mar 2009 14:42:44 +0800 Bryan Wu <[email protected]> wrote:

From: Graf Yang <[email protected]>

We are making a SMP like patch to blackfin, cpu_relax() is replaced by a data cache flush function which will count it to a per-cpu counter. If this serial function is called too early, the per-cpu data area have not been initialized, this call will cause crash.

That's a bug in blackfin architecture support.  The kernel should be able to call cpu_relax() at any time, surely.  It's a very low-level and simple thing.

Quoted 5 lines
Quoted 2 lines

So we'd like to use barrier() instead of cpu_relax().

barrier() is purely a compiler concept.  We might as well just remove the cpu_relax() altogether.

Do you mean remove cpu_relax(), and either not add barrier() here?

Quoted 7 lines
Quoted 2 lines

afaik, early printk all runs before SMP is setup, so having it be a 100% busy wait is fine

No, blackfin is busted, please fix this bug in blackfin core.

What happens if core kernel code decides to run cpu_relax() prior to initialising per-cpu data?

cpu_relax() will call smp_mb(), and it need to invalidate data-cache in blackfin smp-like kernel,
the cache flush number is increased and recorded into a per-cpu data.

When cpu_relax() is called from early-printk functions, the per-cpu data areas have not
been initialized.

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

--
-Graff

#9 lore raw

Re: [PATCH 02/18] Blackfin Serial Driver: use barrier instead of cpu_relax for Blackfin SMP like patch

Quoted 37 lines · On Wed, 11 Mar 2009 17:50:21 +0800 graff yang <[email protected]> wrote:
Quoted 27 lines · Andrew Morton
Quoted 24 lines · On Tue, 10 Mar 2009 06:25:08 -0400 Mike Frysinger <[email protected]> wrote:
Quoted 22 lines · gyang
Quoted 14 lines · Andrew Morton
Quoted 6 lines · On Fri, __6 Mar 2009 14:42:44 +0800 Bryan Wu <[email protected]> wrote:

From: Graf Yang <[email protected]>

We are making a SMP like patch to blackfin, cpu_relax() is replaced by a data cache flush function which will count it to a per-cpu counter. If this serial function is called too early, the per-cpu data area have not been initialized, this call will cause crash.

That's a bug in blackfin architecture support. __The kernel should be able to call cpu_relax() at any time, surely. __It's a very low-level and simple thing.

Quoted 5 lines
Quoted 2 lines

So we'd like to use barrier() instead of cpu_relax().

barrier() is purely a compiler concept. __We might as well just remove the cpu_relax() altogether.

Do you mean remove cpu_relax(), and either not add barrier() here?

Quoted 7 lines
Quoted 2 lines

afaik, early printk all runs before SMP is setup, so having it be a 100% busy wait is fine

No, blackfin is busted, please fix this bug in blackfin core.

What happens if core kernel code decides to run cpu_relax() prior to initialising per-cpu data?

Quoted 7 lines

cpu_relax() will call smp_mb(), and it need to invalidate data-cache in blackfin smp-like kernel,
the cache flush number is increased and recorded into a per-cpu data.

When cpu_relax() is called from early-printk functions, the per-cpu data areas have not
been initialized.

Right. And we've demonstrated here that this was a bad idea.

So I suggest that the blackfin maintainers delete that code.

If it's really valuable (which I doubt) then it could be reimplemented via a statically-allocated array of longs and local_irq_save() protection. Or a statically allocated array of atomic_long_t's.

author
#10 lore raw

PATCH 3/18 Blackfin Serial Driver: fix a in dma circle rx buffer handling

In reply to Bryan Wu

From: Sonic Zhang <[email protected]>

---
 drivers/serial/bfin_5xx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/serial/bfin_5xx.c +3 -1
index 350bfc4..1e027e3 100644
@@ -402,9 +402,11 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
 	else
 		flg = TTY_NORMAL;
 
-	for (i = uart->rx_dma_buf.tail; i != uart->rx_dma_buf.head; i++) {
+	for (i = uart->rx_dma_buf.tail; ; i++) {
 		if (i >= UART_XMIT_SIZE)
 			i = 0;
+		if (i == uart->rx_dma_buf.head)
+			break;
 		if (!uart_handle_sysrq_char(&uart->port, uart->rx_dma_buf.buf[i]))
 			uart_insert_char(&uart->port, status, OE,
 				uart->rx_dma_buf.buf[i], flg);
Signature · 1 line
1.5.6.3
#11 lore raw

Re: [PATCH 03/18] Blackfin Serial Driver: fix a in dma circle rx buffer handling

Quoted 1 line · On Fri, 6 Mar 2009 14:42:45 +0800 Bryan Wu <[email protected]> wrote:

Subject: [PATCH 03/18] Blackfin Serial Driver: fix a in dma circle rx buffer handling

I changed this to "fix a bug"

Quoted 9 lines

Date: Fri, 6 Mar 2009 14:42:45 +0800
Sender: [email protected]
X-Mailer: git-send-email 1.5.6.3

From: Sonic Zhang <[email protected]>

No changelog.

Quoted 10 lines
 drivers/serial/bfin_5xx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/serial/bfin_5xx.c +0 -0
index 350bfc4..1e027e3 100644
@@ -402,9 +402,11 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
 	else
 		flg = TTY_NORMAL;

drivers/serial/bfin_5xx.c static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart) · line 412

Quoted 10 lines
drivers/serial/bfin_5xx.c +3 -1
 
-	for (i = uart->rx_dma_buf.tail; i != uart->rx_dma_buf.head; i++) {
+	for (i = uart->rx_dma_buf.tail; ; i++) {
 		if (i >= UART_XMIT_SIZE)
 			i = 0;
+		if (i == uart->rx_dma_buf.head)
+			break;
 		if (!uart_handle_sysrq_char(&uart->port, uart->rx_dma_buf.buf[i]))
 			uart_insert_char(&uart->port, status, OE,
 				uart->rx_dma_buf.buf[i], flg);

The fix is not sufficiently obvious to justify the omission of a changelog.

Please always include a changelog unless the patch is quite obvious.

Please send a changelog entry for this patch. This one should contain a description of the bug and a description of how it was fixed. A bugfix's changelog should also provide the reviewer with an understanding of the seriousness of the bug - what impact does it have upon users? Because without this information we cannot decide into which kernel version(s) the code should be merged.

It is alse very useful if the maintainer and/or patch submitter provide information about which kernel versions are affected and whether the fix should be backported into -stable kerenls and if so, why.

Bryan, I should not need to explain all this stuff to you. Please don't let this happen again.

author
#12 lore raw

PATCH 4/18 Blackfin Serial Driver: Change hardware flowcontrol from poll to interrupt driven.

In reply to Bryan Wu

From: Sonic Zhang <[email protected]>

Only CTS bit is affected.

---
 .../mach-bf527/include/mach/bfin_serial_5xx.h      |   26 ----
 .../mach-bf533/include/mach/bfin_serial_5xx.h      |   20 ---
 .../mach-bf537/include/mach/bfin_serial_5xx.h      |   27 ----
 .../mach-bf548/include/mach/bfin_serial_5xx.h      |   45 -------
 .../mach-bf561/include/mach/bfin_serial_5xx.h      |   20 ---
 drivers/serial/bfin_5xx.c                          |  131 ++++++++++++--------
 6 files changed, 82 insertions(+), 187 deletions(-)
arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h +0 -26
index e8c41fd..d2b160c 100644
@@ -167,29 +167,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
 };
 
 #define DRIVER_NAME "bfin-uart"
-
-static void bfin_serial_hw_init(struct bfin_serial_port *uart)
-{
-
-#ifdef CONFIG_SERIAL_BFIN_UART0
-	peripheral_request(P_UART0_TX, DRIVER_NAME);
-	peripheral_request(P_UART0_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_UART1
-	peripheral_request(P_UART1_TX, DRIVER_NAME);
-	peripheral_request(P_UART1_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-	if (uart->cts_pin >= 0) {
-		gpio_request(uart->cts_pin, DRIVER_NAME);
-		gpio_direction_input(uart->cts_pin);
-	}
-
-	if (uart->rts_pin >= 0) {
-		gpio_request(uart->rts_pin, DRIVER_NAME);
-		gpio_direction_output(uart->rts_pin, 0);
-	}
-#endif
-}
arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h +0 -20
index 5f517f5..70356dd 100644
@@ -142,23 +142,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
 };
 
 #define DRIVER_NAME "bfin-uart"
-
-static void bfin_serial_hw_init(struct bfin_serial_port *uart)
-{
-
-#ifdef CONFIG_SERIAL_BFIN_UART0
-	peripheral_request(P_UART0_TX, DRIVER_NAME);
-	peripheral_request(P_UART0_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-	if (uart->cts_pin >= 0) {
-		gpio_request(uart->cts_pin, DRIVER_NAME);
-		gpio_direction_input(uart->cts_pin);
-	}
-	if (uart->rts_pin >= 0) {
-		gpio_request(uart->rts_pin, DRIVER_NAME);
-		gpio_direction_output(uart->rts_pin, 0);
-	}
-#endif
-}
arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h +0 -27
index 9e34700..d46fc4f 100644
@@ -99,7 +99,6 @@ struct bfin_serial_port {
 	struct work_struct	tx_dma_workqueue;
 #endif
 #ifdef CONFIG_SERIAL_BFIN_CTSRTS
-	struct timer_list 	cts_timer;
 	int		cts_pin;
 	int 		rts_pin;
 #endif
@@ -167,29 +166,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
 };
 
 #define DRIVER_NAME "bfin-uart"
-
-static void bfin_serial_hw_init(struct bfin_serial_port *uart)
-{
-
-#ifdef CONFIG_SERIAL_BFIN_UART0
-	peripheral_request(P_UART0_TX, DRIVER_NAME);
-	peripheral_request(P_UART0_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_UART1
-	peripheral_request(P_UART1_TX, DRIVER_NAME);
-	peripheral_request(P_UART1_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-	if (uart->cts_pin >= 0) {
-		gpio_request(uart->cts_pin, DRIVER_NAME);
-		gpio_direction_input(uart->cts_pin);
-	}
-
-	if (uart->rts_pin >= 0) {
-		gpio_request(uart->rts_pin, DRIVER_NAME);
-		gpio_direction_output(uart->rts_pin, 0);
-	}
-#endif
-}
arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h +0 -45

48 lines not on this page · raw message

arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h +0 -20
index ca8c5f6..d0469e3 100644
@@ -142,23 +142,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
 };
 
 #define DRIVER_NAME "bfin-uart"
-
-static void bfin_serial_hw_init(struct bfin_serial_port *uart)
-{
-
-#ifdef CONFIG_SERIAL_BFIN_UART0
-	peripheral_request(P_UART0_TX, DRIVER_NAME);
-	peripheral_request(P_UART0_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-	if (uart->cts_pin >= 0) {
-		gpio_request(uart->cts_pin, DRIVER_NAME);
-		gpio_direction_input(uart->cts_pin);
-	}
-	if (uart->rts_pin >= 0) {
-		gpio_request(uart->rts_pin, DRIVER_NAME);
-		gpio_direction_output(uart->rts_pin, 0);
-	}
-#endif
-}
drivers/serial/bfin_5xx.c +82 -49

227 lines not on this page · raw message

Signature · 1 line
1.5.6.3
#13 lore raw

Re: [PATCH 04/18] Blackfin Serial Driver: Change hardware flowcontrol from poll to interrupt driven.

Quoted 6 lines · On Fri, 6 Mar 2009 14:42:46 +0800 Bryan Wu <[email protected]> wrote:

From: Sonic Zhang <[email protected]>

Only CTS bit is affected.

Another completely useless changelog.

Your [PATCH 00/18] email described all these patches as needed-in-2.6.29 bugfixes. As far as I can tell (based on almost zero information), this patch is not a bugfix.

#14 lore raw

Re: [PATCH 04/18] Blackfin Serial Driver: Change hardware flowcontrol from poll to interrupt driven.

Quoted 9 lines · Andrew Morton
Quoted 6 lines · On Fri,  6 Mar 2009 14:42:46 +0800 Bryan Wu wrote:

From: Sonic Zhang <[email protected]>

Only CTS bit is affected.

Another completely useless changelog.

the summary, while brief, describes the change: the flowcontrol is currently implemented by polling, but this changes it to an interrupt based system

Quoted 3 lines

Your [PATCH 00/18] email described all these patches as needed-in-2.6.29 bugfixes.  As far as I can tell (based on almost zero information), this patch is not a bugfix.

because the current implementation is polling (busy waiting), the kernel will basically hang when the remote asserts hardware flowcontrol pins. if this is only asserted for short periods (less than 1 char time), then it's not really noticed ... but it still destroys latencies.
-mike

#15 lore raw

Re: [PATCH 04/18] Blackfin Serial Driver: Change hardware flowcontrol from poll to interrupt driven.

Quoted 6 lines · On Fri, 6 Mar 2009 17:49:13 -0500 Mike Frysinger <[email protected]> wrote:
Quoted 5 lines · Andrew Morton
Quoted 4 lines · On Fri, __6 Mar 2009 14:42:46 +0800 Bryan Wu wrote:

From: Sonic Zhang <[email protected]>

Only CTS bit is affected.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Another completely useless changelog.

the summary, while brief, describes the change: the flowcontrol is currently implemented by polling, but this changes it to an interrupt based system

yes, but it doesn't explain why the change was made.

Quoted 9 lines
Quoted 3 lines

Your [PATCH 00/18] email described all these patches as needed-in-2.6.29 bugfixes. __As far as I can tell (based on almost zero information), this patch is not a bugfix.

because the current implementation is polling (busy waiting), the kernel will basically hang when the remote asserts hardware flowcontrol pins. if this is only asserted for short periods (less than 1 char time), then it's not really noticed ... but it still destroys latencies.

That.

Please send through replacement changelogs for all the patches which I complained about. Then I'll pick through it all and see what we can do about a 2.6.29 merge.

author
#16 lore raw

PATCH 5/18 Blackfin Serial Driver: fix bug - serial port transfer big file from host to target would have more lines

In reply to Bryan Wu

From: Sonic Zhang <[email protected]>

Ignore receiving data if new position is in the same line of current buffer tail and small.

---
 drivers/serial/bfin_5xx.c |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)
drivers/serial/bfin_5xx.c +29 -2
index 8d34ccd..5a163f6 100644
@@ -407,6 +407,15 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
 
 	spin_lock_irqsave(&uart->port.lock, flags);
 
+	/* 2D DMA RX buffer ring is used. Because curr_y_count and
+	 * curr_x_count can't be read as an atomic operation,
+	 * curr_y_count should be read before curr_x_count. When
+	 * curr_x_count is read, curr_y_count may already indicate
+	 * next buffer line. But, the position calculated here is
+	 * still indicate the old line. The wrong position data may
+	 * be smaller than current buffer tail, which cause garbages
+	 * are received if it is not prohibit.
+	 */
 	uart->rx_dma_nrows = get_dma_curr_ycount(uart->rx_dma_channel);
 	x_pos = get_dma_curr_xcount(uart->rx_dma_channel);
 	uart->rx_dma_nrows = DMA_RX_YCOUNT - uart->rx_dma_nrows;
@@ -417,7 +426,11 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
 		x_pos = 0;
 
 	pos = uart->rx_dma_nrows * DMA_RX_XCOUNT + x_pos;
-	if (pos != uart->rx_dma_buf.tail) {
+	/* Ignore receiving data if new position is in the same line of
+	 * current buffer tail and small.
+	 */
+	if (pos > uart->rx_dma_buf.tail ||
+		uart->rx_dma_nrows < (uart->rx_dma_buf.tail/DMA_RX_XCOUNT)) {
 		uart->rx_dma_buf.head = pos;
 		bfin_serial_dma_rx_chars(uart);
 		uart->rx_dma_buf.tail = uart->rx_dma_buf.head;
@@ -455,11 +468,25 @@ static irqreturn_t bfin_serial_dma_rx_int(int irq, void *dev_id)
 {
 	struct bfin_serial_port *uart = dev_id;
 	unsigned short irqstat;
+	int pos;
 
 	spin_lock(&uart->port.lock);
 	irqstat = get_dma_curr_irqstat(uart->rx_dma_channel);
 	clear_dma_irqstat(uart->rx_dma_channel);
-	bfin_serial_dma_rx_chars(uart);
+
+	uart->rx_dma_nrows = get_dma_curr_ycount(uart->rx_dma_channel);
+	uart->rx_dma_nrows = DMA_RX_YCOUNT - uart->rx_dma_nrows;
+	if (uart->rx_dma_nrows == DMA_RX_YCOUNT)
+		uart->rx_dma_nrows = 0;
+
+	pos = uart->rx_dma_nrows * DMA_RX_XCOUNT;
+	if (pos > uart->rx_dma_buf.tail ||
+		uart->rx_dma_nrows < (uart->rx_dma_buf.tail/DMA_RX_XCOUNT)) {
+		uart->rx_dma_buf.head = pos;
+		bfin_serial_dma_rx_chars(uart);
+		uart->rx_dma_buf.tail = uart->rx_dma_buf.head;
+	}
+
 	spin_unlock(&uart->port.lock);
 
 	return IRQ_HANDLED;
Signature · 1 line
1.5.6.3
#17 lore raw

Re: [PATCH 05/18] Blackfin Serial Driver: fix bug - serial port transfer big file from host to target would have more lines

Quoted 7 lines · On Fri, 6 Mar 2009 14:42:47 +0800 Bryan Wu <[email protected]> wrote:

From: Sonic Zhang <[email protected]>

Ignore receiving data if new position is in the same line of current buffer tail and small.

Changelog fails to describe the bug which is being fixed, and fails to describe the impact of that bug and fails to explain _why_ this change is being made. I presently have no reason to merge this into 2.6.29.

author
#18 lore raw

PATCH 6/18 Blackfin Serial Driver: explain why we cannot cpu_relax() in early serial code

In reply to Bryan Wu

From: Mike Frysinger <[email protected]>

---
 drivers/serial/bfin_5xx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/serial/bfin_5xx.c +4 -0
index 5a163f6..de8709d 100644
@@ -1190,6 +1190,10 @@ static __init void early_serial_putc(struct uart_port *port, int ch)
 	unsigned timeout = 0xffff;
 	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
 
+	/* We cannot cpu_relax() here as doing so on the BF561 relies
+	 * on the per-cpu region being setup, and since this is early
+	 * serial code, it may not yet be usable ...
+	 */
 	while ((!(UART_GET_LSR(uart) & THRE)) && --timeout)
 		barrier();
 
Signature · 1 line
1.5.6.3
#19 lore raw

Re: [PATCH 06/18] Blackfin Serial Driver: explain why we cannot cpu_relax() in early serial code

Quoted 13 lines · On Fri, 6 Mar 2009 14:42:48 +0800 Bryan Wu <[email protected]> wrote:

From: Mike Frysinger <[email protected]>

---
 drivers/serial/bfin_5xx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/serial/bfin_5xx.c +0 -0
index 5a163f6..de8709d 100644

drivers/serial/bfin_5xx.c static __init void early_serial_putc(struct uart_port *port, int ch) · line 1198

Quoted 9 lines
drivers/serial/bfin_5xx.c +4 -0
@@ -1190,6 +1190,10 @@ static __init void early_serial_putc(struct uart_port *port, int ch)
 	unsigned timeout = 0xffff;
 	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
 
+	/* We cannot cpu_relax() here as doing so on the BF561 relies
+	 * on the per-cpu region being setup, and since this is early
+	 * serial code, it may not yet be usable ...
+	 */
 	while ((!(UART_GET_LSR(uart) & THRE)) && --timeout)
 		barrier();

Again: this is blackfin core breakage.

author
#20 lore raw

PATCH 7/18 Blackfin Serial Driver: BF538/9 Linux kernel Support

In reply to Bryan Wu

From: Michael Hennerich <[email protected]>

Enable third UART on BF538/9

---
 drivers/serial/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/serial/Kconfig +1 -1
index 7d7f576..d2082fd 100644
@@ -770,7 +770,7 @@ config UART1_RTS_PIN
 
 config SERIAL_BFIN_UART2
 	bool "Enable UART2"
-	depends on SERIAL_BFIN && (BF54x)
+	depends on SERIAL_BFIN && (BF54x || BF538 || BF539)
 	help
 	  Enable UART2
 
Signature · 1 line
1.5.6.3
author
#21 lore raw

PATCH 8/18 Blackfin Serial Driver: use "unsigned long" for flags with irq functions rather than "int"

In reply to Bryan Wu

From: Mike Frysinger <[email protected]>

---
 drivers/serial/bfin_5xx.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/serial/bfin_5xx.c +3 -2
index de8709d..2eab47e 100644
@@ -403,7 +403,8 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
 
 void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
 {
-	int x_pos, pos, flags;
+	int x_pos, pos;
+	unsigned long flags;
 
 	spin_lock_irqsave(&uart->port.lock, flags);
 
@@ -1151,7 +1152,7 @@ static void
 bfin_serial_console_write(struct console *co, const char *s, unsigned int count)
 {
 	struct bfin_serial_port *uart = &bfin_serial_ports[co->index];
-	int flags = 0;
+	unsigned long flags;
 
 	spin_lock_irqsave(&uart->port.lock, flags);
 	uart_console_write(&uart->port, s, count, bfin_serial_console_putchar);
Signature · 1 line
1.5.6.3
author
#22 lore raw

PATCH 9/18 Blackfin Serial Driver: irq funcs take an unsigned long for flags

In reply to Bryan Wu

From: Mike Frysinger <[email protected]>

---
 drivers/serial/bfin_5xx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/serial/bfin_5xx.c +2 -1
index 2eab47e..130e321 100644
@@ -1251,7 +1251,8 @@ void bfin_serial_debug(const char *fmt, ...)
 {
 	struct bfin_serial_port *uart = &bfin_serial_ports[0];
 	unsigned short status, tmp;
-	int flags, i, count;
+	unsigned long flags;
+	int i, count;
 	char buf[128];
 	va_list ap;
 
Signature · 1 line
1.5.6.3
author
#23 lore raw

PATCH 10/18 Blackfin Serial Driver: fix compile error in PIO mode

In reply to Bryan Wu

From: Sonic Zhang <[email protected]>

drivers/serial/bfin_5xx.c: In function bfin_serial_rx_chars:
drivers/serial/bfin_5xx.c:178: error: struct uart_info has no member
named tty
make[3]: *** [drivers/serial/bfin_5xx.o] Error 1
make[2]: *** [drivers/serial] Error 2
make[1]: *** [drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/root/projects/uClinux-dist/linux-2.6.x'
make: *** [linux] Error 1

---
 drivers/serial/bfin_5xx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/serial/bfin_5xx.c +2 -2
index 130e321..5193d62 100644
@@ -172,10 +172,10 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
 			return;
 		}
 
-	if (!uart->port.info || !uart->port.info->tty)
+	if (!uart->port.info || !uart->port.info->port.tty)
 		return;
 #endif
-	tty = uart->port.info->tty;
+	tty = uart->port.info->port.tty;
 
 	if (ANOMALY_05000363) {
 		/* The BF533 (and BF561) family of processors have a nice anomaly
Signature · 1 line
1.5.6.3
author
#24 lore raw

PATCH 11/18 Blackfin Serial Driver: update KGDB UART config name

In reply to Bryan Wu

From: Mike Frysinger <[email protected]>

---
 drivers/serial/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/serial/Kconfig +1 -1
index d2082fd..21936c1 100644
@@ -700,7 +700,7 @@ choice
 
 config SERIAL_BFIN_DMA
 	bool "DMA mode"
-	depends on !DMA_UNCACHED_NONE && !KGDB_UART
+	depends on !DMA_UNCACHED_NONE && !KGDB_SERIAL_CONSOLE
 	help
 	  This driver works under DMA mode. If this option is selected, the
 	  blackfin simple dma driver is also enabled.
Signature · 1 line
1.5.6.3
author
#25 lore raw

PATCH 12/18 Blackfin Serial Driver: fix building when debug is enabled but serial console is disabled

In reply to Bryan Wu

From: Mike Frysinger <[email protected]>

---
 drivers/serial/bfin_5xx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/serial/bfin_5xx.c +2 -0
index 5193d62..b89861d 100644
@@ -1256,8 +1256,10 @@ void bfin_serial_debug(const char *fmt, ...)
 	char buf[128];
 	va_list ap;
 
+#ifdef CONFIG_SERIAL_BFIN_CONSOLE
 	if (bfin_serial_console.index < 0)
 		return;		/* Too early. */
+#endif
 
 	va_start(ap, fmt);
 	vsprintf(buf, fmt, ap);
Signature · 1 line
1.5.6.3
author
#26 lore raw

PATCH 13/18 Blackfin Serial Driver: depend on KGDB_SERIAL_CONSOLE being set to N

In reply to Bryan Wu

From: Mike Frysinger <[email protected]>

Depend on KGDB_SERIAL_CONSOLE being set to N rather than !Y, since it can be built as a module.

---
 drivers/serial/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/serial/Kconfig +1 -1
index 21936c1..87f41ed 100644
@@ -700,7 +700,7 @@ choice
 
 config SERIAL_BFIN_DMA
 	bool "DMA mode"
-	depends on !DMA_UNCACHED_NONE && !KGDB_SERIAL_CONSOLE
+	depends on !DMA_UNCACHED_NONE && KGDB_SERIAL_CONSOLE=n
 	help
 	  This driver works under DMA mode. If this option is selected, the
 	  blackfin simple dma driver is also enabled.
Signature · 1 line
1.5.6.3
author
#27 lore raw

PATCH 14/18 Blackfin Serial Driver: use the DLAB macro to hide variant differences

In reply to Bryan Wu

From: Mike Frysinger <[email protected]>

---
 drivers/serial/bfin_5xx.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
drivers/serial/bfin_5xx.c +2 -6
index b89861d..71a9e6b 100644
@@ -1250,7 +1250,7 @@ struct console __init *bfin_earlyserial_init(unsigned int port,
 void bfin_serial_debug(const char *fmt, ...)
 {
 	struct bfin_serial_port *uart = &bfin_serial_ports[0];
-	unsigned short status, tmp;
+	unsigned short status;
 	unsigned long flags;
 	int i, count;
 	char buf[128];
@@ -1273,11 +1273,7 @@ void bfin_serial_debug(const char *fmt, ...)
 			status = UART_GET_LSR(uart);
 		} while (!(status & THRE));
 
-#ifndef CONFIG_BF54x
-		tmp = UART_GET_LCR(uart);
-		tmp &= ~DLAB;
-		UART_PUT_LCR(uart, tmp);
-#endif
+		UART_CLEAR_DLAB(uart);
 		UART_PUT_CHAR(uart, buf[i]);
 		if (buf[i] == '\n') {
 			do {
Signature · 1 line
1.5.6.3
#28 lore raw

Re: [PATCH 14/18] Blackfin Serial Driver: use the DLAB macro to hide variant differences

Quoted 24 lines · On Fri, 6 Mar 2009 14:42:56 +0800 Bryan Wu <[email protected]> wrote:

From: Mike Frysinger <[email protected]>

---
 drivers/serial/bfin_5xx.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
drivers/serial/bfin_5xx.c +1 -1
index b89861d..71a9e6b 100644
@@ -1250,7 +1250,7 @@ struct console __init *bfin_earlyserial_init(unsigned int port,
 void bfin_serial_debug(const char *fmt, ...)
 {
 	struct bfin_serial_port *uart = &bfin_serial_ports[0];
-	unsigned short status, tmp;
+	unsigned short status;
 	unsigned long flags;
 	int i, count;
 	char buf[128];
@@ -1273,11 +1273,7 @@ void bfin_serial_debug(const char *fmt, ...)
 			status = UART_GET_LSR(uart);
 		} while (!(status & THRE));

drivers/serial/bfin_5xx.c void bfin_serial_debug(const char *fmt, ...) · line 1279

Quoted 10 lines
drivers/serial/bfin_5xx.c +1 -5
 
-#ifndef CONFIG_BF54x
-		tmp = UART_GET_LCR(uart);
-		tmp &= ~DLAB;
-		UART_PUT_LCR(uart, tmp);
-#endif
+		UART_CLEAR_DLAB(uart);
 		UART_PUT_CHAR(uart, buf[i]);
 		if (buf[i] == '\n') {
 			do {

This appears to be a small cleanup, not a bugfix.

I'm OK with sneaking the odd non-bugfix into late -rc by accident - it's not teribly important, and getting the main bugs fixed overwhelms such considerations.

However I have a sneaky suspicion that this patch might actually fix a bug, only we weren't told about it?

#29 lore raw

Re: [PATCH 14/18] Blackfin Serial Driver: use the DLAB macro to hide variant differences

Quoted 38 lines · Andrew Morton
Quoted 24 lines · On Fri,  6 Mar 2009 14:42:56 +0800 Bryan Wu wrote:

From: Mike Frysinger <[email protected]>

---
 drivers/serial/bfin_5xx.c |    8 ++------

 1 files changed, 2 insertions(+), 6 deletions(-)
drivers/serial/bfin_5xx.c +1 -1
index b89861d..71a9e6b 100644
@@ -1250,7 +1250,7 @@ struct console __init *bfin_earlyserial_init(unsigned int port,
  void bfin_serial_debug(const char *fmt, ...)
  {
       struct bfin_serial_port *uart = &bfin_serial_ports[0];
-     unsigned short status, tmp;
+     unsigned short status;
       unsigned long flags;
       int i, count;
       char buf[128];
@@ -1273,11 +1273,7 @@ void bfin_serial_debug(const char *fmt, ...)
                       status = UART_GET_LSR(uart);
               } while (!(status & THRE));

drivers/serial/bfin_5xx.c void bfin_serial_debug(const char *fmt, ...) · line 1279

Quoted 10 lines
drivers/serial/bfin_5xx.c +1 -5
 
-#ifndef CONFIG_BF54x
-             tmp = UART_GET_LCR(uart);
-             tmp &= ~DLAB;
-             UART_PUT_LCR(uart, tmp);
-#endif
+             UART_CLEAR_DLAB(uart);
               UART_PUT_CHAR(uart, buf[i]);
               if (buf[i] == '\n') {
                       do {

This appears to be a small cleanup, not a bugfix.

Quoted 6 lines

I'm OK with sneaking the odd non-bugfix into late -rc by accident - it's not teribly important, and getting the main bugs fixed overwhelms such considerations.

However I have a sneaky suspicion that this patch might actually fix a bug, only we weren't told about it?

fixes an unused var warning. not really a "bug", but ... -mike

author
#30 lore raw

PATCH 15/18 Blackfin Serial Driver: merge the upstream adeos/xenomai

In reply to Bryan Wu

From: Philippe Gerum <[email protected]>

add ipipe serial debug function for adeos

---
 drivers/serial/bfin_5xx.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)
drivers/serial/bfin_5xx.c +45 -0
index 71a9e6b..8aa0e37 100644
@@ -1145,6 +1145,51 @@ static void bfin_serial_console_putchar(struct uart_port *port, int ch)
 	SSYNC();
 }
 
+#ifdef CONFIG_IPIPE
+
+#include <stdarg.h>
+
+void __ipipe_serial_debug(const char *fmt, ...)
+{
+	struct bfin_serial_port *uart = &bfin_serial_ports[0];
+	unsigned short status, tmp;
+	int flags, i, count;
+	char buf[128];
+	va_list ap;
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	local_irq_save_hw(flags);
+
+	for (i = 0; i < count; i++) {
+		do {
+			status = UART_GET_LSR(uart);
+		} while (!(status & THRE));
+
+#ifndef CONFIG_BF54x
+		tmp = UART_GET_LCR(uart);
+		tmp &= ~DLAB;
+		UART_PUT_LCR(uart, tmp);
+#endif
+
+		UART_PUT_CHAR(uart, buf[i]);
+		if (buf[i] == '\n') {
+			do {
+				status = UART_GET_LSR(uart);
+			} while (!(status & THRE));
+			UART_PUT_CHAR(uart, '\r');
+		}
+	}
+
+	local_irq_restore_hw(flags);
+}
+EXPORT_SYMBOL(__ipipe_serial_debug);
+
+#endif /* CONFIG_IPIPE */
+
 /*
  * Interrupts are disabled on entering
  */
Signature · 1 line
1.5.6.3
#31 lore raw

Re: [PATCH 15/18] Blackfin Serial Driver: merge the upstream adeos/xenomai

Quoted 6 lines · On Fri, 6 Mar 2009 14:42:57 +0800 Bryan Wu <[email protected]> wrote:

From: Philippe Gerum <[email protected]>

add ipipe serial debug function for adeos

Changelog is useless.

Quoted 44 lines
 1 files changed, 45 insertions(+), 0 deletions(-)
drivers/serial/bfin_5xx.c +34 -0
index 71a9e6b..8aa0e37 100644
@@ -1145,6 +1145,51 @@ static void bfin_serial_console_putchar(struct uart_port *port, int ch)
 	SSYNC();
 }
 
+#ifdef CONFIG_IPIPE
+
+#include <stdarg.h>
+
+void __ipipe_serial_debug(const char *fmt, ...)
+{
+	struct bfin_serial_port *uart = &bfin_serial_ports[0];
+	unsigned short status, tmp;
+	int flags, i, count;
+	char buf[128];
+	va_list ap;
+
+	va_start(ap, fmt);
+	vsprintf(buf, fmt, ap);
+	va_end(ap);
+	count = strlen(buf);
+
+	local_irq_save_hw(flags);
+
+	for (i = 0; i < count; i++) {
+		do {
+			status = UART_GET_LSR(uart);
+		} while (!(status & THRE));
+
+#ifndef CONFIG_BF54x
+		tmp = UART_GET_LCR(uart);
+		tmp &= ~DLAB;
+		UART_PUT_LCR(uart, tmp);
+#endif
+
+		UART_PUT_CHAR(uart, buf[i]);
+		if (buf[i] == '\n') {
+			do {
+				status = UART_GET_LSR(uart);

drivers/serial/bfin_5xx.c static void bfin_serial_console_putchar(struct uart_port *port, int ch) · line 1191

Quoted 10 lines
drivers/serial/bfin_5xx.c +10 -0
+			} while (!(status & THRE));
+			UART_PUT_CHAR(uart, '\r');
+		}
+	}
+
+	local_irq_restore_hw(flags);
+}
+EXPORT_SYMBOL(__ipipe_serial_debug);
+
+#endif /* CONFIG_IPIPE */

What does this do? What bug does it fix? Why is it needed in 2.6.29?

None of the other patches add references to this symbol.

Why is it exported to modules?

#32 lore raw

Re: [PATCH 15/18] Blackfin Serial Driver: merge the upstream adeos/xenomai

just drop this patch. this was supposed to be merged with some other code but Yi hasnt had a chance to do it yet.
-mike

author
#33 lore raw

PATCH 16/18 Blackfin Serial Driver: fix bug - up arrow key works abnormal for bf561 ezkit board

In reply to Bryan Wu

From: Graf Yang <[email protected]>

Subtrack ANOMALY_05000230 on quot.

---
 drivers/serial/bfin_5xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/serial/bfin_5xx.c +1 -1
index 8aa0e37..c037e8e 100644
@@ -789,7 +789,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
 	}
 
 	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
-	quot = uart_get_divisor(port, baud);
+	quot = uart_get_divisor(port, baud) - ANOMALY_05000230;
 	spin_lock_irqsave(&uart->port.lock, flags);
 
 	UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);
Signature · 1 line
1.5.6.3
author
#34 lore raw

PATCH 17/18 Blackfin Serial Driver: Fix bug - Enable hardware based CTS and RTS for bf548.

In reply to Bryan Wu

From: Sonic Zhang <[email protected]>

Both software emulated and hardware based CTS and RTS are enabled in serial driver.

The CTS RTS PIN connection on BF548 UART port is defined as a modem device not as a host device. In order to test it under Linux, please nake a cross UART cable to exchange CTS and RTS signal.

---
 .../mach-bf518/include/mach/bfin_serial_5xx.h      |   10 +-
 .../mach-bf527/include/mach/bfin_serial_5xx.h      |   10 +-
 .../mach-bf533/include/mach/bfin_serial_5xx.h      |    9 +-
 .../mach-bf537/include/mach/bfin_serial_5xx.h      |   10 +-
 .../mach-bf538/include/mach/bfin_serial_5xx.h      |   10 +-
 .../mach-bf548/include/mach/bfin_serial_5xx.h      |   72 ++++-----
 .../mach-bf561/include/mach/bfin_serial_5xx.h      |    9 +-
 drivers/serial/Kconfig                             |   26 +++-
 drivers/serial/bfin_5xx.c                          |  169 ++++++++++++++------
 9 files changed, 209 insertions(+), 116 deletions(-)
arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h +7 -3
index e21c1c3..0fb2ce5 100644
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -87,6 +87,7 @@
 struct bfin_serial_port {
 	struct uart_port port;
 	unsigned int old_status;
+	int status_irq;
 	unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	int tx_done;
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
 	unsigned long uart_base_addr;
 	int uart_irq;
+	int uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	unsigned int uart_tx_dma_channel;
 	unsigned int uart_rx_dma_channel;
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	 0xFFC00400,
 	 IRQ_UART0_RX,
+	 IRQ_UART0_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	 CH_UART0_TX,
 	 CH_UART0_RX,
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	 0xFFC02000,
 	 IRQ_UART1_RX,
+	 IRQ_UART1_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	 CH_UART1_TX,
 	 CH_UART1_RX,
arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h +7 -3
index d2b160c..a625659 100644
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -87,6 +87,7 @@
 struct bfin_serial_port {
 	struct uart_port port;
 	unsigned int old_status;
+	int status_irq;
 	unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	int tx_done;
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
 	unsigned long uart_base_addr;
 	int uart_irq;
+	int uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	unsigned int uart_tx_dma_channel;
 	unsigned int uart_rx_dma_channel;
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	 0xFFC00400,
 	 IRQ_UART0_RX,
+	 IRQ_UART0_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	 CH_UART0_TX,
 	 CH_UART0_RX,
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	 0xFFC02000,
 	 IRQ_UART1_RX,
+	 IRQ_UART1_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	 CH_UART1_TX,
 	 CH_UART1_RX,
arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h +6 -3
index 70356dd..a3789d7 100644
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -74,6 +74,7 @@
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
+	int			status_irq;
 	unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	int			tx_done;
@@ -116,6 +117,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
 	unsigned long	uart_base_addr;
 	int		uart_irq;
+	int		uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	unsigned int	uart_tx_dma_channel;
 	unsigned int	uart_rx_dma_channel;
@@ -130,6 +132,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	0xFFC00400,
 	IRQ_UART_RX,
+	IRQ_UART_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	CH_UART_TX,
 	CH_UART_RX,
arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h +7 -3
index d46fc4f..b86662f 100644
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -87,6 +87,7 @@
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
+	int			status_irq;
 	unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	int			tx_done;
@@ -124,6 +125,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
 	unsigned long	uart_base_addr;
 	int		uart_irq;
+	int		uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	unsigned int	uart_tx_dma_channel;
 	unsigned int	uart_rx_dma_channel;
@@ -139,6 +141,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	0xFFC00400,
 	IRQ_UART0_RX,
+	IRQ_UART0_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	CH_UART0_TX,
 	CH_UART0_RX,
@@ -153,6 +156,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	0xFFC02000,
 	IRQ_UART1_RX,
+	IRQ_UART1_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	CH_UART1_TX,
 	CH_UART1_RX,
arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h +7 -3
index 3c2811e..c536551 100644
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -87,6 +87,7 @@
 struct bfin_serial_port {
 	struct uart_port	port;
 	unsigned int		old_status;
+	int			status_irq;
 	unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	int			tx_done;
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
 	unsigned long	uart_base_addr;
 	int		uart_irq;
+	int		uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	unsigned int	uart_tx_dma_channel;
 	unsigned int	uart_rx_dma_channel;
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	0xFFC00400,
 	IRQ_UART0_RX,
+	IRQ_UART0_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	CH_UART0_TX,
 	CH_UART0_RX,
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	0xFFC02000,
 	IRQ_UART1_RX,
+	IRQ_UART1_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	CH_UART1_TX,
 	CH_UART1_RX,
arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h +32 -40

154 lines not on this page · raw message

arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h +6 -3
index d0469e3..a1b5087 100644
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -74,6 +74,7 @@
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
+	int			status_irq;
 	unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	int			tx_done;
@@ -116,6 +117,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
 	unsigned long	uart_base_addr;
 	int		uart_irq;
+	int		uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	unsigned int	uart_tx_dma_channel;
 	unsigned int	uart_rx_dma_channel;
@@ -130,6 +132,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
 	{
 	0xFFC00400,
 	IRQ_UART_RX,
+	IRQ_UART_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	CH_UART_TX,
 	CH_UART_RX,
drivers/serial/Kconfig +20 -6
index 87f41ed..beb4617 100644
@@ -727,7 +727,7 @@ config BFIN_UART0_CTSRTS
 
 config UART0_CTS_PIN
 	int "UART0 CTS pin"
-	depends on BFIN_UART0_CTSRTS
+	depends on BFIN_UART0_CTSRTS && !BF548
 	default 23
 	help
 	  The default pin is GPIO_GP7.
@@ -735,7 +735,7 @@ config UART0_CTS_PIN
 
 config UART0_RTS_PIN
 	int "UART0 RTS pin"
-	depends on BFIN_UART0_CTSRTS
+	depends on BFIN_UART0_CTSRTS && !BF548
 	default 22
 	help
 	  The default pin is GPIO_GP6.
@@ -756,14 +756,14 @@ config BFIN_UART1_CTSRTS
 
 config UART1_CTS_PIN
 	int "UART1 CTS pin"
-	depends on BFIN_UART1_CTSRTS && !BF54x
+	depends on BFIN_UART1_CTSRTS && !BF548
 	default -1
 	help
 	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
 
 config UART1_RTS_PIN
 	int "UART1 RTS pin"
-	depends on BFIN_UART1_CTSRTS && !BF54x
+	depends on BFIN_UART1_CTSRTS && !BF548
 	default -1
 	help
 	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
@@ -783,14 +783,14 @@ config BFIN_UART2_CTSRTS
 
 config UART2_CTS_PIN
 	int "UART2 CTS pin"
-	depends on BFIN_UART2_CTSRTS
+	depends on BFIN_UART2_CTSRTS && !BF548
 	default -1
 	help
 	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
 
 config UART2_RTS_PIN
 	int "UART2 RTS pin"
-	depends on BFIN_UART2_CTSRTS
+	depends on BFIN_UART2_CTSRTS && !BF548
 	default -1
 	help
 	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
@@ -808,6 +808,20 @@ config BFIN_UART3_CTSRTS
 	  Enable hardware flow control in the driver. Using GPIO emulate the CTS/RTS
 	  signal.
 
+config UART3_CTS_PIN
+	int "UART3 CTS pin"
+	depends on BFIN_UART3_CTSRTS && !BF548
+	default -1
+	help
+	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+
+config UART3_RTS_PIN
+	int "UART3 RTS pin"
+	depends on BFIN_UART3_CTSRTS && !BF548
+	default -1
+	help
+	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+
 config SERIAL_IMX
 	bool "IMX serial port support"
 	depends on ARM && (ARCH_IMX || ARCH_MXC)
drivers/serial/bfin_5xx.c +117 -52

239 lines not on this page · raw message

Signature · 1 line
1.5.6.3
#35 lore raw

Re: [PATCH 17/18] Blackfin Serial Driver: Fix bug - Enable hardware based CTS and RTS for bf548.

Quoted 11 lines · On Fri, 6 Mar 2009 14:42:59 +0800 Bryan Wu <[email protected]> wrote:

From: Sonic Zhang <[email protected]>

Both software emulated and hardware based CTS and RTS are enabled in serial driver.

The CTS RTS PIN connection on BF548 UART port is defined as a modem device not as a host device. In order to test it under Linux, please nake a cross UART cable to exchange CTS and RTS signal.

Quoted 11 lines
---
 .../mach-bf518/include/mach/bfin_serial_5xx.h      |   10 +-
 .../mach-bf527/include/mach/bfin_serial_5xx.h      |   10 +-
 .../mach-bf533/include/mach/bfin_serial_5xx.h      |    9 +-
 .../mach-bf537/include/mach/bfin_serial_5xx.h      |   10 +-
 .../mach-bf538/include/mach/bfin_serial_5xx.h      |   10 +-
 .../mach-bf548/include/mach/bfin_serial_5xx.h      |   72 ++++-----
 .../mach-bf561/include/mach/bfin_serial_5xx.h      |    9 +-
 drivers/serial/Kconfig                             |   26 +++-
 drivers/serial/bfin_5xx.c                          |  169 ++++++++++++++------
 9 files changed, 209 insertions(+), 116 deletions(-)

This is a huge patch for us to be merging into -rc7.

Quoted 16 lines
arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h +3 -3
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 

arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h line 78

Quoted 5 lines
arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h +1 -0
@@ -74,6 +74,7 @@
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
+	int			status_irq;
 	unsigned int lsr;

whitepace bustage in here.

author
#36 lore raw

PATCH 18/18 Blackfin Serial Driver: update path to gpio header

In reply to Bryan Wu

From: Mike Frysinger <[email protected]>

---
 drivers/serial/Kconfig |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/serial/Kconfig +8 -8
index beb4617..33c678a 100644
@@ -731,7 +731,7 @@ config UART0_CTS_PIN
 	default 23
 	help
 	  The default pin is GPIO_GP7.
-	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+	  Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config UART0_RTS_PIN
 	int "UART0 RTS pin"
@@ -739,7 +739,7 @@ config UART0_RTS_PIN
 	default 22
 	help
 	  The default pin is GPIO_GP6.
-	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+	  Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config SERIAL_BFIN_UART1
 	bool "Enable UART1"
@@ -759,14 +759,14 @@ config UART1_CTS_PIN
 	depends on BFIN_UART1_CTSRTS && !BF548
 	default -1
 	help
-	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+	  Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config UART1_RTS_PIN
 	int "UART1 RTS pin"
 	depends on BFIN_UART1_CTSRTS && !BF548
 	default -1
 	help
-	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+	  Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config SERIAL_BFIN_UART2
 	bool "Enable UART2"
@@ -786,14 +786,14 @@ config UART2_CTS_PIN
 	depends on BFIN_UART2_CTSRTS && !BF548
 	default -1
 	help
-	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+	  Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config UART2_RTS_PIN
 	int "UART2 RTS pin"
 	depends on BFIN_UART2_CTSRTS && !BF548
 	default -1
 	help
-	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+	  Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config SERIAL_BFIN_UART3
 	bool "Enable UART3"
@@ -813,14 +813,14 @@ config UART3_CTS_PIN
 	depends on BFIN_UART3_CTSRTS && !BF548
 	default -1
 	help
-	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+	  Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config UART3_RTS_PIN
 	int "UART3 RTS pin"
 	depends on BFIN_UART3_CTSRTS && !BF548
 	default -1
 	help
-	  Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+	  Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config SERIAL_IMX
 	bool "IMX serial port support"
Signature · 1 line
1.5.6.3