From patchwork Thu Jul 21 02:25:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Salveti X-Patchwork-Id: 2900 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 349BE2405D for ; Thu, 21 Jul 2011 02:25:23 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id 001F4A181A9 for ; Thu, 21 Jul 2011 02:25:22 +0000 (UTC) Received: by qwb8 with SMTP id 8so610371qwb.11 for ; Wed, 20 Jul 2011 19:25:22 -0700 (PDT) Received: by 10.229.217.3 with SMTP id hk3mr8518371qcb.38.1311215122438; Wed, 20 Jul 2011 19:25:22 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.217.78 with SMTP id hl14cs128410qcb; Wed, 20 Jul 2011 19:25:22 -0700 (PDT) Received: by 10.151.10.13 with SMTP id n13mr57904ybi.33.1311215121830; Wed, 20 Jul 2011 19:25:21 -0700 (PDT) Received: from mail-gx0-f178.google.com (mail-gx0-f178.google.com [209.85.161.178]) by mx.google.com with ESMTPS id e2si2732597ybg.75.2011.07.20.19.25.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jul 2011 19:25:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.161.178 is neither permitted nor denied by best guess record for domain of ricardo.salveti@linaro.org) client-ip=209.85.161.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.161.178 is neither permitted nor denied by best guess record for domain of ricardo.salveti@linaro.org) smtp.mail=ricardo.salveti@linaro.org Received: by gxk8 with SMTP id 8so460764gxk.37 for ; Wed, 20 Jul 2011 19:25:21 -0700 (PDT) Received: by 10.236.78.6 with SMTP id f6mr13522866yhe.33.1311215121182; Wed, 20 Jul 2011 19:25:21 -0700 (PDT) Received: from localhost.localdomain ([201.82.65.93]) by mx.google.com with ESMTPS id b47sm791430yhe.25.2011.07.20.19.25.18 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jul 2011 19:25:20 -0700 (PDT) From: Ricardo Salveti de Araujo To: x-loader@googlegroups.com Cc: patches@linaro.org, Ricardo Salveti de Araujo Subject: [PATCH] igep00x0, beagle and omap3evm: fixing bug at prcm_init Date: Wed, 20 Jul 2011 23:25:03 -0300 Message-Id: <1311215103-3048-1-git-send-email-ricardo.salveti@linaro.org> X-Mailer: git-send-email 1.7.4.1 Commit 73eb46434657c8c2c9e7c9146406031fc4d124ce changed get_cpu_rev() to be a generic function for all omap 3 based boards, to remove duplicated code. As a side effect, the behavior changed for beagle and omap3evm when the board is based on 37XX, returning a different value then CPU3430_ES2, causing a bug at prcm_init. The fix is already applied for overo, as you can see from commit 24b8b7f41a83540433024854736518876257672c, changing the index calculation to behave correctly with all board revs. This patch only applies the same fix for the other omap 3 based boards that could be affected. BugLink: https://bugs.launchpad.net/ubuntu/+source/x-loader/+bug/813407 Signed-off-by: Ricardo Salveti de Araujo --- board/igep00x0/igep00x0.c | 2 +- board/omap3530beagle/omap3530beagle.c | 2 +- board/omap3evm/omap3evm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/board/igep00x0/igep00x0.c b/board/igep00x0/igep00x0.c index 5550741..d880b48 100644 --- a/board/igep00x0/igep00x0.c +++ b/board/igep00x0/igep00x0.c @@ -169,7 +169,7 @@ void prcm_init(void) * and sil_index will get the values for that SysClk for the * appropriate silicon rev. */ - sil_index = get_cpu_rev() - 1; + sil_index = (get_cpu_rev() == CPU_3XX_ES10) ? 0 : 1; /* Unlock MPU DPLL (slows things down, and needed later) */ sr32(CM_CLKEN_PLL_MPU, 0, 3, PLL_LOW_POWER_BYPASS); diff --git a/board/omap3530beagle/omap3530beagle.c b/board/omap3530beagle/omap3530beagle.c index 102c6d9..829a66d 100644 --- a/board/omap3530beagle/omap3530beagle.c +++ b/board/omap3530beagle/omap3530beagle.c @@ -439,7 +439,7 @@ void prcm_init(void) * and sil_index will get the values for that SysClk for the * appropriate silicon rev. */ - sil_index = get_cpu_rev() - 1; + sil_index = (get_cpu_rev() == CPU_3XX_ES10) ? 0 : 1; /* Unlock MPU DPLL (slows things down, and needed later) */ sr32(CM_CLKEN_PLL_MPU, 0, 3, PLL_LOW_POWER_BYPASS); diff --git a/board/omap3evm/omap3evm.c b/board/omap3evm/omap3evm.c index 6048964..0ba5c55 100644 --- a/board/omap3evm/omap3evm.c +++ b/board/omap3evm/omap3evm.c @@ -271,7 +271,7 @@ void prcm_init(void) * and sil_index will get the values for that SysClk for the * appropriate silicon rev. */ - sil_index = get_cpu_rev() - 1; + sil_index = (get_cpu_rev() == CPU_3XX_ES10) ? 0 : 1; /* Unlock MPU DPLL (slows things down, and needed later) */ sr32(CM_CLKEN_PLL_MPU, 0, 3, PLL_LOW_POWER_BYPASS);