linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PPC4xx UART0 (8250) problem
@ 2007-04-06 15:11 Mikhail Zolotaryov
  0 siblings, 0 replies; 4+ messages in thread
From: Mikhail Zolotaryov @ 2007-04-06 15:11 UTC (permalink / raw)
  To: mporter, linux-serial; +Cc: linux-kernel

On PPC4xx embedded we often have UART0 on IRQ0 but 8250 UART driver uses
IRQ0 as "no irq" hack.
It's suggested that platforms with UART on IRQ0 will redefine
is_real_interrupt(irq) macro but 8250 code anyway overrides that.
As the result, serial line on UART0 works on polling-way and we have
character loss on high baud rates.

In patch I've added check if UART0 is on IRQ0, if so we define
is_real_interrupt macro to be 1 (true).
Also, check if is_real_interrupt macro is already defined added to 8250
UART driver.

--- linux-2.6.20.5.orig/include/asm-ppc/ibm4xx.h        2007-03-23
21:52:51.000000000 +0200
+++ linux-2.6.20.5/include/asm-ppc/ibm4xx.h     2007-04-06
17:37:22.000000000 +0300
@@ -54,6 +54,12 @@
 #include <platforms/4xx/xilinx_ml403.h>
 #endif
 
+#ifdef UART0_INT
+#if (UART0_INT == 0)
+#define is_real_interrupt(irq)  (1)
+#endif
+#endif
+
 #ifndef __ASSEMBLY__
 
 #ifdef CONFIG_40x
--- linux-2.6.20.5.orig/drivers/serial/8250.c   2007-03-23
21:52:51.000000000 +0200
+++ linux-2.6.20.5/drivers/serial/8250.c        2007-04-06
16:44:32.000000000 +0300
@@ -77,7 +77,10 @@
  * machine types want others as well - they're free
  * to redefine this in their header file.
  */
+
+#ifndef is_real_interrupt(irq)
 #define is_real_interrupt(irq) ((irq) != 0)
+#endif
 
 #ifdef CONFIG_SERIAL_8250_DETECT_IRQ
 #define CONFIG_SERIAL_DETECT_IRQ 1


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] PPC4xx UART0 (8250) problem
@ 2007-04-07  4:21 Mikhail Zolotaryov
  2007-04-07  5:12 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Mikhail Zolotaryov @ 2007-04-07  4:21 UTC (permalink / raw)
  To: mporter; +Cc: linux-serial, linux-kernel

On PPC4xx embedded we often have UART0 on IRQ0 but 8250 UART driver
uses IRQ0 as "no irq" hack. It's suggested that platforms with UART
on IRQ0 will redefine is_real_interrupt(irq) macro but 8250 code
anyway overrides that. As the result, serial line on UART0 works
on polling-way and we have character loss on high baud rates.

In patch I added check if UART0 is on IRQ0, if so we define
is_real_interrupt macro to be 1 (true). Also, check if
is_real_interrupt macro is already defined added to 8250 UART
driver.

-------------------------------------------------------------------

--- linux.orig/include/asm-ppc/ibm4xx.h        2007-03-23 21:52:51.000000000 +0200
+++ linux/include/asm-ppc/ibm4xx.h     2007-04-06 17:37:22.000000000 +0300
@@ -54,6 +54,12 @@
 #include <platforms/4xx/xilinx_ml403.h>
 #endif

+#ifdef UART0_INT
+#if (UART0_INT == 0)
+#define is_real_interrupt(irq)  (1)
+#endif
+#endif
+
 #ifndef __ASSEMBLY__

 #ifdef CONFIG_40x
--- linux.orig/drivers/serial/8250.c   2007-03-23 21:52:51.000000000 +0200
+++ linux/drivers/serial/8250.c        2007-04-06 16:44:32.000000000 +0300
@@ -77,7 +77,9 @@
  * machine types want others as well - they're free
  * to redefine this in their header file.
  */
+#ifndef is_real_interrupt(irq)
 #define is_real_interrupt(irq)	((irq) != 0)
+#endif
 
 #ifdef CONFIG_SERIAL_8250_DETECT_IRQ
 #define CONFIG_SERIAL_DETECT_IRQ 1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-07  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-06 15:11 [PATCH] PPC4xx UART0 (8250) problem Mikhail Zolotaryov
  -- strict thread matches above, loose matches on Subject: below --
2007-04-07  4:21 Mikhail Zolotaryov
2007-04-07  5:12 ` Benjamin Herrenschmidt
2007-04-07  8:41   ` Mikhail Zolotaryov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).