From patchwork Thu Jul 8 09:38:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 110808 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o689c8Ok005107 for ; Thu, 8 Jul 2010 09:38:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755706Ab0GHJiH (ORCPT ); Thu, 8 Jul 2010 05:38:07 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:53508 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754492Ab0GHJiG (ORCPT ); Thu, 8 Jul 2010 05:38:06 -0400 Received: from muru.com ([72.249.23.125] helo=baageli.muru.com) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1OWnYT-000IMF-O1; Thu, 08 Jul 2010 09:38:05 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 72.249.23.125 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+QAiB/zzVF1Xg4xc0W0rfi Subject: [PATCH 5/5] omap: Allow testing for omap type with omap_has_feature To: linux-omap@vger.kernel.org From: Tony Lindgren Cc: nm@ti.com Date: Thu, 08 Jul 2010 12:38:04 +0300 Message-ID: <20100708093804.16352.82935.stgit@baageli.muru.com> In-Reply-To: <20100708093405.16352.11814.stgit@baageli.muru.com> References: <20100708093405.16352.11814.stgit@baageli.muru.com> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 08 Jul 2010 09:38:09 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 96eac4d..c117c3c 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -437,14 +437,36 @@ int omap_chip_is(struct omap_chip_id oci); void omap2_check_revision(void); /* - * Runtime detection of OMAP3 features + * Runtime detection of OMAP features */ -#define OMAP3_HAS_L2CACHE BIT(0) -#define OMAP3_HAS_IVA BIT(1) -#define OMAP3_HAS_SGX BIT(2) -#define OMAP3_HAS_NEON BIT(3) -#define OMAP3_HAS_ISP BIT(4) -#define OMAP3_HAS_192MHZ_CLK BIT(5) -#define OMAP3_HAS_IO_WAKEUP BIT(6) +#define OMAP_FEAT_CLASS_OMAP1 BIT(24) +#define OMAP_FEAT_CLASS_OMAP2 BIT(25) +#define OMAP_FEAT_CLASS_OMAP3 BIT(26) +#define OMAP_FEAT_CLASS_OMAP4 BIT(27) + +#define OMAP_HAS_L2CACHE BIT(0) +#define OMAP_HAS_IVA BIT(1) +#define OMAP_HAS_SGX BIT(2) +#define OMAP_HAS_NEON BIT(3) +#define OMAP_HAS_ISP BIT(4) +#define OMAP_HAS_192MHZ_CLK BIT(5) +#define OMAP_HAS_IO_WAKEUP BIT(6) + +#define OMAP2_HAS_IVA OMAP_FEAT_CLASS_OMAP2 | OMAP_HAS_IVA +#define OMAP2_HAS_SGX OMAP_FEAT_CLASS_OMAP2 | OMAP_HAS_SGX + +#define OMAP3_HAS_L2CACHE OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_L2CACHE +#define OMAP3_HAS_IVA OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_IVA +#define OMAP3_HAS_SGX OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_SGX +#define OMAP3_HAS_NEON OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_NEON +#define OMAP3_HAS_ISP OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_ISP +#define OMAP3_HAS_192MHZ_CLK OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_192MHZ_CLK +#define OMAP3_HAS_IO_WAKEUP OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_IOWAKEUP + +#define OMAP4_HAS_L2CACHE OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_L2CACHE +#define OMAP4_HAS_IVA OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_IVA +#define OMAP4_HAS_SGX OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_SGX +#define OMAP4_HAS_NEON OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_NEON +#define OMAP4_HAS_ISP OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_ISP #endif