From patchwork Thu Jul 21 02:22:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Salveti X-Patchwork-Id: 2899 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 4D16F2405D for ; Thu, 21 Jul 2011 02:22:38 +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 0DCFEA1811D for ; Thu, 21 Jul 2011 02:22:37 +0000 (UTC) Received: by qwb8 with SMTP id 8so609231qwb.11 for ; Wed, 20 Jul 2011 19:22:37 -0700 (PDT) Received: by 10.229.68.200 with SMTP id w8mr8204543qci.114.1311214957455; Wed, 20 Jul 2011 19:22:37 -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 hl14cs128357qcb; Wed, 20 Jul 2011 19:22:36 -0700 (PDT) Received: by 10.236.137.131 with SMTP id y3mr11247632yhi.503.1311214956373; Wed, 20 Jul 2011 19:22:36 -0700 (PDT) Received: from mail-gw0-f50.google.com (mail-gw0-f50.google.com [74.125.83.50]) by mx.google.com with ESMTPS id u61si2910453yhm.106.2011.07.20.19.22.35 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jul 2011 19:22:36 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.50 is neither permitted nor denied by best guess record for domain of ricardo.salveti@linaro.org) client-ip=74.125.83.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.50 is neither permitted nor denied by best guess record for domain of ricardo.salveti@linaro.org) smtp.mail=ricardo.salveti@linaro.org Received: by gwj16 with SMTP id 16so885447gwj.37 for ; Wed, 20 Jul 2011 19:22:35 -0700 (PDT) Received: by 10.236.195.6 with SMTP id o6mr12098363yhn.18.1311214955566; Wed, 20 Jul 2011 19:22:35 -0700 (PDT) Received: from localhost.localdomain ([201.82.65.93]) by mx.google.com with ESMTPS id c69sm788446yhm.43.2011.07.20.19.22.32 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jul 2011 19:22:33 -0700 (PDT) From: ricardo.salveti@linaro.org To: 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:22:13 -0300 Message-Id: <1311214933-2982-1-git-send-email-x-loader@googlegroups.com> X-Mailer: git-send-email 1.7.4.1 From: Ricardo Salveti de Araujo 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);