From patchwork Sat Mar 12 22:50:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 536 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:24 -0000 Delivered-To: patches@linaro.org Received: by 10.224.45.75 with SMTP id d11cs13753qaf; Sat, 12 Mar 2011 14:50:58 -0800 (PST) Received: by 10.227.138.220 with SMTP id b28mr4178237wbu.87.1299970257879; Sat, 12 Mar 2011 14:50:57 -0800 (PST) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id d3si10980797wbe.24.2011.03.12.14.50.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:50:57 -0800 (PST) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by mail-wy0-f178.google.com with SMTP id 26so4062942wyj.37 for ; Sat, 12 Mar 2011 14:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:subject:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version:content-type :content-transfer-encoding; bh=RPyLZ2eo11gx8LVugYCm2KFVaHw1OCA6Wex5Fz1bXy8=; b=lP0Ms9TmXuAfHUzKAILJa+7QvA/NbWe/t3jK59og5MvxJZoM2q9BQYqID21JNHB90f bTiWDsSG1ps8O6or+qf2oMzze263oigFfzwmIaOF/u+MEhmOKIQcrAM7Mkq6Yzh6eD33 0Y3hMDVsukFYtgkot2pFeLi86Bz+KJuj6vuck= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=e2WnTZ8pSAfFfiyg441CWHXpn8o7Z9+lPter2lXJqu2DbuDJ0rFyKEk3dXBnCWJmTV GhVrRqullcXsxofM0nTftwkEnuzG3W0JPeBNYsrWEYBJS8rq4dLP1s24bA6RgJhhaL3s JUGQWsokAL1oaj59bxFXlcxpxO2B8M8XWpqrQ= Received: by 10.216.179.81 with SMTP id g59mr900754wem.35.1299970257151; Sat, 12 Mar 2011 14:50:57 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id t11sm2978938wes.41.2011.03.12.14.50.55 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:50:56 -0800 (PST) Sender: Andy Green From: Andy Green Subject: [RFC PATCH 3/5] OMAP2+:Common CPU DIE ID reading code reads wrong registers for OMAP4430 To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Andy Green Date: Sat, 12 Mar 2011 22:50:54 +0000 Message-ID: <20110312225054.27728.89155.stgit@otae.warmcat.com> In-Reply-To: <20110312224440.27728.60593.stgit@otae.warmcat.com> References: <20110312224440.27728.60593.stgit@otae.warmcat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 This adapts the register offsets used to read the CPU DIE ID registers when run on 44XX so they match what is in the OMAP4430 Reference Manual page 269 Signed-off-by: Andy Green --- arch/arm/mach-omap2/id.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index fc69ec5..733bb27 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -84,6 +84,11 @@ EXPORT_SYMBOL(omap_type); #define OMAP_TAP_DIE_ID_2 0x0220 #define OMAP_TAP_DIE_ID_3 0x0224 +#define OMAP_TAP_DIE_ID_44XX_0 0x0200 +#define OMAP_TAP_DIE_ID_44XX_1 0x0208 +#define OMAP_TAP_DIE_ID_44XX_2 0x020c +#define OMAP_TAP_DIE_ID_44XX_3 0x0210 + #define read_tap_reg(reg) __raw_readl(tap_base + (reg)) struct omap_id { @@ -107,6 +112,14 @@ static u16 tap_prod_id; void omap_get_die_id(struct omap_die_id *odi) { + if (cpu_is_omap44xx()) { + odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0); + odi->id_1 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_1); + odi->id_2 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_2); + odi->id_3 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_3); + + return; + } 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);