From patchwork Thu Jul 26 04:24:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuyuki Kobayashi X-Patchwork-Id: 173326 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 069DA2C0095 for ; Thu, 26 Jul 2012 14:26:07 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D42DC2808B; Thu, 26 Jul 2012 06:25:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fHfIeIWwKAlF; Thu, 26 Jul 2012 06:25:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A224528084; Thu, 26 Jul 2012 06:25:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 361DF2807F for ; Thu, 26 Jul 2012 06:25:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DDMl9nTLoscx for ; Thu, 26 Jul 2012 06:25:23 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from vrgw4.firstserver.ne.jp (vrgw4.firstserver.ne.jp [164.46.1.47]) by theia.denx.de (Postfix) with ESMTPS id 95C4F28099 for ; Thu, 26 Jul 2012 06:25:17 +0200 (CEST) Received: from fvrsp10.firstserver.ne.jp (fvrsp10.firstserver.ne.jp [203.183.0.4]) by vrgw4.firstserver.ne.jp (8.13.8/8.13.8/FirstServer) with ESMTP id q6Q4P6eh029942; Thu, 26 Jul 2012 13:25:06 +0900 (envelope-from koba@kmckk.co.jp) Received: from 203.137.25.97 (203.137.25.97) by fvrsp10.firstserver.ne.jp (F-Secure/virusgw_smtp/407/fvrsp10.firstserver.ne.jp); Thu, 26 Jul 2012 13:25:06 +0900 (JST) X-Virus-Status: clean(F-Secure/virusgw_smtp/407/fvrsp10.firstserver.ne.jp) Received: from localhost (58-188-103-12f2.kns1.eonet.ne.jp [58.188.103.12]) (authenticated (0 bits)) by mail.kmckk.co.jp (8.14.3/8.11.3) with ESMTP id q6Q4P6ES001134; Thu, 26 Jul 2012 13:25:06 +0900 From: Tetsuyuki Kobayshi To: iwamatsu@nigauri.org, u-boot@lists.denx.de Date: Thu, 26 Jul 2012 13:24:20 +0900 Message-Id: <1343276661-22803-4-git-send-email-koba@kmckk.co.jp> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343276661-22803-1-git-send-email-koba@kmckk.co.jp> References: <1343276661-22803-1-git-send-email-koba@kmckk.co.jp> Subject: [U-Boot] [PATCH 3/4] arm: rmobile: kzm9g: fix CPU info X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Tetsuyuki Kobayashi CPU info register was read wrongly by mistake. And function rmobile_get_cpu_rev() was not called properly. Signed-off-by: Tetsuyuki Kobayashi --- arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c | 6 +++--- arch/arm/cpu/armv7/rmobile/cpu_info.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c index f5273cf..a715efa 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c @@ -30,19 +30,19 @@ u32 rmobile_get_cpu_type(void) u32 type; struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE; - id = readl(hpb->cccr); + id = readl(&hpb->cccr); type = (id >> 8) & 0xFF; return type; } -u32 get_cpu_rev(void) +u32 rmobile_get_cpu_rev(void) { u32 id; u32 rev; struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE; - id = readl(hpb->cccr); + id = readl(&hpb->cccr); rev = (id >> 4) & 0xF; return rev; diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c b/arch/arm/cpu/armv7/rmobile/cpu_info.c index 2148958..957a4fc 100644 --- a/arch/arm/cpu/armv7/rmobile/cpu_info.c +++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c @@ -62,7 +62,7 @@ int print_cpuinfo(void) break; default: printf("CPU: Renesas Electronics CPU rev %d\n", - get_cpu_rev()); + rmobile_get_cpu_rev()); break; } return 0;