From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Kagstrom Subject: [PATCH 2/2]: x86 real mode: Set delay port according to kernel config Date: Wed, 17 Mar 2010 13:30:56 +0100 Message-ID: <20100317133056.289d8dc7@marrow.netinsight.se> References: <20100317132849.7d49939b@marrow.netinsight.se> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from ernst.netinsight.se ([194.16.221.21]:25818 "HELO ernst.netinsight.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754722Ab0CQMbA (ORCPT ); Wed, 17 Mar 2010 08:31:00 -0400 In-Reply-To: <20100317132849.7d49939b@marrow.netinsight.se> Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: x86@kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: mingo@redhat.com, tglx@linutronix.de, alan@linux.intel.com, akpm@linux-foundation.org, hpa@zytor.com Port 0x80 is not safe to use on all x86 boards (see arch/x86/kernel/io_delay.c), so optionally use 0xed from the kernel config instead. Signed-off-by: Simon Kagstrom --- arch/x86/boot/boot.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index 98239d2..79880b1 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -73,7 +73,12 @@ static inline u32 inl(u32 port) static inline void io_delay(void) { +#ifdef CONFIG_IO_DELAY_0XED + const u16 DELAY_PORT = 0xed; +#else const u16 DELAY_PORT = 0x80; +#endif + asm volatile("outb %%al,%0" : : "dN" (DELAY_PORT)); } -- 1.6.0.4