From patchwork Thu Jul 8 13:55:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 110850 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 o68DtDGv015721 for ; Thu, 8 Jul 2010 13:55:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757919Ab0GHNzL (ORCPT ); Thu, 8 Jul 2010 09:55:11 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:60624 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757915Ab0GHNzK (ORCPT ); Thu, 8 Jul 2010 09:55:10 -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 1OWrZF-000416-F7; Thu, 08 Jul 2010 13:55:09 +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+YewV1CyXZUksKYPPqKJft Subject: [PATCH 11/13] omap: Add new interface omap_get_die_id To: linux-arm-kernel@lists.infradead.org From: Tony Lindgren Cc: linux-omap@vger.kernel.org, Kan-Ru Chen Date: Thu, 08 Jul 2010 16:55:06 +0300 Message-ID: <20100708135506.26276.73243.stgit@baageli.muru.com> In-Reply-To: <20100708135342.26276.80936.stgit@baageli.muru.com> References: <20100708135342.26276.80936.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 13:55:13 +0000 (UTC) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index ccaa1ed..d079ccf 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -25,6 +25,8 @@ #include #include +#include + static struct omap_chip_id omap_chip; static unsigned int omap_revision; @@ -102,6 +104,14 @@ static struct omap_id omap_ids[] __initdata = { static void __iomem *tap_base; static u16 tap_prod_id; +void omap_get_die_id(struct omap_die_id *odi) +{ + odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_0); + odi->id_1 = read_tap_reg(OMAP_TAP_DIE_ID_1); + odi->id_2 = read_tap_reg(OMAP_TAP_DIE_ID_2); + odi->id_3 = read_tap_reg(OMAP_TAP_DIE_ID_3); +} + static void __init omap24xx_check_revision(void) { int i, j; diff --git a/arch/arm/mach-omap2/include/mach/id.h b/arch/arm/mach-omap2/include/mach/id.h new file mode 100644 index 0000000..02ed3aa --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/id.h @@ -0,0 +1,22 @@ +/* + * OMAP2 CPU identification code + * + * Copyright (C) 2010 Kan-Ru Chen + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef OMAP2_ARCH_ID_H +#define OMAP2_ARCH_ID_H + +struct omap_die_id { + u32 id_0; + u32 id_1; + u32 id_2; + u32 id_3; +}; + +void omap_get_die_id(struct omap_die_id *odi); + +#endif