From patchwork Fri Aug 28 07:24:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 44397 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7S7PA2l005453 for ; Fri, 28 Aug 2009 07:25:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbZH1HZE (ORCPT ); Fri, 28 Aug 2009 03:25:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752049AbZH1HZE (ORCPT ); Fri, 28 Aug 2009 03:25:04 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:58408 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752002AbZH1HZD (ORCPT ); Fri, 28 Aug 2009 03:25:03 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n7S7Owvg016271 for ; Fri, 28 Aug 2009 02:25:04 -0500 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id n7S7OvqG007794; Fri, 28 Aug 2009 12:54:57 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id n7S7OvOR013644; Fri, 28 Aug 2009 12:54:57 +0530 Received: (from a0393109@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id n7S7OvZa013642; Fri, 28 Aug 2009 12:54:57 +0530 From: Thara Gopinath To: linux-omap@vger.kernel.org Cc: Thara Gopinath Subject: [PATCH V2] OMAP3: PM: Fix for MPU power domain MEM BANK position Date: Fri, 28 Aug 2009 12:54:57 +0530 Message-Id: <1251444297-13577-1-git-send-email-thara@ti.com> X-Mailer: git-send-email 1.5.5 In-Reply-To: References: Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org MPU power domain bank 0 bits are displayed in position of bank 1 in PWRSTS and PREPWRSTS registers. So read them from correct position Signed-off-by: Thara Gopinath --- Patch refresh issue. arch/arm/mach-omap2/powerdomain.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 2594cbf..6c5fee9 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -971,6 +971,16 @@ int pwrdm_read_mem_pwrst(struct powerdomain *pwrdm, u8 bank) return -EEXIST; /* + * In 3430, for MPU domain bank 0 status bits + * are displayed in the position of bank1 status bits + * in PWST . So the hack. Think of a cleaner + * way of doing this + */ + if (cpu_is_omap34xx()) + if (!strcmp("mpu_pwrdm", pwrdm->name)) + bank = 1; + + /* * The register bit names below may not correspond to the * actual names of the bits in each powerdomain's register, * but the type of value returned is the same for each @@ -1018,6 +1028,15 @@ int pwrdm_read_prev_mem_pwrst(struct powerdomain *pwrdm, u8 bank) return -EEXIST; /* + * In 3430, for MPU domain bank 0 status bits + * are displayed in the position of bank1 status bits + * in PREPWST . So the hack. Think of a cleaner + * way of doing this + */ + if (cpu_is_omap34xx()) + if (!strcmp("mpu_pwrdm", pwrdm->name)) + bank = 1; + /* * The register bit names below may not correspond to the * actual names of the bits in each powerdomain's register, * but the type of value returned is the same for each