From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965277AbXDGEQK (ORCPT ); Sat, 7 Apr 2007 00:16:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965291AbXDGEQK (ORCPT ); Sat, 7 Apr 2007 00:16:10 -0400 Received: from mail.faust.net.ua ([195.68.202.98]:57099 "EHLO mail.faust.net.ua" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965277AbXDGEQJ (ORCPT ); Sat, 7 Apr 2007 00:16:09 -0400 Message-ID: <46171C50.3020104@faust.net.ua> Date: Sat, 07 Apr 2007 07:21:36 +0300 From: Mikhail Zolotaryov User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: mporter@kernel.crashing.org CC: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PPC4xx UART0 (8250) problem Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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 #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