From patchwork Wed Jul 2 00:17:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luka Perkov X-Patchwork-Id: 366226 X-Patchwork-Delegate: sr@denx.de 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 230991400B7 for ; Wed, 2 Jul 2014 10:18:12 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CF4214B605; Wed, 2 Jul 2014 02:18:10 +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 taqRA0QE6ikM; Wed, 2 Jul 2014 02:18:10 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C42EB4A057; Wed, 2 Jul 2014 02:18:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 491694A057 for ; Wed, 2 Jul 2014 02:18:08 +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 r5d-yDFkHB5F for ; Wed, 2 Jul 2014 02:18:05 +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 arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) by theia.denx.de (Postfix) with ESMTPS id 128424A03F for ; Wed, 2 Jul 2014 02:18:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 4AB2028069C; Wed, 2 Jul 2014 02:16:04 +0200 (CEST) X-Virus-Scanned: at arrakis.dune.hu Received: from w500.lan (213-191-157-124.dhcp.iskon.hr [213.191.157.124]) by arrakis.dune.hu (Postfix) with ESMTPSA id 9C28A280273; Wed, 2 Jul 2014 02:15:50 +0200 (CEST) From: Luka Perkov To: u-boot@lists.denx.de Date: Wed, 2 Jul 2014 02:17:37 +0200 Message-Id: <1404260257-29804-1-git-send-email-luka@openwrt.org> X-Mailer: git-send-email 2.0.1 Cc: luka@openwrt.org, Stefan Roese Subject: [U-Boot] [PATCH] ARM: kirkwood: fix cpu info for 6282 device id 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 Signed-off-by: Luka Perkov CC: Prafulla Wadaskar CC: Stefan Roese Acked-by: Stefan Roese Acked-By: Prafulla Wadaskar --- arch/arm/cpu/arm926ejs/kirkwood/cpu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c index da80240..312d2b2 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c @@ -252,7 +252,7 @@ static void kw_sysrst_check(void) #if defined(CONFIG_DISPLAY_CPUINFO) int print_cpuinfo(void) { - char *rev; + char *rev = "??"; u16 devid = (readl(KW_REG_PCIE_DEVID) >> 16) & 0xffff; u8 revid = readl(KW_REG_PCIE_REVID) & 0xff; @@ -263,7 +263,13 @@ int print_cpuinfo(void) switch (revid) { case 0: - rev = "Z0"; + if (devid == 0x6281) + rev = "Z0"; + else if (devid == 0x6282) + rev = "A0"; + break; + case 1: + rev = "A1"; break; case 2: rev = "A0"; @@ -272,7 +278,6 @@ int print_cpuinfo(void) rev = "A1"; break; default: - rev = "??"; break; }