From patchwork Fri Nov 20 16:02:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vikram pandita X-Patchwork-Id: 61671 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAKG2gNS028936 for ; Fri, 20 Nov 2009 16:02:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753149AbZKTQCf (ORCPT ); Fri, 20 Nov 2009 11:02:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753172AbZKTQCf (ORCPT ); Fri, 20 Nov 2009 11:02:35 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:38735 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753079AbZKTQCe (ORCPT ); Fri, 20 Nov 2009 11:02:34 -0500 Received: from dlep33.itg.ti.com ([157.170.170.112]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAKG2eM7008051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 20 Nov 2009 10:02:41 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id nAKG2c3X029195; Fri, 20 Nov 2009 10:02:38 -0600 (CST) Received: from vip-tid (lta0307903-128247075087.am.dhcp.ti.com [128.247.75.87]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id nAKG2bZ11489; Fri, 20 Nov 2009 10:02:38 -0600 (CST) Received: from vip-tid (localhost.localdomain [127.0.0.1]) by vip-tid (Postfix) with ESMTP id 5707429CBAF; Fri, 20 Nov 2009 10:02:36 -0600 (CST) Received: (from vikram@localhost) by vip-tid (8.14.3/8.14.3/Submit) id nAKG2aQX018839; Fri, 20 Nov 2009 10:02:36 -0600 X-Authentication-Warning: vip-tid: vikram set sender to vikram.pandita@ti.com using -f From: Vikram Pandita To: linux-omap@vger.kernel.org Cc: Vikram Pandita Subject: [PATCH v3 1/2] omap: introduce uart_no_empty_fifo_read feature Date: Fri, 20 Nov 2009 10:02:35 -0600 Message-Id: <1258732956-18799-2-git-send-email-vikram.pandita@ti.com> X-Mailer: git-send-email 1.6.5.1.69.g36942 In-Reply-To: <1258732956-18799-1-git-send-email-vikram.pandita@ti.com> References: <1258732956-18799-1-git-send-email-vikram.pandita@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index f48a4b2..3e266cd 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -176,6 +176,12 @@ void __init omap3_check_features(void) OMAP3_CHECK_FEATURE(status, NEON); OMAP3_CHECK_FEATURE(status, ISP); + /* On omap3630 and omap4: UART empty rx fifo read aborts */ + if (cpu_is_omap3630()) + omap3_features |= OMAP3_HAS_UART_NO_EMPTY_FIFO_READ; + if (cpu_is_omap44xx()) + omap3_features |= OMAP3_HAS_UART_NO_EMPTY_FIFO_READ; + /* * TODO: Get additional info (where applicable) * e.g. Size of L2 cache. @@ -316,6 +322,7 @@ void __init omap3_cpuinfo(void) OMAP3_SHOW_FEATURE(sgx); OMAP3_SHOW_FEATURE(neon); OMAP3_SHOW_FEATURE(isp); + OMAP3_SHOW_FEATURE(uart_no_empty_fifo_read); printk(")\n"); } diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 2e17890..c32f015 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -497,6 +497,7 @@ extern u32 omap3_features; #define OMAP3_HAS_SGX BIT(2) #define OMAP3_HAS_NEON BIT(3) #define OMAP3_HAS_ISP BIT(4) +#define OMAP3_HAS_UART_NO_EMPTY_FIFO_READ BIT(5) #define OMAP3_HAS_FEATURE(feat,flag) \ static inline unsigned int omap3_has_ ##feat(void) \ @@ -509,5 +510,6 @@ OMAP3_HAS_FEATURE(sgx, SGX) OMAP3_HAS_FEATURE(iva, IVA) OMAP3_HAS_FEATURE(neon, NEON) OMAP3_HAS_FEATURE(isp, ISP) +OMAP3_HAS_FEATURE(uart_no_empty_fifo_read, UART_NO_EMPTY_FIFO_READ) #endif