From patchwork Thu Oct 14 18:22:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 253861 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9EIMnxu031796 for ; Thu, 14 Oct 2010 18:22:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755899Ab0JNSWr (ORCPT ); Thu, 14 Oct 2010 14:22:47 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:33183 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755890Ab0JNSWq (ORCPT ); Thu, 14 Oct 2010 14:22:46 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o9EIMfRj015690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Oct 2010 13:22:44 -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 o9EIMaV5024796; Thu, 14 Oct 2010 23:52:37 +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 o9EIMa9g025427; Thu, 14 Oct 2010 23:52:36 +0530 Received: (from a0131687@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id o9EIMZJ9025425; Thu, 14 Oct 2010 23:52:35 +0530 From: Rajendra Nayak To: linux-omap@vger.kernel.org Cc: Rajendra Nayak , Paul Walmsley , Benoit Cousson , Santosh Shilimkar , Kevin Hilman Subject: [PATCH] OMAP: hmwod: Update the sysc_cache in case module context is lost Date: Thu, 14 Oct 2010 23:52:35 +0530 Message-Id: <1287080555-25399-1-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.5.6.6 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 14 Oct 2010 18:22:49 +0000 (UTC) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index cb911d7..e57fe21 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -115,7 +115,10 @@ static void _write_sysconfig(u32 v, struct omap_hwmod *oh) /* XXX ensure module interface clock is up */ - if (oh->_sysc_cache != v) { + if ((oh->_sysc_cache != v) || + /* Did the module go to off and loose context? */ + (oh->_sysc_cache != + omap_hwmod_readl(oh, oh->class->sysc->sysc_offs))) { oh->_sysc_cache = v; omap_hwmod_writel(v, oh, oh->class->sysc->sysc_offs); }