From patchwork Sun May 15 23:37:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1493 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:52:25 -0000 Delivered-To: patches@linaro.org Received: by 10.224.61.3 with SMTP id r3cs68653qah; Sun, 15 May 2011 16:37:50 -0700 (PDT) Received: by 10.223.87.2 with SMTP id u2mr4610523fal.131.1305502669557; Sun, 15 May 2011 16:37:49 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se [194.47.250.12]) by mx.google.com with ESMTPS id n10si6486595fam.154.2011.05.15.16.37.47 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 15 May 2011 16:37:48 -0700 (PDT) Received-SPF: pass (google.com: domain of triad@df.lth.se designates 194.47.250.12 as permitted sender) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=pass (google.com: domain of triad@df.lth.se designates 194.47.250.12 as permitted sender) smtp.mail=triad@df.lth.se Received: from mer.df.lth.se (mer.df.lth.se [194.47.250.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPS id A2D7365D7C; Mon, 16 May 2011 01:37:47 +0200 (CEST) Received: from mer.df.lth.se (triad@localhost.localdomain [127.0.0.1]) by mer.df.lth.se (8.14.3/8.14.3/Debian-9.4) with ESMTP id p4FNbl2h032576; Mon, 16 May 2011 01:37:47 +0200 Received: (from triad@localhost) by mer.df.lth.se (8.14.3/8.14.3/Submit) id p4FNbleU032575; Mon, 16 May 2011 01:37:47 +0200 From: Linus Walleij To: Samuel Ortiz , linux-kernel@vger.kernel.org Cc: Lee Jones , Linus Walleij Subject: [PATCH 04/13] mach-ux500: update ASIC version detection Date: Mon, 16 May 2011 01:37:45 +0200 Message-Id: <1305502665-32549-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.2.5 This makes the core detect the DB8500 V2.0 and V2.1 ASICs, and add a convenience macro for "V2 or later". Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/include/mach/id.h | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/include/mach/id.h index f1288d1..02b541a 100644 --- a/arch/arm/mach-ux500/include/mach/id.h +++ b/arch/arm/mach-ux500/include/mach/id.h @@ -75,6 +75,26 @@ static inline bool __attribute_const__ cpu_is_u8500v2(void) return cpu_is_u8500() && ((dbx500_revision() & 0xf0) == 0xB0); } +static inline bool cpu_is_u8500v20(void) +{ + return cpu_is_u8500() && (dbx500_revision() == 0xB0); +} + +static inline bool cpu_is_u8500v21(void) +{ + return cpu_is_u8500() && (dbx500_revision() == 0xB1); +} + +static inline bool cpu_is_u8500v20_or_later(void) +{ + return cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11(); +} + +static inline bool ux500_is_svp(void) +{ + return false; +} + #define ux500_unknown_soc() BUG() #endif