From patchwork Fri Jun 29 11:28:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 1131581 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 06CA7DFF34 for ; Fri, 29 Jun 2012 11:41:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752467Ab2F2LlY (ORCPT ); Fri, 29 Jun 2012 07:41:24 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:52685 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752164Ab2F2LlX (ORCPT ); Fri, 29 Jun 2012 07:41:23 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q5TBfJUs004030; Fri, 29 Jun 2012 06:41:20 -0500 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q5TBfHb3019625; Fri, 29 Jun 2012 17:11:17 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Fri, 29 Jun 2012 17:11:17 +0530 Received: from localhost.localdomain (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id q5TBfF3F007850; Fri, 29 Jun 2012 17:11:16 +0530 From: Vaibhav Hiremath To: CC: , , Vaibhav Hiremath Subject: [PATCH-V2] ARM: OMAP: cpu: Make cpu_class_is_omap2 true for all non-omap1 platforms Date: Fri, 29 Jun 2012 16:58:26 +0530 Message-ID: <1340969306-28464-1-git-send-email-hvaibhav@ti.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org As omap1 and omap2 will never be compiled together, due to different compiler flags, so we can simply make cpu_class_is_omap2() = true, for all non-omap1 platforms. In order to fix build error from plat-omap/sram.c file, omap_type() function is encapsulated under #ifdef CONFIG_ARCH_OMAP2PLUS. Signed-off-by: Vaibhav Hiremath CC: Tony Lindgren --- Boot tested on Beable Bone, AM37x EVM and build tested for omap1. It would be helpful if someone can test it on omap1 platform. Change from V1: - Fix omap1 build failure, by adding inline function for omap_type(). arch/arm/plat-omap/include/plat/cpu.h | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 8c84d05..c3617e2 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -42,7 +42,18 @@ #define OMAP2_DEVICE_TYPE_GP 3 #define OMAP2_DEVICE_TYPE_BAD 4 +#ifdef CONFIG_ARCH_OMAP2PLUS int omap_type(void); +#else +static inline int omap_type(void) +{ + /* + * Safe to return 0, since this function will not + * be called for omap1. + */ + return 0; +} +#endif /* * omap_rev bits: @@ -358,8 +369,7 @@ IS_OMAP_TYPE(3430, 0x3430) /* Macros to detect if we have OMAP1 or OMAP2 */ #define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \ cpu_is_omap16xx()) -#define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \ - cpu_is_omap44xx()) +#define cpu_class_is_omap2() !cpu_class_is_omap1() /* Various silicon revisions for omap2 */ #define OMAP242X_CLASS 0x24200024